
var newFields = new formFields();

function next() {
	trackShareAsale();
	document.hiddenForm.SSAID.value = getCookie('SSAID');
	document.hiddenForm.Source.value = getCookie('Source');

	if(document.hiddenForm.Site.value == '') document.hiddenForm.Site.value = '-';
	if(document.hiddenForm.Source.value == '') document.hiddenForm.Source.value = '-';
	if(document.hiddenForm.Referrer.value == '') document.hiddenForm.Referrer.value = '-';
	if(document.hiddenForm.SSAID.value == '') document.hiddenForm.SSAID.value = '-';

//	var remainingFields = 0;
	var remainingFields = '';
	var completedFields = '|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||';

	var submitValue = "Next";
//	document.getElementById('test').value='';

	for(var i=0; i<(document.hiddenForm.elements.length-1); i++) {
		var newFieldName = document.hiddenForm.elements[i].name;


		if(document.hiddenForm.elements[i].value == '') {

			for(var j=0; j<document.hiddenForm.elements.length; j++) {
				if(document.hiddenForm.elements[j].value == '') {
//					remainingFields++;
					remainingFields+='|';
				}
				else{
//					document.getElementById('test').value+=(document.hiddenForm.elements[j].name + '=' + document.hiddenForm.elements[j].value + '\n')
				}
			}

			var min = parseInt(remainingFields*2/60);
			var sec = remainingFields*2 - min*60;
			completedFields = completedFields.substring(0, completedFields.length - remainingFields.length);

			var info = '<font style=\"font-size: 11\">(progress: <font color=blue>' + completedFields + '</font><font color=brown><b>|</b>' + remainingFields + '</font>)</font>';

			var SSL = " <a href='https://www.leadpile.com/ezwebsys.com/shared/html/secureSite.html' target=blank'><img src='http://www.ezwebsys.com/shared/images/lock.gif' style='padding: 0px 5px 0px 5px; border: 0' alt='SSL Secured Form - Click for details'></a> ";

			var formEnd = SSL + " <input type=button name=back class='submitStyle' style='width: 50' value='Back' onClick='backStep();'><img src='http://www.ezwebsys.com/shared/images/spacer.gif' width='10' onLoad='//document.inquiry.elements[0].focus();'><input type=submit name=submit class='submitStyle' style='width: 50' value='" + submitValue + "'> " + SSL;

			if(!document.hiddenForm.LoanType.value){
				formEnd = formEnd + "<br><font style='font-family:arial; font-size:10px; font-weight:normal;color: gray; position: relative; top: 18; '>By using this form you agree to its <a style='font-family:arial; font-size:10px; font-weight:normal;color: gray; text-decoration:underline;' href='http://www.ezwebsys.com/shared/html/disclaimer.html' target=_blank>terms of use</a>";
			}

			if(newFields[newFieldName]) {setPage('leftSide', newFields[newFieldName], 'nextButton', formEnd);}
			setPage('info', info);
			break;
		}
	}

	if(remainingFields == 0) {
		if(getCookie('Sent') != 'True') {
			submitInfo();
		}
		else {
			if (getCookie('Alert') == null) {
				alert("Please wait for the confirmation page!\nYour information is being processed.");
				setCookie('Alert', 'Made');
			}
		}
	}
//	showFieldsValues(document.hiddenForm);
}

function showFieldsValues(form){
	var string = "";
	for(var i=0; i<form.elements.length; i++) {
		if(form.elements[i].value == '') string += form.elements[i].name + " = " + form.elements[i].value + "\n";
	}
	alert(string);
}

function removeFields(from, to) {
	for (var i = from; i <= to; i++) {
		if(document.hiddenForm.elements[i].value == '') {
			document.hiddenForm.elements[i].value = ' ';
		}
	}
}

function getValue(field) {
	if(document.hiddenForm.elements[field.name]) document.hiddenForm.elements[field.name].value = field.value;
	else return;
	next();
}

function validateLoanForm(form){
	var currentPosition = 0;
	for(var i=0; i<document.hiddenForm.elements.length; i++) {
		if(document.hiddenForm.elements[i].name == document.inquiry.elements[0].name) {
			break;
		}
		else { currentPosition++; }
	}

	for(var i=currentPosition+1; i<document.hiddenForm.elements.length; i++) {
		if((document.hiddenForm.elements[i].value != '') && (document.hiddenForm.elements[i].value != '-') && (newFields[document.hiddenForm.elements[i].name])){
			if(document.hiddenForm.elements[i].name != 'mortgageLead' && document.hiddenForm.elements[i].name != 'CreditRating') {
			setPage('leftSide', newFields[document.hiddenForm.elements[i].name]);

			for(var j=0; j<document.inquiry.elements.length; j++) {
				if((document.inquiry.elements[j].type == 'text') && (document.inquiry.elements[j].value != 'MM/dd/yyyy')) {
					document.inquiry.elements[j].value = document.hiddenForm.elements[document.inquiry.elements[j].name].value;
				}
			}
			return;
			}
		}
	}

	for (var i = 0; i < form.elements.length-2; i++) {
		if(form.elements[i].value != 'MM/dd/yyyy' && form.elements[i].value != 'mm' && form.elements[i].value != 'dd' && form.elements[i].value != 'yyyy') getValue(form.elements[i]);
		if(!document.hiddenForm.elements[form.elements[i].name]) {break}

		if((form.elements[i].value == '') || (document.hiddenForm.elements[form.elements[i].name].value == '') || (form.elements[i].value == 'MM/dd/yyyy')) {
			alert('Please complete the missing fields.');
			form.elements[i].focus();
			return false;
		}
	}
}

function resetForm() {
	for(var i=0; i<document.hiddenForm.elements.length; i++) {
		if((document.hiddenForm.elements[i].name != 'submit')&&(document.hiddenForm.elements[i].name != 'Site')&&(document.hiddenForm.elements[i].name != 'Source')&&(document.hiddenForm.elements[i].name != 'Referrer')) {
			document.hiddenForm.elements[i].value = '';
		}
	}
}

function backStep() {
	var currentPosition = 0;
	for(var i=0; i<document.hiddenForm.elements.length; i++) {
		if(document.hiddenForm.elements[i].name == document.inquiry.elements[0].name) {
			break;
		}
		else { currentPosition++; }
	}

	for(var i=currentPosition-1; i>0; i--) {
		if((document.hiddenForm.elements[i].value != '') && (document.hiddenForm.elements[i].value != '-')  && (newFields[document.hiddenForm.elements[i].name])){
			setPage('leftSide', newFields[document.hiddenForm.elements[i].name]);

			for(var j=0; j<document.inquiry.elements.length; j++) {
				if(document.inquiry.elements[j].type == 'text') {
					document.inquiry.elements[j].value = document.hiddenForm.elements[document.inquiry.elements[j].name].value;
				}
			}

			break;
		}
	}
}


var hiddenForm = "<form name=hiddenForm action='https://www.leadpile.com/cgi-bin/ezwebsys/apply_ssl.pl' method=post>"
	+ "<input type=hidden name=LoanType value=''>"

// 1	Qualifications
	+ "<input type=hidden name=state value=''>"
	+ "<input type=hidden name=usCitizen value=''>"
	+ "<input type=hidden name=make1000 value=''>"
	+ "<input type=hidden name=haveChecking value=''>"

// 2	Pay
	+ "<input type=hidden name=payperiod value=''>"
	+ "<input type=hidden name=paydateone value=''>"
	+ "<input type=hidden name=paydatetwo value=''>"

	+ "<input type=hidden name=Homeowner value=''>"

// 3	Contact info
	+ "<input type=hidden name=firstName value=''>"
	+ "<input type=hidden name=lastName value=''>"
	+ "<input type=hidden name=address value=''>"
	+ "<input type=hidden name=city value=''>"
	+ "<input type=hidden name=zip value=''>"
	+ "<input type=hidden name=email value=''>"
	+ "<input type=hidden name=HomeAreaCode value=''>"
	+ "<input type=hidden name=HomePhoneNr value=''>"
	+ "<input type=hidden name=HomePhoneSuffix value=''>"

//	Here the "short form" required info ends

// 4	Payday loan long form required info
	+ "<input type=hidden name=requestedAmount value=''>"
	+ "<input type=hidden name=bestTimeToCall value=''>"
	+ "<input type=hidden name=yearsAtResidence value=''>"
	+ "<input type=hidden name=monthsAtResidence value=''>"
	+ "<input type=hidden name=incomeType value=''>					"

// 5	Employment
	+ "<input type=hidden name=income value=''>"
	+ "<input type=hidden name=occupation value=''>"
	+ "<input type=hidden name=employerName value=''>"
	+ "<input type=hidden name=SupervisorName value=''>"
	+ "<input type=hidden name=SupervisorPhoneAreaCode value=''>"
	+ "<input type=hidden name=SupervisorPhoneNr value=''>"
	+ "<input type=hidden name=SupervisorPhoneSuffix value=''>"
	+ "<input type=hidden name='workPhoneAreaCode' value=''>"
	+ "<input type=hidden name='workPhoneNr' value=''>"
	+ "<input type=hidden name='workPhoneSuffix' value=''>"

	+ "<input type=hidden name=EmployementLengthYears value=''>"
	+ "<input type=hidden name=EmployementLengthMonths value=''>		"

// 6	Banking
	+ "<input type=hidden name='bankName' value=''>"
	+ "<input type=hidden name='accountNumber' value=''>"
	+ "<input type=hidden name='routingNumber' value=''>"
	+ "<input type=hidden name='bankPhoneAreaCode' value=''>"
	+ "<input type=hidden name='bankPhoneNr' value=''>"
	+ "<input type=hidden name='bankPhoneSuffix' value=''>"

	+ "<input type=hidden name=directDeposit value=''>		"

// 7	ID info
	+ "<input type=hidden name=dlState value=''>"
	+ "<input type=hidden name=dlNumber value=''>"
	+ "<input type=hidden name=mothersMaiden value=''>"
	+ "<input type=hidden name=bMonth value=''>"
	+ "<input type=hidden name=bDay value=''>"
	+ "<input type=hidden name=bYear value=''>"
	+ "<input type=hidden name=SSNumberA value=''>"
	+ "<input type=hidden name=SSNumberB value=''>"
	+ "<input type=hidden name=SSNumberC value=''>            "

// 8	References
	+ "<input type=hidden name=referenceOneFirstName value=''>          "
	+ "<input type=hidden name=referenceOneLastName value=''>"
	+ "<input type=hidden name=referenceOneRelationship value=''>"
	+ "<input type=hidden name='Reference1PhoneA' value=''>"
	+ "<input type=hidden name='Reference1PhoneB' value=''>"
	+ "<input type=hidden name='Reference1PhoneC' value=''>"
	+ "<input type=hidden name=referenceTwoFirstName value=''>"
	+ "<input type=hidden name=referenceTwoLastName value=''>"
	+ "<input type=hidden name=referenceTwoRelationship value=''>"
	+ "<input type=hidden name='Reference2PhoneA' value=''>"
	+ "<input type=hidden name='Reference2PhoneB' value=''>"
	+ "<input type=hidden name='Reference2PhoneC' value=''>"
	+ "<input type=hidden name=referenceThreeFirstName value=''>"
	+ "<input type=hidden name=referenceThreeLastName value=''>"
	+ "<input type=hidden name=referenceThreeRelationship value=''>"
	+ "<input type=hidden name='Reference3PhoneA' value=''>"
	+ "<input type=hidden name='Reference3PhoneB' value=''>"
	+ "<input type=hidden name='Reference3PhoneC' value=''>                   "

