// JSScript from dispSearchClass1.cfm
function fnValidateForm(frm)
{
	if (frm.MLNUM.value.length > 0 )
	{
		if (!isMLNUM(frm.MLNUM)){
			return false;
		}
		fnClearFormObjects(frm, frm.LISTING_PRICE_MIN, frm.LISTING_PRICE_MAX, frm.MLS_AREA, frm.BEDROOM_NUM, frm.FULL_BATH_NUM, frm.STORIES, frm.SUBDIVISION, frm.ZIP_CODE, frm.SQURE_FEET_MIN, frm.SQURE_FEET_MAX, frm.NEW_CONSTR, frm.YEAR_BUILT, frm.VIRTUAL_TOURS, frm.OPEN_HOUSES, frm.PRIVATE_POOL, frm.AREA_POOL)
		return true;
	}
	
	<!--- require search price when MLNUM or Address are not provided ----->
	
	if ((frm.LISTING_PRICE_MIN.value != '') && (frm.LISTING_PRICE_MAX.value != ''))
	{
		if (fnCompareRangeValues(frm.LISTING_PRICE_MIN, frm.LISTING_PRICE_MAX, 'Minimum Price', 'Maximum Price') == false)
		{
			return false;
		}
	}
	
	if ((frm.SQURE_FEET_MIN.value != '') && (frm.SQURE_FEET_MAX.value != ''))
	{
		if (fnCompareRangeValues(frm.SQURE_FEET_MIN, frm.SQURE_FEET_MAX, 'Minimum Square Feet', 'Maximum Square Feet') == false)
		{
			return false;
		}
	}

	
	if (!isZipCode(frm.ZIP_CODE)){
		return false;
	}
	
	<!-- prevent special char for input text field -->
	for (i=0; i<frm.elements.length; i++){
		if (frm.elements[i].type=="text"){
			if(!validChar(frm.elements[i].value)){
				alert("please don't put special character in " + frm.elements[i].name +  " field");
				return false;
			}
		}
	}
	return true;	
}


// JSScript from dispSearch.cfm
function makeRemote(url) 
{
	remote = window.open(url,"remotewin","toolbar=no,width=410,height=415,directories=no,status=no,scrollbars=no,resize=no,menubar=no");
}

	function openWin( windowURL, windowName, windowFeatures ) { 
		return window.open( windowURL, windowName, windowFeatures ) ; 
	} 

function printable()
{
 var bgc;
 var fgc;
 var lc;
 var vlc;
 var alc;
 var bkg;
 bgc = document.bgColor;
 fgc = document.fgColor;
 lc =  document.linkColor;
 vlc = document.vlinkColor;
 alc = document.alinkColor; 
 bkg = document.body.background;
 document.bgColor = "white"; 
 document.fgColor = "black";
 document.linkColor = "black";
 document.vlinkColor = "black";
 document.alinkColor = "black";
 document.body.background = "";
 focus()
 print()
 document.bgColor = bgc;
 document.fgColor = fgc;
 document.linkColor = lc;
 document.vlinkColor = vlc;
 document.alinkColor = alc;
 document.body.background = bkg;
}

function showPh(oid, mlnum, mid, phone) {
		document.getElementById("phbroker"+mlnum).innerHTML = phone;
		if(navigator.appName=='Netscape'){
			var objHTTP = new XMLHttpRequest();
		}
		else if (navigator.appName.indexOf("Explorer") > 0) {
			var objHTTP = new ActiveXObject("Microsoft.XMLHTTP");
		}
		if (objHTTP) {
			objHTTP.open('GET','doBrokerPhone.cfm?officeid='+oid+'&MLNUM='+mlnum+'&MEMBER_NUMBER='+mid, false);
			objHTTP.send(null);
		}
	}




