
<!--

function isProper(string) 
{
   if (!string) return false;
   var iChars = "*|\\:<>[]{}`/;()@&$#%+~^=";

   for (var i = 0; i < string.length; i++) {
      if (iChars.indexOf(string.charAt(i)) != -1)
         return false;
   }
   return true;
}        


function validator(theForm)
{
  if (theForm.Name.value == "")

  {

    alert("Please enter your name.");

    theForm.Name.focus();

    return (false);

  }
	
	if (theForm.Organization.value == "")
  {

    alert("Please enter the name of your organization.");

    theForm.Organization.focus();

    return (false);

  }
if ((theForm.Email.value.indexOf ('@',0) == -1) || (theForm.Email.value == ""))
  {
    alert("Please verify your email address.");
   
    theForm.Email.focus();
 
    return (false);
  } 
  
  if (document.theForm.Comment.value == "")

  {

    alert("Please enter your comments before submitting this form.");
			
    document.theForm.Comment.focus();

    return (false);
				}
				
			if (isProper(document.theForm.Comment.value) == false)
			{

    alert("Please omit special characters.");
			
    document.theForm.Comment.focus();

    return (false);
				}
	
	var maxChar = 1000
    if (document.theForm.Comment.value.length > maxChar) {
        diff=document.theForm.Comment.value.length - maxChar;
        if (diff>1)
            diff = diff + " characters";
        else
            diff = diff + " character";
            
        alert("This field is limited to " + maxChar + " characters\n" + "Please reduce the text by " + diff);
        document.theForm.Comment.focus();
        return (false);
    }
  
  

}
//-->
