﻿// JScript 文件

//用在搜索页
//mytype  
function GetSearchParm(textid,mytype)
{
   switch(mytype)
   {
       case 1 :
       {
            window.location.replace("http://www.botrip.cn/home/routes.aspx?guanLianChengShi=" + GetTextBoxValue(textid) + "&lvYouXingShi=1&chanPinLeiBie=1");
            break;
       }
       case 2 :
       {
           window.location.replace("http://www.botrip.cn/home/routes.aspx?guanLianChengShi=" + GetTextBoxValue(textid) + "&lvYouXingShi=2&chanPinLeiBie=1");
            break;
       }
       case 3 :
       {
           window.location.replace("http://www.botrip.cn/home/routes.aspx?sheng=" + GetTextBoxValue(textid) + "&chanPinLeiBie=2");
            break;
       }
       case 4 :
       {
            window.location.replace("http://www.botrip.cn/home/routes.aspx?keyword=" + GetTextBoxValue(textid));
            break;
       }
       case 5 :
       {
            window.location.replace("http://www.botrip.cn/home/hotels.aspx?cityid=" + GetTextBoxValue(textid));
            break;
       }
       case 6 :
       {
            window.location.replace("http://www.botrip.cn/home/cars.aspx?cityid=" + GetTextBoxValue(textid));
            break;
       }
       case 7 :
       {
            window.location.replace("http://www.botrip.cn/home/receive.aspx?cityid=" + GetTextBoxValue(textid));
            break;
       }
       case 8 :
       {
            window.location.replace("http://www.botrip.cn/home/trains.aspx?bincity=" + GetTextBoxValue(textid + "1") + "&endcity=" + GetTextBoxValue(textid + "2") );
            break;
       }
       case 9 ://自建游
       {
            window.location.replace("http://www.botrip.cn/home/shopping-1.aspx?cityid=" + GetTextBoxValue(textid));
            break;
       }
   }
}


function GetSearchVThree(mytype)
{
      switch(mytype)
      {
           case 1 ://一日游 ，大巴，城市，特色，天数
           {
                window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=1&guanLianChengShi=" + GetTextBoxValue("select_dabayiriyou_city") + 
                                        "&lvYouLeiBie=" + GetRadioListValue("radio_dabayiriyou_lvyoutese") + 
                                        "&lvYouTianShu=" + GetRadioListValue("radio_dabayiriyou_lvyoutianshu"));
                break;
           }
           case 2 ://一日游 ，单走，城市，特色，天数
           {
               window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=2&guanLianChengShi=" + GetTextBoxValue("select_danzouyiriyou_city") + 
                                        "&lvYouLeiBie=" + GetRadioListValue("radio_danzouyiriyou_lvyoutese") + 
                                        "&lvYouTianShu=" + GetRadioListValue("radio_danzouyiriyou_lvyoutianshu"));
                                        
                break;
           }
           case 3 ://多日游 ，旅游区域，旅游形式
           {
               var  region = GetRadioListValue("radio_duoriyou_region");
               if( region == "2" )
               {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=3&guanLianChengShi=173&lvYouXingShi=" + GetRadioListValue("radio_duoriyou_lvyouxingshi"));
               }
               else
               {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=3&guanLianChengShi=" + GetTextBoxValue("select_duoriyou_quyu_cityid") + 
                                            "&lvYouXingShi=" + GetRadioListValue("radio_duoriyou_lvyouxingshi"));
               }
             
               break;
           }
           case 4 ://在描述中搜索
           {
                window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=4&keyword=" + GetTextBoxValue("txt_keyword"));
                break;
           }
           case 5 ://自建游
           {
                window.location.replace("http://www.botrip.cn/home/shopping-1.aspx?cityid=" + GetTextBoxValue("select_diy_tours"));
                break;
           }
       }
}

function SearchIsShow()
{
       var  region = GetRadioListValue("radio_duoriyou_region");
       if( region == "2" )
       {
           document.getElementById("div_display_Region").style.display="none";
       }
       else
       {
           document.getElementById("div_display_Region").style.display="";
       }
               
}




function SearchShowDivV5()
{
       var  region = GetRadioListValue("Radio_search_vfour");
       
       document.getElementById("div_a").style.display="none";
       document.getElementById("div_b").style.display="none";
       document.getElementById("div_c").style.display="none";
       document.getElementById("div_d").style.display="none";
       
       document.getElementById("div_" + region).style.display="";   
}

function SearchShowDivV5_link(myv)
{
      switch(myv)
      {
        case 1:
        {
             window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=1&guanLianChengShi="+GetTextBoxValue("Select_a")+"&lvYouLeiBie=0&lvYouTianShu=0");
             break;
        }
        case 2:
        {
             var scity = GetTextBoxValue("Select_b");
             window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=2&guanLianChengShi="+ scity +"&lvYouLeiBie=0&lvYouTianShu=0");
             break;
        }
        case 3:
        {
             var scity = GetTextBoxValue("Select_c");
             window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=3&guanLianChengShi="+ scity +"&lvYouXingShi=0");
             break;
        }
        case 4:
        {
             window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=3&guanLianChengShi=173&lvYouXingShi=0");
             break;
        }
      }
}

