<!--
function IsNumeric(strString)
   //  check for valid numeric strings
   {
   var strValidChars = "0123456789";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }


function isEmailAddr(email)
{
  var result = false;
  var theStr = new String(email);
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
  result = true;
  }

  return result;
}
function validRequired(formField,fieldLabel)
{
  var result = true;

  if (formField.value == "")
  {
    alert('Please fill out the "' + fieldLabel +'" field.');
    formField.focus();
    result = false;
  }

  return result;
}
function validEmail(formField,fieldLabel,required)
{
  var result = true;

  if (required && !validRequired(formField,fieldLabel))
    result = false;

  if (result && ((formField.value.length < 3) || !isEmailAddr(formField.value)) )
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    formField.focus();
    result = false;
  }

  return result;

}
function isNullWindow(win) {
        if(win == null || win.focus == null)
        {
                var text = "Unable to open a popup window!\n\n";
                text += "This site just tried to open a window, but was unsuccessful.\n";
                text += "Please disable any pop-up killer software. (this includes the Google toolbar).\n\n";
                text += "Pop-up windows on this site are REQUIRED for the proper functioning of this site.\n\n";
                alert(text);
                return true;
        }
        win.focus();
        return false;
}

function newwin(url, name, w, h, scrolly) {
newwindow = window.open(url, name, "width=" + w + ",height=" + h + ",scrollbars=" + scrolly + "");

if(isNullWindow(newwindow) == true)
        {
                newwindow.document.close();
                return;
        }
        newwindow.focus();
}

function logoutconfirm() {
var answer = confirm ("Are you sure you want to logout?")
if (answer)
document.location.href="logout.php";
}

function areyousure() {
var answer = confirm ("Are you sure?")
if (!answer)
return false;
}

function redirect(url,time) {
	setTimeout("document.location.href='"+url+"'",time);
}

-->
