function initializeDropDownMenu(){		
	//get nav element
	var nav=document.getElementById('topNav');
	if(!nav){return};

	//get all menu items
	var menuitems=nav.getElementsByTagName('li');
	if(!menuitems){return};
	
	for(var i=0;i<menuitems.length;i++){
		//assign 'over' class attribute to each menu item on 'mouseover'
		menuitems[i].onmouseover=function(){					
			//if(this.parentNode.parentNode.className!="subNav") {	
				if(this.className!='') { 
					this.className+=' over';
				}
				else {					
					this.className+='over';
				}				
			//}
		}
		//remove 'over' class attribute to each menu item on 'mouseout' if this is not the current category 
		menuitems[i].onmouseout=function(){
			
			//if(this.parentNode.parentNode.className!="subNav") {
				if(this.className=='over') { 
					this.className=this.className.replace('over','');
				}
				else {
					this.className=this.className.replace(' over','');
				}
		//	}
		}
	}
}


function initializeDropDownMenuLeft(){		
	//get nav element
	var nav=document.getElementById('leftNav');
	if(!nav){return};

	//get all menu items
	var menuitems=nav.getElementsByTagName('ul');
	if(!menuitems){return};
	
	for(var i=0;i<menuitems.length;i++){
		//assign 'over' class attribute to each menu item on 'mouseover'
		menuitems[i].onmouseover=function(){					
			//if(this.parentNode.parentNode.className!="subNav") {	
				if(this.className!='') { 
					this.className+=' over';
				}
				else {					
					this.className+='over';
				}				
			//}
		}
		//remove 'over' class attribute to each menu item on 'mouseout' if this is not the current category 
		menuitems[i].onmouseout=function(){
			
			//if(this.parentNode.parentNode.className!="subNav") {
				if(this.className=='over') { 
					this.className=this.className.replace('over','');
				}
				else {
					this.className=this.className.replace(' over','');
				}
		//	}
		}
	}
}



if (window.attachEvent) {window.attachEvent('onload', initializeDropDownMenu);}
else if (window.addEventListener) {window.addEventListener('load', initializeDropDownMenu, false);}
else {document.addEventListener('load', initializeDropDownMenu, false);}


if (window.attachEvent) {window.attachEvent('onload', initializeDropDownMenuLeft);}
else if (window.addEventListener) {window.addEventListener('load', initializeDropDownMenuLeft, false);}
else {document.addEventListener('load', initializeDropDownMenuLeft, false);}

