/* FILE ARCHIVED ON 23:36:09 Nov 2, 2016 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 13:56:19 Jul 31, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ var home_location; var drc_location_array = new Array(); function submit_geocoder() { if ($("#address").val().length > 1) { call_asd_geocoder(); //document.drc_locator_form.submit(); } else { document.getElementById("announcementdiv").innerHTML = "Please enter an address for search."; } } function call_asd_geocoder() { $.blockUI( { message : ' Just a moment... ' }); $ .getJSON( "getLocations.htm", { "address" : $("#address").val() }, function(data) { $.unblockUI(); document.getElementById("home_score").value = data.geoScore; document.getElementById("latitude").value = data.latitude; document.getElementById("longitude").value = data.longitude; document.getElementById("mode").value = "view_results"; document.getElementById("home_address").value = data.formattedAddress; if (data.geoError != null && data.proceed != true) { document.getElementById("announcementdiv").innerHTML = data.geoError; document.getElementById("messageInput").value = data.geoError; } else { if (data.geoError!= null){ document.getElementById("messageInput").value = data.geoError; }else{ document.getElementById("messageInput").value = "The address searched: " + data.geocodeQueryString + ". The address actually geocoded: " + data.formattedAddress +"."; } document.drc_locator_form.submit(); } }); } var gdirectionPanel; var gdirections; var url; function call_directions(complete_address, drc_address, lat, lon) { url = "directions.htm?begLoc=" + complete_address + "&endLoc=" + drc_address + "&lat=" + lat + "&lon=" + lon var Win1 = window.open(url, "Directions", "width=600,height=800,resizable=yes,scrollbars=yes"); } function resetForm() { document.getElementById("address").value = ""; } function showHide(item, arrow) { var arrow = document.getElementById(arrow); var arrowpath = arrow.src; arrowpath = arrowpath.substring(0, arrowpath.lastIndexOf("/")); item = document.getElementById(item); if (item.style.display == "block") { //if default open is desired change this to !="none" item.style.display = "none"; arrow.src = arrowpath + "/modifysearch.png"; arrow.alt = "Expand the 'ENTER YOUR LOCATION INFORMATION' section"; } else { item.style.display = "block"; arrow.src = arrowpath + "/hidesearch.png"; arrow.alt = "Collapse the 'ENTER YOUR LOCATION INFORMATION' section"; } } function searchByCurGeo(){ if (!navigator.geolocation) { document.getElementById("announcementdiv").innerHTML = "Unable to search by current geolocation because the services are not supported by your browser."; return false; } document.getElementById("announcementdiv").innerHTML = "Searching by current geolocation. Please wait..."; navigator.geolocation.getCurrentPosition(function( position ) { if( position.coords && position.coords.latitude && position.coords.longitude ){ document.getElementById("announcementdiv").innerHTML = "Searching by current geolocation (latitude/longitude): " + position.coords.latitude + "/" + position.coords.longitude + "..."; document.getElementById("latitude").value = position.coords.latitude; document.getElementById("longitude").value = position.coords.longitude; document.getElementById("mode").value = "view_results"; document.getElementById("announcementdiv").innerHTML = ""; document.getElementById("messageInput").value = "Searched by current geolocation (latitude/longitude): " + position.coords.latitude + "/" + position.coords.longitude + "."; document.drc_locator_form.submit(); } }, function(error){ var errors = [ 'Unknown', 'Permission denied', 'Position unavailable', 'Timeout' ]; document.getElementById("announcementdiv").innerHTML = "Error during search by current geolocation: " + errors[ error.code ] + "."; }, { enableHighAccuracy: true, timeout: 60000 } ); }