var stIsIE=false;sorttable={init:function(){if(_timer)clearInterval(_timer);if(!document.createElement||!document.getElementsByTagName)return;sorttable.DATE_RE=/^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;forEach(document.getElementsByTagName('table'),function(table){if(table.className.search(/\bsortable\b/)!=-1){sorttable.makeSortable(table);}});},makeSortable:function(table){if(table.getElementsByTagName('thead').length==0){the=document.createElement('thead');the.appendChild(table.rows[0]);table.insertBefore(the,table.firstChild);}
if(table.tHead==null)table.tHead=table.getElementsByTagName('thead')[0];if(table.tHead.rows.length!=1)return;sortbottomrows=[];for(var i=0;i<table.rows.length;i++){if(table.rows[i].className.search(/\bsortbottom\b/)!=-1){sortbottomrows[sortbottomrows.length]=table.rows[i];}}
if(sortbottomrows){if(table.tFoot==null){tfo=document.createElement('tfoot');table.appendChild(tfo);}
for(var i=0;i<sortbottomrows.length;i++){tfo.appendChild(sortbottomrows[i]);}
delete sortbottomrows;}
headrow=table.tHead.rows[0].cells;for(var i=0;i<headrow.length;i++){if(!headrow[i].className.match(/\bsorttable_nosort\b/)){mtch=headrow[i].className.match(/\bsorttable_([a-z0-9]+)\b/);if(mtch){override=mtch[1];}
if(mtch&&typeof sorttable["sort_"+override]=='function'){headrow[i].sorttable_sortfunction=sorttable["sort_"+override];}else{headrow[i].sorttable_sortfunction=sorttable.guessType(table,i);}
headrow[i].sorttable_columnindex=i;headrow[i].sorttable_tbody=table.tBodies[0];dean_addEvent(headrow[i],"click",function(e){if(this.className.search(/\bsorttable_sorted\b/)!=-1){sorttable.reverse(this.sorttable_tbody);this.className=this.className.replace('sorttable_sorted','sorttable_sorted_reverse');this.removeChild(document.getElementById('sorttable_sortfwdind'));sortrevind=document.createElement('span');sortrevind.id="sorttable_sortrevind";sortrevind.innerHTML=stIsIE?'&nbsp<font face="webdings">5</font>':'&nbsp;&#x25B4;';this.appendChild(sortrevind);return;}
if(this.className.search(/\bsorttable_sorted_reverse\b/)!=-1){sorttable.reverse(this.sorttable_tbody);this.className=this.className.replace('sorttable_sorted_reverse','sorttable_sorted');this.removeChild(document.getElementById('sorttable_sortrevind'));sortfwdind=document.createElement('span');sortfwdind.id="sorttable_sortfwdind";sortfwdind.innerHTML=stIsIE?'&nbsp<font face="webdings">6</font>':'&nbsp;&#x25BE;';this.appendChild(sortfwdind);return;}
theadrow=this.parentNode;forEach(theadrow.childNodes,function(cell){if(cell.nodeType==1){cell.className=cell.className.replace('sorttable_sorted_reverse','');cell.className=cell.className.replace('sorttable_sorted','');}});sortfwdind=document.getElementById('sorttable_sortfwdind');if(sortfwdind){sortfwdind.parentNode.removeChild(sortfwdind);}
sortrevind=document.getElementById('sorttable_sortrevind');if(sortrevind){sortrevind.parentNode.removeChild(sortrevind);}
this.className+=' sorttable_sorted';sortfwdind=document.createElement('span');sortfwdind.id="sorttable_sortfwdind";sortfwdind.innerHTML=stIsIE?'&nbsp<font face="webdings">6</font>':'&nbsp;&#x25BE;';this.appendChild(sortfwdind);row_array=[];col=this.sorttable_columnindex;rows=this.sorttable_tbody.rows;for(var j=0;j<rows.length;j++){row_array[row_array.length]=[sorttable.getInnerText(rows[j].cells[col]),rows[j]];}
row_array.sort(this.sorttable_sortfunction);tb=this.sorttable_tbody;for(var j=0;j<row_array.length;j++){if(j%2==0){row_array[j][1].className='even'}else{row_array[j][1].className='odd'}
tb.appendChild(row_array[j][1]);}
delete row_array;});}}},guessType:function(table,column){sortfn=sorttable.sort_alpha;for(var i=0;i<table.tBodies[0].rows.length;i++){text=sorttable.getInnerText(table.tBodies[0].rows[i].cells[column]);if(text!=''){if(text.match(/^-?[£$¤]?[\d,.]+%?$/)){return sorttable.sort_numeric;}
possdate=text.match(sorttable.DATE_RE)
if(possdate){first=parseInt(possdate[1]);second=parseInt(possdate[2]);if(first>12){return sorttable.sort_ddmm;}else if(second>12){return sorttable.sort_mmdd;}else{sortfn=sorttable.sort_ddmm;}}}}
return sortfn;},getInnerText:function(node){hasInputs=(typeof node.getElementsByTagName=='function')&&node.getElementsByTagName('input').length;if(node.getAttribute("sorttable_customkey")!=null){return node.getAttribute("sorttable_customkey");}
else if(typeof node.textContent!='undefined'&&!hasInputs){return node.textContent.replace(/^\s+|\s+$/g,'');}
else if(typeof node.innerText!='undefined'&&!hasInputs){return node.innerText.replace(/^\s+|\s+$/g,'');}
else if(typeof node.text!='undefined'&&!hasInputs){return node.text.replace(/^\s+|\s+$/g,'');}
else{switch(node.nodeType){case 3:if(node.nodeName.toLowerCase()=='input'){return node.value.replace(/^\s+|\s+$/g,'');}
case 4:return node.nodeValue.replace(/^\s+|\s+$/g,'');break;case 1:case 11:var innerText='';for(var i=0;i<node.childNodes.length;i++){innerText+=sorttable.getInnerText(node.childNodes[i]);}
return innerText.replace(/^\s+|\s+$/g,'');break;default:return'';}}},reverse:function(tbody){newrows=[];for(var i=0;i<tbody.rows.length;i++){newrows[newrows.length]=tbody.rows[i];}
for(var i=newrows.length-1;i>=0;i--){tbody.appendChild(newrows[i]);}
delete newrows;},sort_numeric:function(a,b){aa=parseFloat(a[0].replace(/[^0-9.]/g,''));if(isNaN(aa))return 1;bb=parseFloat(b[0].replace(/[^0-9.]/g,''));if(isNaN(bb))return 0;return aa-bb;},sort_alpha:function(a,b){if(a[0]==b[0])return 0;if(a[0]<b[0])return-1;return 1;},sort_ddmm:function(a,b){mtch=a[0].match(sorttable.DATE_RE);y=mtch[3];m=mtch[2];d=mtch[1];if(m.length==1)m='0'+m;if(d.length==1)d='0'+d;dt1=y+m+d;mtch=b[0].match(sorttable.DATE_RE);y=mtch[3];m=mtch[2];d=mtch[1];if(m.length==1)m='0'+m;if(d.length==1)d='0'+d;dt2=y+m+d;if(dt1==dt2)return 0;if(dt1<dt2)return-1;return 1;},sort_mmdd:function(a,b){mtch=a[0].match(sorttable.DATE_RE);y=mtch[3];d=mtch[2];m=mtch[1];if(m.length==1)m='0'+m;if(d.length==1)d='0'+d;dt1=y+m+d;mtch=b[0].match(sorttable.DATE_RE);y=mtch[3];d=mtch[2];m=mtch[1];if(m.length==1)m='0'+m;if(d.length==1)d='0'+d;dt2=y+m+d;if(dt1==dt2)return 0;if(dt1<dt2)return-1;return 1;},shaker_sort:function(list,comp_func){var b=0;var t=list.length-1;var swap=true;while(swap){swap=false;for(var i=b;i<t;++i){if(comp_func(list[i],list[i+1])>0){var q=list[i];list[i]=list[i+1];list[i+1]=q;swap=true;}}
t--;if(!swap)break;for(var i=t;i>b;--i){if(comp_func(list[i],list[i-1])<0){var q=list[i];list[i]=list[i-1];list[i-1]=q;swap=true;}}
b++;}}}
if(document.addEventListener){document.addEventListener("DOMContentLoaded",sorttable.init,false);}
if(/WebKit/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){sorttable.init();}},10);}
window.onload=sorttable.init;function dean_addEvent(element,type,handler){if(element.addEventListener){element.addEventListener(type,handler,false);}else{if(!handler.$$guid)handler.$$guid=dean_addEvent.guid++;if(!element.events)element.events={};var handlers=element.events[type];if(!handlers){handlers=element.events[type]={};if(element["on"+type]){handlers[0]=element["on"+type];}}
handlers[handler.$$guid]=handler;element["on"+type]=handleEvent;}};dean_addEvent.guid=1;function removeEvent(element,type,handler){if(element.removeEventListener){element.removeEventListener(type,handler,false);}else{if(element.events&&element.events[type]){delete element.events[type][handler.$$guid];}}};function handleEvent(event){var returnValue=true;event=event||fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);var handlers=this.events[event.type];for(var i in handlers){this.$$handleEvent=handlers[i];if(this.$$handleEvent(event)===false){returnValue=false;}}
return returnValue;};function fixEvent(event){event.preventDefault=fixEvent.preventDefault;event.stopPropagation=fixEvent.stopPropagation;return event;};fixEvent.preventDefault=function(){this.returnValue=false;};fixEvent.stopPropagation=function(){this.cancelBubble=true;}
if(!Array.forEach){Array.forEach=function(array,block,context){for(var i=0;i<array.length;i++){block.call(context,array[i],i,array);}};}
Function.prototype.forEach=function(object,block,context){for(var key in object){if(typeof this.prototype[key]=="undefined"){block.call(context,object[key],key,object);}}};String.forEach=function(string,block,context){Array.forEach(string.split(""),function(chr,index){block.call(context,chr,index,string);});};var forEach=function(object,block,context){if(object){var resolve=Object;if(object instanceof Function){resolve=Function;}else if(object.forEach instanceof Function){object.forEach(block,context);return;}else if(typeof object=="string"){resolve=String;}else if(typeof object.length=="number"){resolve=Array;}
resolve.forEach(object,block,context);}};var map=null;var geocoder=null;var location_bubble_html=''
var location_bubble_save_html=''
var adding=0;var editing=0;var current_lat=0;var current_lng=0;var timer=null;var do_streaming=false;var clear_overlays=false;var drop_all_markers=false;var infowindow_controller='';var iphone=false;if(!map_type){var map_type='street';}
var markers=new Hash();var marker_listeners=new Hash();var map_params=new Hash();function centerMarkerOrder(marker,b){return GOverlay.getZIndex(marker.getPoint().lat())-999999999;}
function createCenterMarker(title,infowindow){if(typeof(dest_marker)!="undefined"){map.removeOverlay(dest_marker);}
dest_marker=new GMarker(map.getCenter(),{title:title,zIndexProcess:centerMarkerOrder,icon:icon_dest});if(typeof(infowindow)!="undefined"&&infowindow.length>0){GEvent.addListener(dest_marker,"click",function(){dest_marker.openInfoWindowHtml(infowindow);});}
map.addOverlay(dest_marker);}
function removeCenterMarkerListener(){GEvent.removeListener(dest_marker,"click");}
function dropMarker(marker,height){if(!marker.Xa)
{marker.Xa=true;marker.qo(false);}
marker.Pa=height;marker.ri=height;marker.av=1;marker.tc();}
function hideLeftPanel(){$('content-left').hide();$('map-left').hide();$('map-right').show();$('content-map').className='left';$('nav-menu').className='left';$('content-right').className='fullpage'
window.onresize();}
function showLeftPanel(){$('content-left').show();$('map-left').show();$('map-right').hide();$('content-map').className='right';$('nav-menu').className='';$('content-right').className=''
window.onresize();}
function showInfoTab(tab_num){var totalTabs=5;for(var x=totalTabs-1;x>=0;x--){if(tab_num==x){try{$('tab'+x+'_content').show();$('tab'+x).className='selected';}catch(e){return;}}else{try{$('tab'+x+'_content').hide();$('tab'+x).className='tab';}catch(e){return;}}}}
function addcropper(div_id){Element.update('crop_button_'+div_id,'Cropping ...')
Element.hide('crop_button_'+div_id)
curCrop=new Cropper.Img('testImage_'+div_id,{onEndCrop:onEndCrop});}
function onEndCrop(coords,dimensions){if(current_image_id>0){curCrop.remove();button_div='crop_button_'+current_image_id;new Ajax.Request('/admin/photos/crop_ajax/'+current_image_id+'?geometry='+dimensions.width+'x'+dimensions.height+'%2B'+coords.x1+'%2B'+coords.y1,{asynchronous:true,evalScripts:true,onComplete:function(request){Element.hide('spinner')},onLoading:function(request){Element.show('spinner');Element.show(button_div);}});current_image_id=0;}else{alert('running endcrop. Cropper not getting removed properly.');}}
function clearGarageChart(){try{Element.update("garage-price-table","<p><strong>Loading ...</strong></p>");$('iphone-box-ad').hide();$('price_disclaimer').hide();}catch(e){return;}}
function startTimer(){timer=window.setTimeout('checkcenter()',300);}
function stopTimer(){window.clearTimeout(timer);}
function mapMove(){if(typeof(map)!="undefined"&&do_streaming){stopTimer();startTimer();}}
function checkcenter(){if(typeof(map)!="undefined"&&do_streaming){lat=Math.round(map.getCenter().x*100000)/100000;lng=Math.round(map.getCenter().y*100000)/100000;diff_lat=Math.abs(current_lat-lat);diff_lng=Math.abs(current_lng-lng);if(diff_lat>0.001||diff_lng>0.001){current_lat=lat;current_lng=lng;doRefresh();}}}
function doRefresh(){if(typeof(map)!="undefined"&&map&&do_streaming){swlat=Math.round(map.getBounds().getSouthWest().lat()*100000)/100000;swlng=Math.round(map.getBounds().getSouthWest().lng()*100000)/100000;nelat=Math.round(map.getBounds().getNorthEast().lat()*100000)/100000;nelng=Math.round(map.getBounds().getNorthEast().lng()*100000)/100000;params='?swlat='+swlat+'&swlng='+swlng+'&nelat='+nelat+'&nelng='+nelng;if(clear_overlays){params+='&clear=true';clear_overlays=false;}
map_params.keys().each(function(key){params+='&'+key+'='+map_params.get(key);});url_to_call='/spots/results';if(typeof(results_ajax_url)!="undefined"){url_to_call=results_ajax_url;}
new Ajax.Request(url_to_call+params,{method:'get',asynchronous:true,evalScripts:true,onComplete:function(request){Element.hide('spinner')},onLoading:function(request){Element.show('spinner')}});return false;if(map_type=='lots'){clearGarageChart();}}}
function showDOT(){if(typeof(map)!="undefined"&&map&&do_streaming){swlat=Math.round(map.getBounds().getSouthWest().lat()*100000)/100000;swlng=Math.round(map.getBounds().getSouthWest().lng()*100000)/100000;nelat=Math.round(map.getBounds().getNorthEast().lat()*100000)/100000;nelng=Math.round(map.getBounds().getNorthEast().lng()*100000)/100000;params='?swlat='+swlat+'&swlng='+swlng+'&nelat='+nelat+'&nelng='+nelng;map_params.keys().each(function(key){params+='&'+key+'='+map_params.get(key);});new Ajax.Request('spots/show_dot_signs'+params,{method:'get',asynchronous:true,evalScripts:true,onComplete:function(request){Element.hide('spinner')},onLoading:function(request){Element.show('spinner')}});return false;}}
function update_lat_lon_after_drag(lat,lng){document.getElementById("location_lat").value=lat;document.getElementById("location_lng").value=lng;}
function update_lat_lon(point){document.getElementById("location_lng").value=point.x;document.getElementById("location_lat").value=point.y;}
function clear_lat_lon(point){document.getElementById("location_lng").value='';document.getElementById("location_lat").value='';}
function highlight_marker(){map.closeInfoWindow();newMarker.openInfoWindow(location_bubble_html+location_bubble_save_html);}
function data_entry_center(element){try{element=$(element);}catch(e){return;}
var my_width=0;var my_height=0;if(typeof(window.innerWidth)=='number'){my_width=window.innerWidth;my_height=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){my_width=document.documentElement.clientWidth;my_height=document.documentElement.clientHeight;}
else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){my_width=document.body.clientWidth;my_height=document.body.clientHeight;}
element.style.position='absolute';element.style.zIndex=99;var scrollY=0;if(document.documentElement&&document.documentElement.scrollTop){scrollY=document.documentElement.scrollTop;}else if(document.body&&document.body.scrollTop){scrollY=document.body.scrollTop;}else if(window.pageYOffset){scrollY=window.pageYOffset;}else if(window.scrollY){scrollY=window.scrollY;}
var elementDimensions=Element.getDimensions(element);var setX=(my_width-340);var setY=(my_height-elementDimensions.height)/2+scrollY-120;setX=(setX<0)?0:setX;setY=(setY<0)?0:setY;element.style.left=5+"px";element.style.width=setX+"px";element.style.top=50+"px";element.style.display='block';}
function resetMarkers(){markers=new Hash();marker_listeners=new Hash();if(dest_marker){var loc_dest_marker=dest_marker}
if(document.map){document.map.clearOverlays();document.map.addOverlay(loc_dest_marker);}else{map.clearOverlays();map.addOverlay(loc_dest_marker);}}
function collectGarbage(){var marker_name='marker';if(typeof(map)!="undefined"&&do_streaming){swlat=map.getBounds().getSouthWest().lat();swlng=map.getBounds().getSouthWest().lng();nelat=map.getBounds().getNorthEast().lat();nelng=map.getBounds().getNorthEast().lng();bufferLat=(nelng-swlng)/9;markers.keys().each(function(key){marker=markers.get(key);offscreenlat=false;offscreenlng=false;if(marker.getLatLng().lng()>nelng||marker.getLatLng().lng()<swlng||marker.getLatLng().lat()>nelat||marker.getLatLng().lat()<(swlat-bufferLat))
{delPrimo(key);}})}}
function delPrimo(loc_id){marker=markers.get(loc_id);if(marker){if(document.map){document.map.removeOverlay(marker);}else{map.removeOverlay(marker);}
markers.unset(loc_id);marker_listeners.unset(loc_id);}else{}}
function primoMarkerListener(loc_id,type,time){return GEvent.addListener(markers.get(loc_id),'click',function(){new Ajax.Request('/marker/'+type+'/'+loc_id,{asynchronous:true,method:'get',evalScripts:true,parameters:'unparsed_time='+time,onComplete:function(request){Element.hide('spinner')},onLoading:function(request){Element.show('spinner')}})});}
function primoMarker(loc_id,lat,lng,icon_to,time_left_str,add_overlay,type,time){if(!icon_to){return false};var marker_name='marker';if(typeof(infowindow_controller)!="undefined"&&infowindow_controller.length>0){action=action+"_"+controller;controller=infowindow_controller;}
if(!markers.get(loc_id)){marker=new GMarker(new GLatLng(lat,lng),{id:loc_id,title:time_left_str,icon:eval('icon_'+icon_to)});markers.set(loc_id,marker);marker_listeners.set(loc_id,primoMarkerListener(loc_id,type,time));if(add_overlay){map.addOverlay(marker);}}}
function tomorrowMidnight(){date=new Date();date.setHours(0);date.setMinutes(0);date.setDate(date.getDate()+1);return date;}
function toggleHolidayBox(){cookies=new Cookies();if($('map-float')){Effect.toggle('map-float','blind',{duration:0.3});cookies.set('suspensions_seen','true',tomorrowMidnight());}}
function fillLinkValues(link_field,embed_field,custom_embed_link){if(map){var link_lat=Math.round(map.getCenter().lat()*100000)/100000;var link_lng=Math.round(map.getCenter().lng()*100000)/100000;var zoomlev=map.getZoom();var w='500';var h='400';var search_text='linked+location';if($('search_address')){var search_text=escape($('search_address').value);}
var params='t='+map_type+'&lat='+link_lat+'&lng='+link_lng+'&z='+zoomlev+'&q='+search_text;var whparams='&width='+w+'&height='+h;link_field.value='http://primospot.com/spots?'+params;embed_field.value='<iframe width="'+w+'" height="'+h+'" src="http://primospot.com/embed?'+params+whparams+'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>'+'<br /><small><a target="_blank" href="http://primospot.com/spots?t='+params+whparams+'" style="color:#0000FF;text-align:left">View Larger Map</a></small>';$('link_box').show();var embed_params=params+whparams;embed_params=embed_params.replace(/t=/,'embed[t=');embed_params=embed_params.replace(/&/g,'&embed[');embed_params=embed_params.replace(/=/g,']=');custom_embed_link.setAttribute('href','/embed/create?'+embed_params);}else{alert('map not loaded or javascript error.  please email support@primospot.com if this error persists and indicate your browser type and details.');}}
function getHeight(){if(typeof window.innerHeight!='undefined'){return window.innerHeight;}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientHeight!='undefined'&&document.documentElement.clientHeight!==0){return document.documentElement.clientHeight;}else{return document.getElementsByTagName('body')[0].clientHeight;}}
function getWidth(){return document.viewport.getDimensions().width;}
function initMap(){var gmap_div=$('map_div');var gmap_shadow=$('map-shadow-top');var gmap_shadow_left=$('map-shadow-left');var gmap_shadow_bottom=$('map-shadow-bottom');var picture_browser=$('picture_browser');var garage_price_table=$('garage-price-table');var garage_price_shadow=$('garage-price-shadow');var map_width_mod=223;var map_height_mod=0;garage_price_table.style.top='0px';if(map_type=='lots'){garage_price_table.show();gmap_shadow_bottom.show();map_height_mod=map_height_mod+141;}else{garage_price_table.hide();gmap_shadow_bottom.hide();}
window.onresize=function(){var nav_menu_height=$('nav-menu').getDimensions().height+6;var map_height=getHeight()-nav_menu_height-map_height_mod;var map_width=(getWidth()-map_width_mod);if($('content-map').className=='left'){map_width=map_width+map_width_mod;}
if(garage_price_table){garage_price_table.style.width=map_width+'px';garage_price_table.style.top=map_height+'px';}
gmap_shadow_left.style.height=(getHeight()-nav_menu_height)+'px';gmap_shadow.style.width=map_width+'px';if(map_type=='lots'){gmap_shadow_bottom.style.width=map_width+'px';gmap_shadow_bottom.style.top=map_height-9+'px';}
if(picture_browser){picture_browser.style.height=map_height-30+'px';}
gmap_div.style.height=(map_height)+'px';gmap_div.style.width=map_width+'px';if(map){map.checkResize();}else{if(document.map){document.map.checkResize();}}}
window.onresize();}
function map_notice(message,error){if($('map_notices')){if(message==null&&error==null){return;}
msg=message;if(error){$('map_notices').addClassName('error');msg=error;}else{$('map_notices').removeClassName('error');}
if(msg&&typeof(msg)=='string'){$('map_notices').hide();$('map_notices').innerHTML=msg;cancel_all_effects();Effect.Appear('map_notices',{delay:1,queue:'start'});Effect.Fade('map_notices',{delay:5,queue:'end'});}}}
function cancel_all_effects(){Effect.Queues.get('global').each(function(e){e.cancel();});}
function GMarkerGroup(active,markers,markersById){this.active=active;this.markers=markers||new Array();this.markersById=markersById||new Object();}
GMarkerGroup.prototype=new GOverlay();GMarkerGroup.prototype.initialize=function(map){this.map=map;if(this.active){for(var i=0,len=this.markers.length;i<len;i++){this.map.addOverlay(this.markers[i]);}
for(var id in this.markersById){this.map.addOverlay(this.markersById[id]);}}}
GMarkerGroup.prototype.remove=function(){this.deactivate();}
GMarkerGroup.prototype.redraw=function(force){}
GMarkerGroup.prototype.copy=function(){var overlay=new GMarkerGroup(this.active);overlay.markers=this.markers;overlay.markersById=this.markersById;return overlay;}
GMarkerGroup.prototype.clear=function(){this.deactivate();this.markers=new Array();this.markersById=new Object();}
GMarkerGroup.prototype.addMarker=function(marker,id){if(id==undefined){this.markers.push(marker);}else{this.markersById[id]=marker;}
if(this.active&&this.map!=undefined){this.map.addOverlay(marker);}}
GMarkerGroup.prototype.showMarker=function(id){var marker=this.markersById[id];if(marker!=undefined){GEvent.trigger(marker,"click");}}
GMarkerGroup.prototype.activate=function(active){active=(active==undefined)?true:active;if(!active){if(this.active){if(this.map!=undefined){for(var i=0,len=this.markers.length;i<len;i++){this.map.removeOverlay(this.markers[i])}
for(var id in this.markersById){this.map.removeOverlay(this.markersById[id]);}}
this.active=false;}}else{if(!this.active){if(this.map!=undefined){for(var i=0,len=this.markers.length;i<len;i++){this.map.addOverlay(this.markers[i]);}
for(var id in this.markersById){this.map.addOverlay(this.markersById[id]);}}
this.active=true;}}}
GMarkerGroup.prototype.centerAndZoomOnMarkers=function(){if(this.map!=undefined){var tmpMarkers=this.markers.slice();for(var id in this.markersById){tmpMarkers.push(this.markersById[id]);}
if(tmpMarkers.length>0){this.map.centerAndZoomOnMarkers(tmpMarkers);}}}
GMarkerGroup.prototype.deactivate=function(){this.activate(false);}