<!--
function checkForm(form) {
	with(form) {
		var errorCnt=0;
		document.mailForm.propSave.value = document.mailForm.proptype[proptypeIndex].value;

//  NAME
		if (/^\s*$/.test(form.name.value)) {
		   	document.getElementById("nameMsg").style.visibility	="visible";
			if (errorCnt==0) {
				form.name.focus();
			}
			errorCnt++;
		}
		else {
		   	document.getElementById("nameMsg").style.visibility	="hidden";
		}


//  ADDRESS
  		if (/^\s*$/.test(form.addr.value)) {
		   	document.getElementById("addrMsg").style.visibility	="visible";
			if (errorCnt==0) {
				form.addr.focus();
			}
			errorCnt++;
		}
		else {
		   	document.getElementById("addrMsg").style.visibility	="hidden";
		}


//  CITY
		if (/^\s*$/.test(form.city.value)) {
		   	document.getElementById("cityMsg").style.visibility	="visible";
			if (errorCnt==0) {
				form.city.focus();
			}
			errorCnt++;
		}
		else {
		   	document.getElementById("cityMsg").style.visibility	="hidden";
		}

//  STATE
		if (/^\s*$/.test(form.state.value)) {
		   	document.getElementById("stateMsg").style.visibility	="visible";
			if (errorCnt==0) {
				form.state.focus();
			}
			errorCnt++;
		}
		else {
		   	document.getElementById("stateMsg").style.visibility	="hidden";
		}


//  ZIP CODE
		if (/^\s*$/.test(form.zip.value)) {
		   	document.getElementById("zipMsg").style.visibility	="visible";
			if (errorCnt==0) {
				form.zip.focus();
			}
			errorCnt++;
		}
		else {
			if (/^(\d{5}|\d{5}-\d{4}|\d{9})$/.test(form.zip.value)) {
				document.getElementById("zipMsg").style.visibility	="hidden";
			}
			else {
				document.getElementById("zipMsg").style.visibility	="visible";
				if (errorCnt==0) {
					form.zip.focus();
				}
				errorCnt++;
     		}
		}


//  PHONE
		if (/^\s*$/.test(form.phone.value)) {
		   	document.getElementById("phoneMsg").style.visibility	="visible";
			if (errorCnt==0) {
				form.phone.focus();
			}
			errorCnt++;
		}
		else {
			editPhone = /^\(?(\d{3})\)?[\.\-\/]?(\d{3})[\.\-\/]?(\d{4})$/;
			validPhone = editPhone.exec(form.phone.value)
			if (validPhone) {
				phoneValue = "(" + validPhone[1] + ")" + validPhone[2] + "-" + validPhone[3];
				form.phone.value = phoneValue;
				document.getElementById("phoneMsg").style.visibility	="hidden";
			}
			else {
				document.getElementById("phoneMsg").style.visibility	="visible";
				if (errorCnt==0) {
					form.phone.focus();
				}
				errorCnt++;
			}
		}


//  EMAIL
		if (/^\s*$/.test(form.email.value)) {
			document.getElementById("emailMsg").style.visibility	="visible";
			if (errorCnt==0) {
				form.email.focus();
			}
			errorCnt++;
		}
		else {
			if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value)){
				document.getElementById("emailMsg").style.visibility	="hidden";
			 }
			 else {
				document.getElementById("emailMsg").style.visibility	="visible";
				if (errorCnt==0) {
					form.email.focus();
				}
				errorCnt++;
			 }
		}


//  ERROR CHECK
 		if (errorCnt>0) {
		   	document.getElementById("errorMsg").style.visibility	="visible";
			return false;
		}
		else {
		   	document.getElementById("errorMsg").style.visibility	="hidden";
		}		   	
	}
  return true;
}

function clearForm(form) {
	with(form) {
			form.name.focus();
		   	form.name.value="";
		   	form.addr.value="";
		   	form.city.value="";
		   	form.zip.value="";
		   	form.phone.value="";
		   	form.email.value="";
		   	document.mailForm.proptype[0].checked=true;
		   	document.mailForm.proptype[1].checked=false;
		   	document.mailForm.proptype[2].checked=false;
		   	document.mailForm.proptype[3].checked=false;
		   	document.getElementById("nameMsg").style.visibility	="hidden";
		   	document.getElementById("addrMsg").style.visibility	="hidden";
		   	document.getElementById("cityMsg").style.visibility	="hidden";
		   	document.getElementById("stateMsg").style.visibility	="hidden";
		   	document.getElementById("zipMsg").style.visibility	="hidden";
		   	document.getElementById("phoneMsg").style.visibility	="hidden";
		   	document.getElementById("emailMsg").style.visibility	="hidden";
		   	document.getElementById("errorMsg").style.visibility	="hidden";
		}
		return false;
}


var proptypeIndex = 0;
function proptype_onclick(typIndex)
{
   var returnValue = true;
   proptypeIndex = typIndex;
   return returnValue;
}


function redirectStatistical()
{
	document.location.href="sell_statistical.php";
}

function redirectRelocation()
{
	document.location.href="buy_relocation.php";
}

// -->