// 9	Auto financing offer
	+ "<input type=hidden name=autoFinancing value=''>"
	+ "<input type=hidden name=autoFinancing2 value=''>"
	+ "<input type=hidden name=creditCheckAuthorization value='-'>"

// 10	Mortgage offer
	+ "<input type=hidden name=mortgageLead value=''>"
	+ "<input type=hidden name=CreditRating value=''>"
	+ "<input type=hidden name=PropertyType value=''>"
	+ "<input type=hidden name=PropertyValue value=''>"
	+ "<input type=hidden name=AmountOwedOnProperty value=''>"
	+ "<input type=hidden name=AdditionalCash value=''>"
	+ "<input type=hidden name=SecondMortBalance value=''>"
	+ "<input type=hidden name=BestTime value=''>"
	+ "<input type=hidden name=Rate value=''>"
	+ "<input type=hidden name=MonthlyOwe value=''>"

// 11.1	Other offers
	+ "<input type=hidden name=Debt value=''>"
	+ "<input type=hidden name=credit_repair_lead value=''>"

// 12	Homeowner offers
	+ "<input type=hidden name=home_loan_lead value='-'>"
	+ "<input type=hidden name=home_insurance_lead value='-'>"

// 12.1	Other offers
	+ "<input type=hidden name=car_insurance_lead value=''>"
	+ "<input type=hidden name=life_insurance_lead value=''>"
	+ "<input type=hidden name=student_loans_consolidation_lead value=''>                     "
	+ "<input type=hidden name=home_based_business_lead value=''>                     "
//	+ "<input type=hidden name=renter_insurance_lead value=''>		"
//	+ "<input type=hidden name=credit_card_lead value=''>"

// 12.2
//	+ "<input type=hidden name=credit_report_lead value=''>"
	+ "<input type=hidden name=home_purchase_lead value='-'>"

	+ "<input type=hidden name=sms_agree value=''>"
	+ "<input type=hidden name=CellAreaCode value=''>"
	+ "<input type=hidden name=CellPhoneNr value=''>"
	+ "<input type=hidden name=CellPhoneSuffix value=''>"

// Tracking
	+ "<input type=hidden name=Site value=' '>"
	+ "<input type=hidden name=Source value=' '>"
	+ "<input type=hidden name=Referrer value=' '>"
	+ "<input type=hidden name=SSAID value=' '>"
	+ "<input type=submit name=submit value=' ' style='background: #FFFFFF; border: 0px; position:absolute; left:-30px; top:-30px; width:1px; height:1px'></form>";

function autoLeadOnly(){
	var confirmSelection = confirm("You have selected to receive a\nFree - No Obligation Vehicle Financing Quote\nwith a Free credit check.\n\nIs this correct?");
	if(!confirmSelection){document.inquiry.LoanType.value=''; return;}
	document.hiddenForm.autoFinancing.value='yes';
//	document.hiddenForm.creditCheckAuthorization.value='';
	for(var i=0; i<document.hiddenForm.elements.length; i++) {
		if(	document.hiddenForm.elements[i].name != 'state' &&
			document.hiddenForm.elements[i].name != 'yearsAtResidence' &&
			document.hiddenForm.elements[i].name != 'monthsAtResidence' &&
			document.hiddenForm.elements[i].name != 'Homeowner' &&
			document.hiddenForm.elements[i].name != 'Debt' &&
			document.hiddenForm.elements[i].name != 'income' &&
			document.hiddenForm.elements[i].name != 'employerName' &&
			document.hiddenForm.elements[i].name != 'occupation' &&
			document.hiddenForm.elements[i].name != 'SupervisorName' &&
			document.hiddenForm.elements[i].name != 'SupervisorPhoneAreaCode' &&
			document.hiddenForm.elements[i].name != 'SupervisorPhoneNr' &&
			document.hiddenForm.elements[i].name != 'SupervisorPhoneSuffix' &&
			document.hiddenForm.elements[i].name != 'workPhoneAreaCode' &&
			document.hiddenForm.elements[i].name != 'workPhoneNr' &&
			document.hiddenForm.elements[i].name != 'workPhoneSuffix' &&
			document.hiddenForm.elements[i].name != 'EmployementLengthMonths' &&
			document.hiddenForm.elements[i].name != 'EmployementLengthYears' &&
			document.hiddenForm.elements[i].name != 'dlState' &&
			document.hiddenForm.elements[i].name != 'dlNumber' &&
			document.hiddenForm.elements[i].name != 'mothersMaiden' &&
			document.hiddenForm.elements[i].name != 'bMonth' &&
			document.hiddenForm.elements[i].name != 'bDay' &&
			document.hiddenForm.elements[i].name != 'bYear' &&
			document.hiddenForm.elements[i].name != 'SSNumberA' &&
			document.hiddenForm.elements[i].name != 'SSNumberB' &&
			document.hiddenForm.elements[i].name != 'SSNumberC' &&
			document.hiddenForm.elements[i].name != 'firstName' &&
			document.hiddenForm.elements[i].name != 'lastName' &&
			document.hiddenForm.elements[i].name != 'address' &&
			document.hiddenForm.elements[i].name != 'city' &&
			document.hiddenForm.elements[i].name != 'zip' &&
			document.hiddenForm.elements[i].name != 'email' &&
			document.hiddenForm.elements[i].name != 'HomeAreaCode' &&
			document.hiddenForm.elements[i].name != 'HomePhoneNr' &&
			document.hiddenForm.elements[i].name != 'HomePhoneSuffix' &&
			document.hiddenForm.elements[i].name != 'autoFinancing' &&
			document.hiddenForm.elements[i].name != 'creditCheckAuthorization' &&
			document.hiddenForm.elements[i].name != 'credit_report_lead' &&
			document.hiddenForm.elements[i].name != 'Site' &&
			document.hiddenForm.elements[i].name != 'Source' &&
			document.hiddenForm.elements[i].name != 'Referrer'
 
		) {
			document.hiddenForm.elements[i].value = '-';
		}
	}
}

function paydayOnly() {
	for(var i=0; i<document.hiddenForm.elements.length; i++) {
		if(	
			document.hiddenForm.elements[i].name == 'autoFinancing' ||
			document.hiddenForm.elements[i].name == 'autoFinancing2' ||

//			document.hiddenForm.elements[i].name == 'Homeowner' ||
			document.hiddenForm.elements[i].name == 'mortgageLead' ||
			document.hiddenForm.elements[i].name == 'CreditRating' ||
			document.hiddenForm.elements[i].name == 'PropertyType' ||
			document.hiddenForm.elements[i].name == 'PropertyValue' ||
			document.hiddenForm.elements[i].name == 'AmountOwedOnProperty' ||
			document.hiddenForm.elements[i].name == 'AdditionalCash' ||
			document.hiddenForm.elements[i].name == 'SecondMortBalance' ||
			document.hiddenForm.elements[i].name == 'BestTime' ||
			document.hiddenForm.elements[i].name == 'Rate' ||
			document.hiddenForm.elements[i].name == 'MonthlyOwe' ||

			document.hiddenForm.elements[i].name == 'Debt' ||	
			document.hiddenForm.elements[i].name == 'credit_repair_lead' ||

			document.hiddenForm.elements[i].name == 'creditCheckAuthorization' ||
			document.hiddenForm.elements[i].name == 'home_loan_lead' ||
			document.hiddenForm.elements[i].name == 'home_insurance_lead' ||
			document.hiddenForm.elements[i].name == 'car_insurance_lead' ||
			document.hiddenForm.elements[i].name == 'renter_insurance_lead' ||
			document.hiddenForm.elements[i].name == 'credit_card_lead' ||
			document.hiddenForm.elements[i].name == 'credit_report_lead' ||
			document.hiddenForm.elements[i].name == 'student_loans_consolidation_lead'
		) {
			document.hiddenForm.elements[i].value = '-';
		}
	}
}

var mortgageLeadOnlyFlag = 0;
function mortgageOnly() {
	var confirmSelection = confirm("You have selected to receive a Mortgage Quote.\n\nIs this correct?");
	if(!confirmSelection){document.inquiry.LoanType.value=''; return;}
	mortgageLeadOnlyFlag = 1;
	document.hiddenForm.Homeowner.value='Own';
	document.hiddenForm.mortgageLead.value='true';

	for(var i=0; i<document.hiddenForm.elements.length; i++) {
		if(	document.hiddenForm.elements[i].name != 'state' &&
			document.hiddenForm.elements[i].name != 'firstName' &&
			document.hiddenForm.elements[i].name != 'lastName' &&
			document.hiddenForm.elements[i].name != 'address' &&
			document.hiddenForm.elements[i].name != 'city' &&
			document.hiddenForm.elements[i].name != 'zip' &&
			document.hiddenForm.elements[i].name != 'email' &&
			document.hiddenForm.elements[i].name != 'HomeAreaCode' &&
			document.hiddenForm.elements[i].name != 'HomePhoneNr' &&
			document.hiddenForm.elements[i].name != 'HomePhoneSuffix' &&

			document.hiddenForm.elements[i].name != 'yearsAtResidence' &&
			document.hiddenForm.elements[i].name != 'monthsAtResidence' &&

			document.hiddenForm.elements[i].name != 'Homeowner' &&
			document.hiddenForm.elements[i].name != 'mortgageLead' &&
			document.hiddenForm.elements[i].name != 'CreditRating' &&
			document.hiddenForm.elements[i].name != 'PropertyType' &&
			document.hiddenForm.elements[i].name != 'PropertyValue' &&
			document.hiddenForm.elements[i].name != 'AmountOwedOnProperty' &&
			document.hiddenForm.elements[i].name != 'AdditionalCash' &&
			document.hiddenForm.elements[i].name != 'SecondMortBalance' &&
			document.hiddenForm.elements[i].name != 'BestTime' &&
			document.hiddenForm.elements[i].name != 'Rate' &&
			document.hiddenForm.elements[i].name != 'MonthlyOwe' &&

			document.hiddenForm.elements[i].name != 'income' &&
			document.hiddenForm.elements[i].name != 'occupation' &&
			document.hiddenForm.elements[i].name != 'employerName' &&
			document.hiddenForm.elements[i].name != 'SupervisorName' &&
			document.hiddenForm.elements[i].name != 'SupervisorPhoneAreaCode' &&
			document.hiddenForm.elements[i].name != 'SupervisorPhoneNr' &&
			document.hiddenForm.elements[i].name != 'SupervisorPhoneSuffix' &&
			document.hiddenForm.elements[i].name != 'workPhoneAreaCode' &&
			document.hiddenForm.elements[i].name != 'workPhoneNr' &&
			document.hiddenForm.elements[i].name != 'workPhoneSuffix' &&

//			document.hiddenForm.elements[i].name != 'credit_repair_lead' &&

			document.hiddenForm.elements[i].name != 'credit_report_lead' &&
			document.hiddenForm.elements[i].name != 'Site' &&
			document.hiddenForm.elements[i].name != 'Source' &&
			document.hiddenForm.elements[i].name != 'Referrer'
		) {
			document.hiddenForm.elements[i].value = '-';
		}
	}
}


