// E-mail Form - Validator
function checkData() 
{
	var correct = true
	// Return false if Name field is blank.
	if (document.Bravenet.name.value == "") 
	{
	alert("Please enter your name!")
	document.Bravenet.name.select();
	document.Bravenet.name.focus();
	correct = false;
	}
	// Return false if e-mail field is blank.   
	if (document.Bravenet.replyemail.value == "") 
	{
	alert("Please enter your e-mail address.")
	document.Bravenet.replyemail.select();
	document.Bravenet.replyemail.focus();
	correct = false; 
	}
	// Return false if e-mail field does not contain a '@' and '.' .   
	if (document.Bravenet.replyemail.value.indexOf ('@',0) == -1 || document.Bravenet.replyemail.value.indexOf ('.',0) == -1)
	{ 
		alert("\nThe E-MAIL field requires a \"@\" and a \".\"be used.\n\nPlease re-enter your e-mail address.")      
		document.Bravenet.replyemail.select();      
		document.Bravenet.replyemail.focus();      
		correct = false;      
	}   
	// Return false if telephone field is blank.
	if (document.Bravenet.telephone.value == "") 
	{
	alert("Please enter your Telephone.")
	document.Bravenet.telephone.select();
	document.Bravenet.telephone.focus();
	correct = false; 
	}
	// Return false if City and Country of origin field is blank.
	if (document.Bravenet.city_country_of_origin.value == "") 
	{
	alert("Please enter the City and Country of Origin.")
	document.Bravenet.city_country_of_origin.select();
	document.Bravenet.city_country_of_origin.focus();
	correct = false;
	}
	// Return false if City and Country of Destination field is blank.
	if (document.Bravenet.city_country_of_destination.value == "") 
	{
	alert("Please enter the City and Country of Destination.")
	document.Bravenet.city_country_of_destination.select();
	document.Bravenet.city_country_of_destination.focus();
	correct = false;
	}
	// Return false if Airport of Origin field is blank.
	if (document.Bravenet.airport_of_origin.value == "") 
	{
	alert("Please enter the Airport of Origin.")
	document.Bravenet.airport_of_origin.select();
	document.Bravenet.airport_of_origin.focus();
	correct = false;
	}
	// Return false if Airport of Destination field is blank.
	if (document.Bravenet.airport_of_destination.value == "") 
	{
	alert("Please enter the Airport of Destination.")
	document.Bravenet.airport_of_destination.select();
	document.Bravenet.airport_of_destination.focus();
	correct = false;
	}

/*
You can add more variables above.
The name after the word Bravenet has to match the name in the form below.
*/
	if (correct)
	{
	alert("Thank you for taking your time to fill out this form.")
/*	document.Bravenet.submit()
*/	
	setTimeout("self.location='contact.html'",1);
	}
	return correct
}

function Reset()
{   
	document.Bravenet.name.value = "";
	document.Bravenet.replyemail.value = "";                                                                                  
	document.Bravenet.address.value = "";
	document.Bravenet.telephone.value = "";
	document.Bravenet.fax.value = "";
	document.Bravenet.sita.value = "";
	document.Bravenet.nature_of_cargo.value = "";
	document.Bravenet.gross_weight.value = "";
	document.Bravenet.volume.value = "";
	document.Bravenet.number_of_pieces.value = "";
	document.Bravenet.packing_dimensions.value = "";
	document.Bravenet.special_conditions_for_transportaion.value = "";
	document.Bravenet.city_country_of_origin.value = "";
	document.Bravenet.city_country_of_destination.value = "";
	document.Bravenet.airport_of_origin.value = "";
	document.Bravenet.airport_of_destination.value = "";
	document.Bravenet.un_class.value = "";
	document.Bravenet.date_of_transportation.value = "";
	document.Bravenet.special_requirements.value = "";
	document.Bravenet.name.focus();
}
