<!--
menu_status = new Array();

var iTimer;
var calcHeight;

function showmenu(idd, idd1){
    if(document.getElementById("mymenu5hf").value=="")
    {
    }else{
	if (idd!="all_del")
	{
    showmenu1('all', 'all');
    if ((idd=="all") || (idd!=idd1))
    {
    	if (document.getElementById){
	    	var menuids=["mymenu1","mymenu2","mymenu3","mymenu4","mymenu5"];

		    if (idd=="all")
			{
                function hidemenus(){ //Internal function
					    for (var i=0; i<menuids.length; i++){
					        //fade(menuids[i]);
			    			obj = document.getElementById(menuids[i]);
				    	    if (menuids[i]!=idd1)
					        {			
						        obj.style.display = "none";
			                }
					    }                    
                }
                setTimeout(hidemenus, 500);
			}

		for (var i=0; i<menuids.length; i++){
			obj = document.getElementById(menuids[i]);
			obj11 = document.getElementById(menuids[i]+"hf");
		    	var getheight = obj.style.height;
			var getheight11 = obj11.value;
			if (getheight < getheight11)obj.style.display = "none";
		}


    		if (idd!="all")
	    	{
    			//obj = document.getElementById(idd);
	    		//obj.style.display = "";
                	//appear(idd);
			//alert(obj.offsetHeight);
                	slide(idd);
		}
	    }
    }
	}
	}	
}

function calculateheight(){
	var menuids=["mymenu1","mymenu2","mymenu3","mymenu4","mymenu5"];
	for (var i=0; i<menuids.length; i++){
		obj = document.getElementById(menuids[i]);
		obj.style.display = '';
		var getheight = obj.offsetHeight;
		//alert(getheight);
		obj.style.display = 'none';
		document.getElementById(menuids[i]+"hf").value=getheight;
	}
}

function showmenu_workingsuddenly(idd, idd1){
    showmenu1('all', 'all');
    if ((idd=="all") || (idd!=idd1))
    {
    	if (document.getElementById){
	    	var menuids=["mymenu1","mymenu2","mymenu3","mymenu4","mymenu5"];

		    for (var i=0; i<menuids.length; i++){
		        //fade(menuids[i]);
    			obj = document.getElementById(menuids[i]);
	    	    if (menuids[i]!=idd1)
		        {			
			        obj.style.display = "none";
                }
		    }

    		if (idd!="all")
	    	{
    			//obj = document.getElementById(idd);
	    		//obj.style.display = "";
                	//appear(idd);
			//alert(obj.offsetHeight);
                	slide(idd);
		}
	    }
    }
}

function showmenu1(idd, idd1){
/**
    if ((idd=="all") || (idd!=idd1))
    {
    	if (document.getElementById){
	    	var menuids=["mysmenu1", "mysmenu2"];

		    for (var i=0; i<menuids.length; i++){
		        //fade(menuids[i]);
    			obj = document.getElementById(menuids[i]);
	    	    if (menuids[i]!=idd1)
		        {
			        obj.style.display = "none";
                }
		    }

    		if (idd!="all")
	    	{
    			obj = document.getElementById(idd+"tr");
	    		obj.style.display = "";
		    	appear(idd);
		    }
	    }
    }
**/
}


function isMouseLeaveOrEnter(e, handler)
{	
	if (e.type != 'mouseout' && e.type != 'mouseover') return false;
	var reltg = e.relatedTarget ? e.relatedTarget :
	e.type == 'mouseout' ? e.toElement : e.fromElement;
	while (reltg && reltg != handler) reltg = reltg.parentNode;
	return (reltg != handler);
}

function setOpacity(domId, val) {
	obj = document.getElementById(domId);
	obj.style.MozOpacity = val;
	obj.style.opacity = val/10;
	obj.style.filter = 'alpha(opacity=' + val*10 + ')';
};



function appear(domId){
    obj = document.getElementById(domId); //Get the element

    if(obj.style.display != "none") return false; //Return if it is already being displayed

    obj.style.display = ''; //Un-hide the object before its animation
    //var alpha = 0; //Set the initial value of alpha to 0 (invisible)
    var alpha = 2; //Set the initial value of alpha to 0 (invisible)    

    function a(){ //Internal function
    alpha++; //Increment alpha

    setOpacity(domId, alpha); //Set the opacity of our element to the specified alpha
    if(alpha < 11)setTimeout(a, 100);

    /*Till alpha is 10, keep calling the
    a() function after 100 milliseconds */
    }
    setTimeout(a, 100); //This is where we call the a() function for the first time

}

function fade(domId){
    obj = document.getElementById(domId); //Get the Element

    if(obj.style.display == "none") return false; //Return false if the element is already hidden

    var alpha = 10; //Set the initial value of alpha to 10 (Opaque)
    function f(){ //Internal function

    alpha--; //Decrement the alpha value
    setOpacity(domId, alpha); //Set the opacity of our element to the specified alpha

    if(alpha > -1){ //If alpha is still bigger than -1 then..
    setTimeout(f, 100); //..then call the function again after 100 milliseconds

    }else{ //otherwise..
    obj.style.display = 'none'; //..otherwise now that we cant see the element anyways, hide it

    }
    }
    setTimeout(f, 100); //This is where we call the f() function for the first time
}

function slide(domId){
    obj = document.getElementById(domId); //Get the element
    obj11 = document.getElementById(domId+"hf"); //Get the element

    //if(obj.style.display != "none") return false; //Return if it is already being displayed

    if (obj.style.display == "none")
	{
		    obj.style.display = '';
		    //obj.style.display = "block";

		    //var getheight = obj.offsetHeight;
		    //var getheight = "100";
		    var getheight = obj11.value;
		    var heightvar = 0;
		    obj.style.height = "1px";
		    //alert(getheight);

		    function d(){
			    //heightvar++;
			    //heightvar += 20;
			    heightvar += 3;
			    if (heightvar>getheight)heightvar=getheight;
			    obj.style.height = parseInt(heightvar) + "px";
			    if(parseInt(heightvar) < parseInt(getheight))setTimeout(d, 1);
		    }
		    setTimeout(d, 1);
	}else{
		    obj.style.display = 'none';
		    obj.style.height = "0px";
	}
}

//-->