function formFields() {
	this.LoanType = "Select Your Loan Type:<br>"
	+ "<select onKeyDown='return noBackSpace()' name='LoanType' class='selectStyle' "

	+ "onChange='"
	+ "if(this.value==\"PersonalLoan\" && document.location.href.indexOf(\"myloanpage.com\") != -1){ paydayOnly(); } "
//	+ "if(this.value==\"PersonalLoan\"){ paydayOnly(); } "
	+ "if(this.value==\"AutoLoan\"){autoLeadOnly();} "

	+ "if(this.value==\"Purchase\") {alert(\"You are being redirected to the appropriate page dedicated to the loan type you have selected.\"); "
	+ "document.location.href=\"http://www.myloananddebt.com/home-purchase-mortgage-loan.html?Source=old_form_\"+getCookie(\"Source\")} "

//	+ "if(this.value!=\"x\") {alert(\"Our service is currently not available. You are being redirected to a page with more resourses.\"); "
//	+ "document.location.href=\"http://www.myloananddebt.com/cash-payday-loans.html?Source=old_form_\"+getCookie(\"Source\")} "

	+ "if(this.value==\"Refinance\"){mortgageOnly()} "
//	+ "if(this.value==\"Refinance\"){alert(\"You are being redirected to the appropriate page dedicated to the loan type you have selected.\"); "
//	+ "document.location.href=\"http://www.instantquotes123.com/home_refinance.html?Source=old_form_\"+getCookie(\"Source\")} "

	+ "if(this.value==\"DebtConsolidationNH\"){alert(\"You are being redirected to the appropriate page dedicated to the loan type you have selected.\"); "
	+ "document.location.href=\"http://www.myloananddebt.com/debt-consolidation.html?source=old_form_\"+getCookie(\"Source\")} "

	+ "if(this.value==\"DebtConsolidationH\"){mortgageOnly()} "
//	+ "if(this.value==\"DebtConsolidationH\"){alert(\"You are being redirected to the appropriate page dedicated to the loan type you have selected.\"); "
//	+ "document.location.href=\"http://www.myloananddebt.com/debt-consolidation.html?source=old_form_\"+getCookie(\"Source\")} "

	+ "if(this.value==\"HomeImprovement\"){mortgageOnly()} "
//	+ "if(this.value==\"HomeImprovement\"){alert(\"You are being redirected to the appropriate page dedicated to the loan type you have selected.\"); "
//	+ "document.location.href=\"http://www.instantquotes123.com/home_improvement.html?Source=old_form_\"+getCookie(\"Source\")} "

	+ "if(this.value==\"SecondMortgage\"){mortgageOnly()} "
//	+ "if(this.value==\"SecondMortgage\"){alert(\"You are being redirected to the appropriate page dedicated to the loan type you have selected.\"); "
//	+ "document.location.href=\"http://www.instantquotes123.com/second_mortgage.html?Source=old_form_\"+getCookie(\"Source\")} "

	+ "getValue(this);'>"

	+ "<option value='' selected>Select your Loan Type"
	+ "<option value=''  style='color:#CC3333;'>----------------"
	+ "<option value=PersonalLoan>Personal Loan (up to $1,000.00)"
	+ "<option value=''  style='color:#CC3333;'>----------------"
	+ "<option value=AutoLoan>New or Used Vehicle Financing"
	+ "<option value=''  style='color:#CC3333;'>----------------"
	+ "<option value=DebtConsolidationNH>Debt Consolidation (non homeowners)"
	+ "<option value=DebtConsolidationH>Debt Consolidation (homeowners)"
	+ "<option value=''  style='color:#CC3333;'>----------------"
	+ "<option value=Refinance>Home Refinancing"
	+ "<option value=Purchase>Home Purchase"
	+ "<option value=SecondMortgage>Home Equity Line of Credit"
	+ "<option value=Refinance>Home Equity Cash Out"
	+ "<option value=HomeImprovement>Home Improvement</select>";

	this.usedQPD = "Please choose one:<br><select onKeyDown='return noBackSpace()' onChange=\"getValue(this);\"  class='selectStyle' name=usedQPD><option value=''>Have you requested a loan from<option value=''> \"Quik PayDay\" in the last 90 days?<option value=''  style='color:#CC3333;'>----------------<option value='No'>No<option value='No'>I don't know<option value='Yes'>Yes</select>";

// http://www.myreferer.com/mydb/?M=310loan&ID=paydayloan123&L=2 :: CANADA LEADS AFF PROGRAM

	this.state = "Your State:<br><select onKeyDown='return noBackSpace()' onChange=\"if(this.value.length>2){document.location='http://www.myloananddebt.com/cash-payday-loans.html'} if(this.value=='AZ'){ noMortgageLead(); if(mortgageLeadOnlyFlag){ document.location.href='http://www.blue123.com/index.html?source=leadpile_form' } } checkStateExclusions(hiddenForm.LoanType.value, this.value); getValue(this); \"  class='selectStyle'  name='state' id='State'><option value=''>State / Province:<option value=''  style='color:#CC3333;'>------------ USA ------------  <option value='AL'>AL<option value='AK'>AK<option value='AZ'>AZ<option value='AR'>AR<option value='CA'>CA<option value='CO'>CO<option value='CT'>CT<option value='DE'>DE<option value='DC'>DC<option value='FL'>FL<option value='GA'>GA<option value='HI'>HI<option value='ID'>ID<option value='IL'>IL<option value='IN'>IN<option value='IA'>IA<option value='KS'>KS<option value='KY'>KY<option value='LA'>LA<option value='ME'>ME<option value='MD'>MD<option value='MA'>MA<option value='MI'>MI<option value='MN'>MN<option value='MS'>MS<option value='MO'>MO<option value='MT'>MT<option value='NE'>NE<option value='NV'>NV<option value='NH'>NH<option value='NJ'>NJ<option value='NM'>NM<option value='NY'>NY<option value='NC'>NC<option value='ND'>ND<option value='OH'>OH<option value='OK'>OK<option value='OR'>OR<option value='PA'>PA<option value='RI'>RI<option value='SC'>SC<option value='SD'>SD<option value='TN'>TN<option value='TX'>TX<option value='UT'>UT<option value='VT'>VT<option value='VA'>VA<option value='WA'>WA<option value='WV'>WV<option value='WI'>WI<option value='WY'>WY<option value=''  style='color:#CC3333;'>------- CANADA ---------<option value='Alberta'>Alberta <option value='British Columbia'>British Columbia <option value='Manitoba'>Manitoba <option value='New Brunswick'>New Brunswick <option value='Newfoundland'>Newfoundland <option value='Northwest Territories'>Northwest Territories <option value='Nova Scotia'>Nova Scotia <option value='Nunavut'>Nunavut <option value='Ontario'>Ontario <option value='Prince Edward Island'>Prince Edward Island <option value='Quebec'>Quebec <option value='Saskatchewan'>Saskatchewan <option value='Yukon Territory'>Yukon Territory<option value=''  style='color:#CC3333;'>----------------</select><br><br>";

	this.usCitizen = "Are you a living and working in US?<br>  <select onKeyDown='return noBackSpace()' name='usCitizen' class='selectStyle' onChange=\"if(this.value=='false'){alert('You are being redirected to the page providing services for your specific request.'); document.location='http://www.myloananddebt.com/cash-payday-loans.html'} getValue(this);\"><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value='true'>Yes<option value=''>- -<option value='false'>No</select>";

	this.haveChecking = "Do you have a checking account?<br>  <select onKeyDown='return noBackSpace()' name=haveChecking class='selectStyle' onChange=\"if(this.value=='xfalse'){alert('You are being redirected to the page providing services for your specific request.'); document.location='http://www.myloananddebt.com/cash-payday-loans.html'} getValue(this);\"><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value='true'>Yes<option value=''>- -<option value='false'>No</select>";

	this.directDeposit = "Do you have Direct Deposit?<br>  <select onKeyDown='return noBackSpace()' name=directDeposit class='selectStyle' onChange='getValue(this);'><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value='true'>Yes<option value=''>- -<option value='false'>No<option value=''>- -<option value='false'>I don't know</select>";

	this.make1000 = "Do you make at least $750/month?<br>  <select onKeyDown='return noBackSpace()' name=make1000 class='selectStyle' onChange=\"if(this.value=='false'){alert('You are being redirected to the page providing services for your specific request.'); document.location='http://www.myloananddebt.com/cash-payday-loans.html'} getValue(this);\"><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value='true'>Yes<option value=''>- -<option value='false'>No</select>";

	this.payperiod = "What is your pay cycle?<br><select onKeyDown='return noBackSpace()' name='payperiod' class='selectStyle' onChange='paydatesCalendar(cal1); paydatesCalendar(cal2); getValue(this);'><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value='Weekly'>Weekly</option><option value='Bi_Weekly'>Every other week</option><option value='Monthly'>Monthly</option><option value='TWICE_MONTHLY'>Twice a month</option></select>";

	this.paydateone = "<table border=0 cellpading=5><tr><td colspan=2 align=middle><font  style='font-size: 10pt; font-weight: bold' >"
						+ "Please provide your NEXT 2 PAYDAYS:<BR>(business days only)</font>"

						+ "<tr><td align=middle><A HREF=\"#\"  style='font-size: 10pt; color: blue; text-decoration: underline;' "
						+ " onClick=\"cal1.offsetX = -15; cal1.offsetY = 50; cal1.select(document.inquiry.paydateone,'anchor1','MM/dd/yyyy'); return false;\" TITLE=\"Next Payday\" NAME=\"anchor1\" ID=\"anchor1\">Next Payday</A>"

						+ "<td align=middle><A HREF=\"#\" style='font-size: 10pt; color: blue; text-decoration: underline;' "
						+ " onClick=\"identifySecondPaydate(document.inquiry.paydateone.value, document.hiddenForm.payperiod.value); cal2.offsetX = -35; cal2.offsetY = 50; cal2.select(document.inquiry.paydatetwo,'anchor2','MM/dd/yyyy'); return false;\" "
						+ " TITLE=\"Second Payday\" NAME=\"anchor2\" ID=\"anchor2\">Second Payday</A>"

						+ " <tr valign=top><td align=middle>"
						+ "<INPUT TYPE=\"text\" NAME=\"paydateone\" VALUE=\"MM/dd/yyyy\" SIZE=10 READONLY " 
						+ "  onClick=\" cal1.offsetX = -15; cal1.offsetY = 50;cal1.select(document.inquiry.paydateone,'anchor1','MM/dd/yyyy'); return false;\">"

						+ "<td align=middle>"
						+ "<INPUT TYPE=\"text\" NAME=\"paydatetwo\" VALUE=\"MM/dd/yyyy\" SIZE=10 READONLY "
						+ " onClick=\"identifySecondPaydate(document.inquiry.paydateone.value, document.hiddenForm.payperiod.value); cal2.offsetX = -35; cal2.offsetY = 50; cal2.select(document.inquiry.paydatetwo,'anchor2','MM/dd/yyyy'); return false;\" ></table>";

//	this.Debt ="Please select one:<br><select onKeyDown='return noBackSpace()' onChange='getValue(this);' class='selectStyle' name='Debt'><option value=''>Your total Credit Card Debt with<option value=''>an interest rate of 15% or more:<option value=''  style='color:#CC3333;'>----------------<option value='40000+'>I have $40,000+ of Credit Card Debt<option value='20000-40000'>$20,000 - $40,000 of Credit Card Debt<option value='10000-20000'>$10,000 - $20,000 of Credit Card Debt<option value='5000-10000'>$5,000 - $10,000 of Credit Card Debt<option value='1000-5000'>$1,000 - $5,000 of Credit Card Debt<option value='0'>I have no credit card debt</select>";

this.Debt = "Your total unsecured debt:<br><select onKeyDown='return noBackSpace()' onChange='getValue(this);' class='selectStyle' name='Debt'><option value=''>(credit card debt, medical bills,<option value=''>utility bills, personal loans, etc.)<option value=''  style='color:#CC3333;'>----------------<option value='20000-40000'>$20,000+ of unsecured debt<option value='10000-20000'>$10,000 - $20,000 of unsecured debt<option value='5000-10000'>$5,000 - $10,000 of unsecured debt<option value='1000-5000'>$1,000 - $5,000 of unsecured debt<option value='0'>Below $1,000 or no unsecured debt</select>";

//	this.Homeowner = "Do you Own or Rent your home?<br><select onKeyDown='return noBackSpace()' name=Homeowner class=selectStyle onChange=\"if(this.value=='Own'){agree=confirm('CONGRATULATIONS!\\nAs a Homeowner You also Qualify for a No Obligation Debt Relief Solution\\nor a Credit Repair Service to boost your FICO score.\\n\\nWhat is a Debt Relief Solution?\\nA not for profit agency will negotiate with your creditors to reduce\\nand/or elimitate high interest rates, waive late fees and other charges.\\n\\nWhat is Credit Repair?\\nCompletely remove late payments, tax liens, foreclosures,\\nand bankruptcies from your credit reports.\\n\\nClick OK to receive it with your Loan (recommended)\\nor Cancel to waive it.'); if(!agree){this.value='Own-Wave'}} if(this.value=='Rent'){agree=confirm('CONGRATULATIONS!\\nAs a Renter You also Qualify for a No Obligation Debt Relief Solution\\nor a Credit Repair Service to boost your FICO score.\\n\\nWhat is a Debt Relief Solution?\\nA not for profit agency will negotiate with your creditors to reduce\\nand/or elimitate high interest rates, waive late fees and other charges.\\n\\nWhat is Credit Repair?\\nCompletely remove late payments, tax liens, foreclosures,\\nand bankruptcies from your credit reports.\\n\\nClick OK to receive it with your Loan (recommended)\\nor Cancel to waive it.'); if(!agree){this.value='Rent-Wave'} noMortgageLead(); } if(this.value=='Rent-Wave'){noMortgageLead();} getValue(this);\"><option value='' selected>Select one...<option value='' style='color:#CC3333'>----------------<option value=Own>Own<option value=Rent>Rent<option value='Own-Wave'>-<option value='Rent-Wave'>-</select>";

	this.Homeowner = "Do you Own or Rent your home?<br><select onKeyDown='return noBackSpace()' name=Homeowner class=selectStyle onChange=\"if(this.value=='Own'){agree=confirm('CONGRATULATIONS!\\nAs a Homeowner You also Qualify for an absolutely\\nFree - No Obligation Debt Relief Solution.\\n\\nClick OK to receive it with your Loan (recommended)\\nor Cancel to waive it.'); homeownerOffers(); if(!agree){this.value='Own-Wave'; } } if(this.value=='Rent'){agree=confirm('CONGRATULATIONS!\\nAs a Renter You also Qualify for an absolutely\\nFree - No Obligation Debt Relief Solution.\\n\\nClick OK to receive it with your Loan (recommended)\\nor cancel to waive it.'); if(!agree){this.value='Rent-Wave'} noMortgageLead(); document.hiddenForm.home_purchase_lead.value = '';} if(this.value=='Rent-Wave'){noMortgageLead();} getValue(this);\"><option value='' selected>Select one...<option value='' style='color:#CC3333'>----------------<option value=Own>Own<option value=Rent>Rent<option value='Own-Wave'>-<option value='Rent-Wave'>-</select>";

//	this.Debt ="Your total unsecured debt:<br><select onKeyDown='return noBackSpace()' onChange='getValue(this);' class='selectStyle' name='Debt'><option value=''>(credit card bills, personal loans,<option value=''>medical bills, utility bills, etc.)<option value=''  style='color:#CC3333;'>----------------<option value='40000+'>$40,000+<option value='20000-40000'>$20,000 - $40,000<option value='10000-20000'>$10,000 - $20,000<option value='5000-10000'>$5,000 - $10,000<option value='1000-5000'>$1,000 - $5,000<option value='0'>I have no debts</select>";

	this.firstName = "Your First and Last Name:<br><input title='First Name' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name='firstName' value='' class='textFieldStyle' style='width:115;' onBlur='getValue(this);' onFocus='select(this)'> <input title='Last Name' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name='lastName' value='' class='textFieldStyle' style='width:115;'  onFocus='select(this)'><br><font style='position: relative; left: -3;'>Address <input title='Address' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name='address' value='' class='textFieldStyle' style='width:181;' onFocus='select(this)'><br><font style='position: relative; left: 10;'>City <input title='City' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name='city' value='' class='textFieldStyle' style='width:113;' onFocus='select(this)'> Zip <input title='Zip Code' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,5)){ getValue(this); }' name='zip' value='' maxlength=5 class='textFieldStyle' style='width:46;'  onFocus='select(this)'  onKeyUp='return autoTab(this,5,event);'></font><br><font style='position: relative; left: 5'>Email <input title='Enter a Valid E-mail Here' type='text' onkeypress='return noenter()' onBlur='if(checkEmail(this)){getValue(this);}' name='email' value='' class='textFieldStyle' style='width:188;' onFocus='select(this)'></font><br><font class='formTextStyle'>Home Phone <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='HomeAreaCode' maxlength='3' value='' class='textFieldStyle' style='width: 35;' onKeyUp='return autoTab(this,3,event);'> - <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='HomePhoneNr' maxlength='3' value='' class='textFieldStyle' style='width: 35;' onKeyUp='return autoTab(this,3,event);'> - <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,4)){ getValue(this); }' name='HomePhoneSuffix' maxlength='4' value='' class='textFieldStyle' style='width: 55;' onKeyUp='return autoTab(this,4,event);'></font>";

	this.requestedAmount = "Up to what loan amount would you like to receive?<br><select onKeyDown='return noBackSpace()' onChange='getValue(this);' class='selectStyle' name='requestedAmount'><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value=200> up to $200<option value=300> up to $300<option value=400> up to $400<option value=500> up to $500<option value=600> up to $600<option value=700> up to $700<option value=800> up to $800<option value=900> up to $900<option value=1000> up to $1000</select>";

	this.bestTimeToCall = "What is the best time to be reached?<br><select onKeyDown='return noBackSpace()' onChange='getValue(this);' class='selectStyle' name=bestTimeToCall><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value='Morning'>Morning<option value='Afternoon'>Afternoon<option value='Evening'>Evening</select>";

	this.yearsAtResidence = "How long have you been<br>living in your current home?<br><select onKeyDown='return noBackSpace()' onChange='getValue(this);'   class='selectStyle' style='width: 60' name=yearsAtResidence><option value=''>Years<option value='0'>0<option value='1'>1<option value='2'>2<option value='3'>3<option value='4'>4<option value='5'>5<option value='6'>6<option value='7'>7<option value='8'>8<option value='9'>9<option value='10+'>10+</select> / <select onKeyDown='return noBackSpace()' onChange='getValue(this);'   class='selectStyle' style='width: 62' name=monthsAtResidence><option value=''>Months<option value='0'>0<option value='1'>1<option value='2'>2<option value='3'>3<option value='4'>4<option value='5'>5<option value='6'>6<option value='7'>7<option value='8'>8<option value='9'>9<option value='10'>10<option value='11'>11</select>";

	this.incomeType = "What is your main source of income?<br><select onKeyDown='return noBackSpace()' onChange='getValue(this);' class='selectStyle' name=incomeType><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value=Employment>Employment<option value=Benefits>Benefits </select>";

	this.income = "<font class='formTextStyle' style='position: relative; left: 5'><font class='formTextStyle' style='position: relative; left: 6'>Your <u>monthly</u> income: $<input title='Monthly Income' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,4)){ getValue(this); }' name=income value='' class='textFieldStyle' style='width:70;' onFocus='select(this)' maxLength=4>.00</font><br>Your occupation: <input title='Your Occupation' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name=occupation value='' class='textFieldStyle' style='width:120;' onBlur='getValue(this);' onFocus='select(this)'></font><br><font class='formTextStyle' style='position: relative; left: 27'>Employer: <input title='Employer Name' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name=employerName value='' class='textFieldStyle' style='width:120;' onBlur='getValue(this);' onFocus='select(this)'></font><br><font class='formTextStyle' style='position: relative; left: 3'>Supervisor name: <input title='Supervisor Name' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name=SupervisorName value='' class='textFieldStyle' style='width:120;' onBlur='getValue(this);' onFocus='select(this)'></font><br><font class='formTextStyle' style='position: relative; left: -1'>Supervisor phone: <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='SupervisorPhoneAreaCode' size='3' maxlength='3' value='' class='textFieldStyle' style='width: 30;'  onKeyUp='return autoTab(this,3,event);'> - <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='SupervisorPhoneNr' size='3' maxlength='3' value='' class='textFieldStyle' style='width: 30;' onKeyUp='return autoTab(this,3,event);'> - <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,4)){ getValue(this); }' name='SupervisorPhoneSuffix' size='4' maxlength='4' value='' class='textFieldStyle' style='width: 40;' onKeyUp='return autoTab(this,4,event);'></font><br><font class='formTextStyle' style='position: relative; left: 01'>Your work phone: <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='workPhoneAreaCode' size='3' maxlength='3' value='' class='textFieldStyle' style='width: 30;'  onKeyUp='return autoTab(this,3,event);'> - <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='workPhoneNr' size='3' maxlength='3' value='' class='textFieldStyle' style='width: 30;' onKeyUp='return autoTab(this,3,event);'> - <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,4)){ getValue(this); }' name='workPhoneSuffix' size='4' maxlength='4' value='' class='textFieldStyle' style='width: 40;' onKeyUp='return autoTab(this,4,event);'></font><br>(no cell phone as work phone please)";

	this.EmployementLengthYears = "Length of your current employement:<br><br><select onKeyDown='return noBackSpace()' onChange='getValue(this);'   class='selectStyle' style='width: 60' name='EmployementLengthYears'><option value=''>Years<option value='0'>0<option value='1'>1<option value='2'>2<option value='3'>3<option value='4'>4<option value='5'>5<option value='6'>6<option value='7'>7<option value='8'>8<option value='9'>9<option value='10+'>10+</select> / <select onKeyDown='return noBackSpace()' onChange='getValue(this);'   class='selectStyle' style='width: 62' name='EmployementLengthMonths'><option value=''>Months<option value='0'>0<option value='1'>1<option value='2'>2<option value='3'>3<option value='4'>4<option value='5'>5<option value='6'>6<option value='7'>7<option value='8'>8<option value='9'>9<option value='10'>10<option value='11'>11</select>";

	this.bankName = "Your bank information:<br><font style='position: relative; left: 4'>Bank Name <input title='Name Of Bank' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name='bankName' value='' class='textFieldStyle' style='width:130;' onFocus='select(this)'></font><br>Checking Acc. # <input title='Account Number' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name='accountNumber' value='' class='textFieldStyle' style='width:120;' onFocus='select(this)'> <a class=textLink href='' onClick='window.open(\"http://www.ezwebsys.com/shared/html/check.html\",\"\",\"left=150, top=150, width=286,height=163,scrollbars=no\"); return false;' >?</a><br>Bank Routing # <input title='Bank Routing Number' type='text' onkeypress='return noenter()' onBlur=\"if(this.value != '' && !checkABA(this.value)){alert('Invalid routing number.\\nPlease enter your 9 digits bank routing number. Do not include spaces or dashes.'); this.focus();}getValue(this);\" name='routingNumber' value='' class='textFieldStyle' style='width:130;' onFocus='select(this)' maxlength=9 onKeyUp='return autoTab(this,9,event);'> <a class=textLink href='' onClick='window.open(\"http://www.ezwebsys.com/shared/html/check.html\",\"\",\"left=150, top=150, width=286,height=163,scrollbars=no\"); return false;' >?</a><br><font class='formTextStyle'>Bank Phone: <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='bankPhoneAreaCode' size='3' maxlength='3' value='' class='textFieldStyle' style='width: 30;'  onKeyUp='return autoTab(this,3,event);'> - <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='bankPhoneNr' size='3' maxlength='3' value='' class='textFieldStyle' style='width: 30;' onKeyUp='return autoTab(this,3,event);'> - <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,4)){ getValue(this); }' name='bankPhoneSuffix' size='4' maxlength='4' value='' class='textFieldStyle' style='width: 40;' onKeyUp='return autoTab(this,4,event);'></font>";

	this.dlState = "Your driving license State:<br><select onKeyDown='return noBackSpace()' onChange='getValue(this);'   class='selectStyle'  style='width:212;' name='dlState' id='State'><option value=''>State:<option value=''  style='color:#CC3333;'>------------------------ <option value='AL'>AL<option value='AK'>AK<option value='AZ'>AZ<option value='AR'>AR<option value='CA'>CA<option value='CO'>CO<option value='CT'>CT<option value='DE'>DE<option value='DC'>DC<option value='FL'>FL<option value='GA'>GA<option value='HI'>HI<option value='ID'>ID<option value='IL'>IL<option value='IN'>IN<option value='IA'>IA<option value='KS'>KS<option value='KY'>KY<option value='LA'>LA<option value='ME'>ME<option value='MD'>MD<option value='MA'>MA<option value='MI'>MI<option value='MN'>MN<option value='MS'>MS<option value='MO'>MO<option value='MT'>MT<option value='NE'>NE<option value='NV'>NV<option value='NH'>NH<option value='NJ'>NJ<option value='NM'>NM<option value='NY'>NY<option value='NC'>NC<option value='ND'>ND<option value='OH'>OH<option value='OK'>OK<option value='OR'>OR<option value='PA'>PA<option value='RI'>RI<option value='SC'>SC<option value='SD'>SD<option value='TN'>TN<option value='TX'>TX<option value='UT'>UT<option value='VT'>VT<option value='VA'>VA<option value='WA'>WA<option value='WV'>WV<option value='WI'>WI<option value='WY'>WY </select><br><font class='formTextStyle' style='position: relative; left: -12'>Driving License # <input title='Driving Licence #' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name=dlNumber value='' class='textFieldStyle' style='width:120;' onFocus='select(this)'></font><br><font class='formTextStyle' style='position: relative; left: -13'>Mother maiden name: <input title='Mother maiden name' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name=mothersMaiden value='' class='textFieldStyle' style='width:90;' onFocus='select(this)'></font><br><font class='formTextStyle' style='position: relative; left: 10'>Birth Date <input type='text' onkeypress='return noenter()' onBlur='if(this.value!=\"mm\"){if(checkNumeric(this,2)){ getValue(this); }}' name='bMonth' size='2' maxlength='2' value='mm' class='textFieldStyle' style='width: 30;'  onFocus='select(this)' onKeyUp='return autoTab(this,2,event);'> / <input type='text' onkeypress='return noenter()' onBlur='if(this.value!=\"dd\"){if(checkNumeric(this,2)){ getValue(this); }}' name='bDay' size='2' maxlength='2' value='dd' class='textFieldStyle' style='width: 30;' onFocus='select(this)' onKeyUp='return autoTab(this,2,event);'> / <input type='text' onkeypress='return noenter()' onBlur='if(this.value!=\"yyyy\"){if(checkNumeric(this,4)){ getValue(this); }}' name='bYear' size='4' maxlength='4' value='yyyy' class='textFieldStyle' style='width: 40;' onFocus='select(this)' onKeyUp='return autoTab(this,4,event);'></font><br>Social Sec. # <input title='Social Security #' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='SSNumberA' value='' class='textFieldStyle' style='width:30;' onFocus='select(this)' maxlength=3 onKeyUp='return autoTab(this,3,event);'> - <input title='Social Security #' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,2)){ getValue(this); }' name='SSNumberB' value='' class='textFieldStyle' style='width:30;' onFocus='select(this)' maxlength=2 onKeyUp='return autoTab(this,2,event);'> - <input title='Social Security #' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,4)){ getValue(this); }' name='SSNumberC' value='' class='textFieldStyle' style='width:40;' onFocus='select(this)' maxlength=4 onKeyUp='return autoTab(this,4,event);'>";

	this.referenceOneFirstName = "Please provide 3 references:<br><table border=1><tr><th><font style='font-size:10pt'>Full name<td><input title='Reference 1 first name' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name=referenceOneFirstName value='' class='textFieldStyle' style='width:70;' onFocus='select(this)'> <input title='Reference 1 last name' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name=referenceOneLastName value='' class='textFieldStyle' style='width:70;' onFocus='select(this)'>	<tr><th><font style='font-size:10pt'>Relationship<td><select onKeyDown='return noBackSpace()' onChange='getValue(this);' name=referenceOneRelationship  class='selectStyle'  style='width:145;' ><option value=''>Relation<option value=''  style='color:#CC3333;'>------------<option value='Parent'>Parent<option value='Sibling'>Sibling<option value='Friend'>Friend<option value='Co-Worker'>Co-Worker<option value='Employer'>Employer<option value='Relative'>Relative</select>	<tr><th><font style='font-size:10pt'>Phone<td><input title='Reference 1 Phone' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='Reference1PhoneA' value='' class='textFieldStyle' style='width:30;'  onFocus='select(this)' maxlength=3  onKeyUp='return autoTab(this,3,event);'> <input title='Reference 1 Phone' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='Reference1PhoneB' value='' class='textFieldStyle' style='width:30;'  onFocus='select(this)' maxlength=3  onKeyUp='return autoTab(this,3,event);'> <input title='Reference 1 Phone' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,4)){ getValue(this); }' name='Reference1PhoneC' value='' class='textFieldStyle' style='width:40;'  onFocus='select(this)' maxlength=4  onKeyUp='return autoTab(this,4,event);'></table><br><table border=1>	<tr><th><font style='font-size:10pt'>Full name<td><input title='Reference 2 first name' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name=referenceTwoFirstName value='' class='textFieldStyle' style='width:70;' onFocus='select(this)'> <input title='Reference 2 last name' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name=referenceTwoLastName value='' class='textFieldStyle' style='width:70;' onFocus='select(this)'>	<tr><th><font style='font-size:10pt'>Relationship<td><select onKeyDown='return noBackSpace()' onChange='getValue(this);' name=referenceTwoRelationship  class='selectStyle'  style='width:145;' ><option value=''>Relation<option value=''  style='color:#CC3333;'>------------<option value='Parent'>Parent<option value='Sibling'>Sibling<option value='Friend'>Friend<option value='Co-Worker'>Co-Worker<option value='Employer'>Employer<option value='Relative'>Relative</select>	<tr><th><font style='font-size:10pt'>Phone<td><input title='Reference 2 Phone' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='Reference2PhoneA' value='' class='textFieldStyle' style='width:30;'  onFocus='select(this)' maxlength=3  onKeyUp='return autoTab(this,3,event);'> <input title='Reference 2 Phone' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='Reference2PhoneB' value='' class='textFieldStyle' style='width:30;'  onFocus='select(this)' maxlength=3  onKeyUp='return autoTab(this,3,event);'> <input title='Reference 2 Phone' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,4)){ getValue(this); }' name='Reference2PhoneC' value='' class='textFieldStyle' style='width:40;'  onFocus='select(this)' maxlength=4  onKeyUp='return autoTab(this,4,event);'></table><br><table border=1>	<tr><th><font style='font-size:10pt'>Full name<td><input title='Reference 3 first name' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name=referenceThreeFirstName value='' class='textFieldStyle' style='width:70;' onFocus='select(this)'> <input title='Reference 3 last name' type='text' onkeypress='return noenter()' onBlur='getValue(this);' name=referenceThreeLastName value='' class='textFieldStyle' style='width:70;' onFocus='select(this)'>	<tr><th><font style='font-size:10pt'>Relationship<td><select onKeyDown='return noBackSpace()' onChange='getValue(this);' name=referenceThreeRelationship  class='selectStyle'  style='width:145;' ><option value=''>Relation<option value=''  style='color:#CC3333;'>------------<option value='Parent'>Parent<option value='Sibling'>Sibling<option value='Friend'>Friend<option value='Co-Worker'>Co-Worker<option value='Employer'>Employer<option value='Relative'>Relative</select>	<tr><th><font style='font-size:10pt'>Phone<td><input title='Reference 3 Phone' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='Reference3PhoneA' value='' class='textFieldStyle' style='width:30;'  onFocus='select(this)' maxlength=3  onKeyUp='return autoTab(this,3,event);'> <input title='Reference 3 Phone' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='Reference3PhoneB' value='' class='textFieldStyle' style='width:30;'  onFocus='select(this)' maxlength=3  onKeyUp='return autoTab(this,3,event);'> <input title='Reference 3 Phone' type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,4)){ getValue(this); }' name='Reference3PhoneC' value='' class='textFieldStyle' style='width:40;'  onFocus='select(this)' maxlength=4  onKeyUp='return autoTab(this,4,event);'></table>";

	this.mortgageLead = "As a homeowner<br>you may also qualify for MORE CASH:<br><select onKeyDown='return noBackSpace()' name=mortgageLead class='selectStyle' onChange='if(this.value == \"-\"){noMortgageLead();  homeownerOffers();} getValue(this);'><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value='true'>Yes, show me how can I get more cash<option value='-'>No, I don't want more cash<option value='-'>I do not own a home</select>";

// if(this.value != 'Excellent'){agree=confirm('GOOD NEWS!\\nOur credit repair specialists can help you\\ndramaticaly increase your credit score.\\n\\nClick OK to learn more.\\n\\nClick Cancel if you are not interested\\nin boosting your credit (FICO) score.'); if(agree){hiddenForm.credit_repair_lead.value='yes'}} 

	this.CreditRating = "Complete your request with the selections below:<br><select onKeyDown='return noBackSpace()' name='CreditRating' class='selectStyle' onChange=\"getValue(this);\"><option value='' selected>Your Credit<option value=''  style='color:#CC3333'>----------------<option value=Excellent>Credit: Excellent<option value=Good>Credit: Good<option value=Fair>Credit: Fair<option value=Poor>Credit: Poor</select><br><select onKeyDown='return noBackSpace()' name='PropertyType' class='selectStyle' onChange=\"if(this.value=='Manufactured') {alert('At this time InstantQuotes123.com cannot provide financial services for Manufactured or Mobile Homes.'); this.value=''}  getValue(this);\"><option value='' selected>Your Home Type<option value=''  style='color:#CC3333'>----------------<option value='Single Family Home'>Single Family Home<option value='Condominium'>Condominium<option value='Multi Family Residence'>Multifamily Residence<option value='Manufactured'>Manufactured or Mobile Home</select><br><select onKeyDown='return noBackSpace()' name='PropertyValue' class='selectStyle' onChange='getValue(this);'><option value='' >Home Value<option value='' style='color:#CC3333;'>----------------<option value='50000' >Home Value: up to 50,000<option value='60000' >Home Value: 60,000<option value='70000' >Home Value: 70,000<option value='80000' >Home Value: 80,000<option value='90000' >Home Value: 90,000<option value='100000' >Home Value: 100,000<option value='125000' >Home Value: 125,000<option value='150000' >Home Value: 150,000<option value='175000' >Home Value: 175,000<option value='200000' >Home Value: 200,000<option value='225000' >Home Value: 225,000<option value='250000' >Home Value: 250,000<option value='275000' >Home Value: 275,000<option value='300000' >Home Value: 300,000<option value='325000' >Home Value: 325,000<option value='350000' >Home Value: 350,000<option value='375000' >Home Value: 375,000<option value='400000' >Home Value: 400,000<option value='425000' >Home Value: 425,000<option value='450000' >Home Value: 450,000<option value='475000' >Home Value: 475,000<option value='500000' >Home Value: 500,000<option value='525000' >Home Value: 525,000<option value='550000' >Home Value: 550,000<option value='575000' >Home Value: 575,000<option value='600000' >Home Value: 600,000<option value='650000' >Home Value: 650,000<option value='700000' >Home Value: 700,000<option value='750000' >Home Value: 750,000<option value='800000' >Home Value: 800,000<option value='850000' >Home Value: 850,000<option value='900000' >Home Value: 900,000<option value='950000' >Home Value: 950,000<option value='1000000' >Home Value: 1,000,000+</select><br><select onKeyDown='return noBackSpace()' name='AmountOwedOnProperty' onChange='checkLTV(); getValue(this);' class='selectStyle'><option value='' >Your Mortgage Balance<option value='' style='color:#CC3333;'>----------------<option value='0' >Balance: 0,00<option value='10000' >Balance: 10,000<option value='20000' >Balance: 20,000<option value='25000' >Balance: 25,000<option value='30000' >Balance: 30,000<option value='35000' >Balance: 35,000<option value='40000' >Balance: 40,000<option value='45000' >Balance: 45,000<option value='50000' >Balance: 50,000<option value='55000' >Balance: 55,000<option value='60000' >Balance: 60,000<option value='65000' >Balance: 65,000<option value='70000' >Balance: 70,000<option value='75000' >Balance: 75,000<option value='80000' >Balance: 80,000<option value='85000' >Balance: 85,000<option value='90000' >Balance: 90,000<option value='95000' >Balance: 95,000<option value='100000' >Balance: 100,000<option value='125000' >Balance: 125,000<option value='150000' >Balance: 150,000<option value='175000' >Balance: 175,000<option value='200000' >Balance: 200,000<option value='225000' >Balance: 225,000<option value='250000' >Balance: 250,000<option value='275000' >Balance: 275,000<option value='300000' >Balance: 300,000<option value='350000' >Balance: 350,000<option value='400000' >Balance: 400,000<option value='450000' >Balance: 450,000<option value='500000' >Balance: 500,000<option value='550000' >Balance: 550,000<option value='600000' >Balance: 600,000<option value='650000' >Balance: 650,000<option value='700000' >Balance: 700,000<option value='750000' >Balance: 750,000<option value='800000' >Balance: 800,000<option value='850000' >Balance: 850,000<option value='900000' >Balance: 900,000<option value='950000' >Balance: 950,000<option value='1000000' >Balance: 1,000,000+</select><br><select onKeyDown='return noBackSpace()' name='AdditionalCash' onChange='checkLTV(); getValue(this);' class='selectStyle'><option value='' >Additional Cash Wanted<option value='' style='color:#CC3333;'>----------------<option value='0' >No Additional Cash<option value='5000' >Additional Cash: up to 5,000<option value='10000' >Additional Cash: 10,000<option value='15000' >Additional Cash: 15,000<option value='20000' >Additional Cash: 20,000<option value='25000' >Additional Cash: 25,000<option value='30000' >Additional Cash: 30,000<option value='35000' >Additional Cash: 35,000<option value='40000' >Additional Cash: 40,000<option value='45000' >Additional Cash: 45,000<option value='50000' >Additional Cash: 50,000<option value='55000' >Additional Cash: 55,000<option value='60000' >Additional Cash: 60,000<option value='65000' >Additional Cash: 65,000<option value='70000' >Additional Cash: 70,000<option value='75000' >Additional Cash: 75,000<option value='80000' >Additional Cash: 80,000<option value='85000' >Additional Cash: 85,000<option value='90000' >Additional Cash: 90,000<option value='95000' >Additional Cash: 95,000<option value='100000' >Additional Cash: 100,000<option value='125000' >Additional Cash: 125,000<option value='150000' >Additional Cash: 150,000<option value='175000' >Additional Cash: 175,000<option value='200000' >Additional Cash: 200,000<option value='225000' >Additional Cash: 225,000<option value='250000' >Additional Cash: 250,000<option value='275000' >Additional Cash: 275,000<option value='300000' >Additional Cash: 300,000<option value='325000' >Additional Cash: 325,000<option value='350000' >Additional Cash: 350,000<option value='375000' >Additional Cash: 375,000<option value='400000' >Additional Cash: 400,000<option value='425000' >Additional Cash: 425,000<option value='450000' >Additional Cash: 450,000<option value='475000' >Additional Cash: 475,000<option value='500000' >Additional Cash: 500,000<option value='525000' >Additional Cash: 525,000<option value='550000' >Additional Cash: 550,000<option value='575000' >Additional Cash: 575,000<option value='600000' >Additional Cash: 600,000<option value='650000' >Additional Cash: 650,000<option value='700000' >Additional Cash: 700,000<option value='750000' >Additional Cash: 750,000<option value='800000' >Additional Cash: 800,000<option value='850000' >Additional Cash: 850,000<option value='900000' >Additional Cash: 900,000<option value='950000' >Additional Cash: 950,000<option value='1000000' >Additional Cash: 1,000,000</select><br><select onKeyDown='return noBackSpace()' name='SecondMortBalance' onChange='getValue(this);' class='selectStyle'><option value='' >Second Mortgage Balance<option value='' style='color:#CC3333;'>----------------<option value='0' >I do not have a second mortgage<option value='' style='color:#CC3333;'>----------------<option value='' >My Second Mortgage Balance is:<option value='' >(choose closest value)<option value='5000' >Second Mortgage Balance: 5,000<option value='10000' >Second Mortgage Balance: 15,000<option value='15000' >Second Mortgage Balance: 15,000<option value='20000' >Second Mortgage Balance: 20,000<option value='25000' >Second Mortgage Balance: 25,000<option value='30000' >Second Mortgage Balance: 30,000<option value='35000' >Second Mortgage Balance: 35,000<option value='40000' >Second Mortgage Balance: 40,000<option value='45000' >Second Mortgage Balance: 45,000<option value='50000' >Second Mortgage Balance: 50,000<option value='55000' >Second Mortgage Balance: 55,000<option value='60000' >Second Mortgage Balance: 60,000<option value='65000' >Second Mortgage Balance: 65,000<option value='70000' >Second Mortgage Balance: 70,000<option value='75000' >Second Mortgage Balance: 75,000<option value='80000' >Second Mortgage Balance: 80,000<option value='85000' >Second Mortgage Balance: 85,000<option value='90000' >Second Mortgage Balance: 90,000<option value='95000' >Second Mortgage Balance: 95,000<option value='100000' >Second Mortgage Balance: 100,000<option value='125000' >Second Mortgage Balance: 125,000<option value='150000' >Second Mortgage Balance: 150,000<option value='175000' >Second Mortgage Balance: 175,000<option value='200000' >Second Mortgage Balance: 200,000<option value='225000' >Second Mortgage Balance: 225,000<option value='250000' >Second Mortgage Balance: 250,000<option value='275000' >Second Mortgage Balance: 275,000<option value='300000' >Second Mortgage Balance: 300,000<option value='325000' >Second Mortgage Balance: 325,000<option value='350000' >Second Mortgage Balance: 350,000<option value='375000' >Second Mortgage Balance: 375,000<option value='400000' >Second Mortgage Balance: 400,000<option value='425000' >Second Mortgage Balance: 425,000<option value='450000' >Second Mortgage Balance: 450,000<option value='475000' >Second Mortgage Balance: 475,000<option value='500000' >Second Mortgage Balance: 500,000<option value='525000' >Second Mortgage Balance: 525,000<option value='550000' >Second Mortgage Balance: 550,000<option value='575000' >Second Mortgage Balance: 575,000<option value='600000' >Second Mortgage Balance: 600,000<option value='650000' >Second Mortgage Balance: 650,000<option value='700000' >Second Mortgage Balance: 700,000<option value='750000' >Second Mortgage Balance: 750,000<option value='800000' >Second Mortgage Balance: 800,000<option value='850000' >Second Mortgage Balance: 850,000<option value='900000' >Second Mortgage Balance: 900,000<option value='950000' >Second Mortgage Balance: 950,000<option value='1000000' >Second Mortgage Balance: 1,000,000</select><br><select onKeyDown='return noBackSpace()' name=BestTime class=selectStyle onChange='getFormValues();'><option value='' selected>Best Time to be reached<option value=''  style='color:#CC3333'>----------------<option value=1>Anytime<option value=2>Morning<option value=3>Afternoon<option value=4>Evening</select><br><select onKeyDown='return noBackSpace()' name='Rate' class='selectStyle' onChange='getValue(this);'><option value='' >Your current interest rate<option value='' >(choose closest value)<option value='' style='color:#CC3333;'>----------------<option value='5' >5.00 % or less<option value='5.5' >5.50 %<option value='6' >6.00 %<option value='6.5' >6.50 %<option value='7' >7.00 %<option value='7.5' >7.50 %<option value='8' >8.00 %<option value='8.5' >8.50 %<option value='9' >9.00 %<option value='9.5' >9.50 %<option value='10' >10.00 %<option value='10.5' >10.50 %<option value='11' >11.00 %<option value='11.5' >11.50 %<option value='12' >12.00 %<option value='12.5' >12.50 %<option value='13' >13.00 %<option value='13.5' >13.50 %<option value='14' >14.00 %<option value='14.5' >14.50 %<option value='15' >15.00 %<option value='15.5' >15.50 %<option value='16' >16.00 %<option value='16.5' >16.50 %<option value='17' >17.00 %<option value='17.5' >17.50 %<option value='18' >18.00 % +</select><br><select onKeyDown='return noBackSpace()' name='MonthlyOwe' class='selectStyle' onChange='getValue(this);'><option value='' selected>Your monthly obligations<option value=''>excluding housing:<option value=''>(credit cards, child support, etc.)<option value=''  style='color:#CC3333'>----------------<option value='0' >$0.00<option value='250' >$0.00 - $250.00<option value='500' >$250.00 - $500.00<option value='750' >$500.00 - $750.00<option value='1000' >$750.00 - $1000.00<option value='1250' >$1000.00 - $1250.00<option value='1500' >$1250.00 - $1500.00<option value='1750' >$1500.00 - $1750.00<option value='2000' >$1750.00 - $2000.00<option value='2250' >$2000.00 - $2250.00<option value='2500' >$2250.00 - $2500.00<option value='2750' >$2500.00 - $2750.00<option value='3000' >$2750.00 - $3000.00<option value='3000' >$3000.00+</select>";

    this.autoFinancing = "Limited time offer:<br><select name='autoFinancing' class='selectStyle' onChange=\"if(this.value == 'yes'){var confirmAutoFinancing=confirm('Thank you. You will ALSO receive a Free - No Obligation auto financing quote.\\n\\nClick OK to confirm your selection.'); if(!confirmAutoFinancing) {this.value='no';} else { document.hiddenForm.autoFinancing2.value = 'yes'; document.hiddenForm.creditCheckAuthorization.value = '-'; } } getValue(this);\"><option value=''>Receive a free, no obligation <option value=''>auto loan quote for a new or used car <option value=''>(bad or no credit OK with credit check)<option value='' style='color:#CC3333;'>-----------------------<option value='yes' style='color:#CC3333; text-decoration: bold;'>YES<option value='' style='color:#CC3333;'>-----------------------<option value='no'>no</select>";

    this.autoFinancing2 = "Congratulations:<br><select name='autoFinancing2' class='selectStyle' onChange=\"if(this.value == 'yes'){var confirmAutoFinancing=confirm('Thank you. You will ALSO receive a Free - No Obligation auto financing quote.\\n\\nClick OK to confirm your selection.'); if(!confirmAutoFinancing) {this.value='no';} else { document.hiddenForm.autoFinancing.value = 'yes'; document.hiddenForm.creditCheckAuthorization.value = '-' } }  getValue(this);\"><option value=''>You are also pre-approved<option value=''>to receive a free, no obligation <option value=''>auto loan quote for a new or used car <option value=''>(bad or no credit OK with credit check)<option value='' style='color:#CC3333;'>-----------------------<option value='yes' style='color:#CC3333; text-decoration: bold;'>YES, get me approved<option value='' style='color:#CC3333;'>-----------------------<option value='no'>No, I don't want it</select>";

    this.home_purchase_lead = "Why Rent when you can OWN your home?<br><select name='home_purchase_lead' class='selectStyle' onChange=\"if(this.value == 'yes'){var confirmHomePurchase=confirm('Congratulations!\\nYou will ALSO receive a Free - No Obligation Quote on a New Home Purchase\\n\\nClick OK to confirm your selection.'); if(!confirmHomePurchase) {this.value='no';} else { document.hiddenForm.home_purchase_lead.value = 'yes' } } getValue(this);\"><option value=''>Learn how you can own a home <option value=''>for the same money you pay on rent.<option value=''>(bad credit OK)<option value='' style='color:#CC3333;'>-----------------------<option value='yes' style='color:#CC3333; text-decoration: bold;'>YES, I would rather Own than Rent<option value='' style='color:#CC3333;'>-----------------------<option value='no'>no, I don't want to own my home</select>";

    this.creditCheckAuthorization = "Please select one:<br><select name='creditCheckAuthorization' class='selectStyle' onChange=\"if(this.value != 'yes'){document.hiddenForm.autoFinancing.value = 'no'; document.hiddenForm.autoFinancing2.value = 'no'} getValue(this);\"><option value=''>For a fast and accurate<option value=''>auto loan quote<option value=''>please check my credit<option value=''>(bad credit or no credit OK)<option value='' style='color:#CC3333;'>-----------------------<option value='yes'>YES, I agree and authorize <option value='yes'>a credit check to be performed<option value='' style='color:#CC3333;'>-----------------------<option value='no'>No, do not want the auto loan quote</select>";

	this.home_loan_lead = "<table border=1 cellpadding=3><tr><td align=middle>Based on your information,<br>we can help you save money!<tr><td align=middle><font color=brown><b>Yes, I would like to save up to 70% <br>on the following:</b></font>" 

	+ "<tr><td align=middle><font color=teal><b>My Mortgage Payments</b></font><br><b>Yes</b><input type=radio name='home_loan_lead' id=g value='' onClick=\"this.value='yes'; document.getElementById('h').value=this.value; getValue(this);\"> <input type=radio name='home_loan_lead' id=h value='' onClick=\"this.value='no'; document.getElementById('g').value=this.value; getValue(this)\">no thanks"

	+ "<tr><td align=middle><font color=teal><b>My Homeowner Insurance</b></font><br><b>Yes</b><input type=radio name='home_insurance_lead' id=a value='' onClick=\"this.value='yes'; document.getElementById('b').value=this.value; getValue(this);\"> <input type=radio name='home_insurance_lead' id=b value='' onClick=\"this.value='no'; document.getElementById('a').value=this.value; getValue(this)\">no thanks";

//	+  "<tr><td align=middle><font color=teal><b>Credit Problems?<br>Get a Fast Credit Repair Quote:</b></font><br><b>Yes</b><input type=radio name='credit_repair_lead' id=a value='' onClick=\"this.value='yes'; document.getElementById('b').value=this.value; getValue(this);\"> <input type=radio name='credit_repair_lead' id=b value='' onClick=\"this.value='no'; document.getElementById('a').value=this.value; getValue(this)\">no thanks";

	this.credit_repair_lead = "<b>Credit Problems?<br>Get a <u>Free Credit Repair</u> Quote:</b><br><select onKeyDown='return noBackSpace()' name=credit_repair_lead class='selectStyle' onChange='getValue(this);'><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value='yes'>YES<option value='no'>No, I don't want a better credit</select>";

	this.credit_report_lead = "<b>With your request you could receive a<br>FREE CREDIT REPORT:</b><br><select onKeyDown='return noBackSpace()' name=credit_report_lead class='selectStyle' onChange='getValue(this);'><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value='yes'>YES, I want my Free Credit Report<option value=''  style='color:#CC3333;'>----------------<option value='no'>No, I don't want to know my credit</select>";

	this.sms_agree = "<b>Keep me updated on my request<br>and Special Promotions<br>using SMS (text messaging)</b><br><br><select onKeyDown='return noBackSpace()' name=sms_agree class='selectStyle' onChange='if(this.value != \"yes\"){document.hiddenForm.CellAreaCode.value = \"000\"; document.hiddenForm.CellPhoneNr.value = \"000\"; document.hiddenForm.CellPhoneSuffix.value = \"0000\"; document.inquiry.CellAreaCode.value = \"000\"; document.inquiry.CellPhoneNr.value = \"000\"; document.inquiry.CellPhoneSuffix.value = \"0000\";} getValue(this);'><option value=''>Select one...<option value=''  style='color:#CC3333;'>----------------<option value='yes'>YES<option value=''  style='color:#CC3333;'>----------------<option value='no'>No<option value=''  style='color:#CC3333;'>----------------<option value='no'>I do not have a cell phone</select> <br><br><font class='formTextStyle' style='position:relative; left: -30'>Cell Phone <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='CellAreaCode' maxlength='3' value='' class='textFieldStyle' style='width: 35;' onKeyUp='return autoTab(this,3,event);'> - <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,3)){ getValue(this); }' name='CellPhoneNr' maxlength='3' value='' class='textFieldStyle' style='width: 35;' onKeyUp='return autoTab(this,3,event);'> - <input type='text' onkeypress='return noenter()' onBlur='if(checkNumeric(this,4)){ getValue(this); }' name='CellPhoneSuffix' maxlength='4' value='' class='textFieldStyle' style='width: 55;' onKeyUp='return autoTab(this,4,event);'></font>";

	this.car_insurance_lead = "<table border=1 cellpadding=3><tr><td align=middle>Based on your information,<br>we can help you save money!<tr><td align=middle><font color=brown><b>Yes, I would like to save up to 70% <br>on the following:</b></font>" 

	+ "<tr><td align=middle><font color=teal><b>My Car Insurance</b></font><br><b>Yes</b><input type=radio name='car_insurance_lead' id=c value='' onClick=\"this.value='yes'; document.getElementById('d').value=this.value; getValue(this);\"> <input type=radio name='car_insurance_lead' id=d value='' onClick=\"this.value='no'; document.getElementById('c').value=this.value; getValue(this)\">no thanks"

	+ "<tr><td align=middle><font color=teal><b>Life Insurance Quote</b></font><br><b>Yes</b><input type=radio name='life_insurance_lead' id=c value='' onClick=\"this.value='yes'; document.getElementById('d').value=this.value; getValue(this);\"> <input type=radio name='life_insurance_lead' id=d value='' onClick=\"this.value='no'; document.getElementById('c').value=this.value; getValue(this)\">no thanks"

	+ "<tr><td align=middle><font color=teal><b>My Student Loans Debt of over<br> $10,000 (must be out of school)</b></font><br><b>Yes</b><input type=radio name='student_loans_consolidation_lead' id=i value='' onClick=\"this.value='yes'; document.getElementById('j').value=this.value; getValue(this);\"> <input type=radio name='student_loans_consolidation_lead' id=j value='' onClick=\"this.value='no'; document.getElementById('i').value=this.value; getValue(this)\">no thanks"

//	+ "<tr><td align=middle><font color=teal><b>My Renter Insurance</b></font><br><b>Yes</b><input type=radio name='renter_insurance_lead' id=a value='' onClick=\"this.value='yes'; document.getElementById('b').value=this.value; getValue(this);\"> <input type=radio name='renter_insurance_lead' id=b value='' onClick=\"this.value='no'; document.getElementById('a').value=this.value; getValue(this)\">no thanks"

	+ "<tr><td align=middle><font color=teal><b>Home Business Opportunity</b></font><br><b>Yes</b><input type=radio name='home_based_business_lead' id=a value='' onClick=\"this.value='yes'; document.getElementById('b').value=this.value; getValue(this);\"> <input type=radio name='home_based_business_lead' id=b value='' onClick=\"this.value='no'; document.getElementById('a').value=this.value; getValue(this)\">no thanks";

//	+ "<tr><td align=middle><font color=teal><b>Secured or Unsecured Credit Card</b></font><br><b>Yes</b><input type=radio name='credit_card_lead' id=e value='' onClick=\"this.value='yes'; document.getElementById('f').value=this.value; getValue(this);\"> <input type=radio name='credit_card_lead' id=f value='' onClick=\"this.value='no'; document.getElementById('e').value=this.value; getValue(this)\">no thanks";

}

