CPrefIcon=Class.create();
CPrefIcon.prototype={mapObj:Object,pref_obj:Object,name:String,latitude:Number,longitude:Number,aid:Number,point:Object,icon:Object,marker:Object,clickRef:Object,initialize:function(_23,_24,_25,aid){
this.mapObj=_23;
this.pref_obj=_24;
this.name=_24.name;
this.latitude=_24.latitude;
this.longitude=_24.longitude;
this.number=_25;
this.aid=aid;
this.img="/hotel-count/"+_25+".gif";
this.point=new GLatLng(this.latitude,this.longitude);
this.icon=new GIcon();
this.icon.image=this.img;
this.icon.iconSize=new GSize(76,25);
this.icon.iconAnchor=new GPoint(20,6);
this.icon.infoWindowAnchor=new GPoint(5,1);
this.marker=new GMarker(this.point,this.icon);
GEvent.addListener(this.marker,"click",this.onClick.bind(this));
},draw:function(){
this.mapObj.addOverlay(this.marker);
},onClick:function(){
if(this.clickRef){
this.clickRef.onClick(this);
}
},viewInfo:function(){
var _27=new GSize(0,-20);
var mes;
mes="<div style=\"width: 200px;font-size:12px;\">";
$("hyoarea1").innerHTML="<b>"+this.name+"\u5468\u8fba\u306e\u30db\u30c6\u30eb\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3059</b>";
if(this.aid<=8){
if(this.number>0){
mes+="\u3053\u306e\u30a8\u30ea\u30a2\uff08"+this.name+"\uff09\u306b\u306f\u3001"+this.number+"\u8ed2\u306eHOTEL\u304c\u3042\u308a\u307e\u3059\u3002";
}else{
mes+="\u3053\u306e\u30a8\u30ea\u30a2\uff08"+this.name+"\uff09\u306b\u306f\u3001\u767b\u9332\u304c\u3042\u308a\u307e\u305b\u3093\u3002";
}
}else{
if(this.number>0){
mes+="\u3053\u306e\u30a8\u30ea\u30a2\uff08"+this.name+"\uff09\u306b\u306f\u3001"+this.number+"\u8ed2\u306eHOTEL\u304c\u3042\u308a\u307e\u3059\u3002<br>";
}else{
mes+="\u3053\u306e\u30a8\u30ea\u30a2\uff08"+this.name+"\uff09\u306b\u306f\u3001\u767b\u9332\u304c\u3042\u308a\u307e\u305b\u3093\u3002";
}
}
mes+="<br />";
mes+="<b>\u5730\u56f3\u8868\u793a\u30a8\u30ea\u30a2\u5207\u66ff</b><br />";
mes+="<a href=\"javascript:void(0)\" onclick=\"mapZoom(ZOOM_LEVEL_MID,"+this.longitude+","+this.latitude+")\">[\u90fd\u9053\u5e9c\u770c]&nbsp;</a>";
mes+="<a href=\"javascript:void(0)\" onclick=\"mapZoom(ZOOM_LEVEL_NARROW,"+this.longitude+","+this.latitude+")\">[\u5e02\u753a\u6751]&nbsp;</a>";
mes+="<a href=\"javascript:void(0)\" onclick=\"mapZoom(ZOOM_LEVEL_SMALL,"+this.longitude+","+this.latitude+")\">[\u6761\u4e01\u76ee]</a>";
mes+="</div>";
this.mapObj.openInfoWindowHtml(this.point,mes,_27);
},call:function(){
window.setTimeout(function(){
this.mapObj.panTo(this.point);
this.onClick();
}.bind(this),500);
},addEventListener:function(nm,pt){
switch(nm){
case "click":
this.clickRef=pt;
break;
}
}};
Chotel=Class.create();
Chotel.prototype={mapObj:Object,hotel_id:String,hotel_url:String,hotel_name:String,hotel_addr:String,image_filename:String,latitude:Number,longitude:Number,img:String,point:Object,icon:Object,marker:Object,visible:Boolean,number_id:String,pref_id:Number,timerId:Object,clickRef:Object,initialize:function(_2b,id,_2d){
this.mapObj=_2b;
this.hotel_id=id;
this.hotel_url=_2d.hotel_url;
this.hotel_name=_2d.hotel_name;
this.hotel_addr=_2d.hotel_addr;
this.number_id=_2d.number_id;
this.image_filename=_2d.image_filename;
this.latitude=_2d.latitude;
this.longitude=_2d.longitude;
this.pref_id=_2d.pref_id;
this.img=this.number_id;
this.point=new GLatLng(this.latitude,this.longitude);
this.icon=new GIcon();
this.icon.image=this.img;
this.icon.iconSize=new GSize(62,67);
this.icon.iconAnchor=new GPoint(10,45);
this.icon.infoWindowAnchor=new GPoint(29,52);
this.marker=new GMarker(this.point,this.icon);
GEvent.addListener(this.marker,"click",this.onClick.bind(this));
this.visible=false;
},onClick:function(){
var _2e=new GSize(0,-20);
var _2f="<div style=\"width: 200px;\" align=\"center\">"+"<b><font style=\"font-size: 9pt;\">\u65bd\u8a2d\u60c5\u5831</font></b><hr>"+"<a href=\""+this.hotel_url+"\" target=\"_blank\">"+"<table width=\"100%\" height=\"100\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"+"<tr>"+"<td align=\"center\" valign=\"middle\"><a href=\""+this.hotel_url+"\" target=\"_blank\"><img src=\"http://map.binguan.info"+this.image_filename+"\" border=\"0\" border=\"0\" style=\"border: 1px solid rgb(153, 153, 153);\" alt=\""+this.hotel_id+"\"></a></td>"+"</tr>"+"</table>"+"</a>"+"<font style=\"font-size: 10pt;\">"+this.hotel_name+"</font><br /><font style=\"font-size: 9pt;\">"+this.hotel_addr+"</font><br />"+"<a href=\""+this.hotel_url+"\" target=\"_blank\"><font style=\"font-size: 9pt;\">\uff1c\u8a73\u7d30\u60c5\u5831\u3092\u898b\u308b\uff1e</font></a><br />"+"<hr><font style=\"font-size: 9pt;\">"+"<b>\u5730\u56f3\u8868\u793a\u30a8\u30ea\u30a2\u5207\u66ff</b><br />"+"<a href=\"javascript:void(0)\" onclick=\"mapZoom(ZOOM_LEVEL_MID,"+this.longitude+","+this.latitude+")\">[\u90fd\u9053\u5e9c\u770c]&nbsp;</a>"+"<a href=\"javascript:void(0)\" onclick=\"mapZoom(ZOOM_LEVEL_NARROW,"+this.longitude+","+this.latitude+")\">[\u5e02\u753a\u6751]&nbsp;</a>"+"<a href=\"javascript:void(0)\" onclick=\"mapZoom(ZOOM_LEVEL_SMALL,"+this.longitude+","+this.latitude+")\">[\u6761\u4e01\u76ee]</a>"+"</font></div>";
this.mapObj.openInfoWindowHtml(this.point,_2f,_2e);
if(this.clickRef){
this.clickRef.onClick(this);
}
},call:function(){
window.setTimeout(function(){
this.mapObj.panTo(this.point);
this.onClick();
}.bind(this),500);
},addEventListener:function(nm,pt){
switch(nm){
case "click":
this.clickRef=pt;
break;
}
}};
ListIterator=Class.create();
ListIterator.prototype={list:Object,index:Number,initialize:function(_32){
this.list=_32;
this.index=_32.getLength()-1;
},hasPrev:function(){
return this.index>=0;
},prev:function(){
return this.list.getIndexAt(this.index--);
}};
ChotelList=Class.create();
ChotelList.prototype={mapObj:Object,sList:Array,cueList:Array,cueIdx:Number,seqId:Number,clickHdlr:Object,initHotelId:String,initialize:function(_33,_34,_35,_36){
this.mapObj=_33;
this.cueIdx=0;
this.seqId=0;
this.initHotelId=_36;
if(_35){
this.clickHdlr=_35;
}
if(_34){
this.registhotelList(_34);
}
},registhotelList:function(_37){
for(var id in _37){
var _39;
if(!this.getShopById(id)){
_39=new Chotel(this.mapObj,id,_37[id]);
_39.addEventListener("click",this.clickHdlr);
this.sList[id]=_39;
this.cueList[this.cueIdx]=_39;
this.cueIdx++;
}else{
}
}
return this.cueList;
},getLength:function(){
return this.cueIdx;
},iterator:function(){
return new ListIterator(this);
},getIndexAt:function(_3a){
return this.cueList[_3a];
},getShopById:function(key){
return this.sList[key];
},markerOverlay:function(key){
this.mapObj.addOverlay(this.sList[key].marker);
},openInfo:function(key){
this.sList[key].showInfo();
},call:function(key){
this.sList[key].call();
},getObject:function(key){
return this.sList[key];
},redraw:function(it,seq){
var seq;
if(it==undefined){
it=this.iterator();
seq=++this.seqId;
}
if(seq==this.seqId){
if(it.hasPrev()){
var obj=it.prev();
if(obj.marker&&obj.visible==false){
obj.timerId=window.setTimeout(function(){
if(seq==this.seqId){
this.mapObj.addOverlay(obj.marker);
obj.visible=true;
if(this.initHotelId&&this.initHotelId==obj.hotel_id){
this.initHotelId=undefined;
if(parseInt(obj.latitude,10)!=0){
obj.onClick();
}
}
this.redraw(it,seq);
}
}.bind(this),10);
}else{
this.redraw(it,seq);
}
}else{
this.cueList=new Array();
this.cueIdx=0;
delboxm();
document.title="\u307b\u3066\u308b\u30de\u30c3\u30d7";
}
}
},removeAll:function(){
for(var idx in this.sList){
if(this.sList[idx].timerId){
window.clearTimeout(this.sList[idx].timerId);
}
if(this.sList[idx].marker&&this.sList[idx].visible==true){
this.mapObj.removeOverlay(this.sList[idx].marker);
}
}
this.sList=new Array();
this.cueList=new Array();
this.cueIdx=0;
}};


