﻿// 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 SearchShowDivVFour()
{
       var  region = GetRadioListValue("Radio_search_vfour");
       
       document.getElementById("div_vfour_1").style.display="none";
       document.getElementById("div_vfour_2").style.display="none";
       document.getElementById("div_vfour_3").style.display="none";
       document.getElementById("div_vfour_4").style.display="none";
       
       document.getElementById("div_vfour_" + region).style.display="";   
}

function SearchShowDivVFour_link(myv)
{
      switch(myv)
      {
        case 1:
        {
             var  selv = GetRadioListValue("Radio_search_city_bus_tour");
             switch(selv)
             {
                case "1":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=1&guanLianChengShi=90&lvYouLeiBie=0&lvYouTianShu=0");
                    break;
                }
                case "2":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=1&guanLianChengShi=92&lvYouLeiBie=0&lvYouTianShu=0");
                    break;
                }
                case "3":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=1&guanLianChengShi=91&lvYouLeiBie=0&lvYouTianShu=0");
                    break;
                }
                case "4":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=1&guanLianChengShi=93&lvYouLeiBie=0&lvYouTianShu=0");
                    break;
                }
             }
             break;
        }
        case 2:
        {
             var scity = GetTextBoxValue("Select_search_private_tour");
             var selv = GetRadioListValue("Radio_search_private_tour");
             switch(selv)
             {
                case "1":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=2&guanLianChengShi="+ scity +"&lvYouLeiBie=0&lvYouTianShu=2");
                    break;
                }
                case "2":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=2&guanLianChengShi="+ scity +"&lvYouLeiBie=0&lvYouTianShu=1");
                    break;
                }
                case "3":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=2&guanLianChengShi="+ scity +"&lvYouLeiBie=0&lvYouTianShu=0");
                    break;
                }
             }
             break;
        }
        case 3:
        {
             var scity = GetTextBoxValue("Select_package_tour");
             var selv = GetRadioListValue("Radio_search_package_tour");
             switch(selv)
             {
                case "1":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=3&guanLianChengShi="+ scity +"&lvYouXingShi=3");
                    break;
                }
                case "2":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=3&guanLianChengShi="+ scity +"&lvYouXingShi=4");
                    break;
                }
                case "3":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=3&guanLianChengShi="+ scity +"&lvYouXingShi=0");
                    break;
                }
             }
             break;
        }
        case 4:
        {
             var selv = GetRadioListValue("Radio_search_multi_tour");
             switch(selv)
             {
                case "1":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=3&guanLianChengShi=173&lvYouXingShi=3");
                    break;
                }
                case "2":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=3&guanLianChengShi=173&lvYouXingShi=4");
                    break;
                }
                case "3":
                {
                    window.location.replace("http://www.botrip.cn/home/routes_list.aspx?searchtype=3&guanLianChengShi=173&lvYouXingShi=0");
                    break;
                }
             }
             break;
        }
      }
}

