
function isMouseLeaveOrEnter(e,handler){if(e.type!='mouseout'&&e.type!='mouseover')return false;var reltg=e.relatedTarget?e.relatedTarget:e.type=='mouseout'?e.toElement:e.fromElement;while(reltg&&reltg!=handler)reltg=reltg.parentNode;return(reltg!=handler);}
function dropDownNav()
{var objNav=document.getElementById("nav");var sfEls=objNav.getElementsByTagName("LI");for(var i=0;i<sfEls.length;i++)
{sfEls[i].onmouseover=function()
{if(isMouseLeaveOrEnter(event,this)){this.className+=" sfhover";this.style.zIndex=999;}}
sfEls[i].onmouseout=function()
{if(isMouseLeaveOrEnter(event,this)){this.className=this.className.replace(new RegExp(" sfhover\\b"),"");this.style.zIndex=1;}}}}
function dropDownNavFeature()
{var sfEls=document.getElementById("navFeature").getElementsByTagName("LI");for(var i=0;i<sfEls.length;i++)
{sfEls[i].onmouseover=function()
{this.className+=" sfhover";this.style.zIndex=100;}
sfEls[i].onmouseout=function()
{this.className=this.className.replace(new RegExp(" sfhover\\b"),"");}}}
function dropDownNavGallery()
{var sfEls=document.getElementById("navGallery").getElementsByTagName("LI");for(var i=0;i<sfEls.length;i++)
{sfEls[i].onmouseover=function()
{this.className+=" sfhover";this.style.zIndex=100;}
sfEls[i].onmouseout=function()
{this.className=this.className.replace(new RegExp(" sfhover\\b"),"");}}}
function elementChecker()
{if(document.getElementById('nav')!=null)
{dropDownNav();}
if(document.getElementById('navFeature')!=null)
{dropDownNavFeature();}
if(document.getElementById('navGallery')!=null)
{dropDownNavGallery();}}
if(window.attachEvent)
{window.attachEvent("onload",elementChecker);}

