﻿function cleara(){
  document.frmajax.s_word.value="";
}
function move() {
  if(document.frmajax.s_word.value=="キーワードを入力してください" || document.frmoption.s_word.value==""){
      alert("キーワードを入力してください");
	  return;
   }
  document.frmajax.shinryo_taisho_id.value = ""; 
　if ( document.frmajax.shinryo_taisho_ids.length<=1 ) // 只有一个??框，form1.item.length = undefined 
　{ 
　　if ( document.frmajax.shinryo_taisho_ids.checked ) 
       document.frmajax.shinryo_taisho_id.value = document.frmajax.shinryo_taisho_ids.value; 
　} 
　else 
　{ 
　　for ( i = 0 ; i < document.frmajax.shinryo_taisho_ids.length ; i++ ) 
　　{ 
　　　if ( document.frmajax.shinryo_taisho_ids[i].checked ) // ??框中有?中的框 
　　　{ 
        
          document.frmajax.shinryo_taisho_id.value = document.frmajax.shinryo_taisho_ids[i].value; 
　　　　for ( j = i + 1 ; j < document.frmajax.shinryo_taisho_ids.length ; j++ ) 
　　　　{ 
　　　　　if ( document.frmajax.shinryo_taisho_ids[j].checked ) 
　　　　　{ 
            document.frmajax.shinryo_taisho_id.value += ", "; //用逗号做分割符 
            document.frmajax.shinryo_taisho_id.value += document.frmajax.shinryo_taisho_ids[j].value; 
　　　　　} 
　　　　} 
　　　　break; 
　　　} 
　　} 
　} 

 src_charset = document.charset;
 document.charset = 'Shift_JIS';
 document.frmajax.submit();
 document.charset = src_charset;
}




//var prefixes = ["MSXML2.XmlHttp","Microsoft.XmlHttp","MSXML3.XmlHttp", "MSXML.XmlHttp"];
 //function getDomObject(){
 //for (var i = 0; i < prefixes.length; i++) {
  //try{xmlHttp = new ActiveXObject(prefixes[i]);}catch(ex){};
 //}
//return xmlHttp;
//}

   
   function getDomObject(){
      if(window.ActiveXObject) {
           xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
    }
    else{
	var xmlhttp = new XMLHttpRequest();
    }
	return xmlhttp;
}





function createhtml(strUrl,objDiv){
  //var Element= this;

 var xmlHttp = getDomObject();

  xmlHttp.open("POST",strUrl, true);
 xmlHttp.onreadystatechange = function () { 
  switch (xmlHttp.readyState) {  
           case 3 : 
          break;
     case 4 :  
      if (xmlHttp.status == 200){
				  //alert(xmlHttp.getResponseHeader("Content-Type")); 
					//alert( xmlHttp.responseText );
                   //objDiv.innerHTML=gb2utf8(xmlHttp.responseBody);        
				   objDiv.innerHTML = xmlHttp.responseText;
				   //alert(objDiv.innerHTML);
				  
				   //objDiv.innerHTML=xmlHttp.responseBody;            
         }

  } 
 }  
 xmlHttp.setRequestHeader("Content-Type","text/html; charset=euc-jp" ) ;
 xmlHttp.send(null); 
}
function gotos(n){
	 var curObject = document.getElementById("newGds_div");
	  createhtml("get_ah.php?chiiki_code="+n,curObject);
//this.location.href="new-search-1.php?sh_id="+n;
}
function submitcity(){


/*
	  if(document.getElementById("chiiki_codes").value==""){
	       alert("都道府県を選択してください");
	       return;
	     }
	  
     document.frmajax.chiiki_code.value = document.getElementById("chiiki_codes").value;
	 document.frmajax.city.value = document.getElementById("citys").value;
*/     
  if(document.frmajax.s_word.value=="キーワードを入力してください" ){
	document.frmajax.s_word.value="";
  }
     document.frmajax.shinryo_taisho_id.value = ""; 
	　if ( document.frmajax.shinryo_taisho_ids.length<=1 ) // 只有一个??框，form1.item.length = undefined 
	　{ 
	　　if ( document.frmajax.shinryo_taisho_ids.checked ) 
			document.frmajax.shinryo_taisho_id.value = document.frmajax.shinryo_taisho_ids.value; 
	　} 
	　else 
	　{ 
	　　for ( i = 0 ; i < document.frmajax.shinryo_taisho_ids.length ; i++ ) 
	　　{ 
	　　　if ( document.frmajax.shinryo_taisho_ids[i].checked ) // ??框中有?中的框 
	　　　{ 
			
			  document.frmajax.shinryo_taisho_id.value = document.frmajax.shinryo_taisho_ids[i].value; 
	　　　　for ( j = i + 1 ; j < document.frmajax.shinryo_taisho_ids.length ; j++ ) 
	　　　　{ 
	　　　　　if ( document.frmajax.shinryo_taisho_ids[j].checked ) 
	　　　　　{ 
				document.frmajax.shinryo_taisho_id.value += ", "; //用逗号做分割符 
				document.frmajax.shinryo_taisho_id.value += document.frmajax.shinryo_taisho_ids[j].value; 
	　　　　　} 
	　　　　} 
	　　　　break; 
	　　　} 
	　　} 
	　} 
	src_charset = document.charset;
	document.charset = 'Shift_JIS';
	 document.frmajax.submit();
	document.charset = src_charset;
   }

