// Image Preloader  v1.0
// http://www.dithered.com/javascript/image_preloader/index.html
// code by Chris Nott (chris@NOSPAMdithered.com - remove NOSPAM)

/*

 Add the following code to the document you want to use the script in 
 (before any calls to the Array methods defined in the script):

<script language="javascript" src="image_preloader.js"></script>

If the image_preloader.js file is in a different directory than the html document, 
be sure to include the relative path to the Javascript file in the src attribute value.


Add an onload event handler to your <body> tag that reads onload="preloadImages();". 
If your <body> tag already has an onload event handler, append preloadImages(); 
to the current value (be sure to add a ; to the end of the current value if there isn't one already).

Between the parentheses in the event handler, add the names of the image files as a quoted, 
comma-separated list. The file names must be valid relative or full urls. 
For instance, if you wish to preload two images called sample1.gif and sample2.gif 
both of which are in a directory named images, the event handler should read:

onload="preloadImages('images/sample1.gif', 'images/sample2.gif');"

=====> Anmerkung: onload kann auch im IMG-Tag eingesetzt werden!
*/

 
function preloadImages() {
	document.preload = new Array();
	if (document.images) {
		for (var i = 0; i < preloadImages.arguments.length; i++) {
			document.preload[i] = new Image();
			document.preload[i].src = preloadImages.arguments[i];
		}
	}
}