function display(state, img)	//Rolls image based on explicit state and current image
	{
	var s,loc;
	if((loc=(s=new String(img.src)).lastIndexOf('.'))<0)return true;
	switch (state+s.toLowerCase().substring(loc-2,loc))
		{
		case "true_0"  :img.src=s.substring(0,loc-2)+'_1'+s.substring(loc,s.length);break;
		case "false_1" :img.src=s.substring(0,loc-2)+'_0'+s.substring(loc,s.length);break;
		}
	return true;
	}

function roll(e, img)		//Rolls image based on event state and current image
	{
//		alert (e.type  + ' ' + img);
	switch (e.type)
		{
		case "mouseover":return display(true, img);break;
		case "mouseout" :return display(false,img);break;
		}
		
	return true;
	}

function loadroll()		//Loads all rollover images in background
	{
	var src,loc,dex;
	for (dex=0;dex<document.images.length;dex++)
		{
		src=new String(document.images[dex].src);
		if((loc=src.lastIndexOf('.'))<0)return true;
		if(src.toLowerCase().substring(loc-2,loc)=='_0')
			{
			// No need to preload the first one, it's already in the doc
			//(new Image()).src=src.substring(0,loc-2)+'_0'+src.substring(loc,src.length);
			(new Image()).src=src.substring(0,loc-2)+'_1'+src.substring(loc,src.length);

			}
		}
	return true;
	}
