/*
 * Compressed by JSA(www.xidea.org)
 */
var _maplib_icons=[],_maplib_maps=[];createBasicIcon();function Mmap(B,A,_,C,$){if(A!=null){this.lat=-53.71621563247202;this.lng=35.2880859375;this.level=7;if(_!=null)this.lat=_;if(C!=null)this.lng=C;if($!=null)this.level=$;this.container=A;this.mid=B;this.hash="07cc694b9b3fc636710fa08b6922c42b";this.overlays=[];this.loaded=0;_maplib_maps.push(this);this.index=_maplib_maps.length}}function _map_init(_,A,C,D,$){if(_>0){var B=_maplib_maps[_-1];B.iz=A;B.az=C;B.path=D;B.dir=$;B.drawMap()}}Mmap.prototype.initMap=function(){if(this.loaded<1){var $="http://www.maplib.net/api/api.php?a=mapInfo&mapid="+this.mid+"&n="+this.index+"&hash="+this.hash;GScript($)}};Mmap.prototype.drawMap=function(){var F=this;if(this.loaded<1){this.map=new GMap2(this.container,{mapTypes:[]});GEvent.addListener(this.map,"addoverlay",function($){F.overlays.push($)});GEvent.addListener(this.map,"removeoverlay",function($){for(var _=0;_<this.overlays.length;_++)if(F.overlays[_]===$)return F.overlays.splice(_,1)});GEvent.addListener(this.map,"clearoverlays",function(){F.overlays=[]});var J=new GCopyright(1,new GLatLngBounds(new GLatLng(-90,-180),new GLatLng(90,180)),0,"&copy;2008 MapLib.net"),D=new GCopyrightCollection("Map Data:");D.addCopyright(J);var B=this.path,$=this.dir,I=this.iz,A=this.az,G=[new GTileLayer(D,7,17-I)];G[0].getTileUrl=function(_,A){return"http://www.maplib.net/mapdata/"+$+B+"/"+_.x+"_"+_.y+"_"+(17-A)+".gif"};var C=new GMapType(G,G_NORMAL_MAP.getProjection(),"MapLib");this.map.addMapType(C);this.map.setCenter(new GLatLng(this.lat,this.lng),this.level,C);this.loaded=1;var H=document.getElementsByTagName("body").item(0),_=document.createElement("div");_.setAttribute("id","powered_by_maplib");_.innerHTML="<a href='http://www.maplib.net/' target='_blank' title='MapLib.net - Enabling New Ways of Viewing Pictures'><img src='http://www.maplib.net/images/poweredby.png' border='0'></a>";H.appendChild(_);var E=new GControlPosition(G_ANCHOR_BOTTOM_LEFT,new GSize(64,0));E.apply(document.getElementById("powered_by_maplib"));this.map.getContainer().appendChild(document.getElementById("powered_by_maplib"));this.map.addControl(new GLargeMapControl())}};Mmap.prototype.getMap=function(){return this.map};Mmap.prototype.showMarkers=function(){var $="http://www.maplib.net/api/api.php?a=show_markers&mapid="+this.mid+"&n="+this.index+"&hash="+this.hash;GScript($)};function _map_createMarker($,I,_,B,J,A,G,H,K,C){if($>0){var E=_maplib_maps[$-1];if(!_maplib_icons[A])createIcon(A,G,H,K);var F=new GLatLng(_,I),D=new GMarker(F,{icon:_maplib_icons[A],title:B});D.id=C;D.group=A;E.map.addOverlay(D);GEvent.addListener(D,"click",function(){html2=generateInfo(B,J,C);D.openInfoWindowHtml(html2)})}}Mmap.prototype.addLegendControl=function($){if($!=null){var _="http://www.maplib.net/api/api.php?a=listLegend&mid="+this.mid+"&n="+$.id+"&index="+this.index+"&hash="+this.hash;GScript(_)}};Mmap.prototype.listMarkers=function($){if($!=null){var _="http://www.maplib.net/api/api.php?a=listMarkers&mid="+this.mid+"&n="+$.id+"&index="+this.index+"&hash="+this.hash;GScript(_)}};Mmap.prototype.addListener=function(_,$){GEvent.addListener(this.map,_,$)};Mmap.prototype.clearListeners=function($){GEvent.addListener(this.map,$)};function include_dom(A){var _=document.getElementsByTagName("head").item(0),$=document.createElement("script");$.setAttribute("language","javascript");$.setAttribute("type","text/javascript");$.setAttribute("src",A);_.appendChild($);return false}function _map_html(_,$){document.getElementById(_).innerHTML=$}function _map_recenter($,E,_,A,C,F,D){if($>0){var B=_maplib_maps[$-1];B.map.closeInfoWindow();B.map.panTo(new GLatLng(E,_));B.map.setZoom(A);for(var G=0;G<B.overlays.length;G++)if(B.overlays[G].id==D){html2=generateInfo(C,F,D);B.overlays[G].openInfoWindowHtml(html2)}}}function _filter_markers(_,D,$){if($>0){var A=_maplib_maps[$-1];for(var F=0;F<A.overlays.length;F++)if(A.overlays[F].group==_)if(D>0)A.overlays[F].show();else A.overlays[F].hide();var C="maplib_markers_"+$;if(document.getElementById(C).rows.length>0){var B=document.getElementById(C).getElementsByTagName("tr");for(var E=0;E<B.length;E++)if(B[E].id.indexOf("-"+_+"_"+$)>0)if(D>0)B[E].style.display="block";else B[E].style.display="none"}}}function rand(){return"&rand="+(Math.random()*Math.random())}function loading(){}function done(){}function failure(){alert("oops...errors occurred")}function generateInfo(_,$,A){$=$.replace(/\[b\](.*?)\[\/b\]/i,"<strong>$1</strong>");$=$.replace(/\[i\](.*?)\[\/i\]/i,"<em>$1</em>");$=$.replace(/\[u\](.*?)\[\/u\]/i,"<u>$1</u>");$=$.replace(/\[img\](.*?)\[\/img\]/i,"<img src='$1' />");$=$.replace(/\[url\](.*?)\[\/url\]/i,"<a href='$1' target='_blank'>$1</a>");$=$.replace(/\[url\=(.*?)\](.*?)\[\/url\]/i,"<a href='$1' target='_blank'>$2</a>");html2="<div style='width: 200px;'><b>"+_+"</b>&nbsp;&nbsp;<br><hr noshade color='#3399FF' size='1' width='180' align='left'>"+$;html2=html2+"<br><a href='http://www.maplib.net/marker.php?aid="+A+"' target='_blank'>more...</a></div>";return html2}function createBasicIcon(){_maplib_icons.basic=new GIcon();_maplib_icons.basic.image="http://www.maplib.net/markers/basic.png";_maplib_icons.basic.iconSize=new GSize(20,34);_maplib_icons.basic.iconAnchor=new GPoint(6,20);_maplib_icons.basic.infoWindowAnchor=new GPoint(5,1);_maplib_icons.basic.imageMap=[5,0,1,4,1,8,3,12,5,20,7,20,8,12,11,8,11,4,7,0]}function createIcon($,B,A,_){B=B.replace(/\.\//i,"http://www.maplib.net/");_maplib_icons[$]=new GIcon(_maplib_icons.basic,B);if(A>0)_maplib_icons[$].iconSize=new GSize(A,_)}function GScript($){document.write("<"+"script src=\""+$+"\""+" type=\"text/javascript\"><"+"/script>")}
