﻿if(typeof Soobb=="undefined"){Soobb={}};if(typeof Soobb.Scripts=="undefined"){Soobb.Scripts={}};if(typeof Soobb.Scripts.Satellite=="undefined"){Soobb.Scripts.Satellite={}};Soobb.Scripts.Satellite.Hotels=new(function(){var MapsContainer,MapsControl,BaseIcon;var Alphabet=["A","B","C","D","E","F","G","H","I","J"];var InitLatLng,InitZooming;this.Init=function(){MapsContainer=document.getElementById("MapsContainer");MapsControl=new GMap2(MapsContainer);MapsControl.addControl(new GSmallZoomControl());MapsControl.enableContinuousZoom();window.unload=GUnload;BaseIcon=new GIcon();BaseIcon.shadow="http://www.google.com/mapfiles/shadow50.png";BaseIcon.iconSize=new GSize(20,34);BaseIcon.shadowSize=new GSize(37,34);BaseIcon.iconAnchor=new GPoint(9,34);BaseIcon.infoWindowAnchor=new GPoint(9,2);BaseIcon.infoShadowAnchor=new GPoint(18,25);};this.ChangeLatlng=function(Lat,Lng,Zooming){InitLatLng=new GLatLng(Lat,Lng);InitZooming=Zooming;MapsControl.setCenter(InitLatLng,InitZooming);};this.BuildMarker=function(Lat,Lng,Index){var Icon=new GIcon(BaseIcon,"http://www.google.cn/intl/zh-CN_cn/mapfiles/marker"+Alphabet[Index]+".png");var Marker=new GMarker(new GPoint(Lng,Lat),Icon);MapsControl.addOverlay(Marker);var Icon=document.getElementById("Marker"+Index);Icon.onclick=function(){var Zooming=InitZooming+3;MapsControl.setCenter(new GLatLng(Lat,Lng),(Zooming<14?14:Zooming));document.documentElement.scrollTop=0;};};this.ClearMarker=function(){MapsControl.clearOverlays();MapsControl.setCenter(InitLatLng,InitZooming);};});(function(){Soobb.Scripts.Satellite.Hotels.Init();})();
