var ZdcEmapGPSCondParams=""; // 検索TOP:cond条件セット function ZdcEmapSetCond(frm, frm_c, htm) { if(!frm) return; if(!frm_c) return; var condfr, condto; if (htm=="nmap") { condfr = frm_c.cond1; } else { condfr = frm_c.scond1; } condto = frm.cond1; if (condfr) { var cond_val = ""; switch (condfr.type) { case "checkbox": if(condfr.checked == true) { cond_val = condfr.value; } break; case "select-one": cond_val = condfr.options[condfr.selectedIndex].value; break; case "radio": if(condfr.checked == true && condfr.value) { cond_val = condfr.value; } break; case "hidden": cond_val = condfr.value; break; ; case "text": if(condfr.value != '') { cond_val = condfr.value; } break; ; } ; if (condto) { frm.removeChild(condto); condto = null; } ; if (cond_val != "") { if (!condto) { condto = document.createElement("input"); condto.setAttribute("type", "hidden"); condto.setAttribute("name", "cond1"); frm.appendChild(condto); } condto.value = cond_val; } } } // 任意パラメータセット function ZdcEmapSetFreeParams(frm) { var hid; } // 検索TOP:地域図検索実行 function ZdcEmapSubmitArea(frm, area, frm_c) { if(!frm) return; if(!area) return; frm.area.value = area; if (frm_c) ZdcEmapSetCond(frm, frm_c); ZdcEmapSetFreeParams(frm); frm.submit(); } ; // 検索TOP:地域図検索実行 function ZdcEmapSubmitAreaSEO(frm, area, frm_c) { if(!frm) return; if(!area) return; if (frm_c) ZdcEmapSetCond(frm, frm_c); ZdcEmapSetFreeParams(frm); var url = "http://127.0.0.1/p/shinkumi/"+area+"/"; frm.action=url; frm.submit(); } ; // 検索TOP:路線図検索実行 function ZdcEmapSubmitRail(frm, area, frm_c) { if(!frm) return; if(!area) return; frm.area.value = area; if (frm_c) ZdcEmapSetCond(frm, frm_c); ZdcEmapSetFreeParams(frm); frm.submit(); } function ZdcEmapEscapeKeyword(form) { if (form.keyword) { var kw = form.keyword.value; if (kw.substr(kw.length-1) == ' ') return; form.keyword.value = kw+' '; } } //検索結果ajax表示 var ZdcEmapSearchTopPopObj; function ZdcEmapSearchTopResultAjax(form) { ZdcEmapSearchTopPopObj = document.getElementById('ZdcEmapSearchTopPop'); if(!ZdcEmapSearchTopPopObj) ZdcEmapSearchTopPopObj = document.createElement('DIV');//light用ダミー ZdcEmapSearchTopPopObj.innerHTML = ''; //検索条件 var type = form.type.value; var keyword, col, area, adcd, page; var cond_col = cond_val = cond_param = ""; switch (type) { case "ShopW": col = form.col.value; keyword = form.keyword.value; break; case "AddrW": case "StW": case "ZipW": case "Comb": keyword = form.keyword.value; break; case "AddrL": area = form.area.value; adcd = form.adcd.value; break; default: break; } if (form.page) page = form.page.value; for (var no=1; no<=200; no++) { cond_col = "cond"+no; if (form[cond_col]) { cond_val = form[cond_col].value; if (cond_val) cond_param += "&"+cond_col+"="+cond_val; } } var url = "http://127.0.0.1/p/shinkumi/search.htm?type="+type; if (keyword) url+= "&keyword="+keyword; if (col) url+= "&col="+col; if (area) url+= "&area="+area; if (adcd) url+= "&adcd="+adcd; if (page) url+= "&page="+page; if (cond_param) url+= cond_param; ZdcEmapCmnHttpRequestHtmlAjax(url, function(html,status){ if(status) html = "申し訳ありませんが只今大変混み合っております。TOPページに戻りしばらく時間を置いてからご利用ください cond["+status+"]"; ZdcEmapSearchTopPopObj.innerHTML = html; }); } function ZdcEmapLocProgress() { var c=document.getElementById("ZdcEmapLocCmmt"); if(c){ c.innerHTML = "現在地を取得中..."; } } function ZdcEmapLocFinish() { var c=document.getElementById("ZdcEmapLocCmmt"); if(c){ c.innerHTML = ""; } } var flt = ""; function GetFilter(){ if( document.getElementById("gpsfilter").value ){ flt = document.getElementById("gpsfilter").value; } else { flt = ""; } } function ZdcEmapMakeGPSCondParams(frm) { ZdcEmapGPSCondParams = ""; if (frm.plfilter) { if (frm.plfilter.value) { ZdcEmapGPSCondParams += "&plfilter="+frm.plfilter.value; } } if (ZdcEmapCond.length > 0) { for(var i=0; i < ZdcEmapCond.length; i++) { cond = eval("frm.cond"+ZdcEmapCond[i]); if (cond) { if (cond.value) { ZdcEmapGPSCondParams += "&cond"+ZdcEmapCond[i]+"="+cond.value; } } } } }