MSG.geo_search_error="Geocoder error";MSG.geo_search_nan="Coordinates you've entered are incorrect.\nPlease enter: <b>latitude, longitude</b>";MSG.geo_search_warn="Invalid or incomplete address";MSG.geo_search_nok="No addresses match your search\nCheck the address or try another one around";MSG.geo_search_quota="Geocoder is currently unavailable.\nPlease try again later.";MSG.geo_search_ok="Ok, let's go!";geomap=Class.create();geomap.prototype.initialize=function(a){if(a.preview){this.preview=true}if(a.pid){this.pid=a.pid}if(a.user_id){this.user_id=a.user_id}if(a.fullscreen){this.fullscreen=true}if(a.nomodal){this.nomodal=true}this.window={};this.init()};geomap.prototype.init=function(){if(this.batch){return}if(!GBrowserIsCompatible()){$("map").style.display="none";$("nomap").style.display="block";return}if(this.fullscreen){this.window_onresize_observer=this.window_onresize.bindAsEventListener(this);Event.observe(window,"resize",this.window_onresize_observer);this.window_onresize(null,true)}Data.poi=[];this.batch={locs:[],pois:[],poi2locs:[],loc2poi:[],markers:[],page:0,pages:0,search:{lat1:-90,lng1:-180,lat2:90,lng2:180},bounds:{lat1:0,lng1:0,lat2:0,lng2:0,lat:0,lng:0},corners:{x1:0,y1:0,x2:0,y2:0,x:0,y:0},zoom:0};this.custom={};var a=new GMap2($("map"));this.map=a;if(this.preview){this.set_center(0,0,1)}else{this.set_center(0,0,2)}if(this.preview){a.addControl(new GSmallZoomControl(),new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(10,10)))}else{a.enableDoubleClickZoom();a.enableScrollWheelZoom();a.enableContinuousZoom();a.addControl(new GMapTypeControl());a.addControl(new GLargeMapControl(),new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(10,30)));a.addControl(new GScaleControl())}this.create_all_icons();this.refresh_observer=this.refresh.bindAsEventListener(this);this.unload_observer=this.unload.bindAsEventListener(this);GEvent.addListener(a,"moveend",this.refresh_observer);GEvent.addListener(a,"zoomend",this.refresh_observer);GEvent.addListener(a,"infowindowopen",function(){this.do_not_refresh=true}.bind(this));
GEvent.addListener(a,"infowindowclose",function(){this.do_not_refresh=false}.bind(this));Event.observe(window,"unload",this.unload_observer);this.geo_init();if(this.user_id){this.load_user()}else{this.load()}};geomap.prototype.unload=function(){var a=this.map;a.clearOverlays();GEvent.clearInstanceListeners(a);if(this.window_onresize_observer){Event.stopObserving(window,"resize",this.window_onresize_observer)}GUnload()};geomap.prototype.window_onresize=function(f,c){if(window.ignore_window_resize){return}if(this.resize_timeout){clearTimeout(this.resize_timeout)}if(!c){this.resize_timeout=setTimeout(function(){this.window_onresize(null,true)}.bind(this),500);return}var d=_find_page_size();this.window.sw=d[2];this.window.sh=d[3];var a=d[2],b=d[3];var h=(window.glob_user_id)?140:120;var g=$("map");g.style.width=a+"px";g.style.height=(b-h)+"px";this.window.mw=a;this.window.mh=(b-h);if(this.map){this.update_bounds()}};geomap.prototype.load_user=function(c){if(!c){this.batch.locs=[];Data.loc=[];c=0}var a=this.batch.search;var b={user_id:this.user_id,lat1:a.lat1,lng1:a.lng1,lat2:a.lat2,lng2:a.lng2,off:c,stp:1000,callback:"load_user"};if(this.preview){b.ord=-1;b.stp=100}modal.say(_MSG.loading+"...",{icon:"wait"});IOL.API.request("loc.search",b,this)};geomap.prototype.load_user_onApi=function(h,c,b,g){if(h&&c.locs){var f=c.r.off;var a=c.r.max;for(var d=0;d<c.locs.length;d++){var e=c.locs[d];this.add_loc(e)}if(a>f+g.stp&&!this.preview){return this.load_user(f+g.stp)}else{modal.shutup();if(this.pid){var e=Data.loc[pid];if(e){this.set_center(e.lat,e.lng,8)}}this.display()}}else{modal.say(_MSG.failed,{icon:"nok"},1)}};geomap.prototype.load=function(c){if(!c){this.batch.locs=[];Data.loc=[];c=0}var a=this.batch.search;var b={user_id:0,lat1:a.lat1,lng1:a.lng1,lat2:a.lat2,lng2:a.lng2,off:c,stp:1000,callback:"load"};if(this.preview){b.ord=-1;b.stp=100}if(!this.nomodal){modal.say(_MSG.loading+"...",{icon:"wait"})}IOL.API.request("loc.search",b,this)};geomap.prototype.load_onApi=function(h,c,b,g){if(h&&c.locs){var f=c.r.off;var a=c.r.max;
for(var d=0;d<c.locs.length;d++){var e=c.locs[d];this.add_loc(e)}if(a>f+g.stp&&f<5*g.stp&&!this.preview){return this.load(f+g.stp)}else{if(!this.nomodal){modal.shutup()}if(this.pid){var e=Data.loc[pid];if(e){this.set_center(e.lat,e.lng,8)}}else{if(this.preview){this.magic_zoom()}}this.display()}}else{modal.say(_MSG.failed,{icon:"nok"},1)}};geomap.prototype.create_marker=function(b){if(this.batch.markers[b]){this.delete_marker(b)}var e=Data.poi[b];var c=this.batch.icon[e.letter];var d=new GMarker(e.point,{icon:c});d._pid=b;var a=this;if(this.preview){if(this.user_id){GEvent.addListener(d,"click",function(){document.location="/tag/"+a.user_id+"/map/"+this._pid})}else{GEvent.addListener(d,"click",function(){document.location="/explore/map/"+this._pid})}}else{GEvent.addListener(d,"click",function(){a.marker_infos(this._pid)})}this.map.addOverlay(d);this.batch.markers[b]=d};geomap.prototype.delete_marker=function(a){var b=this.batch.markers[a];GEvent.clearInstanceListeners(b);this.map.removeOverlay(b);this.batch.markers[a]=undefined};geomap.prototype.marker_infos=function(a){IOL.debug("opening marker pid="+a);var b=this.batch.markers[a];if(b){var c=this.get_infowindow(a);b.openInfoWindow(c,{maxWidth:510,onCloseFn:function(){}});this.geobox_load();c.style.display="block"}};geomap.prototype.get_infowindow=function(a,b){this.geobox_init(a,b);return this.geobox};geomap.prototype.del_infowin=function(a){console.log(a)};geomap.prototype.refresh=function(){if(this.batch.refresh_timeout){clearTimeout(this.batch.refresh_timeout)}if(this.batch.do_not_refresh){this.batch.refresh_timeout=setTimeout(function(){this.refresh()}.bind(this),500);return}this.update_bounds();if(this.batch.locs.length){this.display()}};geomap.prototype.display=function(){if(this.do_not_refresh){return}this.do_not_refresh=true;var u=this.map.getBounds();var c=new GLatLngBounds(u.getSouthWest(),u.getNorthEast());var r=this.batch.locs;var g=[];var d=[];if(!r.length){return}for(var s=0;s<r.length;s++){var h=Data.loc[r[s]];if(c.contains(h.point)&&h.doc_count>0){h.pixel=this.map.fromLatLngToDivPixel(h.point);
d.push(r[s])}if(h.doc_count<=0){g.push(r[s])}}for(var s=0;s<g.length;s++){this.del_loc(g[s])}var f=[];var o={};var p={};var e=[];var t=60-_pi(this.batch.zoom)*2;if(t<15){t=15}for(var s=0;s<d.length;s++){if(o[d[s]]){continue}p[d[s]]=[];p[d[s]].push(d[s]);f.push(d[s]);e[d[s]]=d[s];var m=Data.loc[d[s]].pixel;for(var q=s+1;q<d.length;q++){if(p[d[q]]){continue}var k=Data.loc[d[q]].pixel;if(Math.abs(m.x-k.x)<t&&Math.abs(m.y-k.y)<t){p[d[s]].push(d[q]);e[d[q]]=d[s];o[d[q]]=true}}}this.batch.poi2locs=p;this.batch.loc2poi=e;for(var s=0;s<this.batch.pois.length;s++){var l=this.batch.pois[s];this.delete_marker(l)}this.batch.pois=[];for(var s=0;s<f.length;s++){var l=f[s];var h=Data.loc[l];var r=p[l];var a=0;for(var q=0;q<r.length;q++){a+=Data.loc[r[q]].doc_count}var n=this.get_letter(a);Data.poi[l]={loc_id:l,point:h.point,pixel:h.pixel,doc_count:a,letter:n,group:r.length};this.create_marker(l)}this.batch.pois=f;if(this.pid>0){var l=this.batch.loc2poi[this.pid];this.pid=undefined;setTimeout(function(){this.marker_infos(l)}.bind(this),2000)}this.do_not_refresh=false};geomap.prototype.add_loc=function(a){if(!Data.loc[a.loc_id]){a.lat=parseFloat(a.lat);a.lng=parseFloat(a.lng);a.zoom=parseInt(a.zoom);a.doc_count=parseInt(a.doc_count);a.point=new GLatLng(a.lat,a.lng);Data.loc[a.loc_id]=a;this.batch.locs.push(a.loc_id)}};geomap.prototype.del_loc=function(b){Data.loc[b.loc_id]=undefined;var a=this.batch.locs.indexOf(b.loc_id);this.batch.locs.splice(a,1)};geomap.prototype.create_all_icons=function(){this.batch.icon=[];this.batch.letters=[0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100,200,300,400,500,600,700,800,900,"1K","2K","3K","4K","5K","6K","7K","8K","9K","10K"];for(var a=0;a<this.batch.letters.length;a++){this.create_icon(this.batch.letters[a])}this.create_icon("add");this.create_icon("plus");this.create_icon("addr");this.create_icon("address")};geomap.prototype.create_icon=function(a){var b=new GIcon();b.image=URL.L+"/map/"+a+".png";b.iconSize=new GSize(40,40);b.iconAnchor=new GPoint(20,20);b.infoWindowAnchor=new GPoint(20,20);
this.batch.icon[a]=b};geomap.prototype.get_letter=function(e){if(e<1){return 1}var b=1;for(var a=0;a<this.batch.letters.length;a++){var d=this.batch.letters[a];if(typeof d=="string"){d=_pi(d.replace("K","000"))}if(e<d){b=this.batch.letters[a-1];break}}return b};geomap.prototype.set_center=function(e,a,d){if(!d){d=this.batch.zoom}var f=parseFloat(e);var c=parseFloat(a);var b=parseInt(d);if(e==undefined||a==undefined||isNaN(f)||isNaN(c)||f<-90||f>90||c<-180||c>180){IOL.debug("invalid point (lat:"+e+" lng:"+a+" zoom:"+d+")","warn");return}this.map.setCenter(new GLatLng(f,c),b)};geomap.prototype.magic_zoom=function(l){var a=this.map;if(!l){var l=[];for(var e=0;e<this.batch.locs.length;e++){var f=this.batch.locs[e];l.push(Data.loc[f].point)}}if(l.length>1){var j=new GBounds(l);var k=new GLatLng(j.minY,j.minX);var d=new GLatLng(j.maxY,j.maxX);var b=new GLatLngBounds(k,d);var h=b.getCenter();var g=a.getBoundsZoomLevel(b)-1;if(g<1){g=1}if(g>10){g=10}a.setCenter(h,g)}else{if(l[0]){a.setCenter(l[0],10)}}};geomap.prototype.update_bounds=function(){var f=this.map;f.checkResize();var a=f.getBounds();var h=f.getCenter();var g=f.getZoom();var e=a.getSouthWest();var d=a.getNorthEast();this.batch.bounds={lat1:e.lat(),lng1:e.lng(),lat2:d.lat(),lng2:d.lng(),lat:h.lat(),lng:h.lng()};this.batch.zoom=g;h=f.fromLatLngToDivPixel(h);e=f.fromLatLngToDivPixel(e);d=f.fromLatLngToDivPixel(d);this.batch.corners={x1:e.x,y1:e.y,x2:d.x,y2:d.y,x:h.x,y:h.y};var a=this.batch.bounds;var h=f.getCenter()};geomap.prototype.geo_init=function(){var c=document.fg;if(!c){return}var a=this;c.address.undo_value=c.address.value;c.address.style.color="#888";c.onsubmit=function(){a.geo_search();return false};c.search.onclick=function(){this.blur()};c.address.onfocus=function(){if(this.value==this.undo_value){this.value="";this.style.color="#000"}this.select()};c.address.onblur=function(){if(!this.value.trim()){this.value=this.undo_value;this.focus();this.style.color="#888"}};var b=$("geochoose");b.win=new win(b);b.div=b.getElementsByClassName("window-inn")[0];this.geocoder={chooser:b}
};geomap.prototype.geo_search=function(d){var b=document.fg;var c=b.address.value.trim();if(!c||c==b.address.undo_value){alert(MSG.geo_search_warn);return false}modal.say(_MSG.processing,{icon:"wait"});var a,e;if(a=c.match(/^([\-\d\.]+)[\s\,]+([\-\d\.]+)$/)){e=[parseFloat(a[1]),parseFloat(a[2])]}if(typeof e=="object"){if(isNaN(e[0])||isNaN(e[1])||e[0]<-90||e[0]>90||e[1]<-180||e[1]>180){return modal.say(MSG.geo_search_nan,{},1)}modal.say(MSG.geo_search_ok,{icon:"ok",timeout:1000});this.geo_goto(e[0],e[1]);return}IOL.API.request("loc.geocoder",{query:c,callback:"geo_search"},this)};geomap.prototype.geo_search_onApi=function(g,j,d,c){if(!g){if(j.error.id==1){return modal.say(MSG.geo_search_warn,{icon:"warn"},1)}else{if(j.error.id==2){return modal.say(MSG.geo_search_nok,{icon:"warn"},1)}else{if(j.error.id==3){return modal.say(MSG.geo_search_quota,{icon:"nok"},1)}else{return modal.say(MSG.geo_search_error,{icon:"nok"},1)}}}}modal.shutup();var b=j.addrs;if(b.length>1){var k=this.geocoder.chooser.div;while(k.childNodes.length){k.removeChild(k.childNodes[0])}var a=document.createElement("div");a.className="dropdown_menu";if(b.length>5){a.style.height="200px";a.style.overflow="auto"}k.appendChild(a);for(var e=0;e<b.length;e++){var h=b[e];var f=document.createElement("a");f.className="block";f.innerHTML=h.title;f.href="#";f.self=this;f._lat=h.lat;f._lng=h.lng;f.onclick=function(){this.self.geocoder.chooser.win.hide();this.self.geo_goto(this._lat,this._lng);return false};a.appendChild(f)}this.geocoder.chooser.win.show();return}else{if(b.length==1){return this.geo_goto(b[0].lat,b[0].lng)}else{return modal.say(MSG.geo_search_error,{icon:"nok"},1)}}};geomap.prototype.geo_goto=function(c,a){modal.say(MSG.geo_search_ok,{icon:"ok",timeout:1000});var b=(this.batch.zoom<15)?15:this.batch.zoom;this.map.setCenter(new GLatLng(parseFloat(c),parseFloat(a)),b);this.refresh();return};geomap.prototype.geobox_init=function(g){IOL.debug("geobox_init pid="+g);var b=$("geobox").firstChild.cloneNode(true);b.style.display="none";document.body.appendChild(b);
this.geobox=b;this.geobox.stream={w:459,p:9};this.geobox.w=459;this.geobox.p=9;this.geobox.thumbs=[];this.geobox.div=getdivs(b);this.geobox.form=b.getElementsByTagName("form")[0];for(var h in this.geobox.div){this.geobox.div[h].self=this}this.geobox.div.l.onclick=function(){this.self.geobox_go(-1)};this.geobox.div.r.onclick=function(){this.self.geobox_go(+1)};var c=["r","l"];for(var f=0;f<=1;f++){var e=this.geobox.div[c[f]];e.src_default=e.src;e.src_hover=e.src.replace(".png","_hover.png");e.src_off=e.src.replace(".png","_off.png");e.onmouseover=function(){if(!this.is_off){this.src=this.src_hover}};e.onmouseout=function(){if(!this.is_off){this.src=this.src_default}}}var l=this.batch.markers[g].getPoint();if(navigator.userAgent.indexOf("Safari")<0){var a=new GMap2(this.geobox.div.map,{size:new GSize(240,200)});a.addControl(new GSmallZoomControl(),new GControlPosition(G_ANCHOR_TOP_RIGHT));a.setCenter(l,2);var k=new GIcon();k.image=URL.L+"/map/mini_addr.png";k.iconSize=new GSize(20,20);k.iconAnchor=new GPoint(10,10);k.infoWindowAnchor=new GPoint(10,10);var j=new GMarker(l,{icon:k});GEvent.addListener(j,"click",function(){a.setCenter(this.getPoint())});a.addOverlay(j);this.geobox.map=a;this.geobox.addr=j}else{this.geobox.div.map.style.display="none";this.geobox.div.nomap.style.display="block"}this.geobox.pid=g;this.geobox.ready=false};geomap.prototype.geobox_load=function(a){this.geobox.done=[];this.geobox.pos=0;this.geobox.page=0;this.geobox.pages=0;this.geobox.poi=a;this.geobox.docs=[];this.geobox.doc_id=0;this.geobox.off=0;this.geobox.max=0;this.custom.is_user=0;this.custom.is_loc=0;this.geobox_search()};geomap.prototype.geobox_search=function(){this.geobox.off=this.geobox.page*this.geobox.p;var a=this.geobox.pid;var b=this.batch.poi2locs[a];if(this.user_id){IOL.API.request("doc.search",{user_id:this.user_id,loc_id:b,stp:this.geobox.p*10,off:this.geobox.off,callback:"geobox_search"},this)}else{IOL.API.request("doc.search",{user_id:0,extra:"user",loc_id:b,stp:this.geobox.p*10,off:this.geobox.off,callback:"geobox_search"},this)
}};geomap.prototype.geobox_search_onApi=function(h,c,a,g){this.geobox.max=c.r.max;this.geobox.pages=Math.floor(c.r.max/this.geobox.p);var f=this.geobox.off;if(h&&c.docs){for(var d=0;d<c.docs.length;d++){var e=c.docs[d];if(!Data.doc[e.doc_id]){Data.doc[e.doc_id]=e}this.geobox.docs[f+d]=e.doc_id;if(!this.geobox.doc_id){this.geobox.doc_id=e.doc_id}}IOL.debug("geobox search docs="+c.docs.length);if(c.users){for(var d=0;d<c.users.length;d++){var b=c.users[d];Data.user[b.user_id]=b}}this.geobox_display(this.geobox.doc_id)}else{modal.complain(c,{},1);this.map.closeInfoWindow()}};geomap.prototype.geobox_show_nav=function(){if(this.geobox.page>0){this.geobox.div.l.is_off=false;this.geobox.div.l.src=this.geobox.div.l.src_default}else{this.geobox.div.l.is_off=true;this.geobox.div.l.src=this.geobox.div.l.src_off}if(this.geobox.page<this.geobox.pages){this.geobox.div.r.is_off=false;this.geobox.div.r.src=this.geobox.div.r.src_default}else{this.geobox.div.r.is_off=true;this.geobox.div.r.src=this.geobox.div.r.src_off}};geomap.prototype.geobox_display=function(o){if(this.geobox.is_customing){return}var p=this.geobox.pos;var m=this.geobox.page;var k=this.geobox.docs;this.geobox_show_nav();if(!this.geobox.done[m]){var n=0;for(var j=m*this.geobox.p;j<(m+1)*this.geobox.p;j++){if(k[j]){IOL.debug("adding doc="+k[j]);var e=document.createElement("a");e.href="#";this.geobox.thumbs[k[j]]=e;var h=document.createElement("img");h.src=Data.doc[k[j]].doc_url+".t.jpg";h.style.width=h.style.height="50px";h.style.zIndex=401;h.onmouseover=function(){new Effect.Opacity(this,{to:0.8,duration:0})};h.onmouseout=function(){new Effect.Opacity(this,{to:1,duration:0})};e.appendChild(h);e.self=this;e.doc_id=k[j];e.onclick=function(){this.blur();this.self.geobox_display(this.doc_id);return false}}else{var e=document.createElement("b")}e.style.left=(m*this.geobox.w+n*51)+"px";e.style.top=0;e.style.zIndex=401;this.geobox.div.thumbs.appendChild(e);n++}this.geobox.done[m]=true}if(o){IOL.debug("showing doc="+o);var q=Data.doc[o];var b=q.wh.m;var d=$(this.geobox.div.media);
d.update("");var l=document.createElement("h4");l.className="tit";var r=document.createElement("a");r.href="/doc/"+q.user_id+"/"+q.doc_id;r.target="_new";r.appendChild(document.createTextNode(q.title));l.appendChild(r);this.geobox.div.nw.href="/doc/"+q.user_id+"/"+q.doc_id;this.geobox.div.nw.target="_new";var g=new Element("div",{id:"doc_"+o+"_player"});d.appendChild(l);d.appendChild(g);if(q.embed=="flv"){setTimeout(function(){var c={file:q.embed_url,image:q.doc_url+".240.jpg",width:240,height:240};new mediaplayer("flv",g.id,c).build()},500)}else{if(q.embed=="mp3"){setTimeout(function(){var c={file:q.embed_url,micon:(q.width)?q.doc_url+".75x.jpg":"",width:240,height:60};new mediaplayer("mp3",g.id,c).build()},500)}else{if(q.embed=="jpg"){var a=document.createElement("img");a.src=q.doc_url+".m.jpg";a.style.width=b[0]+"px";a.style.height=b[1]+"px";g.appendChild(a)}else{var a=document.createElement("img");a.src=q.doc_url+".t.jpg";a.style.width="75px";a.style.height="75px";g.appendChild(a)}}}if(this.geobox.doc_id&&this.geobox.thumbs[this.geobox.doc_id]){this.geobox.thumbs[this.geobox.doc_id].className=""}this.geobox.doc_id=o;this.geobox.thumbs[this.geobox.doc_id].className="on";this.geobox_custom_loc();if(q.user_id!=glob_user_id){IOL.log_visit("doc",o)}}if(!this.geobox.is_counted){var f=this.geobox.div.cnt.getElementsByTagName("h4")[0].getElementsByTagName("span")[0];f.innerHTML=" "+this.geobox.max+" ";this.geobox.is_counted=true}};geomap.prototype.geobox_custom_loc=function(b){var f=this.custom;var i=Data.doc[this.geobox.doc_id];if(!f[i.user_id]){f[i.user_id]=[]}if(f.is_user==i.user_id&&f.is_loc==i.loc_id){return}if(!f[i.user_id][i.loc_id]&&!b){this.geobox.div.title.style.visibility="hidden";this.geobox.div.notitle.style.visibility="hidden";this.geobox.is_customing=true;return IOL.API.request("loc.get",{loc_id:i.loc_id,user_id:i.user_id,callback:"geobox_custom_loc"},this)}else{f.is_user=i.user_id;f.is_loc=i.loc_id;var e=this.geobox.div.user;var j=e.getElementsByTagName("img")[0];var a=e.getElementsByTagName("a");j.src=Data.user[i.user_id].doc_url;
if(glob_u){var g=new Date((_pi(i.posted_at)-_pi(glob_u.tmo))*1000)}else{var g=new Date(_pi(i.posted_at)*1000)}a[0].href="/doc/"+i.user_id+"/archive/posted/"+g.iol_date("path");a[0].innerHTML=g.iol_date("short");a[1].href="/home/"+i.user_id;a[1].innerHTML=Data.user[i.user_id].title.truncate_nice(20);var h=f[i.user_id][i.loc_id].title;if(h){this.geobox.div.title.innerHTML=h;this.geobox.div.title.style.display="block";this.geobox.div.notitle.style.display="none"}else{this.geobox.div.title.innerHTML="";this.geobox.div.title.style.display="none";this.geobox.div.notitle.style.display="block"}this.geobox.div.title.style.visibility="visible";this.geobox.div.notitle.style.visibility="visible";if(this.geobox.map){var c=Data.loc[i.loc_id];this.geobox.addr.setPoint(c.point);this.geobox.map.panTo(c.point);this.geobox.map.checkResize()}}};geomap.prototype.geobox_custom_loc_onApi=function(f,b,a,e){var c=e.loc_id;var d=e.user_id;if(f&&b.loc){this.custom[d][c]=b.loc}else{this.custom[d][c]={}}this.geobox.is_customing=false;this.geobox_custom_loc(true)};geomap.prototype.geobox_go=function(a){if(this.geobox.is_moving){return}if(this.geobox.is_customing){return}var b=this.geobox.page+a;if(b>=0&&b<=this.geobox.pages){this.geobox.is_moving=true;this.geobox.pos=this.geobox.pos-a*this.geobox.w;this.geobox.page=b;this.geobox.off=b*this.geobox.p;new Effect.Move(this.geobox.div.thumbs,{x:-a*this.geobox.w,y:0,transition:Effect.Transitions.sinoidal,duration:0.3,afterFinish:function(){this.geobox.is_moving=false}.bind(this)});if(!this.geobox.docs[this.geobox.off]){return this.geobox_search()}else{this.geobox_display()}}};