function checkEmail(field)
{
		if(field.value == '') return false;
		var str=field.value;
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
			field.value = '';
			alert("Invalid E-mail")
			return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
			field.value = '';
			alert("Invalid E-mail")
			return false;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
			field.value = '';
			alert("Invalid E-mail")
			return false;
		}

		 if (str.indexOf(at,(lat+1))!=-1){
			field.value = '';
			alert("Invalid E-mail")
			return false;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
			field.value = '';
			alert("Invalid E-mail")
			return false;
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
			field.value = '';
			alert("Invalid E-mail")
			return false;
		 }

		 if (str.indexOf(" ")!=-1){
			field.value = '';
			alert("Invalid E-mail")
			return false;
		 }

 		 return true;
}

function checkNumeric(field,minLength) {
	if(field.value.length < 1) return;
	if(field.value.length<minLength){
		field.value = '';
		alert("This field must have minimum " + minLength + " digits.");
		return false;
	}
	for (var i=0; i<field.value.length; i++) {
		var c = field.value.charAt(i);
      	if (((c < "0") || (c > "9"))) {
			field.value = '';
			alert("Numeric characters only please.\nNo commas, periods or other characters.");
			return false;
		}
	}
	return true;
}
var flag = 0;

function submitInfo() {
	if((document.hiddenForm.HomePhoneSuffix.value != '')&&(flag==0)&&(getCookie('Sent') != 'True')) {

		setPage('leftSide', "<b>Your request is being processed...<br><br>Please wait for a confirmation.<br>This may take a few minutes.<br>");
		document.inquiry.back.disabled=true;
		document.inquiry.submit.disabled=true;

		document.hiddenForm.submit.click();
		setCookie('Sent', 'True', null, '/');
		flag=1;
		 
	}
}

