
function inputInit(){var input=document.getElementsByTagName("input");if(input==null)return;for(var i=0;i<input.length;i++){try{if(input[i].id=="search")continue;if(input[i].type=="text"||input[i].type=="password"){input[i].className="mminput";input[i].onfocus=function(){this.className="mminput_active";};input[i].onblur=function(){this.className="mminput";};}}
catch(e){}}}
function isGecko(){if(navigator){if(navigator.userAgent){if(navigator.userAgent.indexOf("Gecko/")!=-1){return true;}}}
return false;}
function isIE(){if(document.all&&navigator.userAgent.indexOf("MSIE",0)!=-1?true:false){return true;}
return false;}
var Cookie=Class.create();Cookie.prototype={initialize:function(){},set:function(key,value,day){var exp=new Date();exp.setTime(exp.getTime()+(day*24*60*60*1000));var item="@"+key+"="+escape(value)+";";var expires="expires="+exp.toGMTString();document.cookie=item+expires;},get:function(key){key="@"+key+"=";var value=null;var str=document.cookie+";";var offset=str.indexOf(key);if(offset!=-1){var start=offset+key.length;var end=str.indexOf(";",start);value=unescape(str.substring(start,end));}
return value;}}
function Trim(str){str=str.replace(/^[ 　]+/,"");str=str.replace(/[ 　]+$/,"");return(str);}
function getJSONP(url,prm,callbackStr){if(callbackStr==null)callbackStr="";if(prm==null)prm=="";if(prm.length>0){url+='?'+prm;}
if(callbackStr.length>0){url+='&callback='+callbackStr;}
var script=document.createElement('script');script.setAttribute('type','text/javascript');script.setAttribute('src',url);script.setAttribute('charset','UTF-8');document.getElementsByTagName('head').item(0).appendChild(script);}
var YUIGeocoder=Class.create();YUIGeocoder.prototype={initialize:function(){this.url="/bybus/servlet/YUIGeocoder";},getAddress:function(lat,lng,callback){var prm="&lat="+lat;prm+="&lng="+lng;prm+="&type=address";new Ajax.Request(this.url,{method:'post',parameters:prm,onComplete:function(request){var addr="";var json="("+request.responseText+")";json=eval(json);if(json.Count>0){addr=json.Item[0].Title;}
callback(addr);}});},getStation:function(lat,lng,dist,count,callback){var prm="&lat="+lat;prm+="&lng="+lng;prm+="&type=station";prm+="&dist="+dist;prm+="&n="+count;doRequest(prm,callback);},getLandmark:function(lat,lng,dist,count,callback){var prm="&lat="+lat;prm+="&lng="+lng;prm+="&type=landmark";prm+="&dist="+dist;prm+="&n="+count;doRequest(prm,callback);},getCourpon:function(lat,lng,dist,count,callback){var prm="&lat="+lat;prm+="&lng="+lng;prm+="&type=courpon";prm+="&dist="+dist;prm+="&count="+count;this.doRequest(prm,callback);},doRequest:function(prm,callback){new Ajax.Request(this.url,{method:'post',parameters:prm,onComplete:function(request){var json="("+request.responseText+")";json=eval(json);callback(json);}});}}
var placeEngine;function initPlaceEngine(){Element.hide("placeEngineExists");var host=window.location.host;var apikey;apikey="J5EDj0dD46Hz3ZhilS1zio5gkWcADZtsVWG6B2HuLdTF4oML1vsGlohhrJz2htL2iv1ti1OEzyVNnGYMInzFtnrXeapEyQN8EsqEejbiFIFEs-vb6ISKR7w6hjV7vjnGIYewVPxv0rCqtKuqZnrj1oUfcUyVrqB6AeJENI1M.QUJ.oaDSYRI.StMmAPE5QvuXexuSaCax9zeRtEYX5PRuYQqz2VKB0.CKppGqYWYNghfd8qs2toL7KKs3va5NQoqdRsA0KDL9Nkx38batfZBrRapTNV4w3fR04XITeBXyzF4a8PMZ0yJeNgXTXvTnHh1Z8WdbPMdsB.fCv6O.K2UMQ__,aHR0cDovL2NhbHRhLmpwLw__,Q2FsdGEgUHJvamVjdCBTZXJ2aWNlcw__";Element.show('placeEngineNotExists')
placeEngine=new PEngine({onGetLocation:function(x,y,r,info){getGmap().panTo(new GLatLng(y,x));$("pestatus").innerHTML=info.addr+"を自動表示しました。";},onFindClient:function(v){Element.show('placeEngineExists');Element.hide('placeEngineNotExists');},idstatus:"pestatus",appkey:apikey});}
var WaitDialog=Class.create();WaitDialog.prototype={initialize:function(){this.div=null;this.width=400;this.height=100;this.overlay=null;},show:function(msg){if(this.div!=null){this.close();}
this.div=document.createElement("div");this.div.className="waitdialog";this.div.id="waitdlg";this.div.style.height=this.height+"px";this.div.style.width=this.width+"px";var mg=document.createElement("div");mg.className="msg";var p=document.createElement(p);p.align="center";p.appendChild(document.createTextNode(msg));mg.appendChild(p);var icon=document.createElement("img");icon.src="/bybus/images/pleasewait.gif";p.appendChild(document.createElement("br"));p.appendChild(icon);mg.appendChild(p);this.div.appendChild(mg);var body=document.getElementsByTagName("body");var x;var y;var wy;if(isIE()){wy=(document.body.scrollTop||document.documentElement.scrollTop);y=wy+200;x=document.body.clientWidth/2-this.width/2;}
else{wy=window.pageYOffset;y=wy+200;x=window.innerWidth/2-this.width/2;}
this.div.style.top=y+"px";this.div.style.left=x+"px";var w;var h;if(isIE()){h=document.body.clientHeight;w=document.body.clientWidth;}
else{h=window.innerHeight;w=window.innerWidth;}
this.overlay=document.createElement("div");this.overlay.className="overlay";this.overlay.style.width=(w-5)+"px";this.overlay.style.height=h+"px";this.overlay.style.top=wy+"px";body[0].appendChild(this.div);body[0].appendChild(this.overlay);},close:function(){var body=document.getElementsByTagName("body");body[0].removeChild(this.div);body[0].removeChild(this.overlay);this.div=null;}}
var CursorDiv;var CursorX=8;var CursorY=16;function IconCursor(id){CursorDiv=id;this.OP=(navigator.userAgent.indexOf("Opera",0)!=-1)?1:0;this.MZ=document.getElementById;this.IE=document.all;this.SF=(navigator.userAgent.indexOf("Safari",0)!=-1)?1:0;Element.hide(CursorDiv);this.show=function(message,icon){if(message.length==0){Element.hide(CursorDiv);}
else{$('pcursor').innerHTML="";var htmlstr="<table><tr>";if(icon!=null){htmlstr+='<td height=\"24\" valign=\"middle\"><img src=\"'+icon+'\" /></td>';}
htmlstr+='<td valign=\"middle\" class=\"cursor\"><p><font color=\"#FFFFFF\"><b>'+message+'</b></font></p></td></tr></table>';$('pcursor').innerHTML+=htmlstr;Element.show(CursorDiv);}}
this.hide=function(){Element.hide(CursorDiv);}
this.OnMouseMove_OP=function(){var div=$(CursorDiv).style;div.left=CursorX+window.event.clientX+"px";div.top=CursorY+window.event.clientY+"px";}
this.OnMouseMove_Mozilla=function(event){var div=$(CursorDiv).style;div.left=CursorX+event.clientX+window.pageXOffset+"px";div.top=CursorY+event.clientY+window.pageYOffset+"px";}
this.OnMouseMove_IE=function(){var div=$(CursorDiv).style;var wy=(document.body.scrollTop||document.documentElement.scrollTop);var wx=(document.body.scrollLeft||document.documentElement.scrollLeft)
div.left=CursorX+window.event.clientX+wx+"px";div.top=CursorY+window.event.clientY+wy+"px";}
if(this.OP){document.onmousemove=this.OnMouseMove_OP;}
else if(this.SF){window.addEventListener("mousemove",this.OnMouseMove_Mozilla,true);}
else if(this.IE){document.onmousemove=this.OnMouseMove_IE;}
else if(this.MZ){window.addEventListener("mousemove",this.OnMouseMove_Mozilla,true);}
else{document.onmousemove=this.OnMouseMove_OP;}}