function VF_secured_app(){ //v2.0
<!--start_of_saved_settings-->
<!--type,select,name,Credit&space;Status,isDefault,errMsg,Describe&space;your&space;credit&space;status&question;-->
<!--type,select,name,Employment&space;Status,isDefault,errMsg,What&space;is&space;your&space;current&space;employment&space;status&question;-->
<!--type,select,name,Contact&space;Time,isDefault,errMsg,When&space;is&space;it&space;best&space;to&space;contact&space;you&question;-->
<!--type,text,name,Email&space;Address,required,true,isEmail,errMsg,Please&space;offer&space;a&space;valid&space;contact&space;email&space;address-->
<!--type,text,name,Postcode,required,true,errMsg,Please&space;enter&space;your&space;Post&space;Code-->
<!--type,text,name,Address&space;&dash;&space;1st&space;Line,required,true,errMsg,Please&space;enter&space;the&space;first&space;line&space;of&space;your&space;address-->
<!--type,text,name,Mobile,required,false,isOkChars,0123456789,errMsg,What&space;is&space;your&space;mobile&space;number&question;-->
<!--type,text,name,Evening&space;Tel,required,false,isOkChars,0123456789&space;&dash;,errMsg,Please&space;offer&space;an&space;evening&space;contact&space;number-->
<!--type,text,name,Daytime&space;Tel&space;,required,true,isOkChars,0123456789&space;&dash;,errMsg,Please&space;offer&space;a&space;daytime&space;contact&space;number-->
<!--type,text,name,Mortgage&space;Outstanding,required,true,isOkChars,0123456789&comma;£,errMsg,How&space;much&space;is&space;outstanding&space;on&space;your&space;mortgage&question;-->
<!--type,text,name,Property&space;Value,required,true,isOkChars,0123456789&comma;£,errMsg,What&space;is&space;the&space;current&space;value&space;of&space;your&space;property&question;-->
<!--type,text,name,Amount&space;Reqd,required,true,isOkChars,0123456789&comma;£,errMsg,How&space;much&space;do&space;you&space;want&space;to&space;borrow&question;-->
<!--type,text,name,App1&space;Surname,required,true,errMsg,Please&space;enter&space;your&space;surname-->
<!--type,text,name,App1&space;Forename,required,true,isAlpha,errMsg,Please&space;enter&space;your&space;first&space;names&obrack1;s&cbrack1;-->
<!--type,checkbox,name,Homeowner&space;Status,isChecked,errMsg,Please&space;confirm&space;you&space;are&space;a&space;homeowner-->
<!--end_of_saved_settings-->
	var theForm = document.forms['secured_app'];
	var alphaRE = /^[a-zA-Z0-9]+$/;
	var emailRE = /(@\w[-._\w]*\w\.\w{2,3})$/;
	var userRE10 = new RegExp("^((0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9))+$","g");
	var userRE9 = new RegExp("^((0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9)|(\\s)|(-))+$","g");
	var userRE8 = new RegExp("^((0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9)|(\\s)|(-))+$","g");
	var userRE7 = new RegExp("^((0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9)|(,)|(£))+$","g");
	var userRE6 = new RegExp("^((0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9)|(,)|(£))+$","g");
	var userRE5 = new RegExp("^((0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9)|(,)|(£))+$","g");
	var sFlg_Credit_Status = false;
	var sFlg_Employment_Status = false;
	var sFlg_Contact_Time = false;
	var errMsg = "";
	var setfocus = "";

	for(var s16=0;s16<theForm['Credit Status'].length;s16++){if(theForm['Credit Status'].options[s16].selected){if(theForm['Credit Status'].options[s16].text==theForm['Credit Status'].options[0].text)sFlg_Credit_Status=true;}}
	for(var s15=0;s15<theForm['Employment Status'].length;s15++){if(theForm['Employment Status'].options[s15].selected){if(theForm['Employment Status'].options[s15].text==theForm['Employment Status'].options[0].text)sFlg_Employment_Status=true;}}
	for(var s14=0;s14<theForm['Contact Time'].length;s14++){if(theForm['Contact Time'].options[s14].selected){if(theForm['Contact Time'].options[s14].text==theForm['Contact Time'].options[0].text)sFlg_Contact_Time=true;}}

	if (sFlg_Credit_Status){
		errMsg = "Describe your credit status\?";
		setfocus = "['Credit Status']";
	}
	if (sFlg_Employment_Status){
		errMsg = "What is your current employment status\?";
		setfocus = "['Employment Status']";
	}
	if (sFlg_Contact_Time){
		errMsg = "When is it best to contact you\?";
		setfocus = "['Contact Time']";
	}
	if (!emailRE.test(theForm['Email Address'].value)){
		errMsg = "Please offer a valid contact email address";
		setfocus = "['Email Address']";
	}
	if (theForm['Postcode'].value == ""){
		errMsg = "Please enter your Post Code";
		setfocus = "['Postcode']";
	}
	if (theForm['Address - 1st Line'].value == ""){
		errMsg = "Please enter the first line of your address";
		setfocus = "['Address - 1st Line']";
	}
	if (theForm['Mobile'].value != ""){
		if (!userRE10.test(theForm['Mobile'].value)){
			errMsg = "What is your mobile number\?";
			setfocus = "['Mobile']";
		}
	}
	if (theForm['Evening Tel'].value != ""){
		if (!userRE9.test(theForm['Evening Tel'].value)){
			errMsg = "Please offer an evening contact number";
			setfocus = "['Evening Tel']";
		}
	}
	if ((theForm['Daytime Tel '].value == "") || (!userRE8.test(theForm['Daytime Tel '].value))){
		errMsg = "Please offer a daytime contact number";
		setfocus = "['Daytime Tel ']";
	}
	if ((theForm['Mortgage Outstanding'].value == "") || (!userRE7.test(theForm['Mortgage Outstanding'].value))){
		errMsg = "How much is outstanding on your mortgage\?";
		setfocus = "['Mortgage Outstanding']";
	}
	if ((theForm['Property Value'].value == "") || (!userRE6.test(theForm['Property Value'].value))){
		errMsg = "What is the current value of your property\?";
		setfocus = "['Property Value']";
	}
	if ((theForm['Amount Reqd'].value == "") || (!userRE5.test(theForm['Amount Reqd'].value))){
		errMsg = "How much do you want to borrow\?";
		setfocus = "['Amount Reqd']";
	}
	if (theForm['App1 Surname'].value == ""){
		errMsg = "Please enter your surname";
		setfocus = "['App1 Surname']";
	}
	if (!alphaRE.test(theForm['App1 Forename'].value)){
		errMsg = "Please enter your first names\(s\)";
		setfocus = "['App1 Forename']";
	}
	if (!theForm['Homeowner Status'].checked){
		errMsg = "Please confirm you are a homeowner";
		setfocus = "['Homeowner Status']";
	}
	if (errMsg != ""){
		alert(errMsg);
		eval("theForm" + setfocus + ".focus()");
	}
	else theForm.submit();
}