// -----------------------------------------------------------------------------------------------------------------------------------------

function checkLTV() {

	if(document.inquiry.PropertyValue.options[document.inquiry.PropertyValue.selectedIndex].value == '') {
		alert('Please select your home value first');
		document.inquiry.PropertyValue.focus();
		document.inquiry.AmountOwedOnProperty.value = '';
		document.inquiry.AdditionalCash.value = '';
		return;
	}

	if(document.inquiry.AmountOwedOnProperty.options[document.inquiry.AmountOwedOnProperty.selectedIndex].value == '') {
		alert('Please select your mortgage balance first');
		document.inquiry.AmountOwedOnProperty.focus();
		document.inquiry.AdditionalCash.value = '';
		return;
	}

		if(document.inquiry.AmountOwedOnProperty.options[document.inquiry.AmountOwedOnProperty.selectedIndex].value/parseInt( document.inquiry.PropertyValue.options[document.inquiry.PropertyValue.selectedIndex].value) >1) {
			alert('Your mortgage balance cannot exceed the value of your home.\nPlease choose a smaller amount.');
			document.inquiry.AmountOwedOnProperty.value = '';
			document.inquiry.AmountOwedOnProperty.focus();
			return;
		}

		if((inquiry.PropertyValue.value>=80000) && (inquiry.PropertyValue.value<100000)) {inquiry.PropertyValue.value = 100000}

		var totalAmount = parseInt( document.inquiry.AmountOwedOnProperty.options[document.inquiry.AmountOwedOnProperty.selectedIndex].value) + parseInt( document.inquiry.AdditionalCash.options[document.inquiry.AdditionalCash.selectedIndex].value);

		var LTV = totalAmount/parseInt( document.inquiry.PropertyValue.options[document.inquiry.PropertyValue.selectedIndex].value);

		if ( LTV >1) {

			alert('Your mortgage balance plus the additional cash cannot exceed the value of your home.\nPlease choose a smaller amount.');
			document.inquiry.AdditionalCash.value = '';
			document.inquiry.AdditionalCash.focus();
			return;
		}

		if ((inquiry.AmountOwedOnProperty.value + inquiry.AdditionalCash.value < 50000) && (inquiry.PropertyValue.value>=60000) && (inquiry.PropertyValue.value<90000)) {
			inquiry.AdditionalCash.value = 50000 - inquiry.AmountOwedOnProperty.value;
		}

		if ((inquiry.AmountOwedOnProperty.value + inquiry.AdditionalCash.value < 50000) && (inquiry.PropertyValue.value>=90000)) {
			inquiry.AdditionalCash.value = 75000 - inquiry.AmountOwedOnProperty.value;
		}

		LTV = totalAmount/parseInt( document.inquiry.PropertyValue.options[document.inquiry.PropertyValue.selectedIndex].value);

		if (LTV > 0.85) {
			inquiry.PropertyValue.value = document.inquiry.PropertyValue.options[document.inquiry.PropertyValue.selectedIndex + 1].value;
		}

//		alert('Additional Cash: ' + inquiry.AdditionalCash.value + '\n' + 'Balance: ' + inquiry.AmountOwedOnProperty.value + '\n' + 'Home: value ' + inquiry.PropertyValue.value);

}

