function include(xUrl,xId) {
	var xmlhttp = false;
  /*@cc_on @*/
  /*@if (@_jscript_version >= 5)
  try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } }
  /*@end @*/
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); }
	xmlhttp.open("GET", xUrl,true);
  xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { document.getElementById(xId).innerHTML = xmlhttp.responseText; } }
  xmlhttp.send(null)
}
function BuildCompare()
{
var Compare = "";
	for (x=0; x<=document.HomeSearchResultsForm.PropertyCompare.length-1; x++) {
		if (document.HomeSearchResultsForm.PropertyCompare[x].checked) {
			var CurrentValue = document.HomeSearchResultsForm.PropertyCompare[x].value;
			if (x==0) { Compare += CurrentValue; } else { Compare += "," + CurrentValue; }
		}
	}
	if (Compare !== "") {
		self.location = "homesearch-session.asp?ActiveCompare=Yes&Compare=" + Compare;
	} else {
		alert("You Must Select Listings to Compare!");
	}
}
function RemoveCompare() {
var NumberChecked = 0;
var Compare = "";
var TotalCount = 1;
	if (document.HomeSearchCompareForm.PropertyCompare.checked) {
		//Do Nothing
		NumberChecked++;
	} else {
		var CurrentValue = document.HomeSearchCompareForm.PropertyCompare.value;
		if (Compare == "") { Compare += CurrentValue; } else { Compare += "," + CurrentValue; }
	}
	if (NumberChecked !== 0) {
		self.location = "homesearch-session.asp?ActiveCompare=Yes&Compare=" + Compare;
	} else {
		alert("You Must Select Listings to Remove!");
	}
}
function RemoveCompareMulti() {
var NumberChecked = 0;
var Compare = "";
var TotalCount = document.HomeSearchCompareForm.PropertyCompare.length;
	for (x=0; x<=TotalCount-1; x++) {
	if (document.HomeSearchCompareForm.PropertyCompare[x].checked) {
		//Do Nothing
		NumberChecked++;
	} else {
		var CurrentValue = document.HomeSearchCompareForm.PropertyCompare[x].value;
		if (Compare == "") { Compare += CurrentValue; } else { Compare += "," + CurrentValue; }
	}
	}
	if (NumberChecked !== 0) {
		self.location = "homesearch-session.asp?ActiveCompare=Yes&Compare=" + Compare;
	} else {
		alert("You Must Select Listings to Remove!");
	}
}
