/* addListeners.js
adds event listeners to a document when the page loads */

function addListeners() {
	    //will loop through the child elements of leftNav and attach a mouseover function to each element 
        if(! document.getElementsByTagName ||
		   ! document.getElementById)
		   return;
		   
		  var  parentEl = document.getElementById("topNav");
		  var  el = "";
		  
		  // alert(parent.childNodes.length);
		   var childs = parentEl.getElementsByTagName('li');
		  
		   for (var i = 0; i < childs.length; i++ ) {	
		       if (! childs[i].className) { /*if elment is active, don't swap background */
			      childs[i].onmouseover = swapLinkBG;
				  childs[i].onmouseout = swapLinkBGBack;
			  }
		   }//for (i = 0; 1 < childs.length; i++ )
		   //alert(childs.length);
		   
		  
	   }//eof
	   
	   
	   addEvent(window,'load', addListeners,false);