var def = 'Type City and State OR Zip Code';

function cityIn() {
	if (document.search.City.value == def)
		document.search.City.value = '';
}

function cityOut() {
	if (document.search.City.value == '')
		document.search.City.value = def;
}

window.addEvent('domready', cityOut);


function sbm() {
	if (document.search.City.value == '' || document.search.City.value == def) {
		alert("Please " + def);
		document.search.City.focus();
		return false;
	}
	if (document.search.MinPrice.selectedIndex > 0 && document.search.MaxPrice.selectedIndex > 0 &&
		document.search.MinPrice.selectedIndex > document.search.MaxPrice.selectedIndex) {
			alert("Price Range is incorrect");
			document.search.MinPrice.focus();
			return false;
	}
	if (document.search.MinArea.selectedIndex > 0 && document.search.MaxArea.selectedIndex > 0 &&
		document.search.MinArea.selectedIndex > document.search.MaxArea.selectedIndex) {
			alert("Area Range is incorrect");
			document.search.MinArea.focus();
			return false;
	}
	return true;
}

