
function formpage(theForm)

{

  if (theForm.firstname.value == "")

  {
    alert("Please enter a value for the \"firstname\" field.");
    theForm.firstname.focus();
    return (false);
  }


  if (theForm.firstname.value.length < 1)

  {
    alert("Please enter at least 1 characters in the \"firstname\" field.");
    theForm.firstname.focus();
    return (false);
  }
 

  if (theForm.firstname.value.length > 45)

  {
    alert("Please enter at most 45 characters in the \"firstname\" field.");
    theForm.firstname.focus();
    return (false);
  }
 //---------------------
 

  if (theForm.lastname.value == "")

  {
    alert("Please enter a value for the \"lastname\" field.");
    theForm.lastname.focus();
    return (false);
  }


  if (theForm.lastname.value.length < 1)

  {
    alert("Please enter at least 1 characters in the \"lastname\" field.");
    theForm.lastname.focus();
    return (false);
  }
 

  if (theForm.lastname.value.length > 45)

  {
    alert("Please enter at most 45 characters in the \"lastname\" field.");
    theForm.lastname.focus();
    return (false);
  }
//----------------email-----------------
 





//--------------------------------------
  if (theForm.telephone.value == "")

  {
    alert("Please enter a value for the \"telephone\" field.");
    theForm.telephone.focus();
    return (false);
  }
 

  if (theForm.telephone.value.length < 10)

  {
    alert("Please enter at least 10 characters in the \"telephone\" field.");
    theForm.telephone.focus();
    return (false);
  }
 

  if (theForm.telephone.value.length > 20)

  {
    alert("Please enter at most 20 characters in the \"telephone\" field.");
    theForm.Phone.focus();
    return (false);
  }
 
 
 
 
 //--------------------------------------- message
 
  


 //--------------------------------------
  if (theForm.emailfrom.value == "")

  {
    alert("Please enter your email in the \"email\" field.");
    theForm.emailfrom.focus();
    return (false);
  }
 

  if (theForm.emailfrom.value.length <5)

  {
    alert("Please enter your email correctly");
    theForm.emailfrom.focus();
    return (false);
  }
 


 
 
 
 //-----------end
 
 
 
 
 
 
  return (true);

}
//----------------------------------------




