// Dropdown menus : thanks to http://www.alistapart.com/articles/dropdowns/  

function banner_init() {
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") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}


//Generic onload : thanks to http://www.brothercake.com/site/resources/scripts/onload/

//setup onload function
if(typeof window.addEventListener != 'undefined')
{
    //.. gecko, safari, konqueror and standard
    window.addEventListener('load', banner_init, false);
}
else if(typeof document.addEventListener != 'undefined')
{
    //.. opera 
    document.addEventListener('load', banner_init, false);
}
else if(typeof window.attachEvent != 'undefined')
{
    //.. win/ie
    window.attachEvent('onload', banner_init);
}

//** remove this condition to degrade older browsers
else
{
    //.. mac/ie5 and anything else that gets this far
    
    //if there's an existing onload function
    if(typeof window.onload == 'function')
    {
        //store it
        var existing = onload;
        
        //add new onload handler
        window.onload = function()
        {
            //call existing onload function
            existing();
            
            //call generic onload function
            banner_init();
        };
    }
    else
    {
        //setup onload function
        window.onload = banner_init;
    }
}
