<!--
function openNewWin(theForm,url,query) 
{ 
	msg=open("","NewWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=400,height=150,left=400,top=200"); 
	msg.location = url + "?" + query;
	msg.focus();
}

function clearBlank(theForm,theBlank)
{
	if(theBlank == "staff")
	{
		theForm.staff.value = "";	
		theForm.password.value = "";	
	}else
		theForm.memberid.value = "";	
}

function checkForm(theForm)
{

  if (theForm.memberid.value == "" && theForm.staff.value == "")
  {
    alert("Please enter value either for \"memberid\" or \"staff\" field.");
    theForm.memberid.focus();
    return (false);
  }

  if (theForm.memberid.value.length > 200)
  {
    alert("Please enter at most 200 characters in the \"memberid\" field.");
    theForm.memberid.focus();
    return (false);
  }
  
  if (theForm.staff.value.length > 200)
  {
    alert("Please enter at most 200 characters in the \"staff\" field.");
    theForm.memberid.focus();
    return (false);
  }

  if (theForm.password.value.length > 200)
  {
    alert("Please enter at most 200 characters in the \"password\" field.");
    theForm.memberid.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz????ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüý?0123456789-@_-.";
  var checkStr = theForm.memberid.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and \"@_-.\" characters in the \"memberid\" field.");
    theForm.memberid.focus();
    return (false);
  }

  return (true);
}

function checkTmnlForm(theForm)
{

  if (theForm.title.value == "")
  {
    alert("Please enter value for the \"Title\" field.");
    theForm.title.focus();
    return (false);
  }
   
  if (theForm.rank.value == "")
  {
    alert("Please select value for the \"Rank\" field.");
    theForm.rank.focus();
    return (false);
  }

  if (theForm.testimonial.value == "")
  {
    alert("Please enter value for the \"Testimonial\" field.");
    theForm.testimonial.focus();
    return (false);
  }
  
  if (theForm.footer.value == "")
  {
    alert("Please enter value for the \"Footer\" field.");
    theForm.footer.focus();
    return (false);
  }
  
  if (theForm.url.value == "")
  {
    alert("Please enter value for the \"URL\" field.");
    theForm.url.focus();
    return (false);
  }
  
  if (theForm.title.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"Title\" field.");
    theForm.title.focus();
    return (false);
  }
  
  if (theForm.testimonial.value.length > 500)
  {
    alert("Please enter at most 500 characters in the \"Testimonial\" field.");
    theForm.testimonial.focus();
    return (false);
  }

  if (theForm.footer.value.length > 200)
  {
    alert("Please enter at most 200 characters in the \"Footer\" field.");
    theForm.footer.focus();
    return (false);
  }
  
  if (theForm.url.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"URL\" field.");
    theForm.url.focus();
    return (false);
  }
   
  return confirm("Are you sure to submit?");
}

function onRowOver(row){
    row.style.backgroundColor='#A6E1F1';
}

function onRowOut(row){
    row.style.backgroundColor='';
}

function onRowClicked(row, rowNo, evt){
}
//-->