/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com

/* -----------------------------------------------
  Image Preloader - v.1.1
  (c) 2007 http://www.haan.net
  You may use this script but please leave the credits on top intact.
  Please inform us of any improvements made.
  When useful, we will add your credits.
------------------------------------------------ */

function preload() {
 	var brochure = new Array();
 	var pics = preload.arguments;
 	var dir = '/images/img/img_' // path to images
 	for (i=0;i<pics.length;i++) {
  		brochure[i] = new Image();
  		brochure[i].src = dir + pics[i] + ''; // change file extension, if necessary.
 		// uncomment next line for testing; click OK to continue loop and cancel to break
 		// if(!confirm(brochure[i].src)) break;
 	}
}

// call the function with the list of images (unique part of names)

// Multiple onload function created by: Simon Willison
// http://simon.incutio.com/archive/2004/05/26/addLoadEvent
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
 	preload('pic's/1','pic's/2','pic's/3','pic's/4','pic's/5','pic's/6','pic's/7','pic's/8','pic's/9',
'pic's/10','pic's/11','pic's/12','pic's/13','pic's/14','pic's/15','pic's/16','pic's/17','pic's/18',
'pic's/19','pic's/20','pic's/21','pic's/22','pic's/23','pic's/24','pic's/25','pic's/26','pic's/27',
'pic's/28','pic's/29','pic's/30','pic's/31');
});
