<!--// **************************************// "self-configuring" Rollovers v 1.02// Urs Nyffenegger, 30/3/00// private@snyffi.ch// -------------------------------------// License:// you can use the code as long as you// pass the information above with it.// ------------------------------------//// How it works:// All you have to do is to give the image// a name with the NAME atrribut.// The Filename needs to have this name plus// the on (_1) and off (_0) state.// Then ad this to the BODY Tag:// onload="preloadImages();"//// Then add the <a href> tag with onmouseover// and onmouseout parameters. You can rollover// more than one picture by simply using more// than one picture name in the function request.//// You're done!//// Example: // <a href="#" onmouseover="msover('start');" onmouseout="msout('start');"><img src="start_0.gif" name="start"></a>//// ************************************** 	xImageOn = new Array();	xImageOff = new Array();// check which images to load function preloadImages() {	if(document.images)	{		var xPicts = document.images.length;		for (i=0; i < xPicts; i++)		{			if(document.images[i].name)			{								xName =	document.images[i].name;				xPath =	document.images[i].src;				xTyp =	xPath.substring(xPath.lastIndexOf('.'), xPath.length);				xPath =	xPath.substring(0, xPath.lastIndexOf('/'));				xPath = xPath + "/" + xName;									xx = document.images[i].width;				xy = document.images[i].height;					 		onloader(xName, xPath, xx, xy, xTyp);		 		offloader(xName, xPath, xx, xy, xTyp);  			}							}	}}function onloader(xObj, xURL, xx, xy, xTyp){  	xImageOn[xObj] = new Image(xx, xy);  	xImageOn[xObj].src = xURL + "_1" + xTyp;}function offloader(xObj, xURL, xx, xy, xTyp){	xImageOff[xObj] = new Image(xx,xy);  	xImageOff[xObj].src = xURL + "_0"+ xTyp;  					}function msover(){	if(document.images)	{		for (i=0; i < msover.arguments.length; i++)		{			var xName = msover.arguments[i];			if(xImageOn[xName])			{				document.images[xName].src = xImageOn[xName].src;			}		}	}}function msout(){	if(document.images)	{		for (i=0; i < msout.arguments.length; i++)		{			var xName = msout.arguments[i];			if(xImageOff[xName])			{				document.images[xName].src = xImageOff[xName].src;			}			}	}}//-->