function GetXmlHttpObject(){var D=null;try{D=new XMLHttpRequest();}catch(C){try{D=new ActiveXObject("Msxml2.XMLHTTP");}catch(B){try{D=new ActiveXObject("Microsoft.XMLHTTP");}catch(A){return null;}}}return D;}var xmlHttp=GetXmlHttpObject();function stateChanged(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){window.status="";eval(xmlHttp.responseText);}}function nextVELocations(H,G,F,C,A,B,E){window.status="Fetching locations...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}var D="get_locations.php?minx="+H+"&maxx="+F+"&miny="+G+"&maxy="+C+"&record_start="+A+"&record_limit="+B+"&site_state_abbr="+E+"&type=VE";xmlHttp.open("GET",D,true);xmlHttp.onreadystatechange=stateChanged;xmlHttp.send(null);}function nextLocationsDropDown(A,B,E,D){window.status="Populating dropdown...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}var C="get_location_dropdown.php?site_state_abbr="+E+"&record_start="+A+"&record_limit="+B+"&loccnt="+D;xmlHttp.open("GET",C,true);xmlHttp.onreadystatechange=stateChanged;xmlHttp.send(null);}function stateChanged(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){window.status="";eval(xmlHttp.responseText);}}function nextLocationGroup(A,B){try{window.status="Fetching locations...";var C="get_locations.php?record_start="+A+"&record_limit="+B;var D=OpenLayers.loadURL(C,null,null,requestSuccess,requestFailure);}catch(E){}}function nextLocations(C,B,K,J,F,H,D,A){try{window.status="Fetching locations...";if(document.getElementById("mapLoader")){ajaxCount++;document.getElementById("mapLoader").src="images/ajax-loader-map.gif";}var G="get_locations.php?minx="+C+"&maxx="+K+"&miny="+B+"&maxy="+J+"&record_start="+F+"&record_limit="+H+"&site_state_abbr="+D;if(A!=null&&A!=""){G+="&force="+A;}var E=OpenLayers.loadURL(G,null,null,requestSuccess,requestFailure);}catch(I){}}function nextUSGSLocations(D,C,K,J,G,H,E,A){try{window.status="Fetching locations...";if(document.getElementById("mapLoader")){ajaxCount++;document.getElementById("mapLoader").src="images/ajax-loader-map.gif";}var B="get_usgs_locations.php?minx="+D+"&maxx="+K+"&miny="+C+"&maxy="+J+"&record_start="+G+"&record_limit="+H+"&site_state_abbr="+E;var F=OpenLayers.loadURL(B,null,null,requestSuccess,requestFailure);}catch(I){}}function nextTrips(C,B,K,J,F,G,D,A){try{window.status="Fetching trips...";if(document.getElementById("mapLoader")){ajaxCount++;document.getElementById("mapLoader").src="images/ajax-loader-map.gif";}var I="get_trip_locations.php?minx="+C+"&maxx="+K+"&miny="+B+"&maxy="+J+"&rs="+F+"&rl="+G+"&site_state_abbr="+D;if(loaded_trip_id!=null&&loaded_trip_id!=""){I+="&inc="+loaded_trip_id;}if(A!=null&&A!=""){I+="&force="+A;}var E=OpenLayers.loadURL(I,null,null,requestSuccess,requestFailure);}catch(H){}}function nextOtherLocations(D,C,K,J,G,H,E,B){try{window.status="Fetching amenities...";if(document.getElementById("mapLoader")){ajaxCount++;document.getElementById("mapLoader").src="images/ajax-loader-map.gif";}var A="get_other_locations.php?minx="+D+"&maxx="+K+"&miny="+C+"&maxy="+J+"&record_start="+G+"&record_limit="+H+"&site_state_abbr="+E;var F=OpenLayers.loadURL(A,null,null,requestSuccess,requestFailure);}catch(I){}}function nextPano(B,A,J,I,F,G,C){try{window.status="Fetching panoramio photos...";if(document.getElementById("mapLoader")){ajaxCount++;document.getElementById("mapLoader").src="images/ajax-loader-map.gif";}var H="get_panoramios.php?from="+F+"&to="+G+"&minx="+B+"&miny="+A+"&maxx="+J+"&maxy="+I;var D=OpenLayers.loadURL(H,null,null,requestSuccess,requestFailure);}catch(E){}}function nextHotspots(B,A,I,H,E,F,C){try{window.status="Fetching hotspots...";if(document.getElementById("mapLoader")){ajaxCount++;document.getElementById("mapLoader").src="images/ajax-loader-map.gif";}var J="get_hotspots.php?minx="+B+"&maxx="+I+"&miny="+A+"&maxy="+H+"&rs="+E+"&rl="+F+"&site_state_abbr="+C;var D=OpenLayers.loadURL(J,null,null,requestSuccess,requestFailure);}catch(G){}}function nextPhotos(B,A,J,I,F,G,D){try{window.status="Fetching photos...";if(document.getElementById("mapLoader")){ajaxCount++;document.getElementById("mapLoader").src="images/ajax-loader-map.gif";}var C="get_photos.php?minx="+B+"&maxx="+J+"&miny="+A+"&maxy="+I+"&rs="+F+"&rl="+G+"&site_state_abbr="+D;var E=OpenLayers.loadURL(C,null,null,requestSuccess,requestFailure);}catch(H){}}function closeUserInfo(){if(document.getElementById("noshowinfo")){if(document.getElementById("noshowinfo").checked){window.status="Closing user box...";var A="close_user_info.php?noshowinfo=true";var B=OpenLayers.loadURL(A,null,null,requestSuccess,requestFailure);}else{document.getElementById("user_info_div").style.display="none";}}}function loadTrip(D){try{window.status="Loading trip on map...";var A="load_trip.php?trip_id="+D;var B=OpenLayers.loadURL(A,null,null,requestSuccess,requestFailure);}catch(C){}}function requestSuccess(request){try{if(document.getElementById("mapLoader")){ajaxCount--;if(ajaxCount<=0){ajaxCount=0;document.getElementById("mapLoader").src="images/pixel.gif";}}var response=request.responseText||"";window.status="";if(response!=""){eval(response);}}catch(e){}}function requestFailure(A){try{if(document.getElementById("mapLoader")){ajaxCount--;if(ajaxCount<=0){ajaxCount=0;document.getElementById("mapLoader").src="images/pixel.gif";}}A.transport.abort();window.status="Problem while fetching data...";}catch(B){}}function getUserStats(D,B,A){window.status="Getting user stats...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById("statsdiv")){document.getElementById("statsdiv").innerHTML="Loading stats...";}var C="/get_user_stats.php?userid="+B+"&username="+D+"&exclude="+A;xmlHttp.open("GET",C,true);xmlHttp.onreadystatechange=populateStatsDiv;xmlHttp.send(null);}function populateStatsDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){window.status="";if(document.getElementById("statsdiv")){document.getElementById("statsdiv").innerHTML=xmlHttp.responseText;}}}function watchTrip(C,A){var D=confirm("While watching a trip, we will send you an email notification anytime someone reviews or comments on this trip. Are you sure you want to watch this trip?");if(D==true){var F=new Date();var E=F.getTime();window.status="Subscribing to trip...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById("watchdiv")){document.getElementById("watchdiv").innerHTML="Processing...";}var B="watch.php?type=trip&userid="+A+"&tripid="+C+"&timestamp="+E;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=updateWatchDiv;xmlHttp.send(null);}else{return ;}}function watchLocation(C,A){var D=confirm("While watching a location, we will send you an email notification anytime someone reviews or comments on this location. Are you sure you want to watch this location?");if(D==true){var F=new Date();var E=F.getTime();window.status="Subscribing to location...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById("watchdiv")){document.getElementById("watchdiv").innerHTML="Processing...";}var B="watch.php?type=location&userid="+A+"&locid="+C+"&timestamp="+E;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=updateWatchDiv;xmlHttp.send(null);}else{return ;}}function watchSpecies(C,A){var D=confirm("While watching a species, we will send you an email notification anytime someone comments on or writes a recipe for this species. Are you sure you want to watch this species?");if(D==true){var F=new Date();var E=F.getTime();window.status="Subscribing to species...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById("watchdiv")){document.getElementById("watchdiv").innerHTML="Processing...";}var B="watch.php?type=species&userid="+A+"&fish_id="+C+"&timestamp="+E;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=updateWatchDiv;xmlHttp.send(null);}else{return ;}}function stopWatchTrip(C,A){var D=confirm("Are you sure you want to stop watching this trip? You will no longer receive email notifications when someone reviews or comments on this trip.");if(D==true){var F=new Date();var E=F.getTime();window.status="Unsubscribing to trip...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById("watchdiv")){document.getElementById("watchdiv").innerHTML="Processing...";}var B="watch.php?type=trip&userid="+A+"&tripid="+C+"&stop=true&timestamp="+E;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=updateWatchDiv;xmlHttp.send(null);}else{return ;}}function stopWatchLocation(C,A){var D=confirm("Are you sure you want to stop watching this location? You will no longer receive email notifications when someone reviews or comments on this location.");if(D==true){var F=new Date();var E=F.getTime();window.status="Unsubscribing to location...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById("watchdiv")){document.getElementById("watchdiv").innerHTML="Processing...";}var B="watch.php?type=location&userid="+A+"&locid="+C+"&stop=true&timestamp="+E;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=updateWatchDiv;xmlHttp.send(null);}else{return ;}}function stopWatchSpecies(C,A){var D=confirm("Are you sure you want to stop watching this species? You will no longer receive email notifications when someone comments on or writes a recipe for this species.");if(D==true){var F=new Date();var E=F.getTime();window.status="Unsubscribing to species...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById("watchdiv")){document.getElementById("watchdiv").innerHTML="Processing...";}var B="watch.php?type=species&userid="+A+"&fish_id="+C+"&stop=true&timestamp="+E;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=updateWatchDiv;xmlHttp.send(null);}else{return ;}}var dividtodelete;function permStopWatchTrip(C,A,G){var D=confirm("Are you sure you want to stop watching this trip? You will no longer receive email notifications when someone reviews or comments on this trip.");if(D==true){var F=new Date();var E=F.getTime();window.status="Unsubscribing to trip...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById(G)){document.getElementById(G).innerHTML="Processing...";dividtodelete=G;}var B="watch.php?type=trip&userid="+A+"&tripid="+C+"&stop=true&timestamp="+E;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=deleteWatchDiv;xmlHttp.send(null);}else{return ;}}function permStopWatchLocation(C,A,G){var D=confirm("Are you sure you want to stop watching this location? You will no longer receive email notifications when someone reviews or comments on this location.");if(D==true){var F=new Date();var E=F.getTime();window.status="Unsubscribing to location...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById(G)){dividtodelete=G;document.getElementById(G).innerHTML="Processing...";}var B="watch.php?type=location&userid="+A+"&locid="+C+"&stop=true&timestamp="+E;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=deleteWatchDiv;xmlHttp.send(null);}else{return ;}}function permStopWatchSpecies(C,A,G){var D=confirm("Are you sure you want to stop watching this species? You will no longer receive email notifications when someone comments on or writes a recipe for this species.");if(D==true){var F=new Date();var E=F.getTime();window.status="Unsubscribing to species...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById(G)){dividtodelete=G;document.getElementById(G).innerHTML="Processing...";}var B="watch.php?type=species&userid="+A+"&fish_id="+C+"&stop=true&timestamp="+E;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=deleteWatchDiv;xmlHttp.send(null);}else{return ;}}function permStopWatchTopic(C,A,G){var D=confirm("Are you sure you want to stop watching this topic? You will no longer receive email notifications when someone replies to this message board topic.");if(D==true){var F=new Date();var E=F.getTime();window.status="Unsubscribing to topic...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById(G)){dividtodelete=G;document.getElementById(G).innerHTML="Processing...";}var B="watch.php?type=topic&userid="+A+"&topicid="+C+"&stop=true&timestamp="+E;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=deleteWatchDiv;xmlHttp.send(null);}else{return ;}}function removeAllWatch(C,A,G){var D=confirm("Are you sure you want to stop watching all "+C+"s?");if(D==true){var F=new Date();var E=F.getTime();window.status="Unsubscribing to all "+C+"s...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById(G)){dividtodelete=G;document.getElementById(G).innerHTML="Processing...";}var B="watch.php?type="+C+"&userid="+A+"&delete_all=true&stop=true&timestamp="+E;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=deleteWatchDiv;xmlHttp.send(null);}else{return ;}}function updateWatchDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){window.status="";if(document.getElementById("watchdiv")){document.getElementById("watchdiv").innerHTML=xmlHttp.responseText;}}}function deleteWatchDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){window.status="";if(document.getElementById(dividtodelete)){document.getElementById(dividtodelete).innerHTML="Successfully removed.";}}}var dividtoupdate;function rateItem(B,D,G,C){var F=new Date();var E=F.getTime();window.status="Rating "+C+"...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById(G)){dividtoupdate=G;document.getElementById(G).innerHTML="Processing...";}var A="rate_item.php?item_id="+B+"&rating="+D+"&timestamp="+E+"&type="+C;xmlHttp.open("GET",A,true);xmlHttp.onreadystatechange=updateRateItemDiv;xmlHttp.send(null);}function updateRateItemDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){window.status="";if(document.getElementById(dividtoupdate)){document.getElementById(dividtoupdate).innerHTML=xmlHttp.responseText;}}}var commentidtoupdate;function addItemComment(C,A,H,D){var G=document.getElementById(A).value;if(G==null||G==""||G==" "){alert("Please enter a comment before continuing.");return ;}G=escape(G);var F=new Date();var E=F.getTime();window.status="Adding comment...";if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}if(document.getElementById(H)){commentidtoupdate=H;document.getElementById(H).innerHTML="Processing...";}var B="comment_item.php?item_id="+C+"&comment="+G+"&timestamp="+E+"&type="+D;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=updateCommentItemDiv;xmlHttp.send(null);document.getElementById("comment_item_div_"+C).innerHTML='<font style="color:#ff0000;">Comment processed.</font>';}function updateCommentItemDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){window.status="";if(document.getElementById(commentidtoupdate)){window.location.reload(true);}}}var quicksearchdiv;var quicksearchinput;var activeListNode=-1;var suggestList=null;var quickSearchDelay=500;var lastQuickSearch=null;function ajaxSearch(J,E,G,D,F){var H=J.keyCode;switch(H){case 37:break;case 38:if(suggestList!=null&&suggestList.hasChildNodes()){if(activeListNode-1<0){activeListNode=suggestList.childNodes.length-1;}else{activeListNode--;}for(var C=0;C<suggestList.childNodes.length;C++){if(activeListNode==C){selectedListNode=suggestList.childNodes[C];selectedListNode.style.backgroundColor="#457290";selectedListNode.childNodes[0].style.color="#FFFFFF";document.getElementById(F).value=selectedListNode.id.replace("qsearch_","");}else{suggestList.childNodes[C].style.backgroundColor="#DDDDDD";suggestList.childNodes[C].childNodes[0].style.color="#000000";}}}break;case 39:break;case 40:if(suggestList!=null&&suggestList.hasChildNodes()){if(suggestList.childNodes.length-1>activeListNode){activeListNode++;}else{activeListNode=0;}for(var C=0;C<suggestList.childNodes.length;C++){if(activeListNode==C){selectedListNode=suggestList.childNodes[C];selectedListNode.style.backgroundColor="#457290";selectedListNode.childNodes[0].style.color="#FFFFFF";document.getElementById(F).value=selectedListNode.id.replace("qsearch_","");}else{suggestList.childNodes[C].style.backgroundColor="#DDDDDD";suggestList.childNodes[C].childNodes[0].style.color="#000000";}}}break;default:var B=new Date();var I=B.getTime();if(xmlHttp==null){return ;}if(document.getElementById(D)){quicksearchdiv=D;}if(document.getElementById(F)){quicksearchinput=F;}if(G!=null&&G!=""){if(lastQuickSearch==null||(I-lastQuickSearch)>quickSearchDelay){var A="quick_search.php?type="+E+"&value="+G+"&timestamp="+I;xmlHttp.open("GET",A,true);xmlHttp.onreadystatechange=updateQuickSearchDiv;xmlHttp.send(null);lastQuickSearch=I;}}else{hideQuickSearch();}prevSearchValue=G;break;}}function updateQuickSearchDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(document.getElementById(quicksearchdiv)&&xmlHttp.responseText!=""){showQuickSearch();document.getElementById(quicksearchdiv).innerHTML=xmlHttp.responseText;suggestList=document.getElementById(quicksearchdiv).firstChild;}else{hideQuickSearch();}}}function qSearch(A){if(document.getElementById(quicksearchinput)){document.getElementById(quicksearchinput).value=A;hideQuickSearch();}}function hideQuickSearch(){if(document.getElementById(quicksearchdiv)){document.getElementById(quicksearchdiv).style.display="none";document.getElementById(quicksearchdiv).innerHTML="";}suggestList=null;activeListNode=-1;}function showQuickSearch(){document.getElementById(quicksearchdiv).style.display="block";}var membersTargetSelect=null;function searchMembersWidget(C,D,E){var G=new Date();var F=G.getTime();if(document.getElementById(E)){membersTargetSelect=E;}if(D!=null&&D!=""){if(lastQuickSearch==null||(F-lastQuickSearch)>quickSearchDelay){clearMembersWidget();var A="quick_search.php?type=users_widget&value="+D+"&timestamp="+F+"&target_select_id="+E;var B=OpenLayers.loadURL(A,null,null,requestSuccess,requestFailure);lastQuickSearch=F;}}else{clearMembersWidget();}}function clearMembersWidget(){if(document.getElementById(membersTargetSelect)){var C=document.getElementById(membersTargetSelect);var B=C.parentNode;var A=C.cloneNode(false);B.replaceChild(A,C);return A;}}function getAdvancedSearch(B){var D=new Date();var C=D.getTime();if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}var A="";if(B=="trips"){A="find_trips_advanced.php?timestamp="+C;}else{if(B=="locations"){A="find_locations_advanced.php?timestamp="+C;}}xmlHttp.open("GET",A,true);xmlHttp.onreadystatechange=updateAdvancedSearchDiv;xmlHttp.send(null);}function updateAdvancedSearchDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(document.getElementById("advanced_search")&&xmlHttp.responseText!=""){document.getElementById("advanced_search").innerHTML=xmlHttp.responseText;}else{document.getElementById("advanced_search").innerHTML="There was a problem grabbing the advanced options.";}}}function getUSGSGraph(E,D,F,C,A){var H=new Date();var G=H.getTime();if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}var B="get_usgs_graph.php?chart_type="+E+"&siteid="+D+"&sitetitle="+F+"&chart_width="+C+"&chart_height="+A+"&timestamp="+G;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=updateUSGSGraphDiv;xmlHttp.send(null);}function updateUSGSGraphDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(document.getElementById("usgsGraphDiv")&&xmlHttp.responseText!=""){document.getElementById("usgsGraphDiv").innerHTML=xmlHttp.responseText;}else{document.getElementById("usgsGraphDiv").innerHTML="";}}}var userLoggedIn=false;function setUSGSDefault(B){if(userLoggedIn){var D=new Date();var C=D.getTime();if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}var A="set_usgs_default.php?siteid="+B+"&timestamp="+C;xmlHttp.open("GET",A,true);xmlHttp.onreadystatechange=setUSGSDefaultResult;xmlHttp.send(null);}else{alert("You must be logged in to set your default USGS Water Station.");}}function setUSGSDefaultResult(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(document.getElementById("usgsDefault")&&xmlHttp.responseText!=""){document.getElementById("usgsDefault").innerHTML=xmlHttp.responseText;}else{document.getElementById("usgsDefault").innerHTML="Error setting default USGS Water Station.";}}}var theFlagDiv;function flagItem(B,G,C,F){if(F!=null&&F!=""){theFlagDiv=document.getElementById(F);}else{theFlagDiv=document.getElementById("flagDiv");}var E=new Date();var D=E.getTime();if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}var A="flag_item.php?item_type="+B+"&item_id="+G+"&reason="+C+"&timestamp="+D;xmlHttp.open("GET",A,true);xmlHttp.onreadystatechange=updateFlagDiv;xmlHttp.send(null);}function updateFlagDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(theFlagDiv&&xmlHttp.responseText!=""){theFlagDiv.innerHTML=xmlHttp.responseText;}else{theFlagDiv.innerHTML="Error flagging the current item.";}}}var getContentDiv;function ajaxGetContent(E,B){getContentDiv=document.getElementById(E);getContentDiv.style.display="block";var D=new Date();var C=D.getTime();if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}var A="ajax_get_content.php?type="+B+"&timestamp="+C;xmlHttp.open("GET",A,true);xmlHttp.onreadystatechange=updateAjaxContentDiv;xmlHttp.send(null);}function updateAjaxContentDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(getContentDiv&&xmlHttp.responseText!=""){getContentDiv.innerHTML=xmlHttp.responseText;}else{getContentDiv.innerHTML="Error fetching content.";}}}function postToUrl(J,I,H){H=H||"post";var K=document.createElement("form");K.setAttribute("id","fishPostForm");K.setAttribute("method",H);K.setAttribute("action",J);for(var L=0;L<I.length;L++){var G=document.createElement("input");G.setAttribute("type","hidden");G.setAttribute("name",I[L].name);G.setAttribute("value",I[L].value);K.appendChild(G);}document.body.appendChild(K);K.submit();}function getWeatherForecast(C,B){if(C!=""&&B!=""){var E=new Date();var D=E.getTime();if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}var A="get_weather.php?lat="+C+"&lng="+B+"&timestamp="+D;xmlHttp.open("GET",A,true);xmlHttp.onreadystatechange=updateWeatherForecastDiv;xmlHttp.send(null);}else{document.getElementById("weatherForecastDiv").innerHTML="No weather available...";}}function updateWeatherForecastDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(document.getElementById("weatherForecastDiv")&&xmlHttp.responseText!=""){document.getElementById("weatherForecastDiv").innerHTML=xmlHttp.responseText;}else{document.getElementById("weatherForecastDiv").innerHTML="Error fetching weather...";}}}var tackleBoxDiv;function addToTackleBox(I,S,O,L,G,A,D,R,T,E,M,N,P,Q,C,J,B){tackleBoxDiv=I;if(L!=""){L=L.substring(0,500);}var K=new Date();var H=K.getTime();if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}var F="update_gear.php?add=true&itemType="+S+"&itemName="+O+"&itemDesc="+L+"&itemPrice="+G+"&itemRPrice="+A+"&itemSPrice="+D+"&itemAdID="+R+"&itemAdvID="+T+"&itemAdvName="+E+"&itemManName="+M+"&itemCatID="+N+"&itemBuyUrl="+P+"&itemImageUrl="+Q+"&itemSKU="+C+"&itemUPC="+J+"&itemISBN="+B;xmlHttp.open("GET",F,true);xmlHttp.onreadystatechange=updateTackleBoxDiv;xmlHttp.send(null);}function deleteFromTackleBox(A,C){var D=confirm("Are you sure you want to remove this item from your Tackle Box?");if(D==true){tackleBoxDiv=A;var F=new Date();var E=F.getTime();if(xmlHttp==null){alert("Browser does not support HTTP Request. We recommend using Mozilla Firefox 2.0 or Internet Explorer 6+ browsers.");return ;}var B="update_gear.php?delete=true&itemUPC="+C;xmlHttp.open("GET",B,true);xmlHttp.onreadystatechange=updateTackleBoxDiv;xmlHttp.send(null);}else{return ;}}function updateTackleBoxDiv(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(document.getElementById(tackleBoxDiv)&&xmlHttp.responseText!=""){document.getElementById(tackleBoxDiv).innerHTML=xmlHttp.responseText;}else{document.getElementById(tackleBoxDiv).innerHTML="Error adding item...";}}}function saveMapState(D,B,A,F,E){if(xmlHttp==null){return ;}var C="map_save_state.php?zoom="+D+"&minx="+B+"&miny="+A+"&maxx="+F+"&maxy="+E;xmlHttp.open("GET",C,true);xmlHttp.send(null);}
