// JavaScript Document<!--//サーバサイドのメソッド名を呼び出した戻り値の処理//市区町村リストを取得した場合のコールバック処理function GetClassCityList_callback() {};GetClassCityList_callback.prototype = {  execute: function(result) {    //検索結果をHTML表示する    document.getElementById('searchCityList').innerHTML = result['html'];  }}//路線リストを取得した場合のコールバック処理function GetClassLineList_callback() {};GetClassLineList_callback.prototype = {  execute: function(result) {    //検索結果をHTML表示する    document.getElementById('searchLineList').innerHTML = result['html'];    document.getElementById('searchStationList').innerHTML = "<select name=searchStationId id=searchStationId ><option value='' selected>ご選択ください</option></select>";  }}//駅リストを取得した場合のコールバック処理function GetClassStationList_callback() {};GetClassStationList_callback.prototype = {  execute: function(result) {    //検索結果をHTML表示する    document.getElementById('searchStationList').innerHTML = result['html'];  }}//非同期タイプの関数を呼び出す//newするクラスはPHP側では大文字でもここではすべて小文字にする。var GetClassCityList = new getclasscitylist(new GetClassCityList_callback());var GetClassLineList = new getclasslinelist(new GetClassLineList_callback());var GetClassStationList = new getclassstationlist(new GetClassStationList_callback());//イベント処理のJs関数function ChangePrefId() {  //選択された都道府県IDをパラメータに設定してサーバに渡す	var param = {};  var index = document.getElementById('prefId').selectedIndex;  param['prefId'] = document.getElementById('prefId').options[index].value;  document.getElementById('cityId').value = "";	GetClassCityList.execute(param);}function ChangeCityId() {  //選択された市区町村IDを記憶する  var index = document.getElementById('searchCityId').selectedIndex;  document.getElementById('cityId').value = document.getElementById('searchCityId').options[index].value;}function ChangeAreaId() {  //選択されたエリアIDをパラメータに設定してサーバに渡す	var param = {};  var index = document.getElementById('areaId').selectedIndex;  param['areaId'] = document.getElementById('areaId').options[index].value;  document.getElementById('lineId').value = null  document.getElementById('stationId').value = null	GetClassLineList.execute(param);}function ChangeLineId() {  //選択された路線IDをパラメータに設定してサーバに渡す	var param = {};  var index = document.getElementById('searchLineId').selectedIndex;  param['lineId'] = document.getElementById('searchLineId').options[index].value;  document.getElementById('lineId').value = document.getElementById('searchLineId').options[index].value;  $areaObj = document.getElementById('areaId');  if($areaObj.type == "hidden"){    param['areaId'] = document.getElementById('areaId').value;  }else{    var index2 = document.getElementById('areaId').selectedIndex;    param['areaId'] = document.getElementById('areaId').options[index2].value;  }  document.getElementById('stationId').value = null	GetClassStationList.execute(param);}function ChangeStationId() {  //選択された駅IDを記憶する  var index = document.getElementById('searchStationId').selectedIndex;  document.getElementById('stationId').value = document.getElementById('searchStationId').options[index].value;}//-->