var markers=[];var mgr;var icons={};var allmarkers=[];function getIcon(c){var b=null;if(c){if(icons[c[0]]){b=icons[c[0]]}else{b=new GIcon();b.image="/img/buttons/"+c[0]+".png";var a=iconData[c[0]];b.iconSize=new GSize(a.width,a.height);b.iconAnchor=new GPoint(a.width>>1,a.height>>1);b.infoWindowAnchor=new GPoint(12,2);a=iconData[c[1]];icons[c[0]]=b}}return b}function setupCountyMarkers(){allmarkers.length=0;for(var e in counties){var g=counties[e];var a=[];for(var c in g.places){var b=g.places[c];var f=getIcon(b.icon);var h=b.name;var d=b.reload;var l=new GLatLng(b.posn[0],b.posn[1]);var k=createMarker(l,h,f,d);a.push(k);allmarkers.push(k)}mgr.addMarkers(a,g.zoom[0],g.zoom[1])}mgr.refresh()}function createMarker(a,d,e,c){var b=new GMarker(a,{title:d,icon:e});GEvent.addListener(b,"click",function(){location.href=c});return b};