dayName = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")	monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")now = new DatethisYr = now.getYear()if (thisYr < 1900) {thisYr = thisYr+1900}// VALIDATE EMAILfunction validEmail(emailAdd) {invalidChars = " /:,;"	if (emailAdd == "") {		// cannot be emptyreturn false}for (i=0; i<invalidChars.length; i++) {	// does it contain any invalid characters?badChar = invalidChars.charAt(i)if (emailAdd.indexOf(badChar,0) > -1) {return false}}atPos = emailAdd.indexOf("@",1)	// there must be one "@" symbolif (atPos == -1) {return false}if (emailAdd.indexOf("@",atPos+1) != -1) {	       // and only one "@" symbolreturn false}periodPos = emailAdd.indexOf(".",atPos)if (periodPos == -1) {			// and at least one "." after the "@"return false}if (periodPos+3 > emailAdd.length)  {	// must be at least 2 characters after the "."return false}return true}
function submitIt(leaseForm) {
// ADDRESSES

if (leaseForm.firstname.value == "") {alert("Please fill in your First Name")leaseForm.firstname.focus()leaseForm.firstname.select()return false}if (leaseForm.lastname.value == "") {alert("Please fill in your Last Name")leaseForm.lastname.focus()leaseForm.lastname.select()return false}


if (leaseForm.address.value == "") {alert("Please fill in your Address")leaseForm.address.focus()leaseForm.address.select()return false}

if (leaseForm.city.value == "") {alert("Please fill in your Town/City")leaseForm.city.focus()leaseForm.city.select()return false}

if (leaseForm.county.value == "") {alert("Please fill in your State/Province/County")leaseForm.county.focus()leaseForm.county.select()return false}

if (leaseForm.zip.value == "") {alert("Please fill in your Zip/Postcode")leaseForm.zip.focus()leaseForm.zip.select()return false}

if (leaseForm.country.value == "") {alert("Please fill in your Country")leaseForm.country.focus()leaseForm.country.select()return false}

if (leaseForm.tel.value == "") {alert("Please fill in your Telephone Number")leaseForm.tel.focus()leaseForm.tel.select()return false}

// check to see if the email's valid			if (!validEmail(leaseForm.email.value)) {				alert("The e-mail you have entered appears to be invalid")				leaseForm.email.focus()				leaseForm.email.select()				return false			}
if (leaseForm.terms.checked != true) {
alert("Please check the box to Electronically Accept and Sign the Lease")
return false
}

return true}

