// JSScript from default.cfm

	function fnValidateForm1(frm)
	{
		 if (frm.Client_id.value == "" && frm.Building_Name.value == "" && frm.LISTING_PRICE_MIN.selectedIndex == 0 && frm.LISTING_PRICE_MAX.selectedIndex == 0 && frm.bedroomnum.selectedIndex == 0 && frm.bathroomnum.selectedIndex == 0 && frm.SQURE_FEET_MIN.selectedIndex == 0 && frm.SQURE_FEET_MAX.selectedIndex == 0 && frm.LEASE_PRICE_MIN.selectedIndex == 0 && frm.LEASE_PRICE_MAX.selectedIndex == 0 ) {
			 alert("Please select high-rise(s) or enter a building name or select some search fields to start a search.");
			 return (false);
		}
		 
		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.LEASE_PRICE_MIN.value != '') && (frm.LEASE_PRICE_MAX.value != ''))
		{
			if (fnCompareRangeValues(frm.LEASE_PRICE_MIN, frm.LEASE_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;
			}
		}
			 
		return true;
	}	
	
	function openWin( windowURL, windowName, windowFeatures ) { 
		return window.open( windowURL, windowName, windowFeatures ) ; 
	}
	
	
	function fnClearFormObjects (frm){
 fnClearFormObjects(frm, 
					frm.LISTING_PRICE_MIN, 
					frm.LISTING_PRICE_MAX, 
					frm.LEASE_PRICE_MIN, 
					frm.LEASE_PRICE_MAX, 
					frm.bathroomnum, 
					frm.bedroomnum, 
					frm.SQURE_FEET_MIN, 
					frm.SQURE_FEET_MAX
					)
	}
function showBuyDiv(obj){
//alert(obj.value);
	if(obj.value == 1){
		document.getElementById('divBuy').style.display = '';
		document.getElementById('divLease').style.display = 'none';

		document.getElementById('LEASE_PRICE_MIN').selectedIndex = 0;
		document.getElementById('LEASE_PRICE_MAX').selectedIndex = 0;
	}
}
function showLeaseDiv(obj){
	//alert(obj.value);
	if(obj.value == 0){

		document.getElementById('divLease').style.display = '';
		document.getElementById('divBuy').style.display = 'none';
		document.getElementById('LISTING_PRICE_MIN').selectedIndex = 0;
		document.getElementById('LISTING_PRICE_MIN').selectedIndex = 0;

	}
}

// JSScript from dispHighriseDetail.cfm

function showdiv(divid) {
	obj = document.getElementById(divid);
	if(divid == 'forsale'){
		linkobj = document.getElementById('salelink');
	}else if (divid == 'forlease'){
		linkobj = document.getElementById('leaselink');	
	}
	else if (divid == 'forsold'){
		linkobj = document.getElementById('soldlink');	
	}
	if(obj.style.display == 'none') {
		obj.style.display = '';
		linkobj.style.display = 'none';
	}
	else {
		obj.style.display = 'none';
	}
}




// JSScript from dispHighriseMap.cfm
	function getMousePosition(e) {
	 
	  if (!isIE) {
	    _x = e.pageX;
	    _y = e.pageY;
	  }
	  if (isIE) {
	    _x = event.clientX + document.body.scrollLeft;
	    _y = event.clientY + document.body.scrollTop;
	  }
	  //window.status = _x + ' ' + _y
	}
	function showSpan (val, i){
		//alert(val)
		document.all.span1.style.left = _x;
		document.all.span1.style.top = _y;
		document.all.span1.innerHTML = "<a href='dispHighriseDetail.cfm?Real_Plot_Num=" + i  + strQS +"'>"+ val + "</a>"
		document.all.span1.style.visibility="visible";
	}
	function hideSpan (){
		document.all.span1.innerHTML = ""
		document.all.span1.style.visibility="hidden";
	}
	
	function rollAreas(i) {
		//document.OnePhoto.src = aryAreas[i].src;
		showSpan (aryAreaDesc[i], i);
	}
	


// JSScript from dispPhotoZoom.cfm
function close_window() {
    window.close();
}



// JSScript from doSearchHighrise.cfm
function showPh(oid, mlnum, mid, phone) {
	document.getElementById("phbroker"+mlnum).innerHTML = "<span class='headers'>Phone:</span> " + 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);
	}
}

