function buildsubmenus(){
	/*
    var divs=document.getElementById("menu").getElementsByTagName("DIV")
    for (var t=0; t<divs.length; t++){
	    divs[t].parentNode.onmouseover=function(){
	    	this.bbgg = this.getElementsByTagName("A")[0].style.background;
		    this.style.position="relative";
		    this.getElementsByTagName("A")[0].style.background="#BAE96B";
		    this.getElementsByTagName("DIV")[0].style.display="block";
	    }
	    divs[t].parentNode.onmouseout=function(){
		    this.getElementsByTagName("A")[0].style.background=this.bbgg;
		    this.style.position="static";
		    this.getElementsByTagName("DIV")[0].style.display="none";
	    }
    }
    */
    
    var lis=document.getElementById("menu").getElementsByTagName("A");
    for (var i=0; i<lis.length; i++){
	    lis[i].parentNode.onmouseover=function(){
	    	this.bgc = this.getElementsByTagName("A")[0].style.backgroundColor;
		    this.getElementsByTagName("A")[0].style.backgroundColor="#BAE96B";
		    
		     this.style.position="relative";
		     
		     try{	
				this.getElementsByTagName("DIV")[0].style.display="block";
			 }catch(e){}	
	    }	
	    lis[i].parentNode.onmouseout=function(){
		    this.getElementsByTagName("A")[0].style.backgroundColor=this.bgc;
		    this.style.position="static";
		    
		    try{	
				this.getElementsByTagName("DIV")[0].style.display="none";
			}catch(e){}		    
	    }
    }    
}
if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)
