
function chkRequired(myForm) {
	var validmail=true;
	
	if (document.rfqForm.fname.value=="") {
		alert('Please enter your address.');
		document.rfqForm.fname.select();
		validmail=false;	
	} else if (document.rfqForm.contact.value=="") {
		alert('Please enter name of contact person.');
		document.rfqForm.contact.select();
		validmail=false;
	} else	if (document.rfqForm.tel.value=="") {
		alert('Please enter your contact number.');
		document.rfqForm.tel.select();
		validmail=false;
	} else if (document.rfqForm.srvAddr1.value=="") {
		alert('Please enter address of service location.');
		document.rfqForm.srvAddr1.select();
		validmail=false;
	}
	
	if(validmail) {

		var mail="mailto:faria@srt-eon.com?Subject=Request For Quotation&body=";
		
		mail += "\n [Company Name]: " + document.rfqForm.coName.value;
		mail += "\n [Address]: " + document.rfqForm.addr1.value + "," + document.rfqForm.addr2.value + "," + document.rfqForm.addr3.value;
		mail += "\n [Contact Person]: " + document.rfqForm.contact.value;
		mail += "\n [Tel]: " + document.rfqForm.tel.value;
		mail += "\n [Fax]: " + document.rfqForm.fax.value;
		mail += "\n [E-mail]: " + document.rfqForm.email.value;
		mail += "\n [Service Location]: " + document.rfqForm.srvAddr1.value + "," + document.rfqForm.srvAddr2.value + "," + document.rfqForm.srvAddr3.value;
		mail += "\n [Extra Info]: " + document.rfqForm.extraInfo.value;
		mail += "\n [Enquired Service Type]: ";
			
		if (document.rfqForm.srv1.checked) {mail += "\n [Armed Guard]";}
		if (document.rfqForm.srv2.checked) {mail += "\n [Body Guard]";}
		if (document.rfqForm.srv3.checked) {mail += "\n [Cash-in-Transit (CIT)]";}
		if (document.rfqForm.srv4.checked) {mail += "\n [Private Investigation]";}
		if (document.rfqForm.srv5.checked) {mail += "\n [Central Monitoring Station (CMS)]";}
		if (document.rfqForm.srv6.checked) {mail += "\n [Unarmed Guard]";}
		if (document.rfqForm.srv7.checked) {mail += "\n [Escort Services]";}
		if (document.rfqForm.srv8.checked) {mail += "\n [Security Trucking]";}
		if (document.rfqForm.srv9.checked) {mail += "\n [Security Consultation]";}
		if (document.rfqForm.srv10.checked) {mail += "\n [Electronic Security System]";}	
		
		myForm.action=mail;
		myForm.submit();
		
		window.document.open();
		window.document.writeln("<BR><B>");
		window.document.writeln("Request form submitted. <A HREF=\"index.htm\">Back to main page</A>");
		window.document.writeln("</B>");
		window.document.close();
		
		return true;
	} else {
		return false;
	}	
}
