<!--
function no_framies()	{
	if (top.location != location)	{
		top.location.href = document.location.href;
	}
}
function setptype()
{
	window.document.frmpr.bt.disabled = false;
	window.document.frmpr.ge.disabled = false;
	window.document.frmpr.fe.disabled = false;
	window.document.frmpr.ca.disabled = false;
	window.document.frmpr.nr.disabled = false;
	window.document.frmpr.ss.disabled = false;
//	window.document.frmpr.Bt.disabled = false;
	window.document.frmpr.beds.disabled = false;
	window.document.frmpr.baths.disabled = false;
	window.document.frmpr.vt.disabled = false;
	window.document.frmpr.action = "PerformSearch.asp";
	if (window.document.frmpr.ptype.options[5].selected == true) {
		window.document.frmpr.bt.disabled = true;
		window.document.frmpr.ge.disabled = true;
		window.document.frmpr.fe.disabled = true;
		window.document.frmpr.ca.disabled = true;
		window.document.frmpr.nr.disabled = true;
		window.document.frmpr.ss.disabled = true;
		window.document.frmpr.beds.disabled = true;
		window.document.frmpr.baths.disabled = true;
		window.document.frmpr.vt.disabled = true;
		window.document.frmpr.action = "PerformLandSearch.asp";
		window.document.frmpr.minprice.disabled = false;
		}
	if (window.document.frmpr.ptype.options[2].selected == true)	{
		window.document.frmpr.action = "PerformMultiSearch.asp";
		window.document.frmpr.minprice.disabled = false;
		window.document.frmpr.bt.disabled = true;
		window.document.frmpr.ge.disabled = true;
		window.document.frmpr.fe.disabled = true;
		window.document.frmpr.ca.disabled = true;
		window.document.frmpr.nr.disabled = true;
		window.document.frmpr.ss.disabled = true;
		window.document.frmpr.beds.disabled = true;
		window.document.frmpr.baths.disabled = true;
		window.document.frmpr.vt.disabled = true;
		}

	if (window.document.frmpr.ptype.options[3].selected == true)	{
		window.document.frmpr.action = "REOSearch.asp";
		window.document.frmpr.bt.disabled = true;
		window.document.frmpr.ge.disabled = true;
		window.document.frmpr.fe.disabled = true;
		window.document.frmpr.ca.disabled = true;
		window.document.frmpr.nr.disabled = true;
		window.document.frmpr.ss.disabled = true;
		window.document.frmpr.beds.disabled = true;
		window.document.frmpr.baths.disabled = true;
		window.document.frmpr.minprice.disabled = false;
		window.document.frmpr.vt.disabled = true;
		if (confirm("To BROWSE a list of all bank-owned properties, click OK.\nTo SEARCH bank-owned properties, click Cancel."))

			{
				goBank();
			}
	}
	if (window.document.frmpr.ptype.options[4].selected == true)	{
		window.document.frmpr.action = "PerformSearch.asp";
		window.document.frmpr.bt.disabled = false;
		window.document.frmpr.ge.disabled = false;
		window.document.frmpr.fe.disabled = false;
		window.document.frmpr.ca.disabled = false;
		window.document.frmpr.nr.disabled = false;
		window.document.frmpr.ss.disabled = false;
		window.document.frmpr.beds.disabled = false;
		window.document.frmpr.baths.disabled = false;
		window.document.frmpr.vt.disabled = false;
		window.document.frmpr.minprice.options[23].selected = true;
	}
}

function checkminprice()
{
  if (window.document.frmpr.maxprice.selectedIndex > 0) 	{
	if (window.document.frmpr.minprice.selectedIndex >= window.document.frmpr.maxprice.selectedIndex) 	{
		var j
		j = window.document.frmpr.minprice.selectedIndex; j = j + 1
		window.document.frmpr.maxprice.options[j].selected = true
	}
	if (window.document.frmpr.ptype.options[4].selected == true)	{
		var h
		h = window.document.frmpr.minprice.selectedIndex;
		if (h < 12) {
			alert("To search our Preview Properties, you must include a minimum search price of at least $300,000.")
			window.document.frmpr.minprice.options[12].selected = true;
		}
	}
  }
}

function checkmaxprice()
{
  if (window.document.frmpr.maxprice.selectedIndex < 42) {
	if (window.document.frmpr.minprice.selectedIndex >= window.document.frmpr.maxprice.selectedIndex)	{
		var j
		j = window.document.frmpr.maxprice.selectedIndex; j = j - 1
		if (j < 0)	{
			j = 0
		}
		window.document.frmpr.minprice.options[j].selected = true
	}
  }
}
function MM_validateForm() {
	errors='' 
//	window.document.frmpr.imageField2.disabled=true;
	var sm=document.getElementById("searchmethod").value;
	if (sm=='cities')	{
		var box1=document.getElementById("city1");
		var box2=document.getElementById("city2");
	}
	else if (sm=='schools')	{
		var box1=document.getElementById("school1");
		var box2=document.getElementById("school2");
	}
	else if (sm=='zips')	{
//		var box1=document.getElementById("zip1");
		var box2=document.getElementById("zip2");
	}
	var errors
	if (sm!='zips')	{
	 	if (box2.length==1)	{
			if (box1.selectedIndex<1)	{
				if (window.document.frmpr.MLS.value == "")	{
				  if (window.document.frmpr.Address.value == "") {
					errors = "To perform a search, you must either choose both a region and neighborhood, or enter an Ad Code/MLS #"
					}
				}
			}
		}
	}else{
		//do zip stuff here
		if (box2.value.length<5)	{
			errors='To search by zip code, you must enter at least ONE zip code in the box provided.';
		}
	}
	if (errors) alert('The following error(s) occurred:\n'+errors);
	document.MM_returnValue = (errors == '');
	if (errors=='')	{
	    if (box2.options.length != 0) { 
	        for (var i=1, l = box2.options.length;i<l;i++) {
	           box2.options[i].selected='true'; 
	        }
		}
		document.getElementById("frmpr").submit();
	}
}

//-->