var bw=new cm_bwcheck()

function IEHoverPseudo() {

	if (document.getElementById("mainNav")){ //added this check for the 20/20 vision templates
	var navItems = document.getElementById("mainNav").getElementsByTagName("li");
	
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className == "menuparent") {
			navItems[i].onmouseover=function() { 
      this.className += " over"; 
      this.style.zIndex=2000;
      }
			navItems[i].onmouseout=function() { this.className = "menuparent"; }
		}
	}
	}

}
window.onload = IEHoverPseudo;

/*Functions to hide drop down boxes when the menu is moused-over*/

function HideUncoverable() {
  if ( bw.ns4 ) {
    var l;
    for ( var i = 0 ; i < document.layers.length ; i++ ) {
      l = document.layers[i];
      if ( l.id.indexOf("hide") >= 0 ) {
        l.visibility="hide";
      }
    }
  } else if ( bw.ie4 || bw.ie5 || bw.ie6 ) {
    var oSelectLists = document.all.tags("SELECT");
    for ( var i = 0 ; i < oSelectLists.length ; i ++ ) {
      oSelectLists[i].style.visibility="hidden";
    }
  }
}

function UnHideUncoverable() {
  if ( bw.ns4 ) {
    var l;
    for ( var i = 0 ; i < document.layers.length ; i++ ) {
      l = document.layers[i];
      if ( l.id.indexOf("hide") >= 0 ) {
        l.visibility="show";
      }
    }
  } else if ( bw.ie4 || bw.ie5 || bw.ie6 ) {
    var oSelectLists = document.all.tags("SELECT");
    for ( var i = 0 ; i < oSelectLists.length ; i ++ ) {
      oSelectLists[i].style.visibility="visible";
    }
  }
}

/*Browsercheck object*/
function cm_bwcheck(){
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent.toLowerCase()
	this.dom=document.getElementById?1:0
	this.op5=(this.agent.indexOf("opera 5")>-1 || this.agent.indexOf("opera/5")>-1) && window.opera 
  this.op6=(this.agent.indexOf("opera 6")>-1 || this.agent.indexOf("opera/6")>-1) && window.opera   
  this.ie5 = (this.agent.indexOf("msie 5")>-1 && !this.op5 && !this.op6)
  this.ie55 = (this.ie5 && this.agent.indexOf("msie 5.5")>-1)
  this.ie6 = (this.agent.indexOf("msie 6")>-1 && !this.op5 && !this.op6)
	this.ie4=(this.agent.indexOf("msie")>-1 && document.all &&!this.op5 &&!this.op6 &&!this.ie5&&!this.ie6)
  this.ie = (this.ie4 || this.ie5 || this.ie6)
	this.mac=(this.agent.indexOf("mac")>-1)
	this.ns6=(this.agent.indexOf("gecko")>-1 || window.sidebar)
	this.ns4=(!this.dom && document.layers)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.op5 || this.op6)
  this.usedom= this.ns6//Use dom creation
  this.reuse = this.ie||this.usedom //Reuse layers
  this.px=this.dom&&!this.op5?"px":""
	return this
}


/*Fixes flash banner clash with the drop down navigation
function RunFlashinsert()

{

    document.write('<object classid=""clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="100" width="800">\n');

    document.write('<param name="movie" value="naglowek.swf" />\n');

    document.write('<param name="quality" value="high" />\n');

    document.write('<param name="wmode" value="opaque" />\n');

    document.write('<param name="menu" value="false" />\n');

    document.write('<embed src="naglowek.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="opaque" menu="false" height="100" width="800" />\n');

    document.write('</object>\n');

} */
