//Top Menu
navHover = function() {
    try{
	    var lis = document.getElementById("navmenu-h").getElementsByTagName("LI");
	    for (var i = 0; i < lis.length; i++) {
	        lis[i].onmouseover = function() {
	            this.className += " iehover";
	        }
	        lis[i].onmouseout = function() {
	            this.className = this.className.replace(new RegExp(" iehover\\b"), "");
	        }
	    }
    }
    catch (e){}
}
if (window.attachEvent) window.attachEvent("onload", navHover);

//Left Menu

navHover = function() {
	try{
	    var lis = document.getElementById("navmenu-v").getElementsByTagName("LI");
	    for (var i = 0; i < lis.length; i++) {
	        lis[i].onmouseover = function() {
	            this.className += " iehover";
	        }
	        lis[i].onmouseout = function() {
	            this.className = this.className.replace(new RegExp(" iehover\\b"), "");
	        }
	    }
    }
    catch (e){}

}
if (window.attachEvent) window.attachEvent("onload", navHover);

function selectBg(idName){
    var obj=document.getElementById(idName);
    obj.style.backgroundImage="url(/_layouts/IMAGES/Instore/masterPage/o_"+idName+".gif)";
}
function OutBg(idName){
    // delay closing the popup
    delay();
    
    var obj=document.getElementById(idName);
    obj.style.backgroundImage="url(/_layouts/IMAGES/Instore/masterPage/n_"+idName+".gif)";
}

// executes a delay/sleep for 40seconds
function delay()
{
    sleep(40);
}

// timer delay
function sleep(i)
{
    var start = new Date().getTime();
    while (new Date().getTime() < start + i);
}

