
function HLite(sBtnName,bOn)
{
    if (bOn)    {
		var rollbutton = sitedef+"images/"+sBtnName+"_on.gif";
		document.images[sBtnName].src = rollbutton;
		}
	else {
		var rollbutton = sitedef+"images/"+sBtnName+"_off.gif";
		document.images[sBtnName].src = rollbutton;
	}
}
function popup(url, name, width, height) {
	var n;

	// specify size here

	if (width && height) {
			var w = width;
			var h = height;

			if (w == 0) { w = 560; }
			if (h == 0) { h = 365; }
	}
	else {
		var w = 560;
		var h = 365;
	}

	// END OF SIZE CONTROL SETTINGS

	if (name == "") {
		n = "popupWindow"; 
	}
	else {
		n = name;
	}

	var x = window.open(url,n,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+w+",height="+h);
}
function Search(f)
{
	if ((IsEmpty(f.qu.value)) || (f.qu.value=="SEARCH"))	{
		alert("Please enter something to search for first.");
		f.qu.focus();
		return false;
	}
	else	{
		//Comment out for testing only
		//f.submit();
		//return true;
		return false;
	}
}

function IsEmpty (s)
{
	if (s==null || s=="undefined" || s=="")
		return true;
		
	for (var i = 0; i < s.length; i++)	{
		var ch = s.charAt (i);
		if ((ch != ' ') && (ch!= '\n') && (ch != '\t') && (ch != '\r'))
			return false;
	}
	return true;
}

