// JavaScript Document
    var hidesec = 100; // 0.1 Sec
    var enableAutoHide = false;
	
    // code for IE  
    function actionMenu(menuindex, status){
	   	var ParentMenu = document.getElementById(menuindex);
		var PopupMenu = document.getElementById('submenu');
		if(status == "visible"){
		PopupMenu.style.visibility = status;
		if (PopupMenu.style.pixelLeft) PopupMenu.style.pixelLeft = Find_OffsetX(ParentMenu);
		else PopupMenu.style.left = Find_OffsetX(ParentMenu)+"px";
		if (PopupMenu.style.pixelTop) PopupMenu.style.pixelTop = Find_OffsetY(ParentMenu)+ParentMenu.offsetHeight+1;
		else PopupMenu.style.top = Find_OffsetY(ParentMenu)+ParentMenu.offsetHeight+1+"px";
		
		}else{
		  enableAutoHide = true;
		   setTimeout("autoHide(document.getElementById('submenu'))", hidesec);
		}
    }
    
    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));
		}
