var bobMapsIsLive=true;if(!window.dw){window.dw={}}if(!window.bobMapsIsLive&&window.log4javascript){var log=log4javascript.getLogger("main");
var browserConsoleAppender=new log4javascript.BrowserConsoleAppender();log.addAppender(browserConsoleAppender)
}Function.prototype.createDelegate=function(C,B,A){var D=this;return function(){var F=B||arguments;
if(A===true){F=Array.prototype.slice.call(arguments,0);F=F.concat(B)}else{if(typeof A=="number"){F=Array.prototype.slice.call(arguments,0);
var E=[A,0].concat(B);Array.prototype.splice.apply(F,E)}}return D.apply(C||window,F)
}};Function.prototype.defer=function(C,E,B,A){var D=this.createDelegate(E,B,A);if(C){return setTimeout(D,C)
}D();return 0};dw.bobs={ajaxServer:"/bob.src/bobsAjaxServer.php",map:null,countryZoomLevel:6,searchCountryZoomLevel:6,blogLocationZoomLevel:12,searchFieldDefaultText:"Country, Location, Blog, Author, Tag"};
dw.bobs.getDynamicIcon=function(C){var B;var F;var A=C.iconSize;var G=C.numEntries;
var E="blogs";if(C.isCountry==true){B=["#EE48E0","#B330A8","#003282"];F=0.0045;E="countries"
}else{B=["#b330a8","#931688","#003282"];F=0.04}if(!dw.bobs.icons){dw.bobs.icons={countries:{fixed:[],dynamic:[]},blogs:{fixed:[],dynamic:[]}}
}if(A){if(!dw.bobs.icons[E].fixed[A]){dw.bobs.icons[E].fixed[A]=MapIconMaker.createMarkerIcon({width:A,height:A,primaryColor:B[0],cornerColor:B[1],strokeColor:B[2]})
}return dw.bobs.icons[E].fixed[A]}else{if(!dw.bobs.icons[E].dynamic[G]){var D;if(G<=1){D=16
}else{if(G<=5){D=20}else{if(G<=10){D=24}else{D=24+Math.ceil(7*(G*F)/2)*2}}}dw.bobs.icons[E].dynamic[G]=MapIconMaker.createMarkerIcon({width:D,height:D,primaryColor:B[0],cornerColor:B[1],strokeColor:B[2]})
}return dw.bobs.icons[E].dynamic[G]}};dw.bobs.blogDetails={loadBlogDetailsMap:function(C){var E=C?C:1;
if(window.detailsLong&&google.maps.BrowserIsCompatible()){GxMarkerInit();var B=dw.bobs.getDynamicIcon({iconSize:32});
var D=new google.maps.Map2(document.getElementById("map_detail"));if(C){D.addControl(new google.maps.SmallZoomControl())
}else{D.addControl(new google.maps.SmallMapControl())}D.setCenter(new google.maps.LatLng(detailsLat,detailsLong),E);
google.maps.Event.addListener(D,"zoomend",function(G,F){D.panTo(new google.maps.LatLng(detailsLat,detailsLong))
});if(detailsLoc==""){detailsLoc="Unnamed location"}if(detailsCountryCode!=""){detailsLoc+=" ("+detailsCountryName+")"
}var A=new GxMarker(new google.maps.LatLng(detailsLat,detailsLong),B,"-",{offset:new GSize(-60,10)});
A.tooltip=detailsLoc;D.addOverlay(A)}}};var MapIconMaker={};MapIconMaker.createMarkerIcon=function(J){var I=J.width||32;
var H=J.height||32;var G=J.primaryColor||"#ff0000";var F=J.strokeColor||"#000000";
var E=J.cornerColor||"#ffffff";var D="http://chart.apis.google.com/chart?cht=mm";
var C=D+"&chs="+I+"x"+H+"&chco="+E.replace("#","")+","+G.replace("#","")+","+F.replace("#","")+"&ext=.png";
var A=new GIcon(G_DEFAULT_ICON);A.image=C;A.iconSize=new GSize(I,H);A.shadowSize=new GSize(Math.floor(I*1.6),H);
A.iconAnchor=new GPoint(I/2,H);A.infoWindowAnchor=new GPoint(I/2,Math.floor(H/12));
A.printImage=C+"&chof=gif";A.mozPrintImage=C+"&chf=bg,s,ECECD8&chof=gif";var C=D+"&chs="+I+"x"+H+"&chco="+E.replace("#","")+","+G.replace("#","")+","+F.replace("#","");
A.transparent=C+"&chf=a,s,ffffff11&ext=.png";A.imageMap=[I/2,H,(7/16)*I,(5/8)*H,(5/16)*I,(7/16)*H,(7/32)*I,(5/16)*H,(5/16)*I,(1/8)*H,(1/2)*I,0,(11/16)*I,(1/8)*H,(25/32)*I,(5/16)*H,(11/16)*I,(7/16)*H,(9/16)*I,(5/8)*H];
for(var B=0;B<A.imageMap.length;B++){A.imageMap[B]=parseInt(A.imageMap[B])}return A
};var __singleLabel;var __singleLabelRefCount=0;function GxLabel(B,A){if(typeof A!="object"){throw"Invalid GxLabel configuration"
}this.content=B;if(A.offset&&typeof A.offset.width!="undefined"){this.offset=A.offset
}else{this.offset=new GSize(0,0)}this.className=A.className||"markerTooltip";if(A.marker&&typeof A.marker.getPoint!="undefined"){this.marker=A.marker;
this.anchor=A.marker.getPoint();if(A.isStatic){this.isStatic=true}else{__singleLabelRefCount++;
GEvent.addListener(this.marker,"mouseover",this.createSingletonClosure(this.show,this.anchor,this.offset,this.content));
GEvent.addListener(this.marker,"mouseout",this.createSingletonClosure(this.hide,this.anchor,this.offset,this.content));
if(!__singleLabel){__singleLabel=this}return __singleLabel}}else{if(A.anchor&&typeof A.anchor.lat!="undefined"){if(A.isStatic){this.isStatic=true
}if(A.moveHandle){this.moveHandle=true}if(A.deleteHandle){this.deleteHandle=true}this.anchor=A.anchor
}}if(A.pane){this.pane=A.pane}if(!this.anchor){throw"Invalid label configuration: no anchor point"
}}function stopEvent(A){if(A&&A.stopPropagation){A.stopPropagation()}if(window.event&&window.event.cancelBubble){window.event.cancelBubble=true
}if(A&&A.preventDefault){A.preventDefault()}if(window.event){window.event.returnValue=false
}}function GxMarker(E,D,H,A){if(H){var I=this.initialize;var G=this;var C=(typeof A=="object")?(A.offset||new GPoint(22,0)):new GPoint(22,0);
var F=(typeof A=="object")?(A.isStatic||false):false;var B;this.initialize=function(J){B=new GxLabel(H,{marker:G,offset:C,isStatic:F});
J.addOverlay(B);I.apply(G,[J])}}GMarker.apply(this,[E,D])}function GxMarkerInit(){GxLabel.prototype=new GOverlay();
GxLabel.prototype.initialize=function(map){var t=this;if(__singleLabel&&!this.isStatic){t=__singleLabel
}t.map=map;t.pane=map.getPane(t.pane||G_MAP_MARKER_PANE)||map.getPane(G_MAP_MARKER_SHADOW_PANE);
if(!t.container){t.container=document.createElement("div");t.container.className=t.className;
t.container.style.position="absolute";if(t.moveHandle&&!t.moveHandleNode){t.moveHandlePanel=t.pane;
t.contentNode=document.createElement("div");t.moveHandleNode=document.createElement("div");
with(t.moveHandleNode.style){background="#ccc";width="8px";height="100%";cssFloat="left";
fontWeight="bold";textAlign="center";borderRight="1px solid #555"}t.contentNode.style.marginLeft="10px";
t.moveHandleNode.innerHTML=":";t.container.appendChild(t.moveHandleNode);t.container.appendChild(t.contentNode);
t.insertPoint=t.contentNode;GEvent.bindDom(t.moveHandleNode,"mousedown",this,this.mouseDown)
}else{t.insertPoint=t.container}t.setContent(t.content);t.pane.appendChild(t.container);
var b=t.container;GEvent.addDomListener(b,"click",function(e){stopEvent(e);GEvent.trigger(t,"click",e)
});GEvent.addDomListener(b,"mouseup",function(e){stopEvent(e);t.mouseUp(e);GEvent.trigger(t,"mouseup",e)
});GEvent.addDomListener(b,"mousedown",function(e){stopEvent(e);GEvent.trigger(t,"mousedown",e)
})}};GxLabel.prototype.setContent=function(content){if(dw.bobs.blogmap&&dw.bobs.blogmap.mapIsFilteredByTag&&dw.bobs.blogmap.mapIsFilteredByTag==true&&this.marker.tagTooltip){content=this.marker.tagTooltip
}else{if(this.marker.tooltip){content=this.marker.tooltip}}var t=this;if(__singleLabel&&!this.isStatic){t=__singleLabel
}if(content){var point=t.insertPoint||t.container;point.innerHTML="";if(typeof content=="object"){point.appendChild(content);
t.content=point.innerHTML}else{t.content=content;point.innerHTML=t.content}if(t.deleteHandle){var img=document.createElement("img");
img.src="/static/images/close.png";img.alt="";img.style.padding="0px 2px";GEvent.bindDom(img,"click",this,this.remove);
point.appendChild(img)}}};GxLabel.prototype.setAnchor=function(anchor){try{if(anchor.lat()&&anchor.lng()){this.anchor=anchor;
this.redraw()}}catch(E){}};GxLabel.prototype.remove=function(){if(this.isStatic||--__singleLabelRefCount<=0){this.container.parentNode.removeChild(this.container);
GEvent.trigger(this,"remove")}};GxLabel.prototype.copy=function(){};GxLabel.prototype.redraw=function(force){if(this.isStatic){this.show()
}else{this.hide()}};GxLabel.prototype.createSingletonClosure=function(fn,p,o,c){var _t=this;
var obj=fn;var _p=p;var _o=o;var _c=c;p=null;fn=null;o=null;c=null;return function(){_t.setContent(_c);
obj.apply(_t,[_p,_o])}};GxLabel.prototype.show=function(point,offset){try{var t=this;
if(__singleLabel&&!this.isStatic){t=__singleLabel}var p=point||t.anchor;var o=offset||t.offset||new GSize(0,0);
if(p&&p.lat){t.anchor=p;t.offset=o;var pix=t.map.fromLatLngToDivPixel(p);t.container.style.left=(pix.x+o.width)+"px";
t.container.style.top=(pix.y+o.height)+"px";t.container.style.display=""}}catch(e){}};
GxLabel.prototype.hide=function(point,offset){var t=this;if(__singleLabel&&!this.isStatic){t=__singleLabel
}t.container.style.display="none"};GxLabel.prototype.mouseUp=function(e){if(this.mouseUpListener){GEvent.removeListener(this.mouseUpListener)
}if(this.mouseMoveListener){GEvent.removeListener(this.mouseMoveListener)}if(this.startDrag){}GEvent.trigger(this,"moveend",this.anchor);
this.startDrag=false};GxLabel.prototype.mouseMove=function(e){if(!this.startDrag){if(this.mouseUpListener){GEvent.removeListener(this.mouseUpListener)
}if(this.mouseMoveListener){GEvent.removeListener(this.mouseMoveListener)}return false
}var point=new GPoint(e.clientX-this.topLeftPoint.x,e.clientY-this.topLeftPoint.y);
var anchor=this.map.fromDivPixelToLatLng(point);this.anchor=anchor;this.redraw()};
GxLabel.prototype.mouseDown=function(e){stopEvent(e);this.startDrag=true;this.topLeftPoint=new GPoint(dojo.html.getAbsoluteX(document.getElementById("map")),dojo.html.getAbsoluteY(document.getElementById("map")));
if(!this.mouseUpListener){this.mouseUpListener=GEvent.bindDom(document.getElementById("map"),"mouseup",this,this.mouseUp)
}if(!this.mouseMoveListener){this.mouseUpListener=GEvent.bindDom(document.getElementById("map"),"mousemove",this,this.mouseMove)
}};GxMarker.prototype=new GMarker(new GLatLng(1,1))}function debug(B){var A=document.getElementById("debug")?document.getElementById("debug"):document.body;
A.appendChild(document.createTextNode("["+new Date()+"] "));A.appendChild(document.createTextNode(B));
A.appendChild(document.createElement("br"))};