<!--

	var lease_price = new Array(
	"1000",
	"1250",
	"1500",
	"1750",
	"2000",
	"2250",
	"2500",
	"2750",
	"3000",
	"4000",
	"5000",
	"6000",
	"7000",
	"8000",
	"9000",
	"10000"
	);

	var normal_price = new Array(
				"80000",
				"90000",
				"100000",
				"110000",
				"120000",
				"130000",
				"140000",
				"150000",
				"160000",
				"170000",
				"180000",
				"190000",
				"200000",
				"210000",
				"220000",
				"230000",
				"240000",
				"250000",
				"260000",
				"270000",
				"280000",
				"290000",
				"300000",
				"310000",
				"320000",
				"330000",
				"340000",
				"350000",
				"360000",
				"370000",
				"380000",
				"390000",
				"400000",
				"410000",
				"420000",
				"430000",
				"440000",
				"450000",
				"460000",
				"470000",
				"480000",
				"490000",
				"500000",
				"510000",
				"520000",
				"530000",
				"540000",
				"550000",
				"560000",
				"570000",
				"580000",
				"590000",
				"600000",
				"610000",
				"620000",
				"630000",
				"640000",
				"650000",
				"660000",
				"670000",
				"680000",
				"690000",
				"700000",
				"710000",
				"720000",
				"730000",
				"740000",
				"750000",
				"760000",
				"770000",
				"780000",
				"790000",
				"800000",
				"810000",
				"820000",
				"830000",
				"840000",
				"850000",
				"860000",
				"870000",
				"880000",
				"890000",
				"900000",
				"910000",
				"920000",
				"930000",
				"940000",
				"950000",
				"960000",
				"970000",
				"980000",
				"990000",
				"1000000",
				"1250000",
				"1500000",
				"1750000",
				"2000000",
				"2250000",
				"2500000",
				"2750000",
				"3000000",
				"3250000",
				"3500000",
				"3750000",
				"4000000",
				"4250000",
				"4500000",
				"4750000",
				"5000000",
				"5250000",
				"5500000",
				"5750000",
				"6000000",
				"6250000",
				"6500000",
				"6750000",
				"7000000",
				"7250000",
				"7500000",
				"7750000",
				"8000000",
				"8250000",
				"8500000",
				"8750000",
				"9000000",
				"9250000",
				"9500000",
				"9750000",
				"10000000"
	);

	function addCommas(nStr)
	{
		nStr += '';
		x = nStr.split('.');
		x1 = x[0];
		x2 = x.length > 1 ? '.' + x[1] : '';
		var rgx = /(\d+)(\d{3})/;
		while (rgx.test(x1)) {
			x1 = x1.replace(rgx, '$1' + ',' + '$2');
		}
		return x1 + x2;
	}

	function update_price(idx, min, max) {
		if(idx == "lease") {
			var arr = lease_price;
		} else {
			var arr = normal_price;
		}
		document.getElementById("minimum_price").options.length=1;
		document.getElementById("maximum_price").options.length=1;
		document.getElementById("maximum_price").value="";
		document.getElementById("minimum_price").value="";
		for(var i=0, len=arr.length; i<len; i++) {
				var num = arr[i];
				num_comma = addCommas(num);
				document.getElementById("minimum_price").options[i+1]=new Option("$"+num_comma, num);
				if(num == min) {
    				document.getElementById("minimum_price").selectedIndex = i+1;
				}
			    document.getElementById("maximum_price").options[i+1]=new Option("$"+num_comma, num);
				if(num == max) {
    				document.getElementById("maximum_price").selectedIndex = i+1;
				}
		}
	}

	function map_price()
	{
		var val = document.getElementById("search_type").value;
		update_price(val);
	}

	function quick_price()
	{
		var val = document.getElementById("idx").value;
		update_price(val);
	}
//-->
