function SiteSearchPanel_ListingType_onChange(listingType){
	PropertySearch_ListingType_OnSelectionChange(listingType, 
																		HttpManager.Document.GetObject("categoryID").value, 
																		document.isc.igid.value, 
																		document.isc.egid.value, 
																		document.isc.imgid.value, 
																		document.isc.emgid.value );
}

var olistingtype = new Object();
olistingtype.value = "";
var idefaultlistingtype = HttpManager.Request.QueryString("listingtype");
if ( idefaultlistingtype.length == 0 ){
	if ( HttpManager.Document.GetObject("defaultlistingtype").value.length > 0 ){
		idefaultlistingtype = HttpManager.Document.GetObject("defaultlistingtype").value;
	}
}

if ( HttpManager.Document.GetObject("rdoListingType_Sales") ){
	HttpManager.Document.Forms.HtmlRadio.SetValue( document.isc.ListingType , idefaultlistingtype );
	olistingtype.value = HttpManager.Document.Forms.HtmlRadio.GetCheckedItem( document.isc.ListingType ).value;
}else if ( document.isc.ListingType ){
	if ( typeof document.isc.ListingType.options != "undefined" ){
		HttpManager.Document.Forms.HtmlSelect.SelectedValue("isc","ListingType", idefaultlistingtype );
	}else{
		if ( idefaultlistingtype.length > 0 ){
			document.isc.ListingType.value = idefaultlistingtype;		
		}
	}
	olistingtype.value = document.isc.ListingType.value;
}

if ( olistingtype.value.length > 0 ){
	SiteSearchPanel_ListingType_onChange( olistingtype );
	HttpManager.Document.Forms.HtmlSelect.SelectedValue("isc","minprice", HttpManager.Request.QueryString("minprice") );
	HttpManager.Document.Forms.HtmlSelect.SelectedValue("isc","maxprice", HttpManager.Request.QueryString("maxprice") );
	HttpManager.Document.Forms.HtmlSelect.SelectedValue("isc","pt", HttpManager.Request.QueryString("pt") );
	HttpManager.Document.Forms.HtmlSelect.SelectedValue("isc","bedrooms", HttpManager.Request.QueryString("bedrooms") );
	HttpManager.Document.Forms.HtmlSelect.SelectedValue("isc","area", HttpManager.Request.QueryString("area") );
	HttpManager.Document.Forms.HtmlSelect.SelectedValue("isc","location", HttpManager.Request.QueryString("location") );
}else{
	alert("Listingtype not found");
}

