window.onload = attachHandlers; 

function attachHandlers() {

     runMenus(); 
     document.getElementById('btnCheckOut').onclick = function () {
           window.location = "http://store.acculex.com/checkout.aspx"
     }

     //test to see if the name resolves to a function and if it does, call it if it does not, then it is not defined.
     if ( typeof pageBehavior == 'function' ) {
          pageBehavior(); 
     }
}

function runMenus() {

	var mnuItem1 		= document.getElementById('divMenuItem1'); 
	var subMenu1 	     = document.getElementById('divSubMenu1');
	var mnuItem2 		= document.getElementById('divMenuItem2'); 
	var subMenu2 	     = document.getElementById('divSubMenu2');
	var mnuItem3 		= document.getElementById('divMenuItem3'); 
	var subMenu3 	     = document.getElementById('divSubMenu3');
	var mnuItem4 		= document.getElementById('divMenuItem4'); 
	var subMenu4 	     = document.getElementById('divSubMenu4');
	var mnuItem5 		= document.getElementById('divMenuItem5'); 
	var subMenu5 	     = document.getElementById('divSubMenu5');
	var mnuItem7 		= document.getElementById('divMenuItem7'); 
	var subMenu7 	     = document.getElementById('divSubMenu7');

	mnuItem1.onmouseover= function() { subMenu1.style.display="inline"; } 
	mnuItem1.onmouseout = function() { subMenu1.style.display="";	}
	
	subMenu1.onmouseover = function() {subMenu1.style.display="inline";}
	subMenu1.onmouseout = function()  {subMenu1.style.display="";	}	

	mnuItem2.onmouseover= function() { subMenu2.style.display="inline"; } 
	mnuItem2.onmouseout = function() { subMenu2.style.display="";	}
	
	subMenu2.onmouseover = function() {subMenu2.style.display="inline";}
	subMenu2.onmouseout = function()  {subMenu2.style.display="";	}	

	mnuItem3.onmouseover= function() { subMenu3.style.display="inline"; } 
	mnuItem3.onmouseout = function() { subMenu3.style.display="";	}
	
	subMenu3.onmouseover = function() {subMenu3.style.display="inline";}
	subMenu3.onmouseout = function()  {subMenu3.style.display="";	}	

	mnuItem4.onmouseover= function() { subMenu4.style.display="inline"; } 
	mnuItem4.onmouseout = function() { subMenu4.style.display="";	}
	
	subMenu4.onmouseover = function() {subMenu4.style.display="inline";}
	subMenu4.onmouseout = function()  {subMenu4.style.display="";	}	

	mnuItem5.onmouseover= function() { subMenu5.style.display="inline"; } 
	mnuItem5.onmouseout = function() { subMenu5.style.display="";	}
	
	subMenu5.onmouseover = function() {subMenu5.style.display="inline";}
	subMenu5.onmouseout = function()  {subMenu5.style.display="";	}	

	mnuItem7.onmouseover= function() { subMenu7.style.display="inline"; } 
	mnuItem7.onmouseout = function() { subMenu7.style.display="";	}
	
	subMenu7.onmouseover = function() {subMenu7.style.display="inline";}
	subMenu7.onmouseout = function()  {subMenu7.style.display="";	}	

}

