function openwin_print() {
	var iWidth = 520;
    var iHeight = 500; 
	var iTop = (window.screen.availHeight-30-iHeight)/2;
    var iLeft = (window.screen.availWidth-10-iWidth)/2;
	window.open ("inc/print.asp", "Print", "height="+iHeight+", width="+iWidth+", toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no, top="+iTop+", left="+iLeft) 
} 


	function VF_finance(){ //v2.1
	
		var theForm = document.forms['finance'];
		var numRE = /^\d+$/;
		var emailRE = /(@\w[-._\w]*\w\.\w{2,4})$/;
		var errMsg = "";
		var setfocus = "";
		
		if (!theForm['Acceptance_of_Terms'].checked){
			errMsg = "Please accept terms and conditions";
			setfocus = "['Acceptance_of_Terms']";
		}
		
		if (!theForm['Acceptance_of_Risks'].checked){
			errMsg = "Please acknowledge that there may be some security risks associated with the transmission";
			setfocus = "['Acceptance_of_Risks']";
		}
		
		if (theForm['Expenses_Car'].value != ""){
			if (!numRE.test(theForm['Expenses_Car'].value)){
				errMsg = "Expenses \- car must be numeric only";
				setfocus = "['Expenses_Car']";
			}
		}
		
		if (theForm['Expenses_Insurance'].value != ""){
			if (!numRE.test(theForm['Expenses_Insurance'].value)){
				errMsg = "Expenses \- insurance must be numeric only";
				setfocus = "['Expenses_Insurance']";
			}
		}
		
		if (theForm['Expenses_Power_Phone'].value != ""){
			if (!numRE.test(theForm['Expenses_Power_Phone'].value)){
				errMsg = "Expenses \- phone must be numeric only";
				setfocus = "['Expenses_Power_Phone']";
			}
		}
		
		if (theForm['Expenses_Credit_Accounts'].value != ""){
			if (!numRE.test(theForm['Expenses_Credit_Accounts'].value)){
				errMsg = "Expenses \- credit accounts must be numeric only";
				setfocus = "['Expenses_Credit_Accounts']";
			}
		}
		
		if (theForm['Expenses_Mortgage'].value != ""){
			if (!numRE.test(theForm['Expenses_Mortgage'].value)){
				errMsg = "Expenses \- mortgage must be numeric only";
				setfocus = "['Expenses_Mortgage']";
			}
		}
		
		if (theForm['Income_Other'].value != ""){
			if (!numRE.test(theForm['Income_Other'].value)){
				errMsg = "Income \- other income must be numeric only";
				setfocus = "['Income_Other']";
			}
		}
		
		if (theForm['Expenses_Rent'].value != ""){
			if (!numRE.test(theForm['Expenses_Rent'].value)){
				errMsg = "Expenses \- rent must be numeric only";
				setfocus = "['Expenses_Rent']";
			}
		}
		
		if (theForm['Income_Take_Home_Pay'].value != ""){
			if (!numRE.test(theForm['Income_Take_Home_Pay'].value)){
				errMsg = "Income \- take home pay must be numeric only";
				setfocus = "['Income_Take_Home_Pay']";
			}
		}
		
		if (theForm['Assets_Other'].value != ""){
			if (!numRE.test(theForm['Assets_Other'].value)){
				errMsg = "";
				setfocus = "['Assets_Other']";
			}
		}
		
		if (theForm['Liabilities_Other'].value != ""){
			if (!numRE.test(theForm['Liabilities_Other'].value)){
				errMsg = "Liabilities \- other loans  must be numeric only";
				setfocus = "['Liabilities_Other']";
			}
		}
		
		if (theForm['Assets_Investments'].value != ""){
			if (!numRE.test(theForm['Assets_Investments'].value)){
				errMsg = "Assets \- investments must be numeric only";
				setfocus = "['Assets_Investments']";
			}
		}
		
		if (theForm['Liabilities_Other_Creditors'].value != ""){
			if (!numRE.test(theForm['Liabilities_Other_Creditors'].value)){
				errMsg = "Liabilities \- other creditors  must be numeric only";
				setfocus = "['Liabilities_Other_Creditors']";
			}
		}
		
		if (theForm['Assets_Vehicle'].value != ""){
			if (!numRE.test(theForm['Assets_Vehicle'].value)){
				errMsg = "Assets \- vehicle must be numeric only";
				setfocus = "['Assets_Vehicle']";
			}
		}
		
		if (theForm['Liabilities_Bank_OD'].value != ""){
			if (!numRE.test(theForm['Liabilities_Bank_OD'].value)){
				errMsg = "Liabilities \- bank must be numeric only";
				setfocus = "['Liabilities_Bank_OD']";
			}
		}
		
		if (theForm['Assets_Bank'].value != ""){
			if (!numRE.test(theForm['Assets_Bank'].value)){
				errMsg = "Assets \- bank must be numeric only";
				setfocus = "['Assets_Bank']";
			}
		}
		
		if (theForm['Liabilities_Credit_Accounts'].value != ""){
			if (!numRE.test(theForm['Liabilities_Credit_Accounts'].value)){
				errMsg = "Liabilities \- credit account must be numeric only";
				setfocus = "['Liabilities_Credit_Accounts']";
			}
		}
		
		if (theForm['Assets_Furnishings'].value != ""){
			if (!numRE.test(theForm['Assets_Furnishings'].value)){
				errMsg = "Assets \- furnishings must be numeric only";
				setfocus = "['Assets_Furnishings']";
			}
		}
		
		if (theForm['Liabilities_Mortgages'].value != ""){
			if (!numRE.test(theForm['Liabilities_Mortgages'].value)){
				errMsg = "Liabilities \- mortgage must be numeric only";
				setfocus = "['Liabilities_Mortgages']";
			}
		}
		
		if (theForm['Assets_Home'].value != ""){
			if (!numRE.test(theForm['Assets_Home'].value)){
				errMsg = "";
				setfocus = "['Assets_Home']";
			}
		}
		
		if (theForm['Loan_Trade_In'].value != ""){
			if (!numRE.test(theForm['Loan_Trade_In'].value)){
				errMsg = "Trade\-In value must be numeric only";
				setfocus = "['Loan_Trade_In']";
			}
		}
		
		if (theForm['Loan_Cash_Deposit'].value != ""){
			if (!numRE.test(theForm['Loan_Cash_Deposit'].value)){
				errMsg = "Cash deposit must be numeric only";
				setfocus = "['Loan_Cash_Deposit']";
			}
		}
		
		if (theForm['TradeIn_Vehicle_Year'].value != ""){
			if (!numRE.test(theForm['TradeIn_Vehicle_Year'].value)){
				errMsg = "Trade\-In vehicle year must be numeric only";
				setfocus = "['TradeIn_Vehicle_Year']";
			}
		}
		
		if (theForm['Purchase_Vehicle_Year'].value != ""){
			if (!numRE.test(theForm['Purchase_Vehicle_Year'].value)){
				errMsg = "Purchase vehicle year must be numeric only";
				setfocus = "['Purchase_Vehicle_Year']";
			}
		}
		
		if (theForm['Applicant2_EmailAddress'].value != ""){
			if (!emailRE.test(theForm['Applicant2_EmailAddress'].value)){
				errMsg = "Please provide a valid email address for Applicant 2 ";
				setfocus = "['Applicant2_EmailAddress']";
			}
		}
		
		if (!emailRE.test(theForm['Applicant1_EmailAddress'].value)){
			errMsg = "Please provide a valid email address for Applicant 1";
			setfocus = "['Applicant1_EmailAddress']";
		}
		
		if (theForm['Applicant1_LastName'].value == ""){
			errMsg = "Please provide Applicant 1 Last Name";
			setfocus = "['Applicant1_LastName']";
		}
		
		if (theForm['Applicant1_FirstName'].value == ""){
			errMsg = "Please provide Applicant 1 First Name";
			setfocus = "['Applicant1_FirstName']";
		}
		
		if (errMsg != ""){
			alert(errMsg);
			eval("theForm" + setfocus + ".focus()");
		} else {
			if (document.finance.Print.value=="Yes"){
				window.print();
				theForm.submit();
			} else {
				theForm.submit();
			}
		}
		
	}

	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}

	function calcLoan(){
	formref = window.document.finance
	formref.elements['Loan_TotalRequired'].value =
	formref.elements['Loan_VehiclePrice'].value-formref.elements['Loan_Cash_Deposit'].value-formref.elements['Loan_Trade_In'].value
	}
	function calcAssets(){
	formref = window.document.finance
	formref.elements['Assets_Total'].value =
	parseInt(formref.elements['Assets_Home'].value)+parseInt(formref.elements['Assets_Furnishings'].value)+parseInt(formref.elements['Assets_Bank'].value)+parseInt(formref.elements['Assets_Vehicle'].value)+parseInt(formref.elements['Assets_Investments'].value)+parseInt(formref.elements['Assets_Other'].value)
	}
	function calcLiabilities(){
	formref = window.document.finance
	formref.elements['Liabilities_Total'].value =
	parseInt(formref.elements['Liabilities_Credit_Accounts'].value)+parseInt(formref.elements['Liabilities_Mortgages'].value)+parseInt(formref.elements['Liabilities_Bank_OD'].value)+parseInt(formref.elements['Liabilities_Other_Creditors'].value)+parseInt(formref.elements['Liabilities_Other'].value)
	}
	function calcNetworth(){
	formref = window.document.finance
	formref.elements['Net_Worth'].value =
	parseInt(formref.elements['Assets_Total'].value)-parseInt(formref.elements['Liabilities_Total'].value)
	}
	function calcIncome(){
	formref = window.document.finance
	formref.elements['Income_Total'].value =
	parseInt(formref.elements['Income_Other'].value)+parseInt(formref.elements['Income_Take_Home_Pay'].value)
	}
	function calcExpenses(){
	formref = window.document.finance
	formref.elements['Expenses_Total'].value =
	parseInt(formref.elements['Expenses_Rent'].value)+parseInt(formref.elements['Expenses_Mortgage'].value)+parseInt(formref.elements['Expenses_Credit_Accounts'].value)+parseInt(formref.elements['Expenses_Power_Phone'].value)+parseInt(formref.elements['Expenses_Insurance'].value)+parseInt(formref.elements['Expenses_Car'].value)
	}
