//<!--- *************** Clear Keyword *************** --->
function clearKeyword(formPath, keyword){
	if (formPath.value == keyword) {
		formPath.value = "";
	}
}

//<!--- *************** Restore Keyword *************** --->
function restoreKeyword(formPath, keyword){
	if (formPath.value == "") {
		formPath.value = keyword;
	}
}

var isOver = false;
var curGroup = ""
var prevGroup = ""; 

function sidebox(grpName){
	// show the menu
	curGroup = grpName;
	if (isOver == false) {
		isOver = true;
		if (prevGroup != "") window.document.getElementById(prevGroup).style.display = "none";
		window.document.getElementById(curGroup).style.display = "inline";
	} else {
		isOver = false;
		if (prevGroup != "") window.document.getElementById(prevGroup).style.display = "inline";
		window.document.getElementById(curGroup).style.display = "none";
	}
	prevGroup = curGroup;
	
}

function showMenu(grpName){
	// show the menu
	isOver = true;
	curGroup = grpName;
	
	if (prevGroup != "") window.document.getElementById(prevGroup).style.display = "none";
	window.document.getElementById(curGroup).style.display = "inline";
	if (document.getElementById('selectBox') != null) hideform(true);
	prevGroup = curGroup;
	
}


var popupWin;
// wit & hite will determine where the window opens on the screen
function openWin(windowURL,windowName,wit,hite,scroll) { 
	var winH = (screen.height - hite) / 2;
	var winW = (screen.width - wit) / 2;
	popupWin = window.open( windowURL, windowName, "menubar=no,status=no,toolbar=no,location=no,scrollbars="+scroll+",screenx=1,screeny=1,width=" + wit + ",height=" + hite + ",top="+winH+",left="+winW);
	popupWin.focus();
}