function showmenu(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "visible";
}

function hidemenu(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "hidden";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}

	
	function getDim2(el){
	for (var lx=0,ly=0;el!=null;
		ly+=el.offsetTop,lx+=el.offsetLeft,el=el.offsetParent);
	return {y:ly}
}
    function getDim(el){
	for (var lx=0,ly=0;el!=null;
		lx+=el.offsetLeft,ly+=el.offsetTop,el=el.offsetParent);
	return {x:lx}
}


function popUp(PopInfo,wid,hei)
{
var desktop=window.open(PopInfo,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width=" + wid + ",height=" + hei + "");
}



  function checkData2() {
	if (document.searchBox.search.value == "") {
		alert("Please enter your search string.");
		document.searchBox.search.focus();
		return false; }
		
	var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";

  for (var i = 0; i < document.searchBox.search.value.length; i++) {
  	if (iChars.indexOf(document.searchBox.search.value.charAt(i)) != -1) {
  	alert ("Your search string contains special characters. \nThese are not allowed.\n Please remove them and try again.");
  	return false;
  	}
  }
  }

	
	function checkData3() {
	var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";

	if (document.loginBox.sUsername.value == "") {
		alert("Please enter your username.");
		document.loginBox.sUsername.focus();
		return false; }
	
  for (var i = 0; i < document.loginBox.sUsername.value.length; i++) {
  	if (iChars.indexOf(document.loginBox.sUsername.value.charAt(i)) != -1) {
  	alert ("Your username has special characters. \nThese are not allowed.\n Please remove them and try again.");
  	return false;
  	}
  }
  
  if (document.loginBox.sPassword.value == "") {
		alert("Please enter your password.");
		document.loginBox.sPassword.focus();
		return false; }
		
   for (var i = 0; i < document.loginBox.sPassword.value.length; i++) {
  	if (iChars.indexOf(document.loginBox.sPassword.value.charAt(i)) != -1) {
  	alert ("Your password has special characters. \nThese are not allowed.\n Please remove them and try again.");
  	return false;
  	}
  }
  }

