function validatepayment() {

	var strError = '';
	var mf = document.forms['onlinepayment'];
	
	if (mf.name.value == '' ) { strError = strError + 'Name;\n'; }
	if (mf.address.value == '' ) { strError = strError + 'Address;\n'; }
	if (mf.postcode.value == '' ) { strError = strError + 'Postcode;\n'; }
	if (mf.country.value == '' ) { strError = strError + 'Country;\n'; }
	if (mf.tel.value == '' ) { strError = strError + 'Contact Telephone;\n'; }	
	if (mf.email.value == '' ) { strError = strError + 'Email Address;\n'; }	
	if (mf.amount.value == '' ) { strError = strError + 'Amount;\n'; }
	
	if (strError == '') {
		document.onlinepayment.submit();
	}
	else {
		strError = 'Please ensure you complete all fields - the following information is required:\n\n' + strError;
		alert(strError);
	}
}

function validatecargo() {

	var strError = '';
	var mf = document.forms['cargoquote'];
	
	if (mf.name.value == '' ) { strError = strError + 'Proposer\'s name;\n'; }
	if (mf.address.value == '' ) { strError = strError + 'Address;\n'; }
	if (mf.postcode.value == '' ) { strError = strError + 'Postcode;\n'; }
	if (mf.tel.value == '' ) { strError = strError + 'Contact telephone;\n'; }	
	
	if (mf.typeofgoods.value == '' ) { strError = strError + 'Type of Goods Shipped;\n'; }	
	if ((mf.containerised[0].checked == false) && (mf.containerised[1].checked == false)) { strError = strError + 'Are the goods containerised?;\n'; }
	if (mf.methodoftransportation.value == '' ) { strError = strError + 'Method of transportation;\n'; }	
	if (mf.voyageto.value == '' ) { strError = strError + 'Voyage (To);\n'; }	
	if (mf.voyagefrom.value == '' ) { strError = strError + 'Voyage (From);\n'; }
	if (mf.totalsuminsured.value == '' ) { strError = strError + 'Total Sum Insured;\n'; }
	if (mf.currency.value == '' ) { strError = strError + 'Currency;\n'; }
	
	if ((mf.previousclaims[0].checked == false) && (mf.previousclaims[1].checked == false)) { strError = strError + 'Have you had any previous claims?;\n'; }
	
	if (mf.hearaboutvelos.value == '' ) { strError = strError + 'Where did you hear about Velos;\n'; }
	
	if (strError == '') {
		document.cargoquote.submit();
	}
	else {
		strError = 'Please ensure you complete all fields - the following information is required:\n\n' + strError;
		alert(strError);
	}
}

function validatefishing() {

	var strError = '';
	var mf = document.forms['fishingquote'];
	
	if (mf.name.value == '' ) { strError = strError + 'Assured\'s name;\n'; }
	if (mf.address.value == '' ) { strError = strError + 'Address;\n'; }
	if (mf.postcode.value == '' ) { strError = strError + 'Postcode;\n'; }
	if (mf.tel.value == '' ) { strError = strError + 'Contact telephone;\n'; }
	if (mf.skippersexperience.value == '' ) { strError = strError + 'Skipper\'s Experience;\n'; }
	
	
	if (mf.typeofvessel.value == '' ) { strError = strError + 'Type of Vessel;\n'; }
	if (mf.vesselflag.value == '' ) { strError = strError + 'Vessel Flag;\n'; }
	if (mf.hullmaterial.value == '' ) { strError = strError + 'Hull Material;\n'; }
	if (mf.yearbuilt.value == '' ) { strError = strError + 'Year Built;\n'; }
	if (mf.grosstons.value == '' ) { strError = strError + 'Gross Tons;\n'; }
	if (mf.maxspeed.value == '' ) { strError = strError + 'Max Speed;\n'; }	
	if (mf.length.value == '' ) { strError = strError + 'Length;\n'; }	
	
	//if (mf.use.value == 'charter') {
	//	if (mf.maxpassengers.value == '' ) { strError = strError + 'Max Number of Passengers;\n'; }
	//}
	
	//if (mf.value.value == '' ) { strError = strError + 'Value (Engine);\n'; }
	//if (mf.lastoverhaul.value == '' ) { strError = strError + 'Date of Last Overhaul;\n'; }
	if (mf.engineyearofmake.value == '' ) { strError = strError + 'Year of Make (Engine);\n'; }
	
	if (mf.cruisingfishinglimits.value == '' ) { strError = strError + 'Cruising\\Fishing Limits;\n'; }
	if (mf.typeofoperation.value == '' ) { strError = strError + 'Type of Operation\\Fishing;\n'; }
	
	if ((mf.crewliability[0].checked == false) && (mf.crewliability[1].checked == false)) { strError = strError + 'Crew Liability;\n'; }
	if ((mf.crewliability[0].checked == true)) {
		if (mf.numberofcrew.value == '' ) { strError = strError + 'If Crew Liability is required, please specify the number of men;\n'; }
	}	
		
	if (mf.totalsuminsured.value == '' ) { strError = strError + 'Total Sum Insured;\n'; }
	if (mf.noclaimsdiscount.value == '' ) { strError = strError + 'No Claims Discount;\n'; }
	if (mf.renewaldate.value == '' ) { strError = strError + 'Renewal Date;\n'; }
	
	if ((mf.previousclaims[0].checked == false) && (mf.previousclaims[1].checked == false)) { strError = strError + 'Have you had any claims in the last 5 years?;\n'; }
	
	if (mf.hearaboutvelos.value == '' ) { strError = strError + 'Where did you hear about Velos;\n'; }
	
	if (strError == '') {
		document.fishingquote.submit();
	}
	else {
		strError = 'Please ensure you complete all fields - the following information is required:\n\n' + strError;
		alert(strError);
	}
}

