										
	function check(frm)
 {
 re = /([0-9a-zA-Z\.-_]+)@([0-9a-zA-Z\.-_]+)/;
 var name, contact, email, phone, fax, address, city, state, zip, total, dataRight = true;
 
 total=""
 message = "";
 name=frm.name.value;
 contact=frm.contact.value;
 email=frm.email.value;
 phone=frm.phone.value;
 fax=frm.fax.value;
 address=frm.address.value;
 city=frm.city.value;
 state=frm.state.value;
 zip=frm.zip.value;
 
if (name.length==0)
    {
    message += "\n -  Company Name";
    dataRight=false;
    }
if (contact.length==0)
    {
    message += "\n -  Contact Name";
    dataRight=false;
  }
if (email.length==0)
   {
   message += "\n -  E-Mail Address is not Valid";
   dataRight=false;
   }
if (email.length!=0 && email.match(re)==null)
   {
   dataRight=false;
   message += "\n -  E-Mail is Incorrect";
   }

if (phone.length < 10)
   {
   message += "\n -  Phone";
   dataRight=false;
   }
 
if (fax.length < 10)
   {
   message += "\n -  Fax";
   dataRight=false;
   }
if (address.length==0)
   {
   message += "\n -  Address";
   dataRight=false;
   }   
if (city.length==0)
   {
   message += "\n -  City";
   dataRight=false;
   }   
if (state.length==0)
   {
   message += "\n -  State";
   dataRight=false;
   }   
if (zip.length==0)
   {
   message += "\n -  Zip";
   dataRight=false;
   }  
  
for(var i=0; i < document.frm.type.length; i++){
if(document.frm.type[i].checked)
total +=document.frm.type[i].value + "\n"
}
if(total=="") 
	{
   message += "\n -  Check at least 1 type of work";
	dataRight=false;
	}
   
   
   
if (!dataRight)
    {
if (message != "")
   {
   message ="\n" +
   "You failed to correctly fill in the form:\n" +   message;
   }
    alert(message);
    }
 return dataRight;
 }

