function onLoad(){
if(!GBrowserIsCompatible()){
document.getElementById("MapBuilderMap").innerHTML="Unfortunately your browser doesn't support Google Maps.<br /> To check browser compatibility visit the following <a href=\"http://local.google.com/support/bin/answer.py?answer=16532&topic=1499\">link</a>.";
return;
}
map=new GMap2(document.getElementById("MapBuilderMap"));
var MB=new MapBuilder(map);
MB.renderMap();
};
window.onload=function(){
onLoad();
};
function getPdMarkerRevisionInfo(){
var cr="<br/>";
var s="1.99e 05/05/06 - fixed zoomed tooltip positioning &amp; non-centered marker graphics."+cr+"1.99d 05/01/06 - fixed display &amp; blink when defining .transparent."+cr+"1.99c 04/25/06 - added display and blink."+cr+"1.99b 04/21/06 - added 'Powered By' version &amp; marker count display."+cr+"1.99a 04/18/06 - revised for Google Maps API Version 2, GMap2 required."+cr+"0.99c 01/30/06 - added setDetailWinClass and resetDetailWinClass."+cr+"0.99a 10/12/05 - now handles maps in containers with undefined widths"+cr+"define a div with id 'pdmarkerwork' to reduce flicker"+cr+"0.99  10/03/05 - added setImageEnabled, allowLeftTooltips (global)"+cr+"0.98  09/30/05 - fixed zoomToMarkers"+cr+"0.97  09/24/05 - added setHoverImage, setShowDetailOnClick, setDetailWinHTML, showDetailWin, closeDetailWin"+cr+"0.96  09/22/05 - added setTooltipHiding, getTooltipHiding"+cr+"0.95  09/20/05 - handle zoom for lingering tooltips mouseOutEnabled(false) "+"disables setImage and restoreImage"+cr+"0.94  09/20/05 - added setTooltipClass and resetTooltipClass"+cr+"0.93  09/19/05 - added slopPercentage [optional] parameter to zoomToMarkers"+cr+"0.92  09/18/05 - added getMouseOutEnabled, setMouseOutEnabled"+cr+"0.91  09/17/05 - fixed setOpacity";
return s;
};
function getPdMarkerVersion(){
return getPdMarkerRevisionInfo().substring(0,15);
};
function getPdMarkerShortVersion(){
return getPdMarkerRevisionInfo().substring(0,5);
};
var APIkey="";
function getGoogleMapsVersion(){
var i,a,b,c;
var v="unknown";
if(document.getElementsByTagName){
for(i=0;(a=document.getElementsByTagName("script")[i]);i++){
if(a.getAttribute("src")){
b=a.getAttribute("src");
c=b.indexOf("/mapfiles/maps");
d=b.indexOf("http://maps.google.com/maps?file=api");
e=b.indexOf("key=");
if(c>0){
v=parseFloat(b.substring(c+14));
}
if(d>=0){
if(e>0){
APIkey=b.substring(e+4);
}
}
}
}
}
return v;
};
function latLongToPixel(_9,_a,_b){
var _c=_9.getCurrentMapType().getProjection().fromLatLngToPixel(_9.fromDivPixelToLatLng(new GLatLng(0,0),true),_9.getZoom());
var _d=_9.getCurrentMapType().getProjection().fromLatLngToPixel(_a,_9.getZoom());
return new GPoint(_d.x-_c.x,_d.y-_c.y);
};
var pdMarkerExtList=[];
function PdMarkerAddToExtList(_e){
pdMarkerExtList.push(_e);
};
function PdMarkerRemoveFromExtList(id){
for(var i=0;i<pdMarkerExtList.length;i++){
if(pdMarkerExtList[i].internalId==id){
pdMarkerExtList.splice(i,1);
}
}
};
function PdMarkerFindInExtList(id){
for(var i=0;i<pdMarkerExtList.length;i++){
if(pdMarkerExtList[i].internalId==id){
return pdMarkerExtList[i];
}
}
};
function PdMarkerClose(id){
for(var i=0;i<pdMarkerExtList.length;i++){
if(pdMarkerExtList[i].internalId==id){
pdMarkerExtList[i].closeDetailWin();
pdMarkerExtList.splice(i,1);
}
}
};
function PdMarkerBlinkOnOff(id){
var _16=PdMarkerFindInExtList(id);
if(_16){
if(!_16.blinking){
return;
}
_16.blinkOn=!_16.blinkOn;
_16.display(_16.blinkOn);
setTimeout("PdMarkerBlinkOnOff("+_16.getId()+");",_16.blinkSpeed);
}
};
function isPdMarker(a){
if(a.isMarker){
return true;
}
return false;
};
function getPdMarkerCount(a){
if(a.pdMarkers){
return a.pdMarkers.length;
}
return 0;
};
GMap2.prototype.getMarkerById=function(id){
var _1a=getPdMarkerCount(this);
for(var i=0;i<_1a;i++){
if(isPdMarker(this.pdMarkers[i])){
if(this.pdMarkers[i].internalId==id){
this.cursor=i;
return this.pdMarkers[i];
}
}
}
return null;
};
GMap2.prototype.getFirstMarker=function(){
var _1c=getPdMarkerCount(this);
for(var i=0;i<_1c;i++){
if(isPdMarker(this.pdMarkers[i])){
this.cursor=i;
return this.pdMarkers[i];
}
}
return null;
};
GMap2.prototype.getNextMarker=function(){
var _1e=getPdMarkerCount(this);
if(_1e>0){
if(this.cursor>=0){
for(var i=this.cursor+1;i<_1e;i++){
if(isPdMarker(this.pdMarkers[i])){
this.cursor=i;
return this.pdMarkers[i];
}
}
}
}
return null;
};
GMap2.prototype.getNthMarker=function(nTh){
var _21=getPdMarkerCount(this);
for(var i=0;i<_21;i++){
if(isPdMarker(this.pdMarkers[i])){
nTh--;
if(nTh==0){
this.cursor=i;
return this.pdMarkers[i];
}
}
}
return null;
};
GMap2.prototype.getMarkerCount=function(){
return getPdMarkerCount(this);
};
GMap2.prototype.boxMap=function(_23,_24){
var _25=this.spec;
var _26=_25.getLowestZoomLevel(_23,_24,this.viewSize);
this.centerAndZoom(new GPoint(_23.x,_23.y),_26);
};
GMap2.prototype.zoomToMarkers=function(_27,_28){
var _29=0;
var _2a,x,y,_2d,_2e,_2f,_30,_31;
var _32=this.getFirstMarker();
while(_32!=null){
_2a=_32.getPoint();
x=_2a.lat();
y=_2a.lng();
if(_29==0){
_2d=x;
_2e=x;
_2f=y;
_30=y;
}else{
if(x<_2d){
_2d=x;
}
if(x>_2e){
_2e=x;
}
if(y<_2f){
_2f=y;
}
if(y>_30){
_30=y;
}
}
_32=this.getNextMarker();
_29++;
}
if(_29==1){
this.setCenter(new GLatLng(x,y),this.getZoom());
}else{
if(_29>1){
var _33=new GLatLng((_2d+_2e)/2,(_2f+_30)/2);
_31=new GSize(Math.abs(_2e-_2d),Math.abs(_30-_2f));
slopWid=0;
slopHgt=0;
if(typeof _27!="undefined"){
slopWid=_31.width*_27/200;
slopHgt=_31.height*_27/200;
_31.width*=1+_27/100;
_31.height*=1+_27/100;
}
deltaHgt=0;
if(typeof _28!="undefined"){
deltaHgt=_31.height*_28/100;
_33=new GLatLng(_33.lat()+deltaHgt,_33.lng());
}
var _34=new GLatLngBounds(new GLatLng(_2d-slopHgt,_2f-slopWid),new GLatLng(_2e+slopHgt,_30+slopWid));
var _35=this.getBoundsZoomLevel(_34);
this.setCenter(_33,_35);
}
}
};
function shorten(x){
var _37=1000000;
return Math.round(x*_37)/_37;
};
function poweredByClick(map){
var _39=map.getCenter();
var _3a=map.getBounds().toSpan();
var _3b=map.getZoom();
var url="http://maps.google.com/maps?ll="+_39.lat()+","+_39.lng()+"&spn="+shorten(_3a.lat())+","+shorten(_3a.lng())+"&z="+_3b+"&key="+APIkey;
document.location=url;
};
function poweredByMouseover(map){
var _3e=map.getFirstMarker();
var _3f=map.getBounds();
var _40=0;
var _41=0;
while(_3e!=null){
var _42=_3e.getPoint();
if(_3f.contains(_42)){
_40++;
}
_41=_41+1;
_3e=map.getNextMarker();
}
var _43=map.poweredByTitle+" ("+_40+" markers of "+_41+" visible)";
map.poweredByObj.setAttribute("title",_43);
map.poweredByObj.setAttribute("alt",_43);
};
function getPoweredBy(map){
try{
var _45="GMap "+getGoogleMapsVersion()+" & PdMarker "+getPdMarkerShortVersion();
map.poweredByTitle=_45;
var b=document.createElement("img");
b.setAttribute("src","http://www.google.com/intl/en_ALL/mapfiles/transparent.gif");
b.setAttribute("width",62);
b.setAttribute("alt",_45);
b.setAttribute("title",_45);
b.setAttribute("height",30);
b.style.display="block";
b.style.position="absolute";
b.style.left="2px";
b.style.bottom="0px";
b.style.width="62px";
b.style.height="30px";
b.style.cursor="pointer";
b.style.zIndex=600001;
b.onclick=function(){
poweredByClick(map);
};
b.onmouseover=function(){
poweredByMouseover(map);
};
map.getPane(G_MAP_FLOAT_PANE).parentNode.parentNode.appendChild(b);
return b;
}
catch(e){
}
return true;
};
function setPoweredBy(map){
getGoogleMapsVersion();
if(!map.poweredByObj){
map.poweredByObj=getPoweredBy(map);
}
};
function PdMarkerNamespace(){
var _48=navigator.userAgent.toLowerCase();
var n4=(document.layers);
var n6=(document.getElementById&&!document.all);
var ie=(document.all);
var o6=(_48.indexOf("opera")!=-1);
var _4d=(_48.indexOf("safari")!=-1);
var _4e=(_48.indexOf("msie")!=-1)&&(_48.indexOf("opera")==-1);
var _4f=10;
var _50=true;
icon=new GIcon();
icon.shadow="http://www.google.com/mapfiles/shadow50.png";
icon.iconSize=new GSize(20,34);
icon.shadowSize=new GSize(37,34);
icon.iconAnchor=new GPoint(9,34);
icon.infoWindowAnchor=new GPoint(9,2);
icon.infoShadowAnchor=new GPoint(18,25);
icon.image="http://www.google.com/mapfiles/marker.png";
function PdMarker(a,b,_53,opt){
this.inheritFrom=GMarker;
if(typeof b=="undefined"){
b=icon;
}
if(typeof opt!="undefined"){
opt.icon=b;
this.inheritFrom(a,opt);
}else{
this.inheritFrom(a,b);
}
if(typeof _53!="undefined"){
this.pendingTitle=_53;
}else{
this.pendingTitle="";
}
this.internalId=_4f;
_4f+=1;
this.zIndexSaved=false;
this.oldImagePath="";
this.pendingCursor="";
this.percentOpacity=70;
this.mouseOutEnabled=true;
this.setImageOn=true;
this.hidingEnabled=true;
this.showDetailOnClick=true;
this.detailOpen=false;
this.userData="";
};
PdMarker.prototype=new GMarker(new GLatLng(1,1));
function addMarkerToMapList(map,_56){
try{
if(map.pdMarkers.length){
}
}
catch(e){
map.pdMarkers=new Array();
}
map.pdMarkers.push(_56);
};
function removeMarkerFromMapList(map,_58){
var id=_58.internalId;
for(var i=0;i<map.pdMarkers.length;i++){
if(map.pdMarkers[i].internalId==id){
map.pdMarkers.splice(i,1);
return;
}
}
};
PdMarker.prototype.initialize=function(a){
if(typeof a=="GMap"){
GLog.write("PdMarker requires GMap2");
return;
}
addMarkerToMapList(a,this);
try{
GMarker.prototype.initialize.call(this,a);
this.isMarker=true;
if(this.pendingTitle.length>0){
this.setTitle(this.pendingTitle);
}
if(this.pendingCursor.length>0){
this.setCursor(this.pendingCursor);
}
this.map=a;
setPoweredBy(a);
GEvent.bindDom(this,"mouseover",this,this.onMouseOver);
GEvent.bindDom(this,"mouseout",this,this.onMouseOut);
GEvent.bindDom(this,"click",this,this.onClick);
GEvent.bind(this.map,"zoomend",this,this.reZoom);
}
catch(e){
alert("PdMarker initialize error: "+e);
}
};
PdMarker.prototype.allowLeftTooltips=function(a){
_50=a;
};
PdMarker.prototype.reZoom=function(){
var _5d=false;
if(this.tooltipObject){
if(this.tooltipObject.style.display=="block"){
setTTPosition(this);
_5d=true;
}
}
if(this.detailObject){
if(!_5d){
setTTPosition(this);
}
this.detailObject.style.top=this.ttTop+"px";
this.detailObject.style.left=this.ttLeft+"px";
}
};
PdMarker.prototype.setId=function(id){
this.internalId=id;
};
PdMarker.prototype.getId=function(){
return this.internalId;
};
PdMarker.prototype.setName=function(a){
this.name=a;
};
PdMarker.prototype.getName=function(){
if(this.name){
return this.name;
}else{
return null;
}
};
PdMarker.prototype.setUserData=function(a){
this.userData=a;
};
PdMarker.prototype.getUserData=function(){
if(this.userData){
return this.userData;
}else{
return "";
}
};
PdMarker.prototype.setUserData2=function(a){
this.userData2=a;
};
PdMarker.prototype.getUserData2=function(){
if(this.userData2){
return this.userData2;
}else{
return "";
}
};
PdMarker.prototype.setImageEnabled=function(a){
this.setImageOn=a;
};
var _63="";
var _64="";
function PdCompPdMIN(_65){
if(_63.length==0){
for(var i in _65){
if(eval("typeof marker."+i)=="object"){
try{
if(eval("typeof marker."+i+"[0].src")!="undefined"){
_64="this."+i;
_63=_64+"[0]";
}
}
catch(e){
}
}
}
}
};
PdMarker.prototype.setImage=function(a){
var _68="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\""+a+"\")";
if(this.mouseOutEnabled&&this.setImageOn){
PdCompPdMIN(this);
try{
if(this.oldImagePath.length==0){
eval("this.oldImagePath = "+_63+".src");
}
if(_4e){
eval(_63+".style.filter = msFilter");
}else{
eval(_63+".src = a");
}
}
catch(e){
}
}
};
PdMarker.prototype.restoreImage=function(){
if(this.mouseOutEnabled&&this.setImageOn&&this.oldImagePath.length>0){
var a=this.oldImagePath;
this.setImage(a);
this.oldImagePath="";
}
};
PdMarker.prototype.display=function(a){
PdCompPdMIN(this);
var b="";
if(!a){
this.hideTooltip();
this.closeDetailWin();
b="none";
}
try{
var _6c=2;
if(this.getIcon().transparent){
_6c=3;
}
for(i=0;i<_6c;i++){
eval(_64+"["+i+"].style.display = b;");
}
}
catch(e){
}
};
PdMarker.prototype.blink=function(a,b){
if(a){
this.blinkOn=true;
marker.blinkSpeed=b;
if(!this.blinking){
this.blinking=a;
PdMarkerAddToExtList(this);
PdMarkerBlinkOnOff(this.getId());
}
}else{
this.blinking=a;
this.display(true);
PdMarkerRemoveFromExtList(this);
}
};
PdMarker.prototype.setIcon=function(a){
this.remove();
this.icon=a;
this.initialize(this.map);
this.redraw(true);
};
PdMarker.prototype.setMarkerZIndex=function(a){
if(!this.zIndexSaved){
this.zIndexSaved=true;
this.oldZIndex=eval(_63+".style.zIndex");
}
eval(_63+".style.zIndex = a");
this.redraw(true);
};
PdMarker.prototype.topMarkerZIndex=function(){
this.setMarkerZIndex(600000);
};
PdMarker.prototype.restoreMarkerZIndex=function(){
if(this.zIndexSaved){
this.zIndexSaved=false;
eval(_63+".style.zIndex = this.oldZIndex");
this.redraw(true);
}
};
PdMarker.prototype.onInfoWindowOpen=function(){
this.hideTooltip();
GMarker.prototype.onInfoWindowOpen.call(this);
};
PdMarker.prototype.setHoverImage=function(a){
this.hoverImage=a;
};
var _72=false;
PdMarker.prototype.onMouseOver=function(){
if(_72){
return;
}
_72=true;
if(this.hoverImage){
this.setImage(this.hoverImage);
}
if(!this.detailOpen){
this.showTooltip();
}
_72=false;
};
PdMarker.prototype.onMouseOut=function(){
if(this.hoverImage){
this.restoreImage();
}
if(!this.detailOpen){
if(this.mouseOutEnabled){
this.hideTooltip();
}
}
};
PdMarker.prototype.setMouseOutEnabled=function(a){
this.mouseOutEnabled=a;
};
PdMarker.prototype.getMouseOutEnabled=function(){
return this.mouseOutEnabled;
};
PdMarker.prototype.setTooltipHiding=function(a){
this.hidingEnabled=a;
};
PdMarker.prototype.getTooltipHiding=function(){
return this.hidingEnabled;
};
PdMarker.prototype.setTitle=function(a){
this.tooltipText="";
PdCompPdMIN(this);
try{
eval(_63+".title = a");
}
catch(e){
this.pendingTitle=a;
}
};
PdMarker.prototype.setCursor=function(a){
PdCompPdMIN(this);
try{
eval(_63+".style.cursor = a");
}
catch(e){
this.pendingCursor=a;
}
};
PdMarker.prototype.setTooltipClass=function(a){
this.pendingClassName=a;
if(this.tooltipObject){
var _78=(this.tooltipObject.style.display!="none");
this.deleteObjects();
if(this.tooltipRaw){
this.setTooltipNoResize(this.tooltipRaw);
}
if(_78){
this.showTooltip();
}
}else{
if(this.tooltipRaw){
this.setTooltipNoResize(this.tooltipRaw);
}
}
};
PdMarker.prototype.resetTooltipClass=function(){
this.setTooltipClass("markerTooltip");
};
PdMarker.prototype.getTooltip=function(){
try{
return this.tooltipRaw;
}
catch(e){
return "";
}
};
PdMarker.prototype.setTooltipNoResize=function(a){
this.setTitle("");
var _7a="markerTooltip";
if(this.pendingClassName){
_7a=this.pendingClassName;
}
this.tooltipRaw=a;
this.tooltipText="<div class='"+_7a+"'>"+a+"</div>";
if(this.tooltipObject){
this.tooltipObject.innerHTML=this.tooltipText;
}
};
PdMarker.prototype.setTooltip=function(a){
this.setTooltipNoResize(a);
this.deleteObjects();
};
PdMarker.prototype.showTooltip=function(){
if(this.tooltipText){
if(!this.tooltipObject){
initTooltip(this);
}
setTTPosition(this);
this.tooltipObject.style.display="block";
}
};
PdMarker.prototype.hideTooltip=function(){
if(this.tooltipObject){
if(this.hidingEnabled){
this.tooltipObject.style.display="none";
}
}
};
PdMarker.prototype.onClick=function(a){
if(this.showDetailOnClick&&this.detailWinHTML){
this.showDetailWin();
}
};
PdMarker.prototype.setShowDetailOnClick=function(a){
this.showDetailOnClick=a;
};
PdMarker.prototype.setDetailWinHTML=function(a){
this.detailWinHTML=a;
};
PdMarker.prototype.setDetailWinClass=function(a){
this.pendingDetailClassName=a;
};
PdMarker.prototype.resetDetailWinClass=function(){
this.setDetailWinClass("markerDetail");
};
PdMarker.prototype.showDetailWin=function(){
if(this.detailOpen){
this.closeDetailWin();
return;
}
this.hideTooltip();
this.setMouseOutEnabled(false);
var _80="markerDetail";
if(this.pendingWinClassName){
_80=this.pendingWinClassName;
}
var _81="<table><tr><td>"+this.detailWinHTML+"</td><td valign='top'><a class='markerDetailClose' href='javascript:PdMarkerClose("+this.internalId+")'><img src='http://www.google.com/mapfiles/close.gif' width='14' height='13'></a></td></tr></table>";
_81="<div class='"+_80+"'>"+_81+"</div>";
this.detailOpen=true;
if(!this.tooltipText){
this.ttWidth=150;
this.ttHeight=30;
setTTPosition(this);
}
initDetailWin(this,this.ttTop,this.ttLeft,_81);
PdMarkerAddToExtList(this);
};
PdMarker.prototype.closeDetailWin=function(){
this.detailOpen=false;
if(this.detailObject){
this.setMouseOutEnabled(true);
this.onMouseOut();
this.map.getPane(G_MAP_FLOAT_PANE).removeChild(this.detailObject);
this.detailObject=null;
}
};
PdMarker.prototype.deleteObjects=function(){
if(this.tooltipObject){
this.map.getPane(G_MAP_FLOAT_PANE).removeChild(this.tooltipObject);
this.tooltipObject=null;
}
if(this.detailObject){
this.map.getPane(G_MAP_FLOAT_PANE).removeChild(this.detailObject);
this.detailObject=null;
}
};
PdMarker.prototype.remove=function(a){
removeMarkerFromMapList(this.map,this);
PdMarkerRemoveFromExtList(this.getId());
GMarker.prototype.remove.call(this);
this.deleteObjects();
};
PdMarker.prototype.setOpacity=function(b){
if(b<0){
b=0;
}
if(b>=100){
b=100;
}
var c=b/100;
this.percentOpacity=b;
var d=document.getElementById(this.objId);
if(d){
if(typeof (d.style.filter)=="string"){
d.style.filter="alpha(opacity:"+b+")";
}
if(typeof (d.style.KHTMLOpacity)=="string"){
d.style.KHTMLOpacity=c;
}
if(typeof (d.style.MozOpacity)=="string"){
d.style.MozOpacity=c;
}
if(typeof (d.style.opacity)=="string"){
d.style.opacity=c;
}
}
};
PdMarker.prototype.setOpacityNew=function(b){
setObjOpacity(this.objId);
this.percentOpacity=b;
};
function setObjOpacity(_87,b){
if(b<0){
b=0;
}
if(b>=100){
b=100;
}
var c=b/100;
var d=document.getElementById(_87);
if(d){
if(typeof (d.style.filter)=="string"){
d.style.filter="alpha(opacity:"+b+")";
}
if(typeof (d.style.KHTMLOpacity)=="string"){
d.style.KHTMLOpacity=c;
}
if(typeof (d.style.MozOpacity)=="string"){
d.style.MozOpacity=c;
}
if(typeof (d.style.opacity)=="string"){
d.style.opacity=c;
}
}
};
function idToElemId(id){
return "ttobj"+id;
};
function initTooltip(_8c){
_8c.objId=idToElemId(_8c.internalId);
_8c.anchorLatLng=_8c.point;
var b=document.createElement("span");
_8c.tooltipObject=b;
b.setAttribute("id",_8c.objId);
b.innerHTML=_8c.tooltipText;
var c=document.body;
var d=document.getElementById("pdmarkerwork");
if(d){
c=d;
}
c.appendChild(b);
b.style.position="absolute";
b.style.bottom="5px";
b.style.left="5px";
b.style.zIndex=1;
if(_8c.percentOpacity){
_8c.setOpacity(_8c.percentOpacity);
}
var _90=document.getElementById(_8c.objId);
_8c.ttWidth=_90.offsetWidth;
_8c.ttHeight=_90.offsetHeight;
c.removeChild(b);
b.style.zIndex=600000;
b.style.bottom="";
b.style.left="";
_8c.map.getPane(G_MAP_FLOAT_PANE).appendChild(b);
};
function initDetailWin(_91,top,_93,_94){
_91.detailId="detail"+_91.internalId;
var b=document.createElement("span");
_91.detailObject=b;
b.setAttribute("id",_91.detailId);
b.innerHTML=_94;
b.style.display="block";
b.style.position="absolute";
b.style.top=top+"px";
b.style.left=_93+"px";
b.style.zIndex=600001;
map=_91.map;
map.getPane(G_MAP_FLOAT_PANE).appendChild(b);
};
function setTTPosition(_96){
var gap=5;
var map=_96.map;
var pt=_96.getPoint();
var _9a=latLongToPixel(map,pt,map.getZoom());
var _9b=_96.getIcon();
_9a.y-=Math.floor(_9b.iconAnchor.y/2);
var _9c=true;
var _9d=map.getBounds();
var _9e=_9d.toSpan();
var _9f=_9e.lng();
var _a0=map.getSize().width;
var _a1=(_96.ttWidth+_9b.iconSize.width+6)/_a0*_9f;
if(pt.lng()+_a1>_9d.getNorthEast().lng()&&_50){
_9c=false;
}
if(_9c){
_9a.y-=Math.floor(_96.ttHeight/2);
_9a.x+=(_9b.iconSize.width-_9b.iconAnchor.x)+gap;
}else{
_9a.y-=Math.floor(_96.ttHeight/2);
_9a.x-=(_9b.iconAnchor.x+_96.ttWidth)+gap;
}
_96.ttLeft=_9a.x;
_96.ttTop=_9a.y;
if(_96.tooltipObject){
_96.tooltipObject.style.left=_9a.x+"px";
_96.tooltipObject.style.top=_9a.y+"px";
}
};
function makeInterface(a){
var b=a||window;
b.PdMarker=PdMarker;
};
makeInterface();
};
PdMarkerNamespace();
function getCurrentMapTypeNumber(_a4){
var _a5=-1;
for(var ix=0;ix<_a4.getMapTypes().length;ix++){
if(_a4.getMapTypes()[ix]==_a4.getCurrentMapType()){
_a5=ix;
}
}
return _a5;
};
function createMarker(_a7,_a8,_a9,_aa){
if(usePDMarker){
var _ab=new PdMarker(_a7,_a9,_aa.label);
}else{
var _ab=new GMarker(_a7,_a9);
}
GEvent.addListener(_ab,"click",function(){
_ab.openInfoWindowHtml(_a8);
});
return _ab;
};
function ZoomMapTo(num){
var _ad=map.getZoom();
newzoom=(_ad>17)?17:((_ad==0)?0:(_ad+1));
map.setCenter(aLocations[num][3],newzoom);
};
function myInfoWindowHtml(num){
map.setCenter(aLocations[num][3]);
aLocations[num][0].openInfoWindowHtml(aLocations[num][2]);
};
function createSideBar(){
var oUL=document.createElement("ul");
for(var i=0;i<aLocations.length;i++){
var _b1=document.createElement("a");
var _b2=document.createElement("li");
_b1.innerHTML=aLocations[i][1];
_b1.href="javascript:myInfoWindowHtml("+i+");";
_b2.appendChild(_b1);
oUL.appendChild(_b2);
}
document.getElementById("LocationList").appendChild(oUL);
};
var LocationListVisible=true;
function ProcessLocationList(){
if(LocationListVisible){
document.getElementById("LocationList").style.display="none";
document.getElementById("SideBarActionLink").innerHTML="+";
}else{
document.getElementById("LocationList").style.display="block";
document.getElementById("SideBarActionLink").innerHTML="-";
}
LocationListVisible=!LocationListVisible;
};
var MBDirectionFormBox=false;
function MBDirectionFormState(_b3,_b4){
var _b5=document.getElementById("MBLocID").value;
document.getElementById("addr1").value=aLocations[_b5][0].getPoint().lat()+", "+aLocations[_b5][0].getPoint().lng()+" ("+aLocations[_b5][1]+")";
if(_b3=="to"){
document.getElementById("MBDirectionAddr").innerHTML="Start address";
document.getElementById("addr1").name="daddr";
document.getElementById("addr2").name="saddr";
}else{
document.getElementById("MBDirectionAddr").innerHTML="End address";
document.getElementById("addr1").name="saddr";
document.getElementById("addr2").name="daddr";
}
if(_b4){
document.getElementById("MBDirectionForm").style.display=(MBDirectionFormBox?"none":"block");
}else{
document.getElementById("MBDirectionForm").style.display="block";
}
MBDirectionFormBox=(!MBDirectionFormBox);
};
function GetDirectionForm(_b6){
return "<div class=\"IWDirections\">[<a onclick=\"MBDirectionFormState('to', true);\" href=\"javascript:void(0)\">+</a>] Directions:&nbsp;<a onclick=\"MBDirectionFormState('to', false);\" href=\"javascript:void(0)\">To here</a>&nbsp;-&nbsp;<a onclick=\"MBDirectionFormState('from', false);\" href=\"javascript:void(0)\">From here</a><div id=\"MBDirectionForm\" style=\"display:none\"><form action=\"http://maps.google.com/maps\" target=\"_blank\" method=\"get\"><input id=\"addr1\" name=\"daddr\" value=\"0,0(NAME)\" type=\"hidden\"><input id=\"MBLocID\" name=\"MBLocID\" value=\""+_b6+"\" type=\"hidden\"><div id=\"MBDirectionAddr\" style=\"padding-top: 0.2em; width: 290px;\">Start address</div><div style=\"width: 290px;\"><input value=\"\" id=\"addr2\" style=\"width: 16em;\" name=\"saddr\" onload=\"this.select()\" type=\"text\"></div><div style=\"width: 290px;\"><input value=\"Get Directions\" type=\"submit\"></div></form></div></div>";
};
GetGoogleMapsAPIVersion=function(){
var v=0;
var _b8=document.getElementsByTagName("SCRIPT");
for(var i=0;i<_b8.length;i++){
var _ba=/\/maps([0-9])?(\.?[0-9]+)(\.api)?\.js/;
var m=_ba.exec(_b8[i].src);
if(m!=null){
if(m[1]==null){
v=parseFloat("1"+m[2]);
}else{
v=parseFloat(m[1]+m[2]);
}
break;
}
}
return v;
};
function MapBuilder(_bc){
var _bd=document.createElement("div");
_bd.id="MapBuilderInfo";
_bd.style.position="absolute";
_bd.style.right="1px";
_bd.style.bottom="25px";
_bd.style.backgroundColor="transparent";
_bd.style.zIndex=25500;
_bc.getContainer().appendChild(_bd);
};
var map=null;
var aLocations=new Array;
var usePDMarker=true;
var iconsm=new GIcon();
iconsm.image="http://labs.google.com/ridefinder/images/mm_20_red.png";
iconsm.shadow="http://labs.google.com/ridefinder/images/mm_20_shadow.png";
iconsm.iconSize=new GSize(12,20);
iconsm.shadowSize=new GSize(20,18);
iconsm.iconAnchor=new GPoint(6,20);
iconsm.infoWindowAnchor=new GPoint(5,1);
var iconbig=new GIcon();
iconbig.image="http://www.google.com/mapfiles/marker.png";
iconbig.shadow="http://www.google.com/mapfiles/shadow50.png";
iconbig.iconSize=new GSize(20,34);
iconbig.shadowSize=new GSize(37,34);
iconbig.iconAnchor=new GPoint(6,34);
iconbig.infoWindowAnchor=new GPoint(5,1);
var iconcustom=new GIcon(iconbig);
iconcustom.shadow="";
MapBuilder.prototype.renderMap=function(){
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(18.46902608452806,-69.9045467376709),14,map.getMapTypes()[1]);
var _be=null;
var _bf=null;
var _c0=null;
var _c1=null;
var _c2={};
_be=new GLatLng(18.481440657636906,-69.92471006851196);
_bf="<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(0)\">Zoom To</a></div>"+"</div>";
_c2={opasity:100,label:"Aladino Apart Hotel"};
_c0="<div class=\"IW\"><div class=\"IWCaption\">Aladino Apart Hotel</div><div class=\"IWContent\"><i>Info: </i>Aladino Aparta Hotel: estamos ubicados en un lugar céntrico, cerca de establecimientos comerciales y de las principales avenidas de la ciudad de Santo Domingo. Ofrecemos tarifas especiales en caso que desee quedarse por varias semanas.&nbsp;&nbsp;<br /><br /><i>Direcci&oacute;n: </i>Heriberto Pieter 34</div>"+_bf+"</div>";
iconbig.image=site+"images/marker.png";
_c1=createMarker(_be,_c0,iconbig,_c2);
map.addOverlay(_c1);
aLocations[0]=new Array(_c1,"Aladino Apart Hotel",_c0,_be);
_be=new GLatLng(18.4761187826669,-69.92167532444);
_bf="<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(1)\">Zoom To</a></div>"+"</div>";
_c2={opasity:100,label:"Turey Apart Hotel"};
_c0="<div class=\"IW\"><div class=\"IWCaption\">Turey Apart Hotel</div><div class=\"IWContent\"><i>Info: </i>Apartamentos tipo estudio todo integrado con una habitación separada,ubicado en el centro de la ciudad de Santo Domingo.<br /><br /><i>Direcci&oacute;n: </i>Av. Gustavo Mejia Ricart # 8</div>"+_bf+"</div>";
iconbig.image=site+"images/marker.png";
_c1=createMarker(_be,_c0,iconbig,_c2);
map.addOverlay(_c1);
aLocations[1]=new Array(_c1,"Turey Apart Hotel",_c0,_be);
_be=new GLatLng(18.473544279090124,-69.8844838142395);
_bf="<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(2)\">Zoom To</a></div>"+"</div>";
_c2={opasity:100,label:"Hotel Conde de Peñalba"};
_c0="<div class=\"IW\"><div class=\"IWCaption\">Hotel Conde de Peñalba</div><div class=\"IWContent\"><i>Info: </i>El Hotel Conde de Peñalba, de arquitectura colonial, esta situado en el mismo centro de la Zona Colonial de la ciudad de Santo Domingo, al lado del esplendoroso Parque Cristóbal Colon y frente a la majestuosa Catedral Primada de América.&nbsp;&nbsp;<br /><br /><i>Direcci&oacute;n: </i>El Conde Esq. Arzobispo Meriño</div>"+_bf+"</div>";
iconbig.image=site+"images/marker.png";
_c1=createMarker(_be,_c0,iconbig,_c2);
map.addOverlay(_c1);
aLocations[2]=new Array(_c1,"Hotel Conde de Peñalba",_c0,_be);
_be=new GLatLng(18.465800183614636,-69.89506244659424);
_bf="<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(3)\">Zoom To</a></div>"+"</div>";
_c2={opasity:100,label:"Hotel El Señorial"};
_c0="<div class=\"IW\"><div class=\"IWCaption\">Hotel El Señorial</div><div class=\"IWContent\"><i>Info: </i>Hotel El Señorial esta situado a pocos metros del mar caribe, a 10 minutos de la Zona Colonial de Santo Domingo y frente al Parque Eugenio Maria de Hostos, uno de los mas antiguos de la ciudad; próximo a centros de salud, clínicas de estética, centros odontológicos, discotecas, locales nocturnos y restaurantes de la ciudad de Santo Domingo .&nbsp;&nbsp;<a href=\"http://www.santodomingohotels.com.do/en/hotels/senorial/\">More Info</a><br /><br /><i>Direcci&oacute;n: </i>Calle Pte. Vicini Burgos No. 58, entre Av. Independencia y Malecón</div>"+_bf+"</div>";
iconbig.image=site+"images/marker.png";
_c1=createMarker(_be,_c0,iconbig,_c2);
map.addOverlay(_c1);
aLocations[3]=new Array(_c1,"Hotel El Señorial",_c0,_be);
_be=new GLatLng(18.46525065501537,-69.89645183086395);
_bf="<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(4)\">Zoom To</a></div>"+"</div>";
_c2={opasity:100,label:"Hotel Maison Gautreaux"};
_c0="<div class=\"IW\"><div class=\"IWCaption\">Hotel Maison Gautreaux</div><div class=\"IWContent\"><i>Info: </i>Estamos ubicados próximo al Malecón el cual es un gran boulevard frente al mar, a pocos metros de la Zona Colonial.   A solo pasos nuestros huéspedes podrán encontrar una gran cantidad de restaurantes, cafeterías, discotecas, casinos, y los hoteles 5 Estrellas y todas sus facilidades.&nbsp;&nbsp;<a href=\"http://www.santodomingohotels.com.do/en/hotels/gautreaux/\">More Info</a><br /><br /><i>Direcci&oacute;n: </i>Calle Félix mariano Lluberes No. 8</div>"+_bf+"</div>";
iconbig.image=site+"images/marker.png";
_c1=createMarker(_be,_c0,iconbig,_c2);
map.addOverlay(_c1);
aLocations[4]=new Array(_c1,"Hotel Maison Gautreaux",_c0,_be);
_be=new GLatLng(18.465494890165658,-69.89533066749573);
_bf="<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(5)\">Zoom To</a></div>"+"</div>";
_c2={opasity:100,label:"Hotel Papo's"};
_c0="<div class=\"IW\"><div class=\"IWCaption\">Hotel Papo's</div><div class=\"IWContent\"><i>Info: </i>Usted se sentirá como en casa en este hotel de tipo familiar. Papo’s esta estratégicamente ubicado cerca de  estupendos restaurantes, muy cerca de grandes hoteles de Santo Domingo. Usted no podrá encontrar otra mejor opción en el mismo centro de la ciudad de Santo Domingo.&nbsp;&nbsp;<br /><br /><i>Direcci&oacute;n: </i>Pret. Vicini Burgos Esq. Crucero Ahrens #2-A</div>"+_bf+"</div>";
iconbig.image=site+"images/marker.png";
_c1=createMarker(_be,_c0,iconbig,_c2);
map.addOverlay(_c1);
aLocations[5]=new Array(_c1,"Hotel Papo's",_c0,_be);
_be=new GLatLng(18.472602998371208,-69.8947137594223);
_bf="<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(6)\">Zoom To</a></div>"+"</div>";
_c2={opasity:100,label:"Plaza Colonial Apart Hotel"};
_c0="<div class=\"IW\"><div class=\"IWCaption\">Plaza Colonial Apart Hotel</div><div class=\"IWContent\"><i>Info: </i>60 apartamentos, para un total de 90 habitaciones, organizadas en un complejo de siete (7) edificios independientes con piscina.&nbsp;&nbsp;<br /><br /><i>Direcci&oacute;n: </i>Luiza Ozema Pellerano # 2 Esq. Julio Verne</div>"+_bf+"</div>";
iconbig.image=site+"images/marker.png";
_c1=createMarker(_be,_c0,iconbig,_c2);
map.addOverlay(_c1);
aLocations[6]=new Array(_c1,"Plaza Colonial Apart Hotel",_c0,_be);
_be=new GLatLng(18.456366365139527,-69.92508172988892);
_bf="<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(7)\">Zoom To</a></div>"+"</div>";
_c2={opasity:100,label:"Hotel Royal Palace"};
_c0="<div class=\"IW\"><div class=\"IWCaption\">Hotel Royal Palace</div><div class=\"IWContent\"><i>Info: </i>Ubicado en el corazón de la ciudad de Santo Domingo con una impresionante vista al mar y la ciudad, fácil acceso para desplazarse a cualquiera de las principales avenidas y centros comerciales. A sólo minutos de los Centros de negocios, Casinos, Discotecas, La Zona Colonial, primera ciudad de América, y el malecón el cual es uno de los lugares más visitados por los turistas.&nbsp;&nbsp;<br /><br /><i>Direcci&oacute;n: </i>Av. Abraham Lincoln #116, frente al Dominico Americano</div>"+_bf+"</div>";
iconbig.image=site+"images/marker.png";
_c1=createMarker(_be,_c0,iconbig,_c2);
map.addOverlay(_c1);
aLocations[7]=new Array(_c1,"Hotel Royal Palace",_c0,_be);
_be=new GLatLng(18.46555,-69.8968888889);
_bf="<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(8)\">Zoom To</a></div>"+"</div>";
_c2={opasity:100,label:"Hotel Duque de Wellington"};
_c0="<div class=\"IW\"><div class=\"IWCaption\">Hotel Duque de Wellington</div><div class=\"IWContent\"><i>Info: </i>En el corazón de la ciudad mas antigua de América, en el área mas exclusiva de Santo Domingo, cerca del Malecón, de “El Conde Peatonal” y del principales Hoteles Cinco Estrellas (todos con Casino y discoteca).&nbsp;&nbsp;<br /><br /><i>Direcci&oacute;n: </i>Av. Independencia No. 304 </div>"+_bf+"</div>";
iconbig.image=site+"images/marker.png";
_c1=createMarker(_be,_c0,iconbig,_c2);
map.addOverlay(_c1);
aLocations[8]=new Array(_c1,"Hotel Duque de Wellington",_c0,_be);
_be=new GLatLng(18.459211,-69.929271);
_bf="<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(9)\">Zoom To</a></div>"+"</div>";
_c2={opasity:100,label:"Atalaya Apart Hotel"};
_c0="<div class=\"IW\"><div class=\"IWCaption\">Atalaya Apart Hotel</div><div class=\"IWContent\"><i>Info: </i>&nbsp;&nbsp;<br /><br /><i>Direcci&oacute;n: </i>C/ ELILA MENA # 1,ESQ FERNANDO VALERIO</div>"+_bf+"</div>";
iconbig.image=site+"images/marker.png";
_c1=createMarker(_be,_c0,iconbig,_c2);
map.addOverlay(_c1);
aLocations[9]=new Array(_c1,"Atalaya Apart Hotel",_c0,_be);
createSideBar();
};

