//list.js

/**
 *  搜索
 **/
function search(){
	document.form1.target = "_blank";
	document.form1.action = "xf_list.jsp";
	form1.lineCount.value = "";
	form1.submit();
}

/**
 *
 */
function changeWord() {
    if (document.form1.keyword.value == "小区地址或名称") {
        document.form1.keyword.value = "";
    } 
}

/**
 *  城区搜索
 */
function zonePage(cityzoneid) {
   // location.href = "/xf/xf_list.jsp?cityzoneid=" + cityzoneid + "&cq=1";
   var url = "/xf/xf_list.jsp?cityzoneid=" + cityzoneid + "&cq=1";
   window.open(url);
}

/**
 *  价格区间搜索
 */
function pricePage(minprice, maxprice) {
    //location.href = "/xf/xf_list.jsp?minprice=" + minprice + "&maxprice=" + maxprice;
    var url = "/xf/xf_list.jsp?minprice=" + minprice + "&maxprice=" + maxprice;
    window.open(url);
}

/**
 *  返回城区名称
 */
function cityzoneName() {
    var name = form1.cityzoneid[form1.cityzoneid.selectedIndex].text;
    name = (name == "请选择" || name == "undefined") ? "" : name;
    return name;
}

/**
 *  根据条件改变各样式
 */
function modify_Class(cityzoneid, minprice, maxprice, keyword) {
    var tabLen = document.all.xflist.rows.length;
    if (cityzoneid != "") {
        for (var i = 1; i < tabLen; i++)
          document.getElementById("zone_" + i).className = "color_red";
    }
    if (keyword != "" && keyword != "小区地址或名称") {
        for (var i = 1; i < tabLen; i++)
          document.getElementById("xiaoqumc_" + i).className = "color_red";
    }
    if (minprice != "" || maxprice != "") {
        for (var i = 1; i < tabLen; i++)
          document.getElementById("price_" + i).className = "color_red";
    }
}

function sendEsfy() {
	form1.target="_blank";
    form1.action = "/esf/cs_list.jsp";
    form1.submit();
}

function easy_search(){
	document.form1.target="_blank";
	document.form1.method="post";
	document.form1.action="/xf/xf_list.jsp";
}

/**
 *
 */
function defaultKey(obj) {
    if (obj.value == "小区地址或名称") {
        obj.value = "";
    }
    obj.select(); 
}
