var myimages=new Array()
function populateImages()
{
	for (i=0;i<populateImages.arguments.length;i++)
	{
		myimages[i]=new Image();
		myimages[i].src=populateImages.arguments[i];
	}

}
function preloadimages()
{
	populateImages("../../federal-mogul/images/navtop/home_f2.gif",
					"../../federal-mogul/images/navtop/products_f2.gif",
					"../../federal-mogul/images/navtop/brands_f2.gif",
					"../../federal-mogul/images/navtop/media_f2.gif",
					"../../federal-mogul/images/navtop/careers_f2.gif",
					"../../federal-mogul/images/navtop/locations_f2.gif",
					"../../federal-mogul/images/navtop/suppliers_f2.gif",
					"../../federal-mogul/images/navtop/company_f2.gif",
					"../../federal-mogul/images/navtop/oe_f2.gif",
					"../../federal-mogul/images/navtop/aftermarket_f2.gif",
					"../../federal-mogul/images/navtop/investors_f2.gif");
					
}

preloadimages();
function callProductSelector()
{

alert("You have selected Products");

}
function callBrandsSelector()
{
alert("You have selected Brands");

}

function txtSearchFun()
{
	if (txtSearch.value=="")
	{
	txtSearch.value="Click to Search";
	}
}

function left_nav_orange(obj)
{
	alert(obj.id)
	obj.style.add("class:Left-Nav-Main-Orange")
}

function left_nav_blue(obj)
{
	obj.style.add("class:Left-Nav-Main-Blue")
}
function changeVal(obj)
{
	if (obj.value=="** Type the new record here **")
	{
		obj.value="";
	}

} 
function setButtonCss(objfrm)
{
 for(i=0; i<objfrm.length; i++) 
  { 
	//To change the font after the Page is generated 
	if(objfrm.elements[i].type=="submit") 
	{ 
	objfrm.elements[i].style.fontFamily= "verdana"; 
	objfrm.elements[i].style.fontSize= "12px"; 
	} 
  } 
}
var data1;
function clearClipboard(obj)
{
	data1=window.clipboardData.getData("Text");
	window.clipboardData.clearData();
}
function restoreClipboard()
{
	if (data1)
		window.clipboardData.setData("Text",data1);
}

function changeFrameHeight()
{
	var iframeobj=parent.document.getElementById("product_selector_iframe")
	var productDIVobj=parent.document.getElementById("product_brand_selector")
	var iframeBrand=parent.document.getElementById("Brand_selector_div_iframe")
	var brandDIVobj=parent.document.getElementById("Brand_selector_div")
	var productDIV=parent.document.getElementById("Product_Selector1_prod_selector_DIV")
	var productShadow=parent.document.getElementById("Prod_Shadow")
	var BrandDIV=parent.document.getElementById("BrandDIV")
	var BrandShadow=parent.document.getElementById("Brand_Shadow")
	var tblMain=parent.document.getElementById("tblMain")

	
	if (iframeobj!=null && productDIV!=null && productShadow!=null)
	{
		iframeobj.height=productDIV.clientHeight+productShadow.clientHeight +2;
		iframeobj.width=productDIV.clientWidth;
		//productDIV.width=tblMain.clientWidth;
		//iframeobj.width=800;
		productShadow.style["top"]=productDIV.clientHeight+2;
		//alert(tblMain.clientWidth);
	}
	if (iframeBrand!=null && BrandDIV!=null && BrandShadow!=null)
	{
		iframeBrand.height=BrandDIV.clientHeight+BrandShadow.clientHeight+2;
		iframeBrand.width=BrandDIV.clientWidth;
		BrandShadow.style["top"]=BrandDIV.clientHeight+2;
	}	
}

function trim(str)
{
   return str.replace(/^\s*|\s*$/g,"");
}