if(!(window.GBrowserIsCompatible&&GBrowserIsCompatible())){window.location="notcompatible.htm";} function MarkerManager(map,opt_opts){var me=this;me.map_=map;me.mapZoom_=map.getZoom();me.projection_=map.getCurrentMapType().getProjection();opt_opts=opt_opts||{};me.tileSize_=MarkerManager.DEFAULT_TILE_SIZE_;var maxZoom=MarkerManager.DEFAULT_MAX_ZOOM_;if(opt_opts.maxZoom!=undefined){maxZoom=opt_opts.maxZoom;}me.maxZoom_=maxZoom;me.trackMarkers_=opt_opts.trackMarkers;var padding;if(typeof opt_opts.borderPadding=="number"){padding=opt_opts.borderPadding;}else{padding=MarkerManager.DEFAULT_BORDER_PADDING_;}me.swPadding_=new GSize(-padding,padding);me.nePadding_=new GSize(padding,-padding);me.borderPadding_=padding;me.gridWidth_=[];me.grid_=[];me.grid_[maxZoom]=[];me.numMarkers_=[];me.numMarkers_[maxZoom]=0;GEvent.bind(map,"moveend",me,me.onMapMoveEnd_);me.removeOverlay_=function(marker){map.removeOverlay(marker);me.shownMarkers_--;};me.addOverlay_=function(marker){if(!marker.isHidden()){map.addOverlay(marker);me.shownMarkers_++;}};me.resetManager_();me.shownMarkers_=0;me.shownBounds_=me.getMapGridBounds_();};MarkerManager.DEFAULT_TILE_SIZE_=1024;MarkerManager.DEFAULT_MAX_ZOOM_=17;MarkerManager.DEFAULT_BORDER_PADDING_=100;MarkerManager.MERCATOR_ZOOM_LEVEL_ZERO_RANGE=256;MarkerManager.prototype.resetManager_=function(){var me=this;var mapWidth=MarkerManager.MERCATOR_ZOOM_LEVEL_ZERO_RANGE;for(var zoom=0;zoom<=me.maxZoom_;++zoom){me.grid_[zoom]=[];me.numMarkers_[zoom]=0;me.gridWidth_[zoom]=Math.ceil(mapWidth/me.tileSize_);mapWidth<<=1;}};MarkerManager.prototype.clearMarkers=function(){var me=this;me.processAll_(me.shownBounds_,me.removeOverlay_);me.resetManager_();};MarkerManager.prototype.getTilePoint_=function(latlng,zoom,padding){var pixelPoint=this.projection_.fromLatLngToPixel(latlng,zoom);return new GPoint(Math.floor((pixelPoint.x+padding.width)/this.tileSize_),Math.floor((pixelPoint.y+padding.height)/this.tileSize_));};MarkerManager.prototype.addMarkerBatch_=function(marker,minZoom,maxZoom){var mPoint=marker.getPoint();if(this.trackMarkers_){GEvent.bind(marker,"changed",this,this.onMarkerMoved_);}var gridPoint=this.getTilePoint_(mPoint,maxZoom,GSize.ZERO);for(var zoom=maxZoom;zoom>=minZoom;zoom--){var o=this.getGridCellCreate_(gridPoint.x,gridPoint.y,zoom);o.push(marker);gridPoint.x=gridPoint.x>>1;gridPoint.y=gridPoint.y>>1;}};MarkerManager.prototype.isGridPointVisible_=function(point){var me=this;var vertical=me.shownBounds_.minY<=point.y&&point.y<=me.shownBounds_.maxY;var minX=me.shownBounds_.minX;var horizontal=minX<=point.x&&point.x<=me.shownBounds_.maxX;if(!horizontal&&minX<0){var width=me.gridWidth_[me.shownBounds_.z];horizontal=minX+width<=point.x&&point.x<=width-1;}return vertical&&horizontal;};MarkerManager.prototype.onMarkerMoved_=function(marker,oldPoint,newPoint){var me=this;var zoom=me.maxZoom_;var changed=false;var oldGrid=me.getTilePoint_(oldPoint,zoom,GSize.ZERO);var newGrid=me.getTilePoint_(newPoint,zoom,GSize.ZERO);while(zoom>=0&&(oldGrid.x!=newGrid.x||oldGrid.y!=newGrid.y)){var o=me.getGridCellNoCreate_(oldGrid.x,oldGrid.y,zoom);if(o){if(me.removeFromArray(o,marker)){me.getGridCellCreate_(newGrid.x,newGrid.y,zoom).push(marker);}}if(zoom==me.mapZoom_){if(me.isGridPointVisible_(oldGrid)){if(!me.isGridPointVisible_(newGrid)){me.removeOverlay_(marker);changed=true;}}else{if(me.isGridPointVisible_(newGrid)){me.addOverlay_(marker);changed=true;}}}oldGrid.x=oldGrid.x>>1;oldGrid.y=oldGrid.y>>1;newGrid.x=newGrid.x>>1;newGrid.y=newGrid.y>>1;--zoom;}if(changed){me.notifyListeners_();}};MarkerManager.prototype.removeMarker=function(marker){var me=this;var zoom=me.maxZoom_;var changed=false;var point=marker.getPoint();var grid=me.getTilePoint_(point,zoom,GSize.ZERO);while(zoom>=0){var o=me.getGridCellNoCreate_(grid.x,grid.y,zoom);if(o){me.removeFromArray(o,marker);}if(zoom==me.mapZoom_){if(me.isGridPointVisible_(grid)){me.removeOverlay_(marker);changed=true;}}grid.x=grid.x>>1;grid.y=grid.y>>1;--zoom;}if(changed){me.notifyListeners_();}};MarkerManager.prototype.addMarkers=function(ac,minZoom,opt_maxZoom){var maxZoom=this.getOptMaxZoom_(opt_maxZoom);for(var i=ac.length-1;i>=0;i--){this.addMarkerBatch_(ac[i],minZoom,maxZoom);}this.numMarkers_[minZoom]+=ac.length;};MarkerManager.prototype.getOptMaxZoom_=function(opt_maxZoom){return opt_maxZoom!=undefined?opt_maxZoom:this.maxZoom_;};MarkerManager.prototype.getMarkerCount=function(zoom){var total=0;for(var z=0;z<=zoom;z++){total+=this.numMarkers_[z];}return total;};MarkerManager.prototype.addMarker=function(marker,minZoom,opt_maxZoom){var me=this;var maxZoom=this.getOptMaxZoom_(opt_maxZoom);me.addMarkerBatch_(marker,minZoom,maxZoom);var gridPoint=me.getTilePoint_(marker.getPoint(),me.mapZoom_,GSize.ZERO);if(me.isGridPointVisible_(gridPoint)&&minZoom<=me.shownBounds_.z&&me.shownBounds_.z<=maxZoom){me.addOverlay_(marker);me.notifyListeners_();}this.numMarkers_[minZoom]++;};GBounds.prototype.containsPoint=function(point){var outer=this;return(outer.minX<=point.x&&outer.maxX>=point.x&&outer.minY<=point.y&&outer.maxY>=point.y);};MarkerManager.prototype.getGridCellCreate_=function(x,y,z){var grid=this.grid_[z];if(x<0){x+=this.gridWidth_[z];}var gridCol=grid[x];if(!gridCol){gridCol=grid[x]=[];return gridCol[y]=[];}var gridCell=gridCol[y];if(!gridCell){return gridCol[y]=[];}return gridCell;};MarkerManager.prototype.getGridCellNoCreate_=function(x,y,z){var grid=this.grid_[z];if(x<0){x+=this.gridWidth_[z];}var gridCol=grid[x];return gridCol?gridCol[y]:undefined;};MarkerManager.prototype.getGridBounds_=function(bounds,zoom,swPadding,nePadding){zoom=Math.min(zoom,this.maxZoom_);var bl=bounds.getSouthWest();var tr=bounds.getNorthEast();var sw=this.getTilePoint_(bl,zoom,swPadding);var ne=this.getTilePoint_(tr,zoom,nePadding);var gw=this.gridWidth_[zoom];if(tr.lng()=gw){sw.x=0;ne.x=gw-1;}var gridBounds=new GBounds([sw,ne]);gridBounds.z=zoom;return gridBounds;};MarkerManager.prototype.getMapGridBounds_=function(){var me=this;return me.getGridBounds_(me.map_.getBounds(),me.mapZoom_,me.swPadding_,me.nePadding_);};MarkerManager.prototype.onMapMoveEnd_=function(){var me=this;me.objectSetTimeout_(this,this.updateMarkers_,0);};MarkerManager.prototype.objectSetTimeout_=function(object,command,milliseconds){return window.setTimeout(function(){command.call(object);},milliseconds);};MarkerManager.prototype.refresh=function(){var me=this;if(me.shownMarkers_>0){me.processAll_(me.shownBounds_,me.removeOverlay_);}me.processAll_(me.shownBounds_,me.addOverlay_);me.notifyListeners_();};MarkerManager.prototype.updateMarkers_=function(){var me=this;me.mapZoom_=this.map_.getZoom();var newBounds=me.getMapGridBounds_();if(newBounds.equals(me.shownBounds_)&&newBounds.z==me.shownBounds_.z){return;}if(newBounds.z!=me.shownBounds_.z){me.processAll_(me.shownBounds_,me.removeOverlay_);me.processAll_(newBounds,me.addOverlay_);}else{me.rectangleDiff_(me.shownBounds_,newBounds,me.removeCellMarkers_);me.rectangleDiff_(newBounds,me.shownBounds_,me.addCellMarkers_);}me.shownBounds_=newBounds;me.notifyListeners_();};MarkerManager.prototype.notifyListeners_=function(){GEvent.trigger(this,"changed",this.shownBounds_,this.shownMarkers_);};MarkerManager.prototype.processAll_=function(bounds,callback){for(var x=bounds.minX;x<=bounds.maxX;x++){for(var y=bounds.minY;y<=bounds.maxY;y++){this.processCellMarkers_(x,y,bounds.z,callback);}}};MarkerManager.prototype.processCellMarkers_=function(x,y,z,callback){var o=this.getGridCellNoCreate_(x,y,z);if(o){for(var i=o.length-1;i>=0;i--){callback(o[i]);}}};MarkerManager.prototype.removeCellMarkers_=function(x,y,z){this.processCellMarkers_(x,y,z,this.removeOverlay_);};MarkerManager.prototype.addCellMarkers_=function(x,y,z){this.processCellMarkers_(x,y,z,this.addOverlay_);};MarkerManager.prototype.rectangleDiff_=function(bounds1,bounds2,callback){var me=this;me.rectangleDiffCoords(bounds1,bounds2,function(x,y){callback.apply(me,[x,y,bounds1.z]);});};MarkerManager.prototype.rectangleDiffCoords=function(bounds1,bounds2,callback){var minX1=bounds1.minX;var minY1=bounds1.minY;var maxX1=bounds1.maxX;var maxY1=bounds1.maxY;var minX2=bounds2.minX;var minY2=bounds2.minY;var maxX2=bounds2.maxX;var maxY2=bounds2.maxY;for(var x=minX1;x<=maxX1;x++){for(var y=minY1;y<=maxY1&&y=minX1;x--){callback(x,y);}for(var x=Math.max(minX1,maxX2+1);x<=maxX1;x++){callback(x,y);}}};MarkerManager.prototype.removeFromArray=function(array,value,opt_notype){var shift=0;for(var i=0;iaj)return;var container=document.getElementById(containerID);for(var x=0;container.childNodes[x];x++){if(container.childNodes[x].nodeName!="DIV")continue;if(container.childNodes[x].id=="tab-"+tab){return container.childNodes[x];}}return;};function ak(label,nodes){var tagContent;var tagNum=getTabIndex(label);if(tagNum== -1){tagNum=am(label);tagContent=getTabContent(tagNum);}else{tagContent=getTabContent(tagNum);if(tagContent.hasChildNodes()){while(tagContent.childNodes.length>=1){tagContent.removeChild(tagContent.firstChild);}}}tagContent.appendChild(nodes);};function removeTab(label){if(aj<=1)return;var container=document.getElementById(containerID);var tabIndex=getTabIndex(label);for(var x=0;container.childNodes[x];x++){if(container.childNodes[x].id=="tab-"+tabIndex){container.removeChild(container.childNodes[x]);break;}}var aah=container.getElementsByTagName("li");for(var x=0;x1)triggerTab(tabIndex-1);else triggerTab(tabIndex+1);}aj=aj-1;} var map=null;var al=null;var f=new Array();var r;var G="Brigade";var J=["Carlow","Cavan","Clare","Cork","Donegal","Dublin","Galway","Kerry","Kildare","Kilkenny","Laois","Leitrim","Limerick","Longford","Louth","Mayo","Meath","Monaghan","Offaly","Roscommon","Sligo","Tipperary","Waterford","Westmeath","Wexford","Wicklow"];var v;var g;var currentCorps="All";var gdir;var aa=location.protocol+"//"+location.host+location.pathname.substring(0,location.pathname.lastIndexOf('/')+1);function P(){var box=document.getElementById('box');box.style.display='block';return false;};function k(s){if(typeof s=="undefined"){s="";}if(s=="")document.getElementById('map-tooltip').style.display='none';else{if(document.getElementById('map-tooltip').style.display=='none')document.getElementById('map-tooltip').style.display='block';K(s,document.getElementById('map-tooltip'));}return false;};function B(){document.getElementById('box').style.display='none';return false;};function D(parentNode){var node=parentNode.firstChild;while(node&&node.nodeType!=1){node=node.nextSibling;}return node;};function U(){var select=document.forms["jumptocounty"].county;for(i=0;iInformation Update. In order to provide the most accurate information on local RDF units to the community and prospective members, we invite you to contribute by adding or changing the information we display on individual units. Simply submit the form below or contact us directly at "+contactEmailAddress+" "+"
"+" "+" "+" "+" "+" "+" "+" "+"
Your Name :
Your Email :
"+" \"Cancel\""+" "+"
"+"
";var updateForm=document.createElement("div");updateForm.innerHTML=formHTML;ak("Update",updateForm);triggerTab(getTabIndex("Update"));};function ad(l){var name=document.getElementById("nameInput").value;var T=document.getElementById("emailInput").value;var updateHTML=document.getElementById("updateInput").value;var myXML=""+""+""+l+""+""+name+""+""+T+""+""+updateHTML+""+"";ai("proxy.php?url=update_xml.asp",myXML);var ah=document.createElement("div");ah.innerHTML="Thank you for taking the time to help us improve the quality of information we can provide to the public. Your update will be added to a queue, and once moderated and approved, will appear as part of this units information "+"
\"Back\"
";ak("Update",ah);};function getDirections(){gdir.clear();k("");var saddr=document.getElementById("saddr").value;var daddr=document.getElementById("daddr").value;gdir.load("from: "+saddr+" to: "+daddr+"@"+g.marker.getLatLng().toUrlValue(6),{getSteps:true,preserveViewport:false,getPolyline:true});};function highlightCounty(select){if(select.selectedIndex==0)return;if(v!=null)map.removeOverlay(v);v=new GGeoXml(ajaxServerPath+"kml/"+select.options[select.selectedIndex].value+".kml",function(){if(v.loadedCorrectly()){map.addOverlay(v);v.gotoDefaultViewport(map);}});};function UnitMarker(marker,t){this.marker=marker;this.l=t.id;this.corps=t.corps;this.name=t.name;this.type=t.type;this.address="";this.telephone="";this.T="";this.training="";this.lastmodified="";if(t.parent!="undefined")this.parent=t.parent;else this.parent=0;switch(this.type){case "Brigade":this.minZoom=6;this.maxZoom=7;break;case "Unit":this.minZoom=8;this.maxZoom=9;break;case "Subunit":this.minZoom=10;this.maxZoom=17;break;}this.isLoaded=function(){if(this.address==""&&this.telephone==""&&this.training=="")return false;return true;};this.isDisplayed=function(){if(map.getZoom()>=this.minZoom&&map.getZoom()<=this.maxZoom){if(map.getBounds().contains(this.marker.getPoint())&& !this.marker.isHidden())return true;}return false;};this.genSidebarHTML=function(row){var image=this.marker.getIcon().image;row.className="rowOff";row.id=this.l;row.onclick=function(evt){showUnitInformation(this.id);};row.onmouseover=function(evt){this.className="rowOn";};row.onmouseout=function(evt){this.className="rowOff";};var cellOne=document.createElement('td');cellOne.width="40";cellOne.innerHTML="";var cellTwo=document.createElement('td');if(this.an()!="")cellTwo.innerHTML=this.name+", "+this.an();else cellTwo.innerHTML=this.name;row.appendChild(cellOne);row.appendChild(cellTwo);return row;};this.F=function(){var R=" "+" "+" ";if(this.an()==this.name){R+=" "}else{R+=" "}R+=" "+"
\""+this.name+"\"

"+this.name+"
"+getUnitMarker(this.parent).an()+"

"+this.name+"
"+this.an()+"

";return R;};this.getInfoWindowTabs=function(showDirectionsForm){if(typeof showDirectionsForm=="undefined"){showDirectionsForm=false;}var tabs=new Array(),i=0;tabs[i]=new GInfoWindowTab("Contact",Q(this,showDirectionsForm));i++;if(this.training!=""&&typeof this.training!="undefined"){tabs[i]=new GInfoWindowTab("Training","
"+this.training+"
UpdateLast Modified: "+this.lastmodified+"
");i++;}if(this.type=="Unit"&&this.O().length>0){tabs[i]=new GInfoWindowTab("Sub Units",H(this));i++;}else if(this.type=="Brigade"&&this.O().length>0){tabs[i]=new GInfoWindowTab("Units",H(this));i++;}return tabs;};this.subUnits_=null;this.O=function(){if(this.subUnits_!=null)return this.subUnits_;var subUnits=new Array();var j=0;for(var i=0;i1){mid=Math.round((low+high)/2);if(f[mid].ll){high=mid;}else{return f[mid];}}};function showUnitInformation(l,c){if(typeof c=="undefined"){c=getUnitMarker(l);}if(!c.isLoaded()){P();ag('unitinfo.asp?format=json&unit='+l,'processUnit');}else{L(c);}};function L(c){var offset=new GSize(r.infoWindowAnchor.x-r.iconAnchor.x,r.infoWindowAnchor.y-r.iconAnchor.y);var tabs=c.getInfoWindowTabs(false);g=c;g.important=true;map.openInfoWindowTabs(c.marker.getPoint(),tabs,{pixelOffset:offset});if(map.getZoom()c.maxZoom)map.setZoom(c.maxZoom);al.removeMarker(c.marker);al.addMarker(c.marker,c.minZoom,c.maxZoom);al.refresh();};function H(c){var rtnString="
"+"
";return rtnString;};function Q(c,showDirectionsForm){var I="
"+c.F()+"
"+c.address+"
";if(!showDirectionsForm&&c.type!="Brigade")I+=" [Directions]
";if(showDirectionsForm)I+="Start address:
"+""+""+""+"
« Back

";if(c.telephone!=""&&typeof c.telephone!="undefined")I+=" Tel: "+c.telephone+"
";if(c.T!=""&&typeof c.T!="undefined")I+=" Email: "+c.T+"
";I+="
Link"+"
"+"
";return I;};function showLink(){document.getElementById("unit-url").style.display="";var linkTag=D(document.getElementById("unit-link"));linkTag.href="javascript:hideLink();";linkTag.firstChild.nodeValue="Hide";};function hideLink(){document.getElementById("unit-url").style.display="none";var linkTag=D(document.getElementById("unit-link"));linkTag.href="javascript:showLink();";linkTag.firstChild.nodeValue="Link";};function EL_onLoad(){var pageTracker=_gat._getTracker("UA-1213527-1");pageTracker._initData();pageTracker._trackPageview();if(document.all&&document.styleSheets&&document.styleSheets[0]&&document.styleSheets[0].addRule){document.styleSheets[0].addRule('#rightColumn img','behavior: url(iepngfix.htc)');document.styleSheets[0].addRule('#unit-information img','behavior: url(iepngfix.htc)');document.styleSheets[0].addRule('#map-nav img','behavior: url(iepngfix.htc)');}MM_preloadImages('images/listhover.png','images/maphover.png');U();map=new GMap2(document.getElementById("map"));map.setCenter(new GLatLng(53.42262754609993,-7.8717041015625),6);map.enableContinuousZoom();P();var mt=map.getMapTypes();for(var i=0;iAmaxX){X=AmaxX;}if(YAmaxY){Y=AmaxY;}map.setCenter(new GLatLng(Y,X));}V();});GEvent.addListener(map,"infowindowopen",function(){if(!gdir)triggerTab(1);});GEvent.addListener(map,"zoomend",function(oldLevel,newLevel){if(g){if(g.isDisplayed())map.getInfoWindow().reset(g.marker.getPoint());else map.closeInfoWindow();}if(newLevel<=7&&G!="Brigade"){K(brigadeMessage,document.getElementById("message"));G="Brigade";}else if((newLevel==8||newLevel==9)&&G!="Unit"){K(unitMessage,document.getElementById("message"));G="Unit";}else if(newLevel>=10&&G!="Subunit"){K(subUnitMessage,document.getElementById("message"));G="Subunit";}var img=document.getElementById("szc");img.src="images/szc"+map.getZoom()+".gif";img.height="20";});GEvent.addListener(map,"infowindowclose",function(){if(typeof g!="undefined"&&g!=null){al.removeMarker(g.marker);g.important=false;al.addMarker(g.marker,g.minZoom,g.maxZoom);al.refresh();}});gdir=new GDirections(map);GEvent.addListener(gdir,"error",function(){switch(gdir.getStatus().code){case G_GEO_BAD_REQUEST:k("\"Directions\" A directions request could not be successfully parsed.");break;case G_GEO_SERVER_ERROR:k("\"Directions\" Server error: The geocoding request could not be successfully processed.");break;case G_GEO_MISSING_QUERY:k("\"Directions\" Missing Address: The address was either missing or had no value.");break;case G_GEO_UNKNOWN_ADDRESS:k("\"Directions\" Unknown Address: No corresponding geographic location could be found for the specified address.");break;case G_GEO_UNAVAILABLE_ADDRESS:k("\"Directions\" Unavailable Address: The geocode for the given address cannot be returned due to legal or contractual reasons.");break;case G_GEO_UNKNOWN_DIRECTIONS:k("\"Directions\" Unknown Direction: No route available between the two addresses.");break;case G_GEO_TOO_MANY_QUERIES:k("\"Directions\" Too Many Queries: The daily geocoding quota for this site has been exceeded.");break;}});GEvent.addListener(gdir,"load",function(){setTimeout("gdir.getMarker(0).hide()",1);setTimeout("gdir.getMarker(gdir.getNumGeocodes() - 1).hide()",1);if(gdir.getNumRoutes()==1){var polyline=gdir.getPolyline();var route=gdir.getRoute(0);var table=document.createElement("table");var tbody=document.createElement("tbody");table.appendChild(tbody);var row;row=tbody.insertRow(-1);var o=row.insertCell(-1);o.colSpan=3;o.style.backgroundColor="#f8f8f8";o.style.border="1px solid #e5e5e5";o.style.margin="3px";o.style.padding="2px";o.innerHTML=g.F()+"
"+route.getSummaryHtml()+"
";for(var i=0;i Problem loading unit details. (Response code "+responseCode+")");return;}var c=getUnitMarker(json.unit.id);c.address=json.unit.adr;c.telephone=json.unit.tel;c.T=json.unit.eml;c.training=json.unit.info;if(typeof json.unit.mod!="undefined")c.lastmodified=json.unit.mod;else c.lastmodified="28/11/2007";L(c);B();};function processUnits(json){if(json.error){B();k("\"Warning\" Could not load unit details. (Response code "+responseCode+")");return;}al=new MarkerManager(map,{trackMarkers:true,maxZoom:17});r=new GIcon();r.shadow=aa+"images/shadow-army.png";r.iconSize=new GSize(64.0,64.0);r.shadowSize=new GSize(97.0,64.0);r.iconAnchor=new GPoint(32.0,32.0);r.infoWindowAnchor=new GPoint(32.0,32.0);for(var i=0;i1){var rnurlterms=urlquery[1].split(",");for(var i=0;i No '"+currentCorps+"' units found. Show all corps, zoom out or try a different area.");else k("\"Warning\" No units found. Zoom out or try a different area.");}else{if(numUnitsVisible>=8){k("\"Warning\" Hint: To reduce the number of units being displayed you can select a single corps on the left or zoom in.");}else k();}};function ab(marker,b){if(typeof g!="undefined"&&g.marker==marker){return GOverlay.getZIndex(marker.getPoint().lat())+1000000;}else return GOverlay.getZIndex(marker.getPoint().lat());};function af(t,r){var icon=new GIcon(r);icon.image=aa+"images/units/"+t.icon+".png";var markerOptions={title:t.name,icon:icon,zIndexProcess:ab};var marker;if(t.offset=="true"){marker=new OffsetableMarker(t.point,markerOptions,Math.floor(Math.random()*icon.iconSize.width),Math.floor(Math.random()*icon.iconSize.height));}else{marker=new GMarker(t.point,markerOptions);}GEvent.addListener(marker,"click",function(){showUnitInformation(t.id);});return marker;};function resetMap(){if(map!=null){map.closeInfoWindow();map.setCenter(new GLatLng(53.42262754609993,-7.8717041015625),6);if(typeof v!="undefined"&&v.hasLoaded())map.removeOverlay(v);}var select=document.forms["jumptocounty"].county;select.selectedIndex=0;if(typeof gdir!="undefined"){gdir.clear();}al.refresh();setTimeout("showCorps('All')",1);triggerTab(1);};function showCorps(corps){map.closeInfoWindow();if(typeof corps=="undefined"){corps=currentCorps;}else{currentCorps=corps;}if(corps!="All"&&G=="Brigade"){k("\"Warning\" Zoom in to view '"+corps+"' units.");return;}var numUnitsVisible=0;var boolMarkersChanged=false;for(var i=0;i=1){pointer.removeChild(pointer.firstChild);}}pointer.innerHTML=s;};function ai(url,xml){var ajaxRequest=false;if(window.XMLHttpRequest){ajaxRequest=new XMLHttpRequest();if(ajaxRequest.overrideMimeType){ajaxRequest.overrideMimeType('text/html');}}else if(window.ActiveXObject){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}if(!ajaxRequest){return false;}ajaxRequest.open("POST",url,true);ajaxRequest.send(xml);};function ag(jsonFeedURL,callback){var script=document.createElement('script');script.setAttribute('src',ajaxServerPath+jsonFeedURL+'&callback='+callback);script.setAttribute('type','text/javascript');document.documentElement.firstChild.appendChild(script);};function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i