// -----------------------------------------------------------------------------------------------------------------------------------------

function noMortgageLead() {
	document.hiddenForm.mortgageLead.value='-';
	document.hiddenForm.CreditRating.value='-';
	document.hiddenForm.PropertyType.value='-';
	document.hiddenForm.PropertyValue.value='-';
	document.hiddenForm.AmountOwedOnProperty.value='-';
	document.hiddenForm.AdditionalCash.value='-';
	document.hiddenForm.SecondMortBalance.value=0;
	document.hiddenForm.BestTime.value='-';
	document.hiddenForm.Rate.value='-';
	document.hiddenForm.MonthlyOwe.value='-';
}

function homeownerOffers(){
	document.hiddenForm.home_loan_lead.value='';
	document.hiddenForm.home_insurance_lead.value='';
//	document.hiddenForm.credit_repair_lead.value='';
}

function getFormValues() {
	for(var i=0; i<(document.inquiry.elements.length-1); i++) {
		if(document.hiddenForm.elements[inquiry.elements[i].name]) document.hiddenForm.elements[inquiry.elements[i].name].value = inquiry.elements[i].value;
	}
	next();
}

// -----------------------------------------------------------------------------------------------------------------------------------------

function noenter() {
	return !(window.event && window.event.keyCode == 13);
}

