var cssmenuids=["cssmenu1"] //Enter id(s) of CSS Horizontal UL menus, separated by commas
var csssubmenuoffset=0 //Offset of submenus from main menu. Default is 0 pixels.

function createcssmenu2(){
for (var ixx=0; ixx<cssmenuids.length; ixx++){
  var ultags=document.getElementById(cssmenuids[ixx]).getElementsByTagName("ul")
    for (var txx=0; txx<ultags.length; txx++){
			ultags[txx].style.top=ultags[txx].parentNode.offsetHeight+csssubmenuoffset+"px"
    		var spanref=document.createElement("span")
			spanref.className="arrowdiv"
			spanref.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;"
			ultags[txx].parentNode.getElementsByTagName("a")[0].appendChild(spanref)
			ultags[txx].parentNode.onmouseover=function(){    	
			this.getElementsByTagName("ul")[0].style.visibility="visible";
			
			this.getElementsByTagName("ul")[0].style.position="absolute";
			this.getElementsByTagName("ul")[0].style.zIndex="99";		
			
			document.getElementById("AbsoluteDiv").style.position = "static";
			//document.getElementById("AbsoluteDiv").style.zIndex = "-1";

    	}
    		ultags[txx].parentNode.onmouseout=function(){
			this.getElementsByTagName("ul")[0].style.visibility="hidden"
			
			document.getElementById("AbsoluteDiv").style.position = "relative";
			document.getElementById("AbsoluteDiv").style.zIndex = "0";

			
    }
    }
  }
}
/*
if (window.addEventListener)
window.addEventListener("load", createcssmenu2, false)
else if (window.attachEvent)
window.attachEvent("onload", createcssmenu2)
*/