﻿
          function submit_search(){
       
          var ClassID_h=document.getElementById('select1').value;
          var PingPai=document.getElementById('select2').value;
          var CityID_h=document.getElementById('select3').value;
          var ChengSe=document.getElementById('select4').value;
          var P_Name=document.getElementById('p_name').value;
          if(P_Name.match(/\S+/)==null) P_Name=-1;
          var obj_shtml="http://hs.pc771.com/SecondHand/";
          if(CityID_h==-1)

          { if (ClassID_h==-1) {


          alert('请选择大类');



          return;
          }

          }


          if(CityID_h!=-1)
          {

          if(ClassID_h!=-1)

          {


          if  (PingPai!=-1)

          obj_shtml+='CityThreeList/'+CityID_h+'/'+PingPai.substring(0,2)+'/'+PingPai.substring(0,4)+'/'+PingPai.substring(0,6)+'/';

          else
          obj_shtml+='CityTwoList/'+CityID_h+'/'+ClassID_h.substring(0,2)+'/'+ClassID_h.substring(0,4)+'/';
          }

          else

          obj_shtml+='CityHomeList/'+CityID_h+'/';

          }


          else

          {
          if(PingPai!=-1)
          obj_shtml+='ThreeList/'+PingPai.substring(0,2)+'/'+PingPai.substring(0,4)+'/'+PingPai.substring(0,6)+'/';
          else

          obj_shtml+='TwoList/'+ClassID_h.substring(0,2)+'/'+ClassID_h.substring(0,4)+'/';
          }


          window.location= obj_shtml+'index_1.shtml?ClassID_h='+ClassID_h+'&PingPai='+PingPai+'&CityID_h='+CityID_h+'&ChengSe='+ChengSe+'&P_Name='+P_Name;

          }
       

























function get_data(url,target) {


var xmlhttp;
document.getElementById(target).innerHTML='<select style="width:110px;"><option>...正在加载数据....</option></select>';
        if (window.XMLHttpRequest) { // code for Mozilla, etc.
               xmlhttp = new XMLHttpRequest();
          
               xmlhttp.open("GET",url, true);
                    xmlhttp.onreadystatechange = function(){                   
                    
              
                         
        if (xmlhttp.readyState == 4) {
         
               if (xmlhttp.status == 200)
                {
         
               document.getElementById(target).innerHTML=xmlhttp.responseText;
                }

           
            
               
                else {
                       alert("Problem retrieving XML data");
                     }
        }
   
                    
                    
                    
                    
                    }
                    
                    
                     xmlhttp.send(null);
        } 
        
        
        
        else if (window.ActiveXObject) { // code for IE 
               xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
               if (xmlhttp) {
         
                       xmlhttp.onreadystatechange =function(){                   
                    
              
                         
        if (xmlhttp.readyState == 4) {
         
               if (xmlhttp.status == 200)
                {
         
               document.getElementById(target).innerHTML=xmlhttp.responseText;
                }

           
            
               
                else {
                       alert("Problem retrieving XML data");
                     }
        }
   
                    
                    
                    
                    
                    }
                       
                       
                       
                       
                       xmlhttp.open("GET", url, true);
                       xmlhttp.send(null);
               }
        }
}


 


