
	function getType(obj) {
		var interest = $("#Interest").val()
		//jsrsExecute('/relatedSelects/jsrsSvr.cfm',callBackGetType,'getType',aParams,0);
		if (interest != '') {
			DWREngine._execute(_ajaxConfig._cfscriptLocation, null, 'getType', interest, callBackGetType);
		}
		else {
			$("#typeID").empty();
			// set default message
			$("#typeID").append("<option value=''>2: Select a Property Type</option>");
			// set selected index
			$("#typeID").each(function () {this.selectedIndex = 0;});

			$("#pricerangeID").empty();
			// set default message
			$("#pricerangeID").append("<option value=''>3: Select a Price Range</option>");
			// set selected index
			$("#pricerangeID").each(function () {this.selectedIndex = 0;});
		}
	}

	function getPriceRange() {
		var interest = $("#Interest").val();
		var theType = $("#typeID").val();
		if ((theType != "") && (interest != "")){
		//jsrsExecute('/relatedSelects/jsrsSvr.cfm',callBackGetPriceRange,'getPriceRange',aParams,0);
			DWREngine._execute(_ajaxConfig._cfscriptLocation, null, 'getPriceRange', interest, theType, callBackGetPriceRange);
		}
		else {
			$("#pricerangeID").empty();
			// set default message
			$("#pricerangeID").append("<option value=''>3: Select a Price Range</option>");
			// set selected index
			$("#pricerangeID").each(function () {this.selectedIndex = 0;});
		}
	}
			
	function callBackGetType(r) {
	
		var sel = $("#typeID").val();
		// empty select box
		$("#typeID").empty();
		// set default message
		$("#typeID").append("<option value=''>2: Select a Property Type</option>");
		  
		// fill Position dropdown
		for (i=0;i<r.getRowCount();i++) {
		   $("#typeID").append("<option value='"+r.id[i]+"'>"+r.name[i]+"</option>");
		}
		
		// set selected index
		$("#typeID").each(function () {this.selectedIndex = 0;});
		getPriceRange();
	}
	
	
	function callBackGetPriceRange(r) {

		var sel = $("#pricerangeID").val();
		// empty select box
		$("#pricerangeID").empty();
		// set default message
		$("#pricerangeID").append("<option value=''>3: Select a Price Range</option>");
		  
		// fill Position dropdown
		for (i=0;i<r.getRowCount();i++) {
		   $("#pricerangeID").append("<option value='"+r.id[i]+"'>"+r.name[i]+"</option>");
		}
		
		// set selected index
		$("#pricerangeID").each(function () {this.selectedIndex = 0;});
	}
	

	
 


//
