function preloadImages() {

	if(document.images)
	{
		/* Make sure imageList doesn't already exist or we'll overwrite what is already in there
		 * as this function may be called multiple times throughout a single page.
		 */
		if(!document.imageList)
		{ 
			document.imageList = new Array();
		}
		
		var i;
		var j = document.imageList.length;
		var argList = preloadImages.arguments;
		
		for(i = 0; i < argList.length; i++)
		{
			if (argList[i].indexOf("#") != 0)
			{
				document.imageList[j] = new Image;
				document.imageList[j].src = argList[i];
				j++;
			}
		}
	}
}

// preload images
function pli() {
	if (document.images) {
		imgButtonHomeOn = new Image();
		imgButtonHomeOn.src = "images/button_home_on.gif";
		imgButtonHomeOff = new Image();
		imgButtonHomeOff.src = "images/button_home_off.gif";
		imgButtonAboutOn = new Image();
		imgButtonAboutOn.src = "images/button_about_on.gif";
		imgButtonAboutOff = new Image();
		imgButtonAboutOff.src = "images/button_about_off.gif";
		imgButtonServicesOn = new Image();
		imgButtonServicesOn.src = "images/button_services_on.gif";
		imgButtonServicesOff = new Image();
		imgButtonServicesOff.src = "images/button_services_off.gif";
		imgButtonSearchOn = new Image();
		imgButtonSearchOn.src = "images/button_search_on.gif";
		imgButtonSearchOff = new Image();
		imgButtonSearchOff.src = "images/button_search_off.gif";
		imgButtonContactOn = new Image();
		imgButtonContactOn.src = "images/button_contact_on.gif";
		imgButtonContactOff = new Image();
		imgButtonContactOff.src = "images/button_contact_off.gif";
	}
}

function buttondown( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "On.src" );
    }
}

function buttonup ( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "Off.src" );
    }
}

