<!--

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

function Morgcal()
{
	form = document.myform
	LoanAmount= form.LoanAmount.value
	DownPayment= "0"
	AnnualInterestRate = form.InterestRate.value/100
	Years= form.NumberOfYears.value
	MonthRate=AnnualInterestRate/12
	NumPayments=Years*12
	Prin=LoanAmount-DownPayment
	MonthTaxes = form.AnnualTaxes.value/12
	MonthInsurance = form.AnnualInsurance.value/12
	MonthPrem = form.AnnualMI.value/12
	Figures = MonthTaxes+MonthInsurance+MonthPrem
	
	MonthPayment=Math.floor((Math.floor((Prin*MonthRate)/(1-Math.pow((1+MonthRate),(-1*NumPayments)))*100)/100)+Figures)
	form.NumberOfPayments.value=NumPayments
	form.MonthlyPayment.value="$"+MonthPayment
}

function same() {
if (document.form1.sitesame.checked) {
	document.form1.saddress.value = document.form1.address.value;
	document.form1.scity.value = document.form1.city.value;
	document.form1.sstate.value = document.form1.state.value;
	document.form1.szip.value = document.form1.zip.value;
} else {
	document.form1.saddress.value = "";
	document.form1.scity.value = "";
	document.form1.sstate.value = "Select a State";
	document.form1.szip.value = "";			
}
}

function checkForm() {
var invaliddata = "";
var zipCheck = /^\d{5}(-\d{4})?$/;
/*
// check for first name
if (document.form1.first_name.value == "") {
	invaliddata += "\n - First Name is missing.";
}

if (document.form1.last_name.value == "") {
	invaliddata += "\n - Last Name is missing.";
}

if (document.form1.address.value == "") {
	invaliddata += "\n - Address is missing.";
}

if (document.form1.city.value == "") {
	invaliddata += "\n - City is missing.";
}

if (document.form1.state.value == "Select a State") {
	invaliddata += "\n - State has not been selected.";
}

if (document.form1.zip.value == "") {
	invaliddata += "\n - Zip Code is missing.";
}

// check for email address
if (document.form1.email.value == "") {
	invaliddata += "\n - Email address is missing.";
}

var phoneRE = /^[0-9]\d{2}-\d{3}-\d{4}$/;
if (document.form1.home_phone.value == "") {
	invaliddata += "\n - Home Phone is missing.";
} else {
	if (!phoneRE.test(document.form1.home_phone.value)) {
		invaliddata += "\n - Home Phone is invalid. Must be in the format xxx-xxx-xxxx";
	}
}
*/
if (document.form1.verify.checked == 0) {
	invaliddata += "\n - You must agree to the terms and conditions to enter.";
}

// show errors
if (invaliddata != "") {
	invaliddata ="Errors have been detected in your submission:\n" + invaliddata;
	alert(invaliddata);
	return false;
}

}
//->