var menuids=["menu1"] //Enter id(s) of Home UL menus, separated by commas
var strMenu = '<ul id="menu1"><li><a href="/LEAD/Login/lms_login.aspx">Home</a></li><li><a href="/LEAD/LoginHTML/aboutus.html">About Us</a>'+
				'<ul style="width:100px;"><li><a href="/LEAD/LoginHTML/aboutus.html" style="width:100px;">Corporate Profile</a></li>'+
				'<li><a href="/LEAD/LoginHTML/news.html" style="width:100px;">News Release</a></li><li><a href="/LEAD/LoginHTML/careers.html" style="width:100px;">Careers</a></li>'+
				'<li><a href="/LEAD/LoginHTML/brandvalues.html" style="width:100px;">Brand Values</a></li></ul></li>'+
				'<li><a href="/LEAD/LoginHTML/casestudies.html">Case Studies</a></li><li><a href="/LEAD/LoginHTML/productsandservices.html">'+
				'Products &amp; Services</a><ul><li><a href="/LEAD/LoginHTML/digitalResP.html">Digital Curriculum - Primary</a></li>'+
				'<li><a href="/LEAD/LoginHTML/digitalResS.html">Digital Curriculum - Secondary</a></li>'+
				'<li><a href="/LEAD/LoginHTML/productsandservices.html?event=0">Learning Management System</a></li><li>' +
				'<a href="/LEAD/LoginHTML/productsandservices.html?event=1">Services</a></li></ul></a></li><li>' +
				'<a href="/LEAD/LoginHTML/contactus.html">Contact Us</a></li></ul>';

			
function buildsubmenus_horizontal(){
	for (var i=0; i<menuids.length; i++){
		var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
		for (var t=0; t<ultags.length; t++){
			if (ultags[t].parentNode.parentNode.id==menuids[i]){ //if this is a first level submenu
				ultags[t].style.top=ultags[t].parentNode.offsetHeight+"px" //dynamically position first level submenus to be height of main menu item
				ultags[t].parentNode.getElementsByTagName("a")[0].className="mainfoldericon"
			}
			else{ //else if this is a sub level menu (ul)
				ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
    			ultags[t].parentNode.getElementsByTagName("a")[0].className="subfoldericon"
			}
			ultags[t].parentNode.onmouseover=function(){
				this.getElementsByTagName("ul")[0].style.visibility="visible"
			}
			ultags[t].parentNode.onmouseout=function(){
				this.getElementsByTagName("ul")[0].style.visibility="hidden"
			}
		}
	}
}
function NewWindow(mypage,myname,w,h,scroll,resizable){
	window.blur();
	window.focus();
	var winl=(screen.width-w)/2;
	var wint=(screen.height-h)/2;
	winprops="height="+h+",width="+w+",top="+wint+",left="+winl+",scrollbars="+scroll+", resizable=1";
	win=window.open(mypage,myname,winprops);
	if(parseInt(navigator.appVersion)>=4){
		win.window.focus();
	}
}