// -----------------------------------------------------------------------------------------------------------------------------------------

function noBackSpace() {
	return !(window.event && window.event.keyCode == 8);
}

// -----------------------------------------------------------------------------------------------------------------------------------------

function checkABA(s) {

  var i, n, t;

  // First, remove any non-numeric characters.

  t = "";
  for (i = 0; i < s.length; i++) {
    c = parseInt(s.charAt(i), 10);
    if (c >= 0 && c <= 9)
      t = t + c;
  }

  // Check the length, it should be nine digits.

  if (t.length != 9)
    return false;

  // Now run through each digit and calculate the total.

  n = 0;
  for (i = 0; i < t.length; i += 3) {
    n += parseInt(t.charAt(i),     10) * 3
      +  parseInt(t.charAt(i + 1), 10) * 7
      +  parseInt(t.charAt(i + 2), 10);
  }

  // If the resulting sum is an even multiple of ten (but not zero),
  // the aba routing number is good.

  if (n != 0 && n % 10 == 0)
	return true;
  else
	return false;
}

function trackShareAsale() {

	// set the cookie lifespan; this will result in having the cookie phisically writen on the client machine
	var expDays = 30;
	var expDate = new Date();
	expDate.setTime(expDate.getTime() +  (24 * 60 * 60 * 1000 * expDays));

	// separate the elements found in the querystring into pairs and look for the "Source" value
	var pairs = location.search.substring(1, location.search.length).split("&");
	var SSAID = "";
	for (var i=0; i<pairs.length; i++) {
		if (pairs[i].indexOf("SSAID=") != -1) {
			SSAID = pairs[i].substring(pairs[i].indexOf("=")+1, pairs[i].length);
		}
	}

	// check if the visitor is new and record the new visit
	var oldSSAID = getCookie('SSAID');

	if (( SSAID != oldSSAID ) && ( SSAID != "" )) {
		setCookie('SSAID', SSAID, expDate, '/');
		setCookie('Source', SSAID, expDate, '/');
	}
}

