function fclp_list_search_init()
{
var url=location.href;if(url.indexOf("#")!=-1)url=url.substring(0,url.indexOf("#"));
//self_fun1
function self_fun1(thePar,theTD){
var arr1 = location.search.substr(1).split("&");var p1="";p2="";for(i=0;i<arr1.length;i++){if([arr1[i].split("=")[0]].toString()==thePar){p1=arr1[i].split("=")[0];p2=arr1[i].split("=")[1];}}
p2=unescape(p2);
var arr2=document.getElementById(theTD).getElementsByTagName("a");
for(var j=0;j<arr2.length;j++){
if(arr2[j].href.indexOf(thePar+"="+p2)!=-1)arr2[j].className="on";else arr2[j].className="";
}
}
//判断开始
    if(url.indexOf("orderby=")!=-1){self_fun1("orderby","fclp_search_td1");}

    if(url.indexOf("jj=")!=-1){self_fun1("jj","fclp_search_td2");}

    if(url.indexOf("areaid=")!=-1){self_fun1("areaid","fclp_search_td3");}

    if(url.indexOf("lx=")!=-1){self_fun1("lx","fclp_search_td4");}

}
fclp_list_search_init();//初始


/*-------------------------*/

function fclp_list_search(str1)
{
//url、theVal
var url=location.href;if(url.indexOf("#")!=-1)url=url.substring(0,url.indexOf("#"));
var theVal=str1.substring(str1.indexOf("=")+1); 
//self_fun1
function self_fun1(thePar){
var arr1 = location.search.substr(1).split("&");var p1="";p2="";for(i=0;i<arr1.length;i++){if([arr1[i].split("=")[0]].toString()==thePar){p1=arr1[i].split("=")[0];p2=arr1[i].split("=")[1];}}return url.replace(thePar+"="+p2,thePar+"="+escape(theVal));
}
//self_fun2
function self_fun2(thePar){
if(url.indexOf("?")!=-1){url+="&"+thePar+"="+theVal;}else{url+="?"+thePar+"="+theVal;}return url;
}
//判断开始
    if(str1.indexOf("orderby=")!=-1)
    {
        if(url.indexOf("orderby=")!=-1){window.location=self_fun1("orderby");}
        else {window.location=self_fun2("orderby");}
    }
    else if(str1.indexOf("jj=")!=-1)
    {    
        if(url.indexOf("jj=")!=-1){window.location=self_fun1("jj");}
        else {window.location=self_fun2("jj");}
    }
    else if(str1.indexOf("areaid=")!=-1)
    {
         if(url.indexOf("areaid=")!=-1){window.location=self_fun1("areaid");}
        else {window.location=self_fun2("areaid");}
    }
    else if(str1.indexOf("lx=")!=-1)
    {
         if(url.indexOf("lx=")!=-1){window.location=self_fun1("lx");}
        else {window.location=self_fun2("lx");}
    }
}