function gmLbAddClickEvent(a,b){var c=a.onclick;if(typeof a.onclick!="function"){a.onclick=b}else{a.onclick=function(){c();b()}}}function gmLbAddLoadEvent(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){b();a()}}}function gmSetCenter(a){alert(a);document["gmCenter"]=a}function showAddress(a){var b=new GClientGeocoder;b.getLatLng(a,function(b){if(!b){alert(a+" not found")}else{gmSetCenter(b)}})}function parseGmapLink(a){var b=a.split("?");if(b.length<2)return new Array;var c=b[1].split("&");var d=new Array;for(i=0;i<c.length;i++){keyValue=c[i].split("=");if(keyValue[0]!="ll"){d[keyValue[0]]=keyValue[1]}else{var e=keyValue[1].split(",");d["lat"]=e[0];d["long"]=e[1]}}return d}function gm_addXMLMarker(a){if(gm_marker!=null){gmMapObject.removeOverlay(gm_marker)}gm_marker=a;gmMapObject.addOverlay(gm_marker)}function gm_addMarker(a){if(gm_marker!=null){gmMapObject.removeOverlay(gm_marker)}gm_marker=new GMarker(a);gmMapObject.addOverlay(gm_marker)}function gm_setMap(a){if(GBrowserIsCompatible()){if(!gmMapObject){gmMapObject=new GMap2(gmMap);gmMapObject.addControl(new GLargeMapControl);gmMapObject.addControl(new GMapTypeControl)}gm_mapType=G_NORMAL_MAP;gm_zoom=10;if(a["t"]=="k"){gm_mapType=G_SATELLITE_MAP;gm_zoom=parseInt(a["z"])}else if(a["t"]==""||a["t"]==null){gm_mapType=G_NORMAL_MAP;gm_zoom=parseInt(a["z"])}else if(a["t"]=="h"){gm_mapType=G_HYBRID_MAP;gm_zoom=parseInt(a["z"])}if(a["lat"]==null&&a["long"]==null&&a["q"]!=null&&a["q"].indexOf("http://")==-1){var b=new GClientGeocoder;b.getLatLng(unescape(a["q"].replace(/\+/g," ")),function(a){gmMapObject.setCenter(a,gm_zoom,gm_mapType);gm_addMarker(a)})}else if(a["q"]!=null&&a["q"].indexOf("http://")!=-1){}else{var c=new GLatLng(a["lat"],a["long"]);gmMapObject.setCenter(c,gm_zoom,gm_mapType);gm_addMarker(c)}}}function getScrollHeight(){var a=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;return a?a:0}function getScrollWidth(){var a=window.pageXOffset||document.body.scrollLeft||document.documentElement.scrollLeft;return a?a:0}function getFrameHeight(){if(self.innerWidth){return self.innerHeight}else if(document.documentElement&&document.documentElement.clientWidth){return document.documentElement.clientHeight}else if(document.body){return document.body.clientHeight}else return}function getFrameWidth(){if(self.innerWidth){return self.innerWidth}else if(document.documentElement&&document.documentElement.clientWidth){return document.documentElement.clientWidth}else if(document.body){return document.body.clientWidth}else return}function gmLbOnClose(){}function gmLbOnShow(){}function gm_ShowMap(a){if(document.all){gmOverlay.style.top=getScrollHeight()+"px";gmOverlay.style.left=getScrollWidth()+"px"}gmOverlay.style.width=getFrameWidth()+"px";gmOverlay.style.height=getFrameHeight()+"px";if(a.title){gmLabel.innerHTML=a.title}else{gmLabel.innerHTML="Google Map"}gmContainer.style.visibility="hidden";document.getElementById("gmlb_overlay").style.display="";gmContainer.style.left=(getFrameWidth()-gmContainer.offsetWidth)/2+"px";gmContainer.style.top=(getFrameHeight()-gmContainer.offsetHeight)/2+"px";gmContainer.style.visibility="";var b=parseGmapLink(a.href);gm_setMap(b);gmLbOnShow()}function gmLb_init(){var a=document.getElementsByTagName("a");for(i=0;i<a.length;i++){if(a[i].getAttribute("rel")=="gmap"){gmLbAddClickEvent(a[i],function(){gm_ShowMap(this);return false})}}gmOverlay=document.createElement("div");gmOverlay.setAttribute("id","gmlb_overlay");gmOverlay.style.display="none";gmOverlay.style.position=document.all?"absolute":"fixed";gmOverlay.style.top="0px";gmOverlay.style.left="0px";gmOverlay.style.width=gmlb_width+"px";gmOverlay.style.height=gmlb_height+"px";gmOverlay.style.width=getFrameWidth();gmOverlay.style.height=getFrameHeight();gmContainer=document.createElement("div");gmContainer.setAttribute("id","gmlb_container");gmContainer.style.width=gmlb_width+"px";gmContainer.style.position="absolute";gmContainer.style.display="inline";gmLabel=document.createElement("div");gmLabel.setAttribute("id","gmlb_label");gmLabel.setAttribute("class","gmlb_label");gmLabel.style.display="block";gmLabel.innerHTML="test";gmClose=document.createElement("div");gmClose.setAttribute("id","gmlb_close");gmClose.setAttribute("class","gmlb_close");gmClose.style.display="block";gmClose.onclick=function(){gmOverlay.style.display="none";gmLbOnClose()};gmCloseTop=document.createElement("div");gmCloseTop.setAttribute("id","gmlb_closetop");gmCloseTop.setAttribute("class","gmlb_closetop");gmCloseTop.style.display="block";gmCloseTop.onclick=function(){gmOverlay.style.display="none";gmLbOnClose()};gmMap=document.createElement("div");gmMap.setAttribute("id","gmlb_map");gmMap.style.width=gmlb_width+"px";gmMap.style.height=gmlb_height+"px";gmMap.style.display="block";gmMap.style.float="left";gmMap.onclick=function(){return false};gmContainer.appendChild(gmMap);gmContainer.appendChild(gmLabel);gmContainer.appendChild(gmClose);gmContainer.appendChild(gmCloseTop);gmOverlay.appendChild(gmContainer);document.documentElement.ownerDocument.body.appendChild(gmOverlay)}var gmlb_width=640;var gmlb_height=480;var gmOverlay;var gmContainer;var gmMap;var gmLabel;var gmMapObject=null;var gm_zoom;var gm_mapType;var gm_close;var gm_marker=null;gmLbAddLoadEvent(gmLb_init)
