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 showSub(wN) {
	if (typeof(navTimer) != "undefined") {
	stopNavTimer();
	if ((cN != "none") && (wN != cN)) { MM_findObj('nav'+cN).className="navoff"; }
	
	if (wN != "none") { 
		if (MM_findObj('sub'+wN)) { MM_findObj('nav'+wN).className="navon"; }
		else { MM_findObj('nav'+wN).className="navon";	}
	}
	
	if (cN != "none") { if (MM_findObj('sub'+cN)) { MM_findObj('sub'+cN).className="suboff"; } }
	if (MM_findObj('sub'+wN)) { 
		MM_findObj('sub'+wN).className="subon"; 
		MM_findObj('turnoffa').className="ton"; 
		MM_findObj('turnoffb').className="ton"; 
	}
	
	if (wN == origN) { 
		MM_findObj('turnoffa').className="toff"; 
		MM_findObj('turnoffb').className="toff"; 
	}
	cN = wN;
	}
}
window.onload = showCurrent;
function showCurrent() { 
	navTimer = 0;
	origN = cN;
	if (cN != "none") {
		showSub(cN);
	}
	//document.forms['topsearchform'].topsearchkeywords.focus();
}
function turnOffNow() { 
	if (typeof(navTimer) != "undefined") {
		showSub(origN);
	}
}
function startNavTimer() {
	if (navTimer == 0) {
		navTimer = setTimeout("showSub(origN);",2000);
	}
}
function stopNavTimer() {
	if (navTimer > 0) {
		clearTimeout(navTimer);
		navTimer = 0;
	}
}

function changeLeftboxTab(whichOn,whichOff) {
	MM_findObj(whichOn).className="vis";
	MM_findObj(whichOff).className="invis";
}

function SelText(whichField,defaultText) { if (whichField.value == defaultText) { whichField.value = ""; } }
function RedoText(whichField,defaultText) { if (whichField.value == "") { whichField.value = defaultText; } }
