		var locationArray = new Array();		var regionArray = new Array();		var counter = 0;		// Build Region Select Box		// Select whatever is passed in as default selected value for box A		function selectDefaultA(boxADefault)		{			var counter = 0;			for (i=0;i <locationArray.length;i=i+2)			{				var aString = locationArray[i];				var aString2 = locationArray[i+1];			 	if ( aString.search("==") != -1 )			 	{					var newopt = new Option( aString2, escape( aString.substr(2) ) );					if (newopt.text == boxADefault){document.custom.product.options[counter].selected = true;}				counter++;				}			}			refreshLocations();		}		// Build Region Select Box		function refreshLocations() {			var counter = 0;			var selectedRegionID = document.custom.product.options[document.custom.product.selectedIndex].value;			var theCompare = "==" + selectedRegionID;			// alert(theCompare);			var foundRegion = false;			for (i=0;i <locationArray.length;i=i+2)			{				var aString = locationArray[i];				var aString2 = locationArray[i+1];			 	// alert(aString.search(theCompare));			 	if (foundRegion == true)			 	 {					// alert("Found Region");					if ( aString.search("==") != -1 )					{						foundRegion = false;					}					else					{						var newopt = new Option( aString2, escape( aString ) );						document.custom.left_version.options[counter] = newopt;						counter++;					}			 	}			 	else if ( aString.search(theCompare) != -1 )			 	{					foundRegion = true;				}			} // end for loop			// When changing "regions", remove all previously selected counties/cities			selectAll(document.custom.selectedVersion);			removeitem(document.custom.selectedVersion);		}		var selectversionstring = "Select a version";		var allstring = "All";		var submitcount = 0;		var browserTag = "Unknown";		if ( navigator.appName == "Microsoft Internet Explorer" ) {		    browserTag = "MSIE";		}		else if ( navigator.appName == "Netscape" ) {		    browserTag = "NS";		}		var majorVer = parseInt( navigator.appVersion );		function supportedBrowser() {		    return( ( ( browserTag == "NS"   && majorVer >= 3 )					  || ( browserTag == "MSIE" && majorVer >= 4 ) ) ? 1 : 0 );		}		function rebuildSelect( object, options ) {		    if ( ! supportedBrowser() ) return( 0 );			if ( object.options == null ) {				return( 0 );			}		    if ( options != null && options.length > 0 ) {				object.options.length = 0;				for ( var i = 0; i < options.length; i++ ) {					var newopt = new Option( options[i], escape( options[i] ) );					object.options[i] = newopt;				}				object.selectedIndex = 0;		    }		    return( 1 );		}		function updateVersions() {		    if ( ! supportedBrowser() ) return( 0 );		    var prodsel	= document.custom.product;		    var product	= prodsel.options[prodsel.selectedIndex].text;		    var versions = new Array();		    var i = 0;		    for ( var version in r[product] ) {				// alert("got here");				versions[i++] = version;		    }		    if ( prodsel.selectedIndex == 0 ) {				// versions[0] = selectversionstring;		    } else if ( versions.length < 1 ) {				// versions[0] = allstring;		    }			rebuildSelect( document.custom.left_version, versions );		    return( 1 );		}		function updateProducts() {		    if ( ! supportedBrowser() ) return( 0 );		    var products = new Array();		    var i = 0;		    for ( var prod in r ) {				products[i++] = prod;		    }		    rebuildSelect( document.custom.product, products );			if ( document.custom.left_version ) {			    updateVersions();			}		    return( 1 );		}		function countProducts() {		    var last = 0;		    for ( var i = 0; i < document.custom.elements.length; i++ ) {				var n = document.custom.elements[i].name;				var l = n.length;				if ( n.substring(0,8) == "product_" && n.substring(l-5) == "_name" ) {					var num = parseInt( n.substring(8,l-5) );					if ( num > last ) last = num;				}		    }		    return( last );		}		function refreshLocation(command,top) {		    if ( supportedBrowser() && ( command == "refreshproduct" || command == "refreshversion" ) ) {				if ( document.custom.version && ( command == "refreshproduct" ) ) {					updateVersions();				}		    }		    else {				if ( ! supportedBrowser() ) {					return( false );				}				if ( command == "addproduct" && browserTag == "MSIE" && majorVer == 3 ) {					var last = countProducts();					if ( last > 2 ) {						alert( "Because of limitations in cookie size, you may only have three products in Microsoft Internet Explorer 3.x." );						return( false );					}				}				var url = buildURL(command);				if ( top ) {					window.top.location = url;				}				else {					window.location = url;				}			}		    return( false );		}		sortitems = 1;  // Automatically sort items within lists? (1 or 0)		function additem(fbox,tbox) {			move(fbox,tbox);			//removeitembyname(tbox,"None Selected")			if (sortitems) SortD(tbox);		}		function additembyname(tbox, theName) {			if (tbox.options.length == 0) {					var no = new Option();					no.value = theName;					no.text = theName;					tbox.options[0] = no;					tbox.length++;			}			BumpUp(tbox);		}		function removeitembyname(fbox, theName) {			for(var i=0; i<fbox.options.length; i++) {				if(fbox.options[i].value == theName) {					fbox.options[i].value = "";					fbox.options[i].text = "";				   }			}			BumpUp(fbox);		}		function removeitem(fbox) {			for(var i=0; i<fbox.options.length; i++) {				if(fbox.options[i].selected && fbox.options[i].value != "") {					// var no = new Option();					// no.value = fbox.options[i].value;					// no.text = fbox.options[i].text;					// tbox.options[tbox.options.length] = no;					fbox.options[i].value = "";					fbox.options[i].text = "";				   }			}			BumpUp(fbox);			//additembyname (fbox,"None Selected")		}		function move(fbox,tbox) {			for(var i=0; i<fbox.options.length; i++) {				if(fbox.options[i].selected && fbox.options[i].value != "") {					var no = new Option();					no.value = fbox.options[i].value;					no.text = fbox.options[i].text;					// check that this entry doesn't already exist.  If it doesn't, then add it					var len = tbox.length;					var found = false;					for(var count = 0; count < len; count++) {						if (tbox.options[count] != null) {							if (no.text == tbox.options[count].text) {							found = true;							break;							}						}					}					if (found != true) {						tbox.options[tbox.options.length] = no;						len++;					}					// tbox.options[tbox.options.length] = no;					// fbox.options[i].value = "";					// fbox.options[i].text = "";				   }			}			// BumpUp(fbox);			if (sortitems) SortD(tbox);		}		function BumpUp(box) { 			var i=0;			while (i < box.options.length) {				if (box.options[i].value == "")					box.options[i] = null;					// by setting the individual Option object to null, it is removed from the array					// and the other objects indexes are automatically adjusted				else					i++; // otherwise look at the next item			}		} // end function		function SortD(box)  {		var temp_opts = new Array();		var temp = new Object();		for(var i=0; i<box.options.length; i++)  {		temp_opts[i] = box.options[i];		}		for(var x=0; x<temp_opts.length-1; x++)  {		for(var y=(x+1); y<temp_opts.length; y++)  {		if(temp_opts[x].text > temp_opts[y].text)  {		temp = temp_opts[x].text;		temp_opts[x].text = temp_opts[y].text;		temp_opts[y].text = temp;		temp = temp_opts[x].value;		temp_opts[x].value = temp_opts[y].value;		temp_opts[y].value = temp;		      }		   }		}		for(var i=0; i<box.options.length; i++)  {		box.options[i].value = temp_opts[i].value;		box.options[i].text = temp_opts[i].text;		   }		}		// START OF SUBMIT PAGE 2		function submit_page2(form)		{			var theForm = form;		    foundError = false;		    foundBuilderBlankError = false;			// builder field		        if(isFieldBlank(form.builder)) {		            foundBuilderBlankError = true;		            foundError = true;		        }			// create error message and alert			if (foundError == true) {				lnfd = "\n";				msgString = "Please correct the following:" + lnfd + lnfd;				if (foundBuilderBlankError == true ) {					msgString += "Please select a builder." + lnfd;				}				if (foundBuilderBlankError == true ) {					form.builder.focus();				}				alert(msgString);				return false;			}				if (submitcount == 0) {				      submitcount++;				      return true;				      }				else {				      alert("Your information is being processed.  Thanks!");				      return false;		      	}		    }		     //  END OF SUBMIT PAGE2		// START OF SUBMIT PAGE 3		function submit_page3(form)		{			var theForm = form;		    foundError = false;		    foundCommunityBlankError = false;			// builder field		        if(isFieldBlank(form.community)) {		            foundCommunityBlankError = true;		            foundError = true;		        }			// create error message and alert			if (foundError == true) {				lnfd = "\n";				msgString = "Please correct the following:" + lnfd + lnfd;				if (foundCommunityBlankError == true ) {					msgString += "Please select a community." + lnfd;				}				if (foundCommunityBlankError == true ) {					form.community.focus();				}				alert(msgString);				return false;			}				if (submitcount == 0) {				      submitcount++;				      return true;				      }				else {				      alert("Your information is being processed.  Thanks!");				      return false;		      	}		    }		     //  END OF SUBMIT PAGE3var searchString= '';		function submit_page(form) {			var controls = document.custom;			  var str = "";			  for (i=0; i<controls.length; i++) {			    if ((controls[i].type == "select-multiple"))			    {					var optsPicked = "";					for (ii = 0; ii < controls[i].length; ii++) {					//if (controls[i].options[ii].selected) {					if ((controls[i].name.indexOf("left") < 0) && (controls[i].options[ii].value != "")){					optsPicked += (controls[i].options[ii].value + ",");						}						}						searchString = form.SelectedCities.value;						if (searchString.indexOf(optsPicked) < 0)						form.SelectedCities.value+=optsPicked;					 //aVal=controls[i].value;					 //alert('>>' + controls[i].type + '::' + optsPicked);			    }else{			    //aVal=controls[i].value;			    //if(aVal.length > 0)				//	 alert(controls[i].type + '::' + aVal);			      //var name = controls[i].name.substr(7);			     // str += name + "=" + (controls[i].checked ? 1 : 0) + ";";			    }			  }			  //window.alert(str);			  //document.submit_frm.js_array.v­alue = str;			  //document.submit_frm.submit();return true;}		// Check for a blank field		function isFieldBlank(theField) {		    if (theField==null || theField=='')		      return false;		    if(theField.value == "")		        return true;		    else		        return false;		}		function doSubmit() {		setPrefs();		if (submit_page(document.custom)) {			document.custom.submit();			}		}		function doQuickSearch() {			if(isFieldBlank(document.quick_search.quickSearch)) {				alert("Please enter a street address or MLS number.");			}			else {				document.quick_search.submit();			}		}		function dopropcodeSearch() {			if(isFieldBlank(document.propcode_search.propertyCode)) {				alert("Please enter a Property Code number.");			}			else {				document.propcode_search.submit();			}		}		function doAltQuickSearch(msg) {			if(isFieldBlank(document.quick_search.altQuickSearch)) {				alert(msg);			}			else {				document.quick_search.submit();			}		}		function numberOfSelectedEntries(theSelect) {			n = 0			count = 0			while (n < theSelect.options.length) {			if(theSelect.options[n].selected && theSelect.options[n].value != "None Selected") {				count ++ }			n ++ }			return count		}		function selectAll(theSelect) {			for(var i =0;i < theSelect.options.length; i++) {				theSelect.options[i].selected = true;			}		}		// Check for a valid email address (Does it contain a "@")		function isValidEmail(theField) {			if((theField.value.indexOf('@', 0) == -1) || (theField.value.indexOf(' ', 0) != -1) || (theField.value.indexOf(',', 0) != -1))				return false;			else				return true;		}		function checkEmail(str) {		  if (str.length == 0) {		    return true		  }		  var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|(\s)/; // not valid		  var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid		  if (!reg1.test(str) && reg2.test(str)) { // if syntax is valid		    return true;		  }		  return false;		}		//--></script><script language="JavaScript"><!-- hide		function popWindow(theLink) {			var initialX =	100;			var initialY = 100;			//theLink = escape(theLink);			//alert(theLink);			if (navigator.appName == "Netscape")			{				//theWindow = open(theLink,'Lookup', 'width=505,height=500,' + 'screenX=' + initialX + ',screenY=' + initialY + ',scrollbars');				theWindow = window.open(theLink,'Lookup', 'width=560,height=500,' + ',scrollbars');			}			else			{				theWindow = open(theLink, 'Lookup', 'width=505,height=500' + ',left=' + initialX + ',top=' + initialY + ',scrollbars');			}			theWindow.opener = self;			theWindow.focus();		}		function popWindowHelp(theLink) {			var initialX =	100;			var initialY = 100;			//theLink = escape(theLink);			//alert(theLink);			if (navigator.appName == "Netscape")			{				//theWindow = open(theLink,'Lookup', 'width=505,height=500,' + 'screenX=' + initialX + ',screenY=' + initialY + ',scrollbars');				theWindow = window.open(theLink,'Lookup', 'width=560,height=500,' + ',scrollbars');			}			else			{				theWindow = open(theLink, 'Lookup', 'width=560,height=500' + ',left=' + initialX + ',top=' + initialY + ',scrollbars');			}			theWindow.opener = self;			theWindow.focus();		}		function popWindowEmail(theLink) {			var initialX =	100;			var initialY = 100;			//theLink = escape(theLink);			//alert(theLink);			if (navigator.appName == "Netscape")			{				//theWindow = open(theLink,'Lookup', 'width=505,height=500,' + 'screenX=' + initialX + ',screenY=' + initialY + ',scrollbars');				theWindow = window.open(theLink,'Lookup', 'width=560,height=500,' + ',scrollbars');			}			else			{				theWindow = open(theLink, 'Lookup', 'width=560,height=500' + ',left=' + initialX + ',top=' + initialY + ',scrollbars');			}			theWindow.opener = self;			theWindow.focus();		}		function popSizedWindow(theLink, theWidth, theHeight) {			var initialX = 100;			var initialY = 100;			if (navigator.appname == "Netscape")				theWindow = window.open(theLink,'Lookup', 'width=' + theWidth + ',height=' + theHeight + ',' + ',scrollbars');			else				theWindow = open(theLink, 'Lookup', 'width=' + theWidth + ',height=' + theHeight + '' + ',left=' + initialX + ',top=' + initialY + ',scrollbars');			theWindow.opener = self;			theWindow.focus();		}		function popWindow360Tour(theLink) {			var initialX =	100;			var initialY = 100;			if (navigator.appName == "Netscape")			{				theWindow = open(theLink, 'Lookup', 'width=600,height=560,' + 'screenX=' + initialX + ',screenY=' + initialY + ',scrollbars');			}			else			{				theWindow = open(	theLink,	'Lookup', 'width=600,height=560' + ',left=' + initialX + ',top=' + initialY + ',scrollbars');			}			theWindow.opener = self;			theWindow.focus();		}		function popWindowFloorPlan(theLink) {			var initialX =	100;			var initialY = 100;			if (navigator.appName == "Netscape")			{				theWindow = open(theLink, 'Lookup', 'width=900,height=800,' + 'screenX=' + initialX + ',screenY=' + initialY + ',scrollbars');			}			else			{				theWindow = open(	theLink,	'Lookup', 'width=900,height=800' + ',left=' + initialX + ',top=' + initialY + ',scrollbars');			}			theWindow.opener = self;			theWindow.focus();		}		function closeWindow() {			close();		}		function popWindowMap(theLink) {			var initialX =	50;			var initialY = 50;			if (navigator.appName == "Netscape")			{				theWindow = open(theLink, 'Lookup', 'width=720,height=500,' + 'screenX=' + initialX + ',screenY=' + initialY + ',scrollbars' + ',resizable');			}			else			{				theWindow = open(theLink,'Lookup', 'width=720,height=500,' + ',left=' + initialX + ',top=' + initialY + ',scrollbars' + ',resizable');			}			theWindow.opener = self;			theWindow.focus();		}		function popShowingAlert(theLink) {			var initialX =	50;			var initialY = 50;			if (navigator.appname == "Netscape")			{				theWindow = open(theLink, 'Lookup', 'width=640,height=500,' + 'screenX=' + initialX + ',screenY=' + initialY + ',scrollbars');			}			else			{				theWindow = open(	theLink,	'Lookup', 'width=640,height=500,' + ',left=' + initialX + ',top=' + initialY + ',scrollbars');			}			theWindow.opener = self;			theWindow.focus();		}		function newImage(arg) {			if (document.images) {				rslt = new Image();				rslt.src = arg;				return rslt;			}		}		function changeImages() {			if (document.images) {				for (var i=0; i<changeImages.arguments.length; i+=2) {					document[changeImages.arguments[i]].src = changeImages.arguments[i+1];				}			}		}		var preloadFlag = false;		function preloadImages() {			if (document.images) {				preloadFlag = true;			}		}		function MM_swapImgRestore() { //v3.0		  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;		}		function MM_preloadImages() { //v3.0		  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();		    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)		    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}		}		function MM_findObj(n, d) { //v4.0		  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {		    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}		  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];		  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);		  if(!x && document.getElementById) x=document.getElementById(n); return x;		}		function MM_swapImage() { //v3.0		  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)		   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}		}		function updateParent(theURL) {            window.opener.location = theURL;            window.close();		}