function BrowserCheck() {
var os= navigator.platform
	if (os.indexOf("Mac")!=-1) {
		this.os = "mac"
	} else {
		this.os = "pc"
	}
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.v = parseInt(navigator.appVersion)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ns6 = (this.b=="ns" && this.v==6)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
	if (this.ie5) this.v = 5
	this.min = (this.ns||this.ie)
}

is = new BrowserCheck()
var menuCoverDivId = ""; // cover DIV as solution of menu height and focus problem


/* 
 * Solution for menu height and focus problem
 * Shows menu cover 
 * function uses menu cover DIV 
 */
function showMenuCover() {
	if (is.ns4) {
		var coverDiv = eval('document.' + menuCoverDivId);
		if (typeof coverDiv != "undefined") {
			coverDiv.visibility = "show";
		}
	}
	if (is.ie){
		var coverDivStyle = eval(menuCoverDivId + '.style');
		if (typeof coverDivStyle != "undefined") {
			coverDivStyle.visibility = "visible";
		}
	}
	if (is.ns6 || is.ns5){
		var coverDivStyle = eval('document.getElementById("' + menuCoverDivId + '").style');
		if (typeof coverDivStyle != "undefined") {
			coverDivStyle .visibility = "visible";
		}
	}
} 
/* 
 * Solution for menu height and focus problem
 * Hides menu cover 
 * function uses menu cover DIV 
 */
function hideMenuCover() {
	if (is.ns4) {
		setTimeout("hidens4Cover()", 1000);
	} else {
		if (is.ie){
			var coverDivStyle = eval(menuCoverDivId + '.style');
			if (typeof coverDivStyle != "undefined") {
				coverDivStyle.visibility = "hidden";
			}
		} 
		if (is.ns6 || is.ns5) {
			var coverDivStyle = eval('document.getElementById("' + menuCoverDivId + '").style');
			if (typeof coverDivStyle != "undefined") {
				coverDivStyle .visibility = "hidden";
			}
		}
	}
}
/* 
 * Solution for menu height and focus problem
 * Hides menu cover in NS4
 * function uses menu cover DIV 
 */
function hidens4Cover() {
	var coverDiv = eval('document.' + menuCoverDivId);
	if (typeof coverDiv != "undefined") {
		coverDiv.visibility = "hide";
	}
}

function showIt(whichone, theLink) {
	which = whichone;
	actlink = theLink;
	show();
}

function hideIt(whichone,theLink) {
	which = whichone;
	actlink = theLink;
	hide();
}

function showL(whichone, theCol) {
	which = whichone;
	actlink.className = theCol;
	show();
}

function hideL(whichone,theCol) {
	which = whichone;
	actlink.className = theCol;
	hide();
}

function show() {

	if (is.ns4) {
		lnk = eval('document.' + which);
		lnk.visibility = "show";
	}
	if (is.ie){
		lnk = eval(which + '.style');
		lnk.visibility = "visible";
	}
	if (is.ns6 || is.ns5){
		lnk = eval('document.getElementById("' + which + '").style');
		lnk.visibility = "visible";
	}
actLayer = lnk;

}

function hide() {
	if (is.ns4) {
		setTimeout("hidens4()", 1000);
	} else {
		actLayer.visibility = "hidden";
	}
}

function hidens4() {
	actLayer.visibility = "hide";
}




		
		
function imgOn(imgName) {

   if (preloaded) {

        if (document.images) {
           	document[imgName].src = eval(imgName + "On.src");
        }
     }
}

function imgOff(imgName) {
   if (preloaded) {
        if (document.images) {
            document[imgName].src = eval(imgName + "Off.src");
        }
	}
}

function adjustNavMenus() {
  if (document.getElementById && (typeof spacerImgIds != "undefined") && (typeof navMenuIds != "undefined") ) {
    for (var i in navMenuIds) {
      var menuId = navMenuIds[i];
      var imgId = spacerImgIds[i];
      var menu = document.getElementById(menuId);
      var img = document.getElementById(imgId);
      if (menu!=null && img!=null) {
        menu.style.top = (getOffsetTopFromParent(img) + 1) + "px";
      }
    }
  }
}

preloaded = false;