function preload(img, on)
{
	off = img.src;
	offfull = img.src;
	onfull = on;
	path = off.substring(0,off.lastIndexOf('/')+1); 
	onfull = path + onfull;
	//alert(onfull);
	if(off.lastIndexOf('/') != -1) // if there is a path, strip it
		{
			 off = off.substring(off.lastIndexOf('/')+1);
		}
	if(on.lastIndexOf('/') != -1) // if there is a path, strip it
		{
			 on = on.substring(on.lastIndexOf('/')+1);
		}
	if(on != off)
		{		  
      off_ex = off.substring(off.lastIndexOf('.')) // extract extension     
			off = off.substring(0,off.lastIndexOf('.')); //strip extension	       		
      on_ex = on.substring(on.lastIndexOf('.')) // extract extension     
			on = on.substring(0,on.lastIndexOf('.')); //strip extension			      		
			eval(off + " = new Image(); ");						 
			eval(off + ".src = '" + offfull +"'");			
			eval(on + " = new Image(); ");			
			eval(on + ".src = '" + onfull +"'");
			var image_on = eval(on + ".src");
			var image_off = eval(off + ".src");
			img.onmouseover = function() { img.src = image_on;}
			img.onmouseout = function() { img.src = image_off;}
		}
}
function open_panel(id)
{
	document.getElementById('service_panel').style.display = "none";
	document.getElementById('voice').style.display = "none";
	document.getElementById('self_service').style.display = "none";
	document.getElementById('inventory').style.display = "none";
	
		
	
	document.getElementById(id).style.display = "block";
	switch(id)
	{
		case "service_panel":
			document.getElementById("learn_more_link").href = "/detail.aspx?id=5485";
			break;
		case "voice":
			document.getElementById("learn_more_link").href = "/detail.aspx?id=5486";
			break;
		case "self_service":
			document.getElementById("learn_more_link").href = "/detail.aspx?id=5488";
			break;
		case "inventory":
			document.getElementById("learn_more_link").href = "/detail.aspx?id=5487";
			break;
		default: 						
			document.getElementById("learn_more_link").href = "/detail.aspx?id=5485";
			break;
	}
}

//frontrange corporate homepage flash js  		
function insertMovie(src, width, height)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'"  >');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+src+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<embed src="'+src+'" wmode="transparent" quality="high" bgcolor="#ffffff" width="'+width+'" height="'+height+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function InsertFlashMovieHEAT()
{
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="955" height="274"><param name="movie" value="/common/Files/Xtra_Sites/HEAT/heat_header_01.swf"><param name="quality" value="high"><EMBED SRC="flash/heat_header_01.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="955" height="274" WMODE="TRANSPARENT" MENU="FALSE" BGCOLOR="WHITE"></EMBED></object>');
}

function expand(divID){
	img = document.getElementById("expand_" + divID);
	img.src = img.src.substr(img.src.lastIndexOf("/")+1) == "expand_plus.gif" ? "common/Images/Xtra_Sites/HEAT/expand_minus.gif" : "common/Images/Xtra_Sites/HEAT/expand_plus.gif";
	box = document.getElementById(divID);
	box.style.display = box.style.display == "none" ? "block" : "none";
}

function compare_expand(divID){
	img = document.getElementById("expand_" + divID + "1");
	img.src = img.src.substr(img.src.lastIndexOf("/")+1) == "expand_plus.gif" ? "common/Images/Xtra_Sites/HEAT/expand_minus.gif" : "common/Images/Xtra_Sites/HEAT/expand_plus.gif";
	box = document.getElementById(divID + "1");
	box.style.display = box.style.display == "none" ? "block" : "none";
	
	img = document.getElementById("expand_" + divID + "2");
	img.src = img.src.substr(img.src.lastIndexOf("/")+1) == "expand_plus.gif" ? "common/Images/Xtra_Sites/HEAT/expand_minus.gif" : "common/Images/Xtra_Sites/HEAT/expand_plus.gif";
	box = document.getElementById(divID + "2");
	box.style.display = box.style.display == "none" ? "block" : "none";
	
	img = document.getElementById("expand_" + divID + "3");
	img.src = img.src.substr(img.src.lastIndexOf("/")+1) == "expand_plus.gif" ? "common/Images/Xtra_Sites/HEAT/expand_minus.gif" : "common/Images/Xtra_Sites/HEAT/expand_plus.gif";
	box = document.getElementById(divID + "3");
	box.style.display = box.style.display == "none" ? "block" : "none";
	
	img = document.getElementById("expand_" + divID + "4");
	img.src = img.src.substr(img.src.lastIndexOf("/")+1) == "expand_plus.gif" ? "common/Images/Xtra_Sites/HEAT/expand_minus.gif" : "common/Images/Xtra_Sites/HEAT/expand_plus.gif";
	box = document.getElementById(divID + "4");
	box.style.display = box.style.display == "none" ? "block" : "none";
}

function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

function MM_openBrWindow2(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

