
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);
  }
 //---------------------last name
 

  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);
  }
//----------------organization-----------------
  
  if (theForm.organization.value == "")

  {
    alert("Please enter a value for the \"organization\" field.");
    theForm.organization.focus();
    return (false);
  }


  if (theForm.organization.value.length < 1)

  {
    alert("Please enter at least 1 characters in the \"organization\" field.");
    theForm.organization.focus();
    return (false);
  }
 


  
  //------------organization end
  
  
  if (theForm.telephone.value == "")

  {
    alert("Please enter a value for the \"telephone\" field.");
    theForm.telephone.focus();
    return (false);
  }
  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.telephone.focus();
    return (false);
  }
 
 
 //-------------------------------------
  
  if (theForm.emailfrom.value == "")

  {
    alert("Please enter your email in  \"email\" field.");
    theForm.emailfrom.focus();
    return (false);
  }


  if (theForm.emailfrom.value.length < 6)

  {
    alert("Please enter your email in the \"email\" field.");
    theForm.emailfrom.focus();
    return (false);
  }
 

  if (theForm.emailfrom.value == "")

  {
    alert("Please enter your \"email\" .");
    theForm.emailfrom.focus();
    return (false);
  }





//--------------------------------------telephone
  if (theForm.address1.value == "")

  {
    alert("Please enter your\"address1\" correctly.");
    theForm.address1.focus();
    return (false);
  }
 

  if (theForm.address1.value.length < 7)

  {
    alert("Please enter your\"address1\" correctly.");
    theForm.telephone.focus();
    return (false);
  }
 

 
 
 
 
 //--------------------------------------- message
 
   if (theForm.city.value == "")

  {
    alert("Please enter a value for the \"city\" field.");
    theForm.city.focus();
    return (false);
  }
 

 
 
//----------------------------------------
if (theForm.county.value == "")

  {
    alert("Please enter a value for the \"county\" field.");
    theForm.county.focus();
    return (false);
  }


  if (theForm.county.value.length < 1)

  {
    alert("Please enter at least 1 characters in the \"county\" field.");
    theForm.county.focus();
    return (false);
  }
 

  if (theForm.county.value.length > 45)

  {
    alert("Please enter at most 45 characters in the \"county\" field.");
    theForm.county.focus();
    return (false);
  }


//---------------------------------------------------


if (theForm.state.value == "")

  {
    alert("Please choose your \"state\" ");
    theForm.state.focus();
    return (false);
  }


  

//--------------------------

if (theForm.zipcode.value == "")

  {
    alert("Please enter a value for the \"zipcode\" field.");
    theForm.zipcode.focus();
    return (false);
  }


  if (theForm.zipcode.value.length < 5)

  {
    alert("Please enter your \"zipcode\" correctly.");
    theForm.zipcode.focus();
    return (false);
  }
 

  if (theForm.zipcode.value.length > 15)

  {
    alert("Please enter your \"zipcode\" correctly.");
    theForm.zipcode.focus();
    return (false);
  }




 //-----------end
 
 
 

 //----------------
 
  return (true);

}
//----------------------------------------




