function el(id){return document.getElementById(id);};function init(){el("idMarkerTypeAll").onclick=function(){mm_a.selectMarkers(0);};el("idMarkerType03").onclick=function(){mm_a.selectMarkers(3);};el("idMarkerType04").onclick=function(){mm_a.selectMarkers(4);};el("idMarkerType07").onclick=function(){mm_a.selectMarkers(7);};el("idMarkerType05").onclick=function(){mm_a.selectMarkers(5);};el("idMarkerType08").onclick=function(){mm_a.selectMarkers(8);};el("idMarkerType02").onclick=function(){mm_a.selectMarkers(2);};el("idMarkerType11").onclick=function(){mm_a.selectMarkers(11);};el("idMarkerType15").onclick=function(){mm_a.selectMarkers(15);};el("idMarkerType10").onclick=function(){mm_a.selectMarkers(10);};el("idMarkerType12").onclick=function(){mm_a.selectMarkers(12);};el("idMarkerType13").onclick=function(){mm_a.selectMarkers(13);};el("idMarkerType16").onclick=function(){mm_a.selectMarkers(16);};el("idMarkerType14").onclick=function(){mm_a.selectMarkers(14);};el("idMarkerType06").onclick=function(){mm_a.selectMarkers(6);};var params=window.location.search;var aK=0;var typeX=params.indexOf("?t=");if(typeX> -1){aK=params.substr(typeX+3);}if(aK==0){el("idMarkerTypeAll").checked=true;}else if(aK==2){el("idMarkerType02").checked=true;}else if(aK==3){el("idMarkerType03").checked=true;}else if(aK==4){el("idMarkerType04").checked=true;}else if(aK==5){el("idMarkerType05").checked=true;}else if(aK==6){el("idMarkerType06").checked=true;}else if(aK==7){el("idMarkerType07").checked=true;}else if(aK==8){el("idMarkerType08").checked=true;}else if(aK==10){el("idMarkerType10").checked=true;}else if(aK==11){el("idMarkerType11").checked=true;}else if(aK==12){el("idMarkerType12").checked=true;}else if(aK==13){el("idMarkerType13").checked=true;}else if(aK==14){el("idMarkerType14").checked=true;}else if(aK==15){el("idMarkerType15").checked=true;}else if(aK==16){el("idMarkerType16").checked=true;}};mm_a=(function(){var U=new Object();var R=new Object();R["eastern_missouri"]=[0,1];R["western_missouri"]=[2];R["nebraska_iowa"]=[3,4];R["south_dakota"]=[5];R["southern_north_dakota"]=[6];R["western_north_dakota"]=[7];R["northern_montana"]=[8,28];R["southern_montana"]=[30];R["northwestern_montana"]=[27,14];R["southwestern_montana"]=[9,10,11,12,13,29];R["idaho"]=[15,16,17,18,19,25,26];R["southeastern_washington_state"]=[20,24];R["lower_columbia_river"]=[21];R["pacific_coast"]=[22,23];function lcm(id,type,lat,lng,title,url){this.id=id;this.type=type;this.url=url;GMarker.call(this,new GLatLng(lat,lng),{title:title});};lcm.prototype=new GMarker(new GLatLng(0,0));function G(ax){var aL=20;var aM=69;var aq=aL/aM;var sw=ax.getSouthWest();var ne=ax.getNorthEast();var ba=sw.lat()-aq;var bb=sw.lng()-aq;var aN=ne.lat()+aq;var ar=ne.lng()+aq;return new GLatLngBounds(new GLatLng(ba,bb),new GLatLng(aN,ar));};function c(aK){for(var id in U){var gMarker=U[id];if(gMarker.type!=aK){gMarker.hide();}}};function I(aX){var be=1;if(aX=="eastern_missouri"){be=1;}else if(aX=="western_missouri"){be=2;}else if(aX=="nebraska_iowa"){be=3;}else if(aX=="south_dakota"){be=4;}else if(aX=="southern_north_dakota"){be=5;}else if(aX=="western_north_dakota"){be=6;}else if(aX=="northern_montana"){be=7;}else if(aX=="southern_montana"){be=8;}else if(aX=="northwestern_montana"){be=9;}else if(aX=="southwestern_montana"){be=10;}else if(aX=="idaho"){be=11;}else if(aX=="southeastern_washington_state"){be=12;}else if(aX=="lower_columbia_river"){be=13;}else if(aX=="pacific_coast"){be=14;}var aw="../DbPhp/MarkersInRegion.php?t="+be;GDownloadUrl(aw,function(aZ,aY){if(aY==200){var ak=44.5771;var aj= -108.2084;var aI=eval("("+aZ+")");for(var i in aI){var aH=aI[i];var gMarker=new lcm(aH.markerId,aH.type,aH.lat+ak,aH.lng+aj,aH.title,aH.url);gMap.addOverlay(gMarker);U[aH.markerId]=gMarker;}if(el("idMarkerType02").checked){c(2);}else if(el("idMarkerType03").checked){c(3);}else if(el("idMarkerType04").checked){c(4);}else if(el("idMarkerType05").checked){c(5);}else if(el("idMarkerType06").checked){c(6);}else if(el("idMarkerType07").checked){c(7);}else if(el("idMarkerType08").checked){c(8);}else if(el("idMarkerType10").checked){c(10);}else if(el("idMarkerType11").checked){c(11);}else if(el("idMarkerType12").checked){c(12);}else if(el("idMarkerType13").checked){c(13);}else if(el("idMarkerType14").checked){c(14);}else if(el("idMarkerType15").checked){c(15);}else if(el("idMarkerType16").checked){c(16);}}})};function o(aP){if(aP&&aP.id){window.location="../"+aP.id+"/"+aP.url+".html";}};return returnValue={setupMap:function(aX){var aW=R[aX];gMap.setMapType(G_NORMAL_MAP);gMap.addControl(new GLargeMapControl());gMap.addControl(new GScaleControl());gMap.addControl(new GMapTypeControl());tm.initialize(gMap);tm.addPolylineSet(aW);var aC=tm.getEnclosingBounds();aC=G(aC);var center=aC.getCenter();var zoom=gMap.getBoundsZoomLevel(aC);gMap.setCenter(center,zoom);I(aX);GEvent.addListener(gMap,"click",o);},selectMarkers:function(aK){if(aK==0){for(var id in U){U[id].show();}}else{for(var id in U){var gMarker=U[id];if(gMarker.type==aK){gMarker.show();}else{gMarker.hide();}}}},handleResize:function(){var aJ=el("idMapDiv");aJ.style.width="0px";var minWidth=el("idMainTable").clientWidth-el("idRightCell").offsetWidth;var aO=Math.max(minWidth,el("idOptionsTable").offsetWidth);aJ.style.width=aO+"px";if(typeof(gMap)!=="undefined"){gMap.checkResize();}}};})();