var isNN = (navigator.appName.indexOf("Netscape")!=-1);
if(isNN)
  document.captureEvents(Event.KEYPRESS);

function autoTab(input,len, e){
  var keyCode = (isNN)?e.which:e.keyCode;
  var filter = (isNN)?[0,8,9]:[0,8,9,16,17,18,37,38,39,40,46];
  if(input.value.length >= len && !containsElement(filter,keyCode)){
    input.value = input.value.slice(0,len);
    input.form[(getIndex(input)+1)%input.form.length].focus();
    input.form[(getIndex(input)+1)%input.form.length].select();
  }
  function containsElement(arr, ele){
    var found = false, index = 0;
    while(!found && index < arr.length)
      if(arr[index]==ele)
        found = true;
      else
        index++;
    return found;
  }
  function getIndex(input){
    var index = -1, i = 0, found = false;
    while (i < input.form.length && index==-1)
      if (input.form[i] == input)index = i;
      else i++;
    return index;
  }
  return true;
}


// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

// PAYDATES VALIDATION

var holidays = new Array(
					'12/26/2005',
					'01/02/2006',
					'01/16/2006',
					'02/20/2006',
					'05/29/2006',
					'07/04/2006',
					'09/04/2006',
					'10/09/2006',
					'11/11/2006',
					'11/23/2006',
					'01/02/2006',
					'12/25/2006');	

function isWeekend(y, m, d)
{
    var dayofweek = getDayofWeek(y, m, d);

    if (dayofweek == 0 || dayofweek == 6)
        return true;
    else
        return false;
}

function getDayofWeek(y, m, d)
{
    var thedate2 = new Date();

    thedate2.setYear(y);
    thedate2.setDate(d);
    thedate2.setMonth(m-1);
    thedate2.setHours(0);
    thedate2.setMinutes(0);
    thedate2.setSeconds(0);

    var dayofweek = thedate2.getDay();

    return dayofweek;
}

function isHoliday(payDate)
{
	for(var i=0; i<holidays.length; i++){
		if(holidays[i] == payDate) return true;
	}
	return false;
}

function dateAdd(intval, numb, base){
	switch(intval){
		case "M":
			base.setMonth(base.getMonth() + numb);
			break;
		case "YYYY":
			base.setFullYear(base.getFullYear() + numb);
			break;
		case "D":
			base.setDate(base.getDate() + numb);
			break;
		case "H":
			base.setHours(base.getHours() + numb);
			break;
		case "N":
			base.setMinutes(base.getMinutes() + numb);
			break;
		case "S":
			base.setSeconds(base.getSeconds() + numb);
			break;
		default:
	}
	return base
}

function correctPayday(payDate)
{
//	alert('test entry date: ' + payDate);

	date = new Array();
	date = payDate.split('/');
	m = date[0];
	d = date[1];
	y = date[2];

    var thedate = new Date();
    thedate.setYear(y);
    thedate.setDate(d);
    thedate.setMonth(m-1);
    thedate.setHours(0);
    thedate.setMinutes(0);
    thedate.setSeconds(0);
	
	if(payDate.length<10){
		if(m<10) m = '0' + m;
		if(d<10) d = '0' + d;
	}

    // Step 1 - if weekend, then move forward 1 or 2 days
    if (isWeekend(y,m,d))
    {
        var dayofweek = getDayofWeek(y, m, d);
        if (dayofweek==0)
            dateAdd("D", +1, thedate);
        if (dayofweek==6)
            dateAdd("D", +2, thedate);

        correctPayday(thedate.getMonth()+1 + '/' + thedate.getDate() + '/' + thedate.getYear());
    }

    // Step 2 - if holiday, then move forward 1 day
    if (isHoliday(payDate))
    {
        var dayofweek = getDayofWeek(y, m, d);

         dateAdd("D", +1, thedate);
         correctPayday(thedate.getMonth()+1 + '/' + thedate.getDate() + '/' + thedate.getYear());
   }

	var newDate = m + '/' + d + '/' + y;
//	alert(newDate + ' last value');
	return newDate;
}

function paydatesCalendar(calendar){
	calendar.setDisabledWeekDays(6,0);
	calendar.setDisabledWeekDays(6,0);

	var theDate = new Date();

//	dateAdd("M", +2, theDate);
//	var twoMonthsLater = theDate.getMonth()+1 + '/' + theDate.getDate() + '/' + theDate.getYear();
//	calendar.addDisabledDates(twoMonthsLater, null);

	for(var i=0; i<holidays.length; i++){
		calendar.addDisabledDates(holidays[i]);
	}
}

function identifySecondPaydate(paydateone, payperiod){

	date = new Array();
	date = paydateone.split('/');
	m = date[0];
	d = date[1];
	y = date[2];

	var theDate = new Date();
	theDate.setYear(y);
	theDate.setDate(d);
	theDate.setMonth(m-1);
	theDate.setHours(0);
	theDate.setMinutes(0);
	theDate.setSeconds(0);

//	alert(theDate);
	var paydatetwo = paydateone;
	switch(payperiod) {
		case 'Weekly':
			dateAdd("D", +7, theDate);
			paydatetwo = theDate.getMonth()+1 + '/' + theDate.getDate() + '/' + theDate.getYear();
			break;
		case 'Bi_Weekly':
			dateAdd("D", +14, theDate);
			paydatetwo = theDate.getMonth()+1 + '/' + theDate.getDate() + '/' + theDate.getYear();
			break;
		case 'Monthly':
			dateAdd("M", +1, theDate);
			paydatetwo = theDate.getMonth()+1 + '/' + theDate.getDate() + '/' + theDate.getYear();
			break;
		case 'TWICE_MONTHLY':
			dateAdd("D", +14, theDate);
			paydatetwo = theDate.getMonth()+1 + '/' + theDate.getDate() + '/' + theDate.getYear();
			break;
	}
	
//	alert(paydateone);
//	alert(paydatetwo);
	paydatetwo = correctPayday(paydatetwo);
	document.inquiry.paydatetwo.value = paydatetwo;
}

// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

function checkStateExclusions(request_type, state){

	var paydayLoansExcludedStates = "GA MA";
	if(request_type == 'PersonalLoan' && paydayLoansExcludedStates.indexOf(state) != -1){
		alert('This website does not service the state of ' + state + ' for personal loans at this time.\nPlease use the next page for more resources.');
		document.location.href='http://www.myloananddebt.com/cash-payday-loans.html';
	}

}