// JavaScript Document

//show-hide scripts
/*var NS4DOM = document.layers ? true:false;
	var IEDOM = document.all ? true:false;
	var W3CDOM = document.getElementById ? true:false;
	function show(id) {
		if (NS4DOM) ref="document." + id;
		else if (IEDOM) ref="document.all." + id;
		else if (W3CDOM) ref="document.getElementById('" + id + "')";
		var cell=eval(ref);
		if (cell == null || cell == "undefined") return
		if (cell.style.display == "none")
			if (IEDOM)
				cell.style.display = "block";
			else
				cell.style.display = "table-row"
		else
			cell.style.display = "none"
	}*/
function show(id) {
	var ref="document.getElementById('" + id + "')";
	var cell=eval(ref);
	if (cell == null || cell == "undefined"){
	 return
	 }
	if (cell.style.display == "none"){
		cell.style.display = "";
	}else{
		cell.style.display = "none"
	}
}
//end show hide scripts

//consolidated from topBanner.cfm scripts
hs.graphicsDir = '/highslide/graphics/';
    hs.outlineType = 'rounded-white';
    hs.outlineWhileAnimating = true;
	hs.preserveContent = false;

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//end topbanner.cfm consolidation

// consolidated from navscript.js file

var curSub;
var outV;

function kSub(x) {
	x.className = x.className.replace(new RegExp("sfhover \\b"), "");
}

navHover = function () {
	if (!document.getElementById("nav")) {
		return;
	}
	
	var mAs = document.getElementById("nav").getElementsByTagName("a");	
	for (var i = 0; i<mAs.length; i++) {
		mAs[i].onmouseover = function() {
			if (this.className == "topnavlink") {
				if ((curSub != "") && (curSub != null)) {
					kSub(curSub);
				}
				clearTimeout(outV);
				curSub = this.parentNode;
				this.parentNode.className = "sfhover "+this.parentNode.className;
			}
		};
		
		mAs[i].onmouseout = function() {
			if (this.className == "topnavlink") {
				outV = setTimeout("kSub(curSub)", 1000);
			}
		};
	}
	
	if (!document.getElementById("navlist")) {
		return;
	}
	
	var mULs = document.getElementById("navlist").getElementsByTagName("ul");
	
	for (var i = 0; i<mULs.length; i++) {
		mULs[i].onmouseover = function() {
			clearTimeout(outV);
		};
		mULs[i].onmouseout = function() {
			outV = setTimeout("kSub(curSub)", 1000);
		};
	}
};

// end navscript.js consolidation