function activateMenu(nav) {

/* currentStyle restricts the Javascript to IE only */
	if(document.getElementById(nav))
	{
	
	if (document.all &&
 document.getElementById(nav).currentStyle) {  
        var navroot = document.getElementById(nav);
        
        navroot.style.zIndex=10000;
	//alert(navroot.style.zIndex);
	/* Get all the list items within the menu */

        var lis=navroot.getElementsByTagName("LI"); 
		
        for (i=0; i<lis.length; i++) {
       		
           /* If the LI has another menu level */
            if(lis[i].lastChild.tagName=="UL"){
            
           /* assign the function to the LI */
             	lis[i].lastChild.style.zIndex=10000;
		lis[i].onmouseover=function() {	
                
                   /* display the inner menu */
                   this.lastChild.style.display="block";
		    this.lastChild.style.zIndex=10000;
		    //alert(this.lastChild.style.zIndex);   
                }
                lis[i].onmouseout=function() {   
                   this.lastChild.style.display="none";
            	}
            }
        }
    }
	}
}

window.onload= function(){
    activateMenu('menu'); 
}

function schimbaPoza(img_name,img_old_name) 
{
	var browser=navigator.appName
	var b_version=navigator.appVersion
	var version=parseFloat(b_version)
	if (browser=="Microsoft Internet Explorer")
	{
		var old_src = document[img_old_name].src;
		document[img_old_name].src=document[img_name].src;
		var name_x = document[img_old_name].name;
		document[img_old_name].name=document[img_name].name;
		document[img_name].src=old_src;
		document[img_name].name=name_x;
	}
	else if (browser=="Netscape")
	{
		
		
		var old_src = document.getElementById(img_old_name).getAttribute("src");
		var name_x = document.getElementById(img_old_name).getAttribute("name");
		var new_src = document.getElementById(img_name).getAttribute("src");
		var name_y = document.getElementById(img_name).getAttribute("name");
		//document[img_old_name].src=document[img_name].src;
		document.getElementById(img_old_name).setAttribute("src",new_src);
		document.getElementById(img_old_name).setAttribute("name",name_y);
		//document[img_name].src=old_src;
		//document[img_name].name=name_x;
		
		document.getElementById(img_name).setAttribute("src",old_src);
		document.getElementById(img_name).setAttribute("name",name_x);
		
	}

}
////////////////////////////////////////////////////
function detectBrowser()
{
var browser=navigator.appName
var b_version=navigator.appVersion
var version=parseFloat(b_version)
if ((browser=="Netscape"||browser=="Microsoft Internet Explorer")
&& (version>=4))
  {alert("Your browser is good !")}
else
  {alert("It's time to upgrade your browser!")}
}

function popUp(URL) 
{
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,height=320,width=480');");
}