//Get the images preloaded into the browser's cache.
var bugImage = new Array(); // don't change this
bugImage[1] = "/Common/images/sparklebg.gif";
bugImage[2] = "/Common/images/sparklebg_sm.gif";
bugImage[3] = "";

var HowBugNonHoverClass;

var OldStatus = "";

//This code will set the background image of the passed in element to the sparkle bug
function ShowBug(WhatElement) {
	//alert('mousedover');
	WhatElement.style.backgroundImage="url(" + bugImage[1] + ")";
	//alert("url(" + bugImage[1] + ")");
}

//This code will set the background image of the passed in element to the SMALL sparkle bug
function ShowSmallBug(WhatElement) {
	//alert('mousedover');
	WhatElement.style.backgroundImage="url(" + bugImage[2] + ")";
	//WhatElement.style.backgroundRepeat="no-repeat";
}

//This code will set the background image of the passed in element to the sparkle bug
function NoBug(WhatElement)
{
	//alert('mousedover');
	WhatElement.style.backgroundImage="url(" + bugImage[3] + ")";
}

//This function sets the background color of the passed in element to the passed in color.
function changeElementBackColor(ElementID,WhatColor)
{
	document.getElementById(ElementID).style.backgroundColor = WhatColor;
}

//This function changes the class for the How to Buy Bug in the left nav so that the highlight color shows.
function changeHow2BuyClass(HowBugBlock_ElName){
	//Store the current class of the How 2 Buy bug block in a page level variable.
	HowBugNonHoverClass = document.getElementById(HowBugBlock_ElName).className.toString();
	
	//Change the class to the hover class
	document.getElementById(HowBugBlock_ElName).className="howbug_blk_hover";
}

//This function changes the class for the How to Buy bug in the left nav back to it's original class.
function resetHow2BuyClass(HowBugBlock_ElName) {
	//Reset the class of the How 2 Buy bug block back to the value stored in the page level variable.
	//alert(HowBugNonHoverClass.toString());
	document.getElementById(HowBugBlock_ElName).className=HowBugNonHoverClass;
}