/* *********************************************
*
*	© 2001 Tadpole Technologies
*	Andrea Gruebele <gruebele@tadpoletech.net>
*	Menu Rollover
*
************************************************ */

function PreloadTopMenu() 
{
	if (!document.images) return;
	
	// Top menu
	PreloadImage("home", "/images/common/topStrip/home_out.jpg", "/images/common/topStrip/about_in.jpg");
	PreloadImage("ordering", "/images/common/topStrip/ordering_out.jpg", "/images/common/topStrip/ordering_in.jpg");
	PreloadImage("resources", "/images/common/topStrip/resources_out.jpg", "/images/common/topStrip/resources_in.jpg");
	PreloadImage("news", "/images/common/topStrip/news_out.jpg", "/images/common/topStrip/news_in.jpg");
	PreloadImage("distributors", "/images/common/topStrip/distributors_out.jpg", "/images/common/topStrip/distributors_in.jpg");
	PreloadImage("company", "/images/common/topStrip/company_out.jpg", "/images/common/topStrip/company_in.jpg");
	PreloadImage("contact", "/images/common/topStrip/contact_out.jpg", "/images/common/topStrip/contact_in.jpg");
}

function PreloadIAS()
{
	if (!document.images) return;
	
	PreloadImage("IAS", "/images/home/IAS_out.gif", "/images/home/IAS_in.gif");
} 

function PreloadQuote()
{
	if (!document.images) return;
	
	PreloadImage("quote", "/images/common/leftStrip/quote_out.gif", "/images/common/leftStrip/quote_in.gif");
} 


function PreloadImage(imgName, loadOut, loadOver) 
{
	if (!document.images) return;
	eval(imgName + '_in			= new Image()');
	eval(imgName + '_in.src		= "' + loadOver + '"');
	eval(imgName + '_out		= new Image()');
	eval(imgName + '_out.src	= "' + loadOut + '"');
}
	

function Swap(imgName, swapType) 
{
	if (!document.images) return;

	var imageObj;
	imageObj		= getImgObject(imgName); // Get image object name
	imageObj.src	= eval(imgName + '_' + swapType + '.src'); //Set new target src for image object
}


function getImgObject(imgName) 
{
	// Get image object name
		if (document.all) return eval('document.all.' + imgName);			// IE
		if (document.images[imgName]) return document.images[imgName];		// W3C, NN
		return null;
}