function validateyacht() {

	var strError = '';
	var mf = document.forms['yachtquote'];
	
	if (mf.name.value == '' ) { strError = strError + 'Assured\'s name;\n'; }
	if (mf.address.value == '' ) { strError = strError + 'Address;\n'; }
	if (mf.postcode.value == '' ) { strError = strError + 'Postcode;\n'; }
	if (mf.tel.value == '' ) { strError = strError + 'Contact telephone;\n'; }
	//if (mf.email.value == '' ) { strError = strError + 'Email;\n'; }
	if (mf.age.value == '' ) { strError = strError + 'Age;\n'; }
	if (mf.experience.value == '' ) { strError = strError + 'Experience;\n'; }
	//if (mf.vesselname.value == '' ) { strError = strError + 'Vessel Name ;\n'; }
	if (mf.craftflag.value == '' ) { strError = strError + 'Craft Flag;\n'; }
	if (mf.makemodel.value == '' ) { strError = strError + 'Make\\Model;\n'; }
	if (mf.yearofmake.value == '' ) { strError = strError + 'Year of Make (Vessel);\n'; }
	if (mf.hullmaterial.value == '' ) { strError = strError + 'Hull Material;\n'; }
	
	if (mf.length.value == '' ) { strError = strError + 'Length;\n'; }
	
	//if (mf.makeofengine.value == '' ) { strError = strError + 'Make of Engine;\n'; }
	//if (mf.engineyearofmake.value == '' ) { strError = strError + 'Year of Make (Engine);\n'; }
	//if (mf.power.value == '' ) { strError = strError + 'Power;\n'; }
	if (mf.maxdesignspeed.value == '' ) { strError = strError + 'Max Design Speed;\n'; }
	
	//if ((mf.enginetypeA[0].checked == false) && (mf.enginetypeA[1].checked == false)) { strError = strError + 'Engine Type (Inboard\\Outboard);\n'; }
	//if ((mf.enginetypeB[0].checked == false) && (mf.enginetypeB[1].checked == false)) { strError = strError + 'Engine Type (Petrol\\Diesel);\n'; }
	//if ((mf.enginetypeC[0].checked == false) && (mf.enginetypeC[1].checked == false)) { strError = strError + 'Engine Type (Single\\Twin);\n'; }
	
	if (mf.use.value == '' ) { strError = strError + 'Use;\n'; }
	
	//if (mf.use.value == 'charter') {
	//	if (mf.maxpassengers.value == '' ) { strError = strError + 'Max Number of Passengers;\n'; }
	//}
	
	if (mf.cruisingrange.value == '' ) { strError = strError + 'Cruising Range;\n'; }
	if (mf.mooringlocation.value == '' ) { strError = strError + 'Mooring Location;\n'; }
	if (mf.mooringtype.value == '' ) { strError = strError + 'Mooring Type;\n'; }
	if (mf.commissionfrom.value == '' ) { strError = strError + 'Commission From;\n'; }
	if (mf.commissionto.value == '' ) { strError = strError + 'Commission To;\n'; }
	
	if (mf.totalsuminsured.value == '' ) { strError = strError + 'Total Sum Insured;\n'; }
	if (mf.noclaimsdiscount.value == '' ) { strError = strError + 'No Claims Discount;\n'; }
	if (mf.renewaldate.value == '' ) { strError = strError + 'Renewal Date;\n'; }
	
	if ((mf.previousclaims[0].checked == false) && (mf.previousclaims[1].checked == false)) { strError = strError + 'Have you had any claims in the last 5 years?;\n'; }
	
	//if (mf.previousclaims[0].checked == true) {
	//	if (mf.previosclaimsdetails.value == '') {
	//		strError = strError + 'Please enter the details of your previous claim(s);\n'; 
	//	}
	//}
	
	//if ((mf.waterskiersliability[0].checked == false) && (mf.waterskiersliability[1].checked == false)) { strError = strError + 'Water Skiers Liability Required;\n'; }
	//if ((mf.towingliability[0].checked == false) && (mf.towingliability[1].checked == false)) { strError = strError + 'Towing Liability Required;\n'; }
	
	if (mf.hearaboutvelos.value == '' ) { strError = strError + 'Where did you hear about Velos;\n'; }
	
	if (strError == '') {
		document.yachtquote.submit();
	}
	else {
		strError = 'Please ensure you complete all fields - the following information is required:\n\n' + strError;
		alert(strError);
	}
}

