﻿// JScript 文件
function popo1(i)
{
    showArea(i);
}
function popo2(j)
{
    searchType(j);
}
function popo3(j,keywords)
{
    searchType(j);
    showkeywords(keywords)
}
function showArea(i)
{
    var divarea=document.getElementById("DivArea");
    //var txt1=document.getElementById("Button1");
    var a1=document.getElementById("a1");
    var a2=document.getElementById("a2");
    switch (i)
    {
        case 1:
            divarea.style.display="block";
            a1.style.display="none";
            a2.style.display="block";
            document.getElementById("hdSearchType").value=1;
            //txt1.value="精确搜索";
            break;
        case 2:
            divarea.style.display="none";
            a1.style.display="block";
            a2.style.display="none";
            //txt1.value="模糊搜索";
            document.getElementById("hdSearchType").value=2;
//            document.getElementById("sltContinent").selectedIndex=1;
//            //document.getElementById("sltCountry").options.length = 1;
//            document.getElementById("sltCountry").selectedIndex=1;
//            //document.getElementById("sltProvinces").options.length = 1;
//            document.getElementById("sltProvinces").selectedIndex=0;
            
            
            
            
            //document.getElementById("sltCity").options.length = 1;
            document.getElementById("sltCity").selectedIndex=0;
            document.getElementById("sltDistrict").options.length = 1;
            document.getElementById("sltDistrict").selectedIndex=0;
            break;
    }
}
function searchType(j)
{
    var hadtype=document.getElementById("hdType");
    switch (j)
    {
        case 1:                
            hadtype.value="1";
            document.getElementById("td1").background="images/23_05.gif";
            document.getElementById("td2").background="images/23_05.gif";
            document.getElementById("td3").background="images/23_03.gif";
            document.getElementById("td4").background="images/23_05.gif";
            document.getElementById("td5").background="images/23_05.gif";
            document.getElementById("td6").background="images/23_05.gif";
            document.getElementById("td7").background="images/23_05.gif";
            document.getElementById("td8").background="images/23_05.gif";
            break;
        case 2:                
            hadtype.value="2";
            document.getElementById("td1").background="images/23_03.gif";
            document.getElementById("td2").background="images/23_05.gif";
            document.getElementById("td3").background="images/23_05.gif";
            document.getElementById("td4").background="images/23_05.gif";
            document.getElementById("td5").background="images/23_05.gif";
            document.getElementById("td6").background="images/23_05.gif";
            document.getElementById("td7").background="images/23_05.gif";
            document.getElementById("td8").background="images/23_05.gif";
            break;
        case 3:                
            hadtype.value="3";
            document.getElementById("td1").background="images/23_05.gif";
            document.getElementById("td2").background="images/23_03.gif";
            document.getElementById("td3").background="images/23_05.gif";
            document.getElementById("td4").background="images/23_05.gif";
            document.getElementById("td5").background="images/23_05.gif";
            document.getElementById("td6").background="images/23_05.gif";
            document.getElementById("td7").background="images/23_05.gif";
            document.getElementById("td8").background="images/23_05.gif";
            break;
        case 4:                
            hadtype.value="4";
            document.getElementById("td1").background="images/23_05.gif";
            document.getElementById("td2").background="images/23_05.gif";
            document.getElementById("td3").background="images/23_05.gif";
            document.getElementById("td4").background="images/23_03.gif";
            document.getElementById("td5").background="images/23_05.gif";
            document.getElementById("td6").background="images/23_05.gif";
            document.getElementById("td7").background="images/23_05.gif";
            document.getElementById("td8").background="images/23_05.gif";
            break;
        case 5:                
            hadtype.value="5";
            document.getElementById("td1").background="images/23_05.gif";
            document.getElementById("td2").background="images/23_05.gif";
            document.getElementById("td3").background="images/23_05.gif";
            document.getElementById("td4").background="images/23_05.gif";
            document.getElementById("td5").background="images/23_03.gif";
            document.getElementById("td6").background="images/23_05.gif";
            document.getElementById("td7").background="images/23_05.gif";
            document.getElementById("td8").background="images/23_05.gif";
            break;
        case 6:                
            hadtype.value="6";
            document.getElementById("td1").background="images/23_05.gif";
            document.getElementById("td2").background="images/23_05.gif";
            document.getElementById("td3").background="images/23_05.gif";
            document.getElementById("td4").background="images/23_05.gif";
            document.getElementById("td5").background="images/23_05.gif";
            document.getElementById("td6").background="images/23_03.gif";
            document.getElementById("td7").background="images/23_05.gif";
            document.getElementById("td8").background="images/23_05.gif";
            break;
        case 7:                
            hadtype.value="7";
            document.getElementById("td1").background="images/23_05.gif";
            document.getElementById("td2").background="images/23_05.gif";
            document.getElementById("td3").background="images/23_05.gif";
            document.getElementById("td4").background="images/23_05.gif";
            document.getElementById("td5").background="images/23_05.gif";
            document.getElementById("td6").background="images/23_05.gif";
            document.getElementById("td7").background="images/23_03.gif";
            document.getElementById("td8").background="images/23_05.gif";
            break;
        case 8:                
            hadtype.value="8";
            document.getElementById("td1").background="images/23_05.gif";
            document.getElementById("td2").background="images/23_05.gif";
            document.getElementById("td3").background="images/23_05.gif";
            document.getElementById("td4").background="images/23_05.gif";
            document.getElementById("td5").background="images/23_05.gif";
            document.getElementById("td6").background="images/23_05.gif";
            document.getElementById("td7").background="images/23_05.gif";
            document.getElementById("td8").background="images/23_03.gif";
            break;
    }      
}
function showkeywords(keywords)
{
    if(keywords!=null && keywords!="")
    {
        document.getElementById("TxtKeyWords").value=keywords;
    }
}
