/*
       copyright 2008 Campmor, Inc. All Rights Reserved
       Client: Campmor, Inc. 
       Author: Maya Lindenmuth - Brulant, Inc. 
       Date: 3/31/2008
	   Description: Provides functionality for drop down navigation in the main nav
*/ 





startList = function() {
//if (document.getElementById) {
if ( document.all&&document.getElementById) {
	navRoot = document.getElementById("nav");
	for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI") {
			iframeShim=document.createElement("iframe");
			node.appendChild(iframeShim);
			iframeShim.setAttribute('frameborder','0');
			iframeShim.setAttribute('scrolling','no');
			iframeShim.setAttribute('src','javascript:"<html></html>";');
			
			iframeShim.style.zIndex='25';
			iframeShim.style.filter="alpha(opacity=0); ";
			iframeShim.style.position='absolute';
			iframeShim.className='iframegone';
			// Make the second level nav work
			var childLIs = node.getElementsByTagName("LI");
			for(z=0; z < childLIs.length; ++z){
				childLIs[z].onmouseover=function(){
					this.className+=" over";
					//dropStep(this);
				}
				childLIs[z].onmouseout=function() {
				  this.className=this.className.replace(" over", "");
				}
			}
			
		  node.onmouseover=function() {
			this.className+=" over";
			
			//dropStep(this);
		  }
		  node.onmouseout=function() {
		  this.className=this.className.replace(" over", "");
		  
		   }
		 }
	  }
	 }
}





window.onload=startList;


