function validEmail(email) {
invalidChars = " /:,;"

if (email == "") {
return false
}
for (i=0; i<invalidChars.length; i++) 
{
badChar = invalidChars.charAt(i)
if (email.indexOf(badChar,0)
> -1)
{
return false
}
}
atPos = email.indexOf("@", 1)
if (atPos == -1)
{ 
return false
}
periodPos = email.indexOf(".",atPos)
if (periodPos == -1) 
{
return false
}
if (periodPos+3 > email.length)
{
return false

}
return true
}


function submitIt(form2)
{
if (form2.company.value == "")
{
alert("Please fill in field : company");
form2.company.focus();
form2.company.select();
return false;
}
if (form2.contact.value == "")
{
alert("Please fill in field : contact");
form2.contact.focus();
form2.contact.select();
return false;
}
if (form2.phone.value == "")
{
alert("Please fill in field : phone");
form2.phone.focus();
form2.phone.select();
return false;
}
if (form2.packinglist.value == "Goods - packing - dimensions - unit weights")
{ 
alert("Please fill in field : packinglist");
form2.packinglist.focus();
form2.packinglist.select();
return false;
}
if (form2.pickup_area.value == "")
{
alert("Please fill in field : pick up area")
form2.pickup_area.focus();
form2.pickup_area.select();
return false;
}
if (form2.transportdate.value =="")
{
alert("Please fill in field : date of transport")
form2.transportdate.focus();
form2.transportdate.select();
return false;
}
if (form2.final_destination.value =="")
{
alert("Please fill in field : final destination")
form2.final_destination.focus();
form2.final_destination.select();
return false;
}
incotermChoice = form2.incoterms.selectedIndex
if(form2.incoterms.options[incotermChoice].value == "") {
alert("Choose an incoterm")
form2.incoterms.focus()
return false
}
if(!validEmail(form2.email.value))
{
alert("Correct email address")
form2.email.focus()
form2.email.select()
return false
}
return true
}