// JavaScript Document
    var hidesec = 100; // 0.1 Sec
    var enableAutoHide = false;
    // code for IE  
    function actionMenu(menuindex, status){
	    var countmenu = 5;
	    for(i=1; i <= countmenu; i++){
		    if(i == menuindex){
			    if(status == "visible"){
			        var ParentMenu = document.getElementById("Menu"+i);
			        var PopupMenu = document.getElementById("Layer"+i);
			        PopupMenu.style.visibility = status;
					ParentMenu.style.backgroundImage = ("url('/images/bgmenu"+i+".gif')");
			        if (PopupMenu.style.pixelLeft) PopupMenu.style.pixelLeft = Find_OffsetX(ParentMenu)+2;
			        else PopupMenu.style.left = Find_OffsetX(ParentMenu)+2+"px";
			        if (PopupMenu.style.pixelTop) PopupMenu.style.pixelTop = Find_OffsetY(ParentMenu)+ParentMenu.offsetHeight+0;
			        else PopupMenu.style.top = Find_OffsetY(ParentMenu)+ParentMenu.offsetHeight+0+"px";
//			        alert(Find_OffsetX(ParentMenu));
//			        alert(Find_OffsetY(ParentMenu));
					//alert('visible');

			    }else{
					
					var ParentMenu = document.getElementById("Menu"+i);
					var url= location.href;
					ParentMenu.style.backgroundImage = ("url('../images/bg-arrow.html')");
				    enableAutoHide = true;
					if(url.indexOf('index.aspx') > -1)
						autoHide(document.getElementById("Layer"+i))
				    setTimeout("autoHide(document.getElementById(\"Layer"+i+"\"))", hidesec);
					//alert('hidden');
			    }
		    }
	    }
    }
    
    function Find_OffsetX(object) {
        if (object!=null) 
            return object.offsetLeft + Find_OffsetX(object.offsetParent);
        else
            return 0;
    }

    function Find_OffsetY(object) {
        if (object!=null) 
            return object.offsetTop + Find_OffsetY(object.offsetParent);
        else
            return 0;
    }

    function autoHide(obj){
	    if(enableAutoHide)
		    obj.style.visibility = "hidden";
    }

    var tmpColor;
    function inCell(obj, color){
	    tmpColor = obj.style.backgroundColor;
	    obj.style.backgroundColor = color;
    }

    function outCell(obj, color){
	    obj.style.backgroundColor = tmpColor;
    }

    function keepStatus(obj, status){
	    enableAutoHide = false;
	    obj.style.visibility = status;
    }
	function PopUp(url)
	{
		var width=550;
		var height=500;
		window.open(url ,"","width="+width+",scrollbars=yes, height="+height+",top="+((screen.height-height)/2)+",left="+((screen.width-width)/2));
		}
	
function SwapImage(imageId, imageUrl)
	{
		//alert('swap');
		var id = document.getElementById(imageId);
		id.src = imageUrl;
	}


