<!--

// Functions to verify form entry

// Function to check for valid email
function validEmail(eMail)
{
  invalidChars =" /:,;"

  if(eMail.indexOf("@") == -1 || eMail.indexOf(".") == -1 || eMail.length < 6)
  {
    alert("The E-Mail address that you entered is invalid please enter it again. \nEx. 'luckyv@yahoo.com'")
    return false
  }
  for(i=0;i<invalidChars.length;i++)
  {
    badChar = invalidChars.charAt(i)
    if(eMail.indexOf(badChar,0) > -1)
    {
      alert("E-Mail cannont contain / : , ; or any spaces. Please enter your E-Mail again.")
      return false
    }   
  }
  return true
}

// Function to check the form is filled out
function checkForm()
{
	var frmContact = document.contactJaymes;
	var strMessage = "The following fields are required:\nName\nE-mail\nComments\nPlease make sure that they are all filled in.";
	
	// Check for empty required fields
	
	// Check first name
	if(frmContact.contactName.value == "")
	{
		alert(strMessage);
		frmContact.contactName.focus();
		return false;
	}
	
	// Check email
	if(frmContact.contactEmail.value == "")
	{
		alert(strMessage);
		frmContact.contactEmail.focus();
		return false;
	}
	if(!validEmail(frmContact.contactEmail.value))
	{
		frmContact.contactEmail.select();
		return false
	}
	
	// Check comments
	if(frmContact.contactComments.value == "")
	{
		alert(strMessage);
		frmContact.contactComments.focus();
		return false;
	}
	
	return true;
}

//-->
