function SeyaMap(b,a,c,d,e,f){this.seyacenterImage=new google.maps.MarkerImage(b,new google.maps.Size(140,43),new google.maps.Point(0,0),new google.maps.Point(10,30));this.seyacenterShadowImage=new google.maps.MarkerImage(a,new google.maps.Size(140,43),new google.maps.Point(0,0),new google.maps.Point(10,30));this.signImage=new google.maps.MarkerImage(e,new google.maps.Size(26,36),new google.maps.Point(0,0),new google.maps.Point(13,36));this.signShadowImage=new google.maps.MarkerImage(f,new google.maps.Size(53, 34),new google.maps.Point(0,0),new google.maps.Point(13,34));this.homeImage=new google.maps.MarkerImage(c,new google.maps.Size(26,36),new google.maps.Point(0,0),new google.maps.Point(13,36));this.homeShadowImage=new google.maps.MarkerImage(d,new google.maps.Size(53,34),new google.maps.Point(0,0),new google.maps.Point(13,34));this.markerImage=[this.seyacenterImage,this.signImage,this.homeImage];this.markerShadowImage=[this.seyacenterShadowImage,this.signShadowImage,this.homeShadowImage];this.shape= {coord:[1,1,1,20,18,20,18,1],type:"poly"}}SeyaMap.prototype.showForAccessMap=function(b,a,c,d){a={zoom:d,center:new google.maps.LatLng(a,c),mapTypeId:google.maps.MapTypeId.ROADMAP};this.map=new google.maps.Map(document.getElementById(b),a)};SeyaMap.prototype.showForHouseDetail=function(b,a,c,d,e){d={zoom:d,center:new google.maps.LatLng(a[0],a[1]),mapTypeId:google.maps.MapTypeId.ROADMAP};this.map=new google.maps.Map(document.getElementById(b),d);this.setMarkerFromLatLng(a[0],a[1],c,2,true,e)}; SeyaMap.prototype.showForBuildinglotDetail=function(b,a,c,d,e){d={zoom:d,center:new google.maps.LatLng(a[0],a[1]),mapTypeId:google.maps.MapTypeId.ROADMAP};this.map=new google.maps.Map(document.getElementById(b),d);this.setMarkerFromLatLng(a[0],a[1],c,2,true,e)};SeyaMap.prototype.showForInstitutionDetail=function(b,a,c,d,e){d={zoom:d,mapTypeId:google.maps.MapTypeId.ROADMAP};this.map=new google.maps.Map(document.getElementById(b),d);this.setMarkerFromAddress(a,c,true,e)}; SeyaMap.prototype.setMarkers=function(b){for(var a=0;a<b.length;a++){var c=b[a],d=this.markerImage[c.type],e=this.markerShadowImage[c.type],f=new google.maps.LatLng(c.lat,c.lon);d=new google.maps.Marker({position:f,map:this.map,shadow:e,icon:d,shape:this.shape,title:c.title,zIndex:c.zIndex});if(c.type==0){var g=d,h=new google.maps.InfoWindow({content:'<div class="gmap-iw-container"><div class="gmap-iw-pic"><img alt="photo:\u30a4\u30fc\u30b9\u30c8\u30d2\u30eb\u30ba\u52e2\u91ce\u73fe\u5730\u571f\u5730\u8ca9\u58f2\u30bb\u30f3\u30bf\u30fc" src="/images/access/access_popup_photo.jpg" width="200" height="150"></div><div class="gmap-iw-info"><p><span class="lt">\u30a4\u30fc\u30b9\u30c8\u30d2\u30eb\u30ba\u52e2\u91ce<br>\u73fe\u5730\u571f\u5730\u8ca9\u58f2\u30bb\u30f3\u30bf\u30fc</span></p><img alt="tel:0120-447-886" src="/images/common/tel.gif"><br><span class="rt"><strong>\u55b6\u696d\u6642\u9593\uff1a</strong>\u5348\u524d10\u6642\uff5e\u5348\u5f8c5\u664230\u5206</span><br><span class="rt"><strong>\u5b9a\u4f11\u65e5\uff1a</strong>\u706b\u66dc\u65e5\u30fb\u6c34\u66dc\u65e5</span><br><span class="rt">\u3012630-0213</span><br><span class="rt">\u5948\u826f\u770c\u751f\u99d2\u90e1\u4e09\u90f7\u753a\u52e2\u91ce\u53173-9-5</span></div><div style="clear:both;"></div></div>', size:new google.maps.Size(50,50)});google.maps.event.addListener(g,"click",function(){h.open(this.map,g)})}}};SeyaMap.prototype.setMarkerFromLatLng=function(b,a,c,d,e,f){var g=this.markerImage[d];d=this.markerShadowImage[d];b=new google.maps.LatLng(b,a);new google.maps.Marker({position:b,map:this.map,shadow:d,icon:g,shape:this.shape,title:c,zIndex:f});e&&this.map.setCenter(b)}; SeyaMap.prototype.setMarkerFromAddress=function(b,a,c,d){var e=this;(new google.maps.Geocoder).geocode({address:b},function(f,g){if(g==google.maps.GeocoderStatus.OK){var h=new google.maps.Marker({map:e.map,shadow:e.homeShadowImage,icon:e.homeImage,shape:e.shape,title:a,zIndex:d});c&&e.map.setCenter(f[0].geometry.location);h.setPosition(f[0].geometry.location)}})}; SeyaMap.prototype.setOverlay=function(b,a,c){b=new google.maps.LatLng(b[0],b[1]);a=new google.maps.LatLng(a[0],a[1]);a=new google.maps.LatLngBounds(b,a);this.overlay=new SeyaOverlay(a,c,this.map)};function SeyaOverlay(b,a,c){this.bounds_=b;this.nwLat_=b.getNorthEast().lat();this.nwLng_=b.getSouthWest().lng();this.imagePath_=a;this.map_=c;this.div_=null;this.setMap(c)}SeyaOverlay.prototype=new google.maps.OverlayView; SeyaOverlay.prototype.onAdd=function(){var b=document.createElement("DIV");b.style.position="absolute";var a=document.createElement("img");a.id="overlayimage";a.src=this.imagePath_;a.style.width="100%";a.style.height="100%";b.appendChild(a);this.div_=b;this.getPanes().mapPane.appendChild(b)}; SeyaOverlay.prototype.draw=function(){var b=this.getProjection(),a=b.fromLatLngToDivPixel(this.bounds_.getSouthWest());b=b.fromLatLngToDivPixel(this.bounds_.getNorthEast());var c=this.div_;c.style.left=a.x+"px";c.style.top=b.y+"px";c.style.width=b.x-a.x+"px";c.style.height=a.y-b.y+"px"};SeyaOverlay.prototype.onRemove=function(){this.div_.parentNode.removeChild(this.div_);this.div_=null};
