<!--
function checkFields() {
var missinginfo = "";
var f = document.quotation;
var d = f.doclanguage.value;
// set default language
if (d == "") {d="en";}

// no name
if (TrimAll(f.name.value) == "") {
	switch(d) {
case "en": missinginfo += "\n     -  Your name."; break
case "nl": missinginfo += "\n     -  Uw naam."; break
case "es": missinginfo += "\n     -  Su nombre."; break
default  : missinginfo += "\n     -  Your name."; break
	}
}

// none, or wrong email address
var strng = TrimAll(f.namemailto.value);
if (strng == "") {
	switch(d) {
case "en": missinginfo += "\n     -  Your e-mail address."; break
case "nl": missinginfo += "\n     -  Uw e-mail adres."; break
case "es": missinginfo += "\n     -  Su dirección del E-mail."; break
default  : missinginfo += "\n     -  Your e-mail address."; break
	}
}
var emailFilter = /^.+@.+\..{2,3}$/;
if (!(emailFilter.test(strng))) { 
	switch(d) {
case "en": missinginfo += "\n     -  Please, enter a valid email address."; break
case "nl": missinginfo += "\n     -  Voer een geldig e-mailadres in."; break
case "es": missinginfo += "\n     -  Por favor, incorpore un email address válido."; break
default  : missinginfo += "\n     -  Please, enter a valid email address."; break
	}
}
var illegalChars = /[\(\)\<\>\,\;\:\\\/\"\[\]]/
if (strng.match(illegalChars)) {
	switch(d) {
case "en": missinginfo += "\n     -  The email address contains illegal characters."; break
case "nl": missinginfo += "\n     -  Het e-mailadres bevat ongeldige tekens."; break
case "es": missinginfo += "\n     -  El email address contiene caracteres ilegales."; break
default  : missinginfo += "\n     -  The email address contains illegal characters."; break
	}
}

// telephone number
if (TrimAll(f.namephone.value) == "") {
	switch(d) {
case "en": missinginfo += "\n     -  Your telephone number...."; break
case "nl": missinginfo += "\n     -  Uw telefoonnummer...."; break
case "es": missinginfo += "\n     -  Su número de teléfono...."; break
default  : missinginfo += "\n     -  Your telephone number...."; break
	}
}

// Professional / personal indication : all radio's UNchecked
if ( ( f.nametype[0].checked == false )
&& 	( f.nametype[1].checked == false )
&& 	( f.nametype[2].checked == false )
&& 	( f.nametype[3].checked == false )
&& 	( f.nametype[4].checked == false ))  {
	switch(d) {
case "en": missinginfo += "\n     -  Your are a..."; break
case "nl": missinginfo += "\n     -  U bent een..."; break
case "es": missinginfo += "\n     -  Su es un..."; break
default  : missinginfo += "\n     -  Your are a..."; break
	}
}
// textfield other-name-type is filled, but radio 'other' UNchecked
if ((( f.nametype[0].checked == true )
|| 	 ( f.nametype[1].checked == true )
|| 	 ( f.nametype[2].checked == true )
|| 	 ( f.nametype[3].checked == true )
&&       ( f.nametype[4].checked == false ))
&& 	 ( f.othernametype.value != "" ) )  {
	switch(d) {
case "en": missinginfo += "\n     -  Select 'other' or clear your input at 'You are a...'."; break
case "nl": missinginfo += "\n     -  Selecteer 'anders' of verwijder uw invoer bij 'U bent een...'."; break
case "es": missinginfo += "\n     -  Seleccione 'otro' o claro su entrada en 'Su es un... '."; break
default  : missinginfo += "\n     -  Select 'other' or clear your input at 'You are a...'."; break
	}
}
// textfield other-name-type is empty, but radio 'other' is CHECKED
if ( ( f.nametype[4].checked == true )
&& 	( TrimAll(f.othernametype.value) == "" ))  {
	switch(d) {
case "en": missinginfo += "\n     -  Specify your 'other' profession at 'You are a...'."; break
case "nl": missinginfo += "\n     -  Specificeer uw 'anders' beroep bij 'U bent een...'."; break
case "es": missinginfo += "\n     -  Usted no incorporó su profesión en 'Su es un...'."; break
default  : missinginfo += "\n     -  Specify your 'other' profession at 'You are a...'."; break
	}
}

// ********************************** quotation **********************************

// Name of boat
if (TrimAll(f.boatname.value) == "") {
	switch(d) {
case "en": missinginfo += "\n     -  Name of boat."; break
case "nl": missinginfo += "\n     -  Bootnaam."; break
case "es": missinginfo += "\n     -  Nombre del barco."; break
default  : missinginfo += "\n     -  Name of boat."; break
	}
}

// Type of boat : all radio's UNchecked
if    (	( f.boattype[0].checked == false )
&& 	( f.boattype[1].checked == false )
&& 	( f.boattype[2].checked == false )
&& 	( f.boattype[3].checked == false )
&& 	( f.boattype[4].checked == false )
&&      ( f.boattype[5].checked == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Type of boat...."; break
case "nl": missinginfo += "\n     -  Boottype...."; break
case "es": missinginfo += "\n     -  Tipo de barco...."; break
default  : missinginfo += "\n     -  Type of boat...."; break
	}
}
// textfield other-boat-type is filled, but radio 'other' UNchecked
if ((( f.boattype[0].checked == true )
|| 	 ( f.boattype[1].checked == true )
|| 	 ( f.boattype[2].checked == true )
|| 	 ( f.boattype[3].checked == true )
|| 	 ( f.boattype[4].checked == true )
&&       ( f.boattype[5].checked == false ))
&& 	 ( TrimAll(f.otherboattype.value) != "" ) )  {
	switch(d) {
case "en": missinginfo += "\n     -  Select 'other' or clear your input at 'Kind of boat...'."; break
case "nl": missinginfo += "\n     -  Selecteer 'anders' of verwijder uw invoer bij 'Soort boot...'."; break
case "es": missinginfo += "\n     -  Seleccione 'otro' o claro su entrada en 'Tipo de barco...'."; break
default  : missinginfo += "\n     -  Select 'other' or clear your input at 'Kind of boat...'."; break
	}
}
// textfield other-boat-type is empty, but radio 'other' CHECKED
if ( ( f.boattype[5].checked == true )
&& 	( TrimAll(f.otherboattype.value) == "" ))  {
	switch(d) {
case "en": missinginfo += "\n     -  Specify your 'other' at 'Kind of boat...'."; break
case "nl": missinginfo += "\n     -  Specificeer uw 'ander' bij 'Soort boot...'."; break
case "es": missinginfo += "\n     -  Especifique 'otro' en el 'Tipo de barco...'."; break
default  : missinginfo += "\n     -  Specify your 'other' at 'Kind of boat...'."; break
	}
}

// Length overall
if (TrimAll(f.boatlengthoverall.value) == "") {
	switch(d) {
case "en": missinginfo += "\n     -  Length overall...."; break
case "nl": missinginfo += "\n     -  Lengte over alles...."; break
case "es": missinginfo += "\n     -  Longitud total...."; break
default  : missinginfo += "\n     -  Length overall...."; break
	}
}
// Length overall : is filled, check float
if ( 	( TrimAll(f.boatlengthoverall.value) != "")
&& 	( isNumeric(f.boatlengthoverall.value) == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Length overall contains illegal characters."; break
case "nl": missinginfo += "\n     -  Lengte over alles bevat ongeldige tekens."; break
case "es": missinginfo += "\n     -  Longitud total contiene caracteres ilegales."; break
default  : missinginfo += "\n     -  TLength overall contains illegal characters."; break
	}
}

// Length waterline
if (TrimAll(f.boatlengthwaterline.value) == "") {
	switch(d) {
case "en": missinginfo += "\n     -  Length waterline...."; break
case "nl": missinginfo += "\n     -  Lengte waterline...."; break
case "es": missinginfo += "\n     -  Línea de flotación de la longitud...."; break
default  : missinginfo += "\n     -  Length waterline...."; break
	}
}
// Length waterline: is filled, check float
if ( 	( TrimAll(f.boatlengthwaterline.value) != "")
&& 	( isNumeric(TrimAll(f.boatlengthwaterline.value)) == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Length waterline contains illegal characters."; break
case "nl": missinginfo += "\n     -  Lengte waterlijn bevat ongeldige tekens."; break
case "es": missinginfo += "\n     -  Longitud línea de flotación contiene caracteres ilegales."; break
default  : missinginfo += "\n     -  Length waterline contains illegal characters."; break
	}
}

// Beam
if (TrimAll(f.boatwidth.value) == "") {
	switch(d) {
case "en": missinginfo += "\n     -  Beam...."; break
case "nl": missinginfo += "\n     -  Breedte...."; break
case "es": missinginfo += "\n     -  Viga...."; break
default  : missinginfo += "\n     -  Beam...."; break
	}
}
// Beam : is filled, check float
if ( 	( TrimAll(f.boatwidth.value) != "")
&& 	( isNumeric(TrimAll(f.boatwidth.value)) == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Beam contains illegal characters."; break
case "nl": missinginfo += "\n     -  Breedte bevat ongeldige tekens."; break
case "es": missinginfo += "\n     -  Viga contiene caracteres ilegales."; break
default  : missinginfo += "\n     -  Beam contains illegal characters."; break
	}
}

// Draught
if (TrimAll(f.boatdraught.value) == "") {
	switch(d) {
case "en": missinginfo += "\n     -  Draught...."; break
case "nl": missinginfo += "\n     -  Diepgang...."; break
case "es": missinginfo += "\n     -  Bosquejo...."; break
default  : missinginfo += "\n     -  Draught...."; break
	}
}
// Draught : is filled, check float
if ( 	( TrimAll(f.boatdraught.value) != "")
&& 	( isNumeric(TrimAll(f.boatdraught.value)) == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Draught contains illegal characters."; break
case "nl": missinginfo += "\n     -  Diepgang bevat ongeldige tekens."; break
case "es": missinginfo += "\n     -  Bosquejo contiene caracteres ilegales."; break
default  : missinginfo += "\n     -  Draught contains illegal characters."; break
	}
}

/*

// ------------------------------------------------------------------------- 
// calculate net surface m2 to be treaded, set price estimate in f.surface.value
// ------------------------------------------------------------------------- 
// 1) calculate gross surface m2
var gm2 = "";	// gross surface area excl. correction factor
var nm2 = "";	// net surface area incl. correction factor

var loa = TrimAll(f.boatlengthoverall.value);
var lwl = TrimAll(f.boatlengthwaterline.value);
var br	= TrimAll(f.boatwidth.value);
var dg	= TrimAll(f.boatdraught.value);
loa = "20"; lwl = "15"; br="6"; dg="3"
if ( (loa != "")&&(lwl != "")&&(br != "")&&(dg != "") ){ gm2 = (lwl * (br + dg)); }

// 2) calculate net surface m2 : gm2 * correction factor
var i = getRadioButtonValue(TrimAll(f.boattype.value));
switch(i) {
	case "motor yacht"			: nm2 = gm2 * 1     ;break
	case "sailing yacht with fin keel"	: nm2 = gm2 * 0.75  ;break
	case "sailing yacht with long keel"	: nm2 = gm2 * 0.5   ;break
	case "catamaran"			: nm2 = 0     ;break
	case "trimaran"				: nm2 = 0     ;break
	case "other"				: nm2 = 0     ;break
	default					: nm2 = 0     ;break
}

*************************************************************************** */


/* ***********************************************
var uP	= "125";	// gross unit price per m2 excl. IVA/BTW/VAT
var gPi = "";		// gross price indication  excl. IVA/BTW/VAT
gPi = nm2 * uP;

// set / update f.surface.value
gPi =	f.surface.value
// ------------------------------------------------------------------------- */

// Hull construction : all radio's UNchecked
if    (	( f.hullconstruction[0].checked == false )
&& 	( f.hullconstruction[1].checked == false )
&& 	( f.hullconstruction[2].checked == false )
&&      ( f.hullconstruction[3].checked == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Hull construction...."; break
case "nl": missinginfo += "\n     -  Rompconstructie...."; break
case "es": missinginfo += "\n     -  Construcción del casco...."; break
default  : missinginfo += "\n     -  Hull construction...."; break
	}
}

// textfield other-hull-construction is filled, but radio 'other' UNchecked
if (   ( ( f.hullconstruction[0].checked == true )
|| 	 ( f.hullconstruction[1].checked == true )
|| 	 ( f.hullconstruction[2].checked == true )
&&       ( f.hullconstruction[3].checked == false) )
&& 	 ( TrimAll(f.otherhullconstruction.value) != "" )   )  {
	switch(d) {
case "en": missinginfo += "\n     -  Select 'other' or clear your input at 'Hull construction'."; break
case "nl": missinginfo += "\n     -  Selecteer 'anders' of verwijder uw invoer bij 'Rompconstructie'."; break
case "es": missinginfo += "\n     -  Seleccione 'otro' o claro su entrada en 'Construcción del casco'."; break
default  : missinginfo += "\n     -  Select 'other' or clear your input at 'Hull construction'."; break
	}
}
// textfield other-hull-contruction is empty, but radio hull-construction-other is CHECKED 
if ( ( f.hullconstruction[3].checked == true )
&& 	( TrimAll(f.otherhullconstruction.value) == "" ))  {
	switch(d) {
case "en": missinginfo += "\n     -  Specify your 'other' at 'Hull construction'."; break
case "nl": missinginfo += "\n     -  Specificeer uw 'ander' bij 'Rompconstructie'."; break
case "es": missinginfo += "\n     -  Especifique 'otro' en el 'Construcción del casco'."; break
default  : missinginfo += "\n     -  Specify your 'other' at 'Hull construction'."; break
	}
}

// Osmosis treatment history : all radio's UNchecked
if ( ( f.hullhistory[0].checked == false )
&& 	( f.hullhistory[1].checked == false )
&& 	( f.hullhistory[2].checked == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Osmosis treatment history."; break
case "nl": missinginfo += "\n     -  Osmosebehandelhistorie."; break
case "es": missinginfo += "\n     -  Historia del tratamiento de la ósmosis."; break
default  : missinginfo += "\n     -  Osmosis treatment history."; break
	}
}
// Boat (prefered) repair and/or inspection location : is empty
if (TrimAll(f.boatlocation.value) == "") {
	switch(d) {
case "en": missinginfo += "\n     -  Boat (prefered) repair and/or inspection location."; break
case "nl": missinginfo += "\n     -  Boot (voorkeurs-) reparatie en/of inspectie locatie."; break
case "es": missinginfo += "\n     -  Reparación del barco y/o localización de la inspección."; break
default  : missinginfo += "\n     -  Boat (prefered) repair and/or inspection location."; break
	}
}
// Treatment period preference : all radio's UNchecked
if ( ( f.boatrepairpreference[0].checked == false )
&& 	( f.boatrepairpreference[1].checked == false )
&& 	( f.boatrepairpreference[2].checked == false )
&& 	( f.boatrepairpreference[3].checked == false )
&& 	( f.boatrepairpreference[4].checked == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Treatment period preference...."; break
case "nl": missinginfo += "\n     -  Behandelvoorkeursperiode...."; break
case "es": missinginfo += "\n     -  Preferencia del período del tratamiento...."; break
default  : missinginfo += "\n     -  Treatment period preference...."; break
	}
}

// ******************************** checklist ***********************************

// Watertank(s) : checked, but all radio's UNcheckd
if ( ( f.watertank.checked == true )
&& 	( f.watertankempty[0].checked == false )
&& 	( f.watertankempty[1].checked == false )
&& 	( f.watertankempty[2].checked == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Specify water tank(s) : empty \| dry \| empty \& dry."; break
case "nl": missinginfo += "\n     -  Specificeer watertank(s) : empty \| droog \| empty \& droog."; break
case "es": missinginfo += "\n     -  Especifique tanque(s) de aqua : vacie \| seco \ vacío & seco."; break
default  : missinginfo += "\n     -  Specify water tank(s) : empty \| dry \| empty \& dry.."; break
	}
}
// Fueltank(s), but all radio's UNcheckd
if ( ( f.fueltank.checked == true )
&& 	( f.fueltankempty[0].checked == false )
&& 	( f.fueltankempty[1].checked == false )
&& 	( f.fueltankempty[2].checked == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Specify fuel tank(s) : empty \| dry \| empty \& dry."; break
case "nl": missinginfo += "\n     -  Specificeer brandstoftank(s) : empty \| droog \| empty \& droog."; break
case "es": missinginfo += "\n     -  Especifique tanque(s) carburante : vacie \| seco \ vacío & seco."; break
default  : missinginfo += "\n     -  Specify fuel tank(s) : empty \| dry \| empty \& dry.."; break
	}
}
// Greywatertank(s), but all radio's UNcheckd
if ( ( f.greywatertank.checked == true )
&& 	( f.greywatertankempty[0].checked == false )
&& 	( f.greywatertankempty[1].checked == false )
&& 	( f.greywatertankempty[2].checked == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Specify grey water tank(s) : empty \| dry \| empty \& dry."; break
case "nl": missinginfo += "\n     -  Specificeer grijswatertank(s) : empty \| droog \| empty \& droog."; break
case "es": missinginfo += "\n     -  Especifique tanque(s) grises de agua : vacie \| seco \ vacío & seco."; break
default  : missinginfo += "\n     -  Specify grey water tank(s) : empty \| dry \| empty \& dry.."; break
	}
}
// Blackwatertank(s), but all radio's UNcheckd
if ( ( f.blackwatertank.checked == true )
&& 	( f.blackwatertankempty[0].checked == false )
&& 	( f.blackwatertankempty[1].checked == false )
&& 	( f.blackwatertankempty[2].checked == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Specify black water tank(s) : empty \| dry \| empty \& dry."; break
case "nl": missinginfo += "\n     -  Specificeer zwartwatertank(s) : empty \| droog \| empty \& droog."; break
case "es": missinginfo += "\n     -  Especifique tanque(s) negros de agua : vacie \| seco \ vacío & seco."; break
default  : missinginfo += "\n     -  Specify black water tank(s) : empty \| dry \| empty \& dry.."; break
	}
}
// Bilge(s), but all radio's UNcheckd
if ( ( f.bilge.checked == true )
&& 	( f.bilgeempty[0].checked == false )
&& 	( f.bilgeempty[1].checked == false )
&& 	( f.bilgeempty[2].checked == false )
&& 	( f.bilgeempty[3].checked == false )
&& 	( f.bilgeempty[4].checked == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Specify bilge(s) : empty \| dry \| empty \& dry."; break
case "nl": missinginfo += "\n     -  Specificeer biels(-zen) : empty \| droog \| empty \& droog."; break
case "es": missinginfo += "\n     -  Especifique bilge(s) : vacie \| seco \ vacío & seco."; break
default  : missinginfo += "\n     -  Specify bilge(s) : empty \| dry \| empty \& dry.."; break
	}
}
// Innerhull(s), but all radio's UNcheckd
if ( ( f.innerhull.checked == true )
&& 	( f.innerhullempty[0].checked == false )
&& 	( f.innerhullempty[1].checked == false )
&& 	( f.innerhullempty[2].checked == false )
&& 	( f.innerhullempty[3].checked == false )
&& 	( f.innerhullempty[4].checked == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Specify inner hull(s) : empty \| dry \| empty \& dry."; break
case "nl": missinginfo += "\n     -  Specificeer inwendige romp(en) : empty \| droog \| empty \& droog."; break
case "es": missinginfo += "\n     -  Especifique casco(s) interno : vacie \| seco \ vacío & seco."; break
default  : missinginfo += "\n     -  Specify inner hull(s) : empty \| dry \| empty \& dry.."; break
	}
}

// Other tank(s) : is selected, but textfield other-tank-name is empty
if ( ( f.othertank.checked == true )
&& 	( TrimAll(f.othertankname.value) == "" ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Specify other tank(s) name(s)."; break
case "nl": missinginfo += "\n     -  Specificeer overige tanknaam (-namen)."; break
case "es": missinginfo += "\n     -  Especifique nombre(s) otro tanque(s)."; break
default  : missinginfo += "\n     -  Specify other tank(s) name(s)."; break
	}
}


// Other tank(s) : is selected , but all radio's UNcheckd
if ( ( f.othertank.checked == true )
&& 	( f.othertankempty[0].checked == false )
&& 	( f.othertankempty[1].checked == false )
&& 	( f.othertankempty[2].checked == false ) ) {
	switch(d) {
case "en": missinginfo += "\n     -  Specify other tank(s) : empty \| dry \| empty \& dry."; break
case "nl": missinginfo += "\n     -  Specificeer overige tank(s) : empty \| droog \| empty \& droog."; break
case "es": missinginfo += "\n     -  Especifique otro tanque(s) : vide \| seco \ vide & seco."; break
default  : missinginfo += "\n     -  Specify other tank(s) : empty \| dry \| empty \& dry.."; break
	}
}




// construct alert
if (missinginfo != "") {
	switch(d) {
case "en":	 missinginfo ="_____________________________\n" + "You failed to correctly fill in your:\n" + missinginfo + "\n_____________________________" + "\nPlease re-enter and submit again !"; break

case "nl":	 missinginfo ="_________________________________________\n" + "U heeft deze gegevens incorrect of niet ingevoerd :\n" + missinginfo + "\n________________________________________" + "\nCorrigeer of voer deze a.u.b. in en zendt opnieuw !"; break

case "es":	 missinginfo ="_____________________________________\n" + "Usted no pudo completar correctamente su:\n" + missinginfo + "\n_____________________________________" + "\nVuelva a entrar y someta por favor otra vez !"; break

default  :	 missinginfo ="_____________________________\n" + "You failed to correctly fill in your:\n" + missinginfo + "\n_____________________________" + "\nPlease re-enter and submit again !"; break
	}
alert(missinginfo);
return false;
}
else return true;
}
// -->
