var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function encode64(input) {var output = "";var chr1, chr2, chr3;var enc1, enc2, enc3, enc4;var i = 0;do {chr1 = input.charCodeAt(i++);chr2 = input.charCodeAt(i++);chr3 = input.charCodeAt(i++);enc1 = chr1 >> 2;enc2 = (chr1 & 3) << 4 | chr2 >> 4;enc3 = (chr2 & 15) << 2 | chr3 >> 6;enc4 = chr3 & 63;if (isNaN(chr2)) {enc3 = enc4 = 64;} else {if (isNaN(chr3)) {enc4 = 64;}}output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4);} while (i < input.length);return output;}function decode64(input) {var output = "";var chr1, chr2, chr3;var enc1, enc2, enc3, enc4;var i = 0;input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");do {enc1 = keyStr.indexOf(input.charAt(i++));enc2 = keyStr.indexOf(input.charAt(i++));enc3 = keyStr.indexOf(input.charAt(i++));enc4 = keyStr.indexOf(input.charAt(i++));chr1 = enc1 << 2 | enc2 >> 4;chr2 = (enc2 & 15) << 4 | enc3 >> 2;chr3 = (enc3 & 3) << 6 | enc4;output = output + String.fromCharCode(chr1);if (enc3 != 64) {output = output + String.fromCharCode(chr2);}if (enc4 != 64) {output = output + String.fromCharCode(chr3);}} while (i < input.length);return output;}function anim2(imgObj, url) {imgObj.src = url;}function anim(name, type) {if (type == 0) {document.images[name].src = "/images/" + name + ".gif";}if (type == 1) {document.images[name].src = "/images/" + name + "_over.gif";}if (type == 2) {document.images[name].src = "/images/" + name + "_down.gif";}}function checkAll(cbox, formObj) {var i = 0;if (cbox.checked == true) {cbox.checked == false;} else {cbox.checked == true;}while (formObj.elements[i] != null) {formObj.elements[i].checked = cbox.checked;i++;}}function checkEvent(formObj) {var key = -1;var shift;key = event.keyCode;shift = event.shiftKey;if (!shift && key == 13) {formObj.submit();}}function show(block) {theBlock = document.getElementById(block);if (theBlock.style.display == "none") {theBlock.style.display = "block";} else {theBlock.style.display = "none";}}function confirmClick(message, href) {if (confirm(message)) {location.href = href;} else {return false;}}function showLoadImg(cmd, img_id) {loadImg = document.getElementById(img_id);if (cmd == "show") {loadImg.style.opacity = 1;loadImg.style.filter = "alpha(opacity=100)";} else {loadImg.style.opacity = 0;loadImg.style.filter = "alpha(opacity=0)";}}if (typeof jQuery != "undefined") {var tk_twitter_pop = function(text, event) {window.open("http://twitter.com/intent/tweet?text=" + text, "", "width=400px,height=550px,left=" + (event.pageX - 300) + "px,top=" + (event.pageY - 300) + "px");};var validate_addons = function(formObj) {var e = formObj.elements;var val_arr = "";for (x in e) {if (typeof e[x].value != "undefined" && e[x].value != "") {val_arr += "&" + e[x].name + "=" + e[x].value;}}jQuery.get(sl_includes_base + "/update-keys.php?" + val_arr, function(data) {jQuery("#validation_status div").html(data);jQuery("#validation_status_link").click();showLoadImg("stop", "module-keys");setTimeout(function() {location.reload();}, 1E4);});};var level3_links = function(sublink_obj, mainlink_id, show) {if (typeof tsn_link_arr[sublink_obj.id] != "undefined") {l3n = document.getElementById("level3_nav");if (show == "show") {jQuery("#level3_nav").hover(function() {l3n.style.position = "absolute";l3n.style.width = document.getElementById("inner_div").offsetWidth + "px";l3n.style.left = document.getElementById(mainlink_id).offsetLeft + "px";l3n.style.top = document.getElementById(mainlink_id).offsetTop + document.getElementById(mainlink_id).offsetHeight + document.getElementById("top_sub_nav").offsetHeight - 0 + "px";l3n.style.visibility = "visible";jQuery("#level3_nav").html(tsn_link_arr[sublink_obj.id]).fadeIn();}, function() {jQuery("#level3_nav").html(tsn_link_arr[sublink_obj.id]).fadeOut();});l3n.style.position = "absolute";l3n.style.width = document.getElementById("inner_div").offsetWidth + "px";l3n.style.left = document.getElementById(mainlink_id).offsetLeft + "px";l3n.style.top = document.getElementById(mainlink_id).offsetTop + document.getElementById(mainlink_id).offsetHeight + document.getElementById("top_sub_nav").offsetHeight - 0 + "px";l3n.style.visibility = "visible";jQuery("#level3_nav").html(tsn_link_arr[sublink_obj.id]).fadeIn();} else {}}};var sl_top_nav = function(sl_admin_page, tab_obj, link_array, the_action) {if (link_array[sl_admin_page] != "") {tsnfC = document.getElementById("top_sub_nav").firstChild;tsnfC.style.visibility = "hidden";if (the_action == "show") {jQuery("#top_sub_nav div").hover(function() {tsnfC.style.position = "absolute";tsnfC.style.left = tab_obj.offsetLeft + "px";tsnfC.style.visibility = "visible";tsnfC.innerHTML = link_array[sl_admin_page];}, function() {});tsnfC.style.position = "absolute";tsnfC.style.left = tab_obj.offsetLeft + "px";tsnfC.style.visibility = "visible";tsnfC.innerHTML = link_array[sl_admin_page];}}};var sl_top_nav_init = function(link_arr) {if (typeof document.getElementById("top_sub_nav") != "undefined") {tsnfC = document.getElementById("top_sub_nav").firstChild;tsnfC.style.visibility = "hidden";tsnfC.style.position = "absolute";tsnfC.style.left = document.getElementById("current_top_link").offsetLeft + "px";tsnfC.style.visibility = "visible";}$tnl = jQuery(".top_nav_li");jQuery.each($tnl, function($key, $val) {$val.onmouseover = function() {sl_top_nav($val.className.replace("top_nav_li ", ""), this, link_arr, "show");};});};jQuery(document).ready(function() {if (typeof tsn_link_arr != "undefined") {sl_top_nav_init(tsn_link_arr);}});jQuery(document).ready(function() {if (jQuery("#clickme").length > 0) {jQuery("#clickme").toggle(function() {jQuery("#slideout").animate({width:"+=880px", height:"+=630px"}, {queue:false, duration:500});jQuery("#slidecontent").animate({width:"+=880px"}, {queue:false, duration:500, complete:function() {jQuery("#slidecontent div").fadeIn();}});}, function() {jQuery("#slidecontent div").fadeOut(function() {jQuery("#slideout").animate({width:"-=880px", height:"-=630px"}, {queue:false, duration:500});jQuery("#slidecontent").animate({width:"-=880px"}, {queue:false, duration:500});});});}});jQuery(document).ready(function() {if (jQuery("#slidecontainer").length > 0) {orig_html = document.getElementById("slidecontainer").innerHTML;jQuery(document).on("click", "#readme_button", function() {jQuery.get(sl_pages_base + "/readme.php", function(readme_data) {jQuery("#slidecontainer").fadeOut(function() {jQuery(this).html("
← Back to Dashboard
" + readme_data + "
← Back to Dashboard
").fadeIn();});});});jQuery(document).on("click", ".sl_back_to_dashboard", function() {jQuery("#slidecontainer").fadeOut(function() {jQuery(this).html(orig_html).fadeIn();});});jQuery(document).on("click", "#server_caps_button", function() {jQuery.prettyPhoto.open("#server_caps");});jQuery(document).on("click", "#shortcode_params_button", function() {jQuery.prettyPhoto.open("#shortcode_params");});jQuery(document).on("click", "#env_vars_button", function() {jQuery.prettyPhoto.open("#env_vars");});}});if (typeof jQuery.prettyPhoto != "undefined") {jQuery(document).ready(function($) {$("a[href$='.jpg'], a[href$='.jpeg'], a[href$='.gif'], a[href$='.png'], a[rel^='sl_pop'], input[rel^='sl_pop'], img[rel^='sl_pop']").prettyPhoto({animationSpeed:"fast", padding:40, opacity:.5, showTitle:true, deeplinking:false, social_tools:false});});}jQuery(document).ready(function() {jQuery(document).on("click", ".twitter_button", function(e) {tk_twitter_pop(jQuery(this).attr("rel"), e);});jQuery(document).on("click", ".star_button", function() {window.open("http://wordpress.org/support/view/plugin-reviews/store-locator?filter=5#postform");});jQuery('#loc_table tr[id^="sl_tr-"]').mousedown(function(e) {$this = jQuery(this);$curr_id = $this.attr("id");$loc_id = $curr_id.split("-")[1];$curr_cbx = jQuery("#" + $curr_id + " input[type='checkbox']");if (e.target == jQuery("#edit_loc-" + $loc_id)[0] || e.target == jQuery("#del_loc-" + $loc_id)[0]) {} else {if (e.target != $curr_cbx[0]) {$this.toggleClass("location_selected");$curr_cbx[0].checked = $this.hasClass("location_selected") ? true : false;} else {if ($curr_cbx[0].checked == false) {$this.addClass("location_selected");} else {$this.removeClass("location_selected");}}}});jQuery(document).keyup(function(e) {$act_elem = jQuery(":focus");text_field_is_focused = $act_elem.attr("name") == jQuery("#mgmt_bar input:text").attr("name") || $act_elem.attr("name") == jQuery(".mng_loc_forms_links input:text").attr("name");if (e.keyCode == 68 && jQuery('input[name="sl_id[]"]:checked').length > 0 && location.search.indexOf("edit=") == -1 && !text_field_is_focused) {jQuery("#mgmt_bar input[type='button']")[0].click(); }});});};var sl_base='http://800gambler.org/wp-content/plugins/store-locator';var sl_uploads_base='http://800gambler.org/wp-content/uploads/sl-uploads';var sl_addons_base=sl_uploads_base+'/addons';var sl_includes_base=sl_base+'/sl-inc/includes';var sl_google_map_country='United States';var sl_google_map_domain='maps.google.com';var sl_map_type=google.maps.MapTypeId.ROADMAP;var sl_map_overview_control='1';var sl_geolocate='0';var sl_load_locations_default='1';var sl_load_results_with_locations_default='1';var sl_website_label='Website';var sl_directions_label='Directions';var sl_map_link_label='Map';var sl_location_not_found_message='';var sl_no_results_found_message='No Results Found';var sl_hours_label='Hours';var sl_phone_label='Phone';var sl_fax_label='Fax';var sl_email_label='Email';var sl_zoom_level=4;var sl_distance_unit='miles';var sl_map_home_icon='/wp-content/plugins/store-locator/icons/droplet_green.png';var sl_map_end_icon='/wp-content/plugins/store-locator/icons/droplet_red.png';var sl_map;var sl_geocoder;var sl_info_window;var sl_marker_array = [];var sl_marker_type;var sl_geo_flag = 0;if (!is_array(sl_categorization_array)) {var sl_categorization_array = []}var sl_marker_categorization_field = is_array(sl_categorization_array) && sl_categorization_array.length > 0 ? sl_categorization_array[0] : "type";var sl_ccTLD = sl_google_map_domain.match(/\.([^\.]+)$/);var sl_ccTLD_not_set = typeof sl_ccTLD[1] == "undefined" || sl_ccTLD[1] == "null" || sl_ccTLD[1] == "";if (sl_ccTLD_not_set || sl_ccTLD[1] == "com") {var sl_ccTLD = sl_ccTLD_not_set || sl_google_map_domain.indexOf("ditu") == -1 ? "us" : "cn"} else {var sl_ccTLD = sl_ccTLD[1]}var sl_mvc_instances = [];if (typeof sl_map_params != "undefined") {sl_map_params = sl_map_params.split("=").join("[]=");}if (!function_exists("sl_details_filter")) {var sl_details_filter = function(sl_details) {return sl_details;}}if (window.location.host.indexOf("www.") != -1 && sl_base.indexOf("www.") == -1) {sl_base = sl_base.split("http://").join("http://www.");} else {if (window.location.host.indexOf("www.") == -1 && sl_base.indexOf("www.") != -1) {sl_base = sl_base.split("http://www.").join("http://");}}function sl_load() {map_type_check();sl_geocoder = new google.maps.Geocoder;if ("undefined" != typeof document.getElementById("sl_map") && null != document.getElementById("sl_map")) {sl_map = new google.maps.Map(document.getElementById("sl_map"));if (typeof sl_infowindow_type != "undefined") {sl_info_window = new sl_infowindow_type;} else {sl_info_window = new google.maps.InfoWindow;}if (function_exists("start_sl_load")) {start_sl_load();}if (sl_geolocate == "1") {showLoadImg("show", "loadImg");try {if (typeof navigator.geolocation === "undefined") {ng = google.gears.factory.create("beta.geolocation");} else {ng = navigator.geolocation;}} catch (e) {}if (ng) {if (sl_geo_flag != 1) {do_load_options();}ng.getCurrentPosition(sl_geo_success, sl_geo_error);} else {do_load_options();}} else {do_load_options();}if (function_exists("end_sl_load")) {google.maps.event.addDomListenerOnce(sl_map, "tilesloaded", end_sl_load);}}}google.maps.event.addDomListener(window, "load", sl_load);function sl_geo_success(point) {sl_geo_flag = 1;var the_coords = new google.maps.LatLng(point.coords.latitude, point.coords.longitude);sl_geocoder.geocode({"location":the_coords}, function(results) {aI = document.getElementById("addressInput");aI.value = results[0].formatted_address;searchLocationsNear(the_coords, aI.value);});}function sl_geo_error(err) {sl_geo_flag = 1;do_load_options();}function do_load_options() {if (sl_load_locations_default == "0") {sl_geocoder.geocode({"address":sl_google_map_country}, function(results, status) {var myOptions = {center:results[0].geometry.location, zoom:sl_zoom_level, mapTypeId:sl_map_type_v3, overviewMapControl:sl_map_overview_control, disableDefaultUI:false, mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}};if (typeof sl_map_options != "undefined" && typeof sl_map_options === "object") {myOptions = mergeArray(sl_map_options, myOptions);}sl_map.setOptions(myOptions);});}if (sl_load_locations_default == "1") {var bounds = new google.maps.LatLngBounds;var searchUrl = sl_base + "/sl-xml.php";if (typeof sl_map_params != "undefined") {searchUrl += "?" + sl_map_params;}retrieveData(searchUrl, function(data) {var xml = data.responseXML;var markerNodes = xml.documentElement.getElementsByTagName("marker");var sidebar = document.getElementById("map_sidebar");sidebar.innerHTML = "";for (var i = 0;i < markerNodes.length;i++) {var sl_details = buildDetails(markerNodes[i]);sl_marker_type = markerNodes[i].getAttribute(sl_marker_categorization_field);if (sl_marker_type == "" || sl_marker_type == null) {sl_marker_type = "sl_map_end_icon";}var icon = typeof sl_icons != "undefined" && typeof sl_icons[sl_marker_type] != "undefined" ? sl_icons[sl_marker_type] : {url:sl_map_end_icon, name:"Default"};var marker = createMarker(sl_details, sl_marker_type, icon);if (sl_load_results_with_locations_default == "1") {var sidebarEntry = createSidebarEntry(marker, sl_details);sidebarEntry.id = "sidebar_div_" + i;sidebar.appendChild(sidebarEntry);}bounds.extend(sl_details["point"]);}if (markerNodes.length == 0) {sl_geocoder.geocode({"address":sl_google_map_country}, function(results, status) {var myOptions = {center:results[0].geometry.location, zoom:sl_zoom_level, mapTypeId:sl_map_type_v3, overviewMapControl:sl_map_overview_control, disableDefaultUI:false, mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}};if (typeof sl_map_options != "undefined" && typeof sl_map_options === "object") {myOptions = mergeArray(sl_map_options, myOptions);}if (typeof sl_mvc_objects != "undefined" && typeof sl_mvc_objects["type"] != "undefined" && typeof sl_mvc_objects["options"] != "undefined") {for (mvc in sl_mvc_objects["type"]) {sl_mvc_instances[mvc] = new sl_mvc_objects["type"][mvc](sl_mvc_objects["options"][mvc]);sl_mvc_instances[mvc].setMap(sl_map);}}sl_map.setOptions(myOptions);});} else {var myOptions = {center:bounds.getCenter(), mapTypeId:sl_map_type_v3, overviewMapControl:sl_map_overview_control, disableDefaultUI:false, mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}};if (typeof sl_map_options != "undefined" && typeof sl_map_options === "object") {myOptions = mergeArray(sl_map_options, myOptions);}if (typeof sl_mvc_objects != "undefined" && typeof sl_mvc_objects["type"] != "undefined" && typeof sl_mvc_objects["options"] != "undefined") {for (mvc in sl_mvc_objects["type"]) {sl_mvc_instances[mvc] = new sl_mvc_objects["type"][mvc](sl_mvc_objects["options"][mvc]);sl_mvc_instances[mvc].setMap(sl_map);}}sl_map.setOptions(myOptions);sl_map.fitBounds(bounds);}if (sl_map.getZoom() > 16) {sl_map.setZoom(9);}});}showLoadImg("stop", "loadImg");}function searchLocations() {if (function_exists("start_searchLocations")) {start_searchLocations();}var address = document.getElementById("addressInput").value;sl_geocoder.geocode({"address":address, "region":sl_ccTLD}, function(results, status) {if (status != google.maps.GeocoderStatus.OK) {showLoadImg("stop", "loadImg");if (sl_location_not_found_message.split(" ").join("") != "") {alert(sl_location_not_found_message);} else {alert(address + " Not Found");}} else {searchLocationsNear(results[0].geometry.location, address);}});if (function_exists("end_searchLocations")) {end_searchLocations();}}function searchLocationsNear(center, homeAddress) {if (function_exists("start_searchLocationsNear")) {start_searchLocationsNear();}var radius = document.getElementById("radiusSelect").value;var searchUrl = sl_base + "/sl-xml.php?mode=gen&lat=" + center.lat() + "&lng=" + center.lng() + "&radius=" + radius;if (typeof sl_map_params != "undefined") {searchUrl += sl_map_params;}retrieveData(searchUrl, function(data) {var xml = data.responseXML;var markerNodes = xml.documentElement.getElementsByTagName("marker");clearLocations();var bounds = new google.maps.LatLngBounds;var point = new google.maps.LatLng(center.lat(), center.lng());var markerOpts = {map:sl_map, position:point, icon:sl_map_home_icon};if (typeof sl_marker_options != "undefined" && typeof sl_marker_options === "object") {markerOpts = mergeArray(sl_marker_options, markerOpts);}var icon = {url:sl_map_home_icon};bounds.extend(point);var homeMarker = new google.maps.Marker(markerOpts);determineShadow(icon, homeMarker);var html = '
Your Location:
' + homeAddress + "
";bindInfoWindow(homeMarker, sl_map, sl_info_window, html);var sidebar = document.getElementById("map_sidebar");sidebar.innerHTML = "";if (markerNodes.length == 0) {showLoadImg("stop", "loadImg");sidebar.innerHTML = '
' + sl_no_results_found_message + "
";sl_marker_array.push(homeMarker);sl_map.setCenter(point);return;}for (var i = 0;i < markerNodes.length;i++) {var sl_details = buildDetails(markerNodes[i]);sl_marker_type = markerNodes[i].getAttribute(sl_marker_categorization_field);if (sl_marker_type == "" || sl_marker_type == null) {sl_marker_type = "sl_map_end_icon";}var icon = typeof sl_icons != "undefined" && typeof sl_icons[sl_marker_type] != "undefined" ? sl_icons[sl_marker_type] : {url:sl_map_end_icon, name:"Default"};var marker = createMarker(sl_details, sl_marker_type, icon);var sidebarEntry = createSidebarEntry(marker, sl_details);sidebarEntry.id = "sidebar_div_" + i;sidebar.appendChild(sidebarEntry);bounds.extend(sl_details["point"]);}sl_marker_array.push(homeMarker);sl_map.setCenter(bounds.getCenter());sl_map.fitBounds(bounds);showLoadImg("stop", "loadImg");});if (function_exists("end_searchLocationsNear")) {end_searchLocationsNear();}}function createMarker(sl_details, type, icon) {var markerOpts = {map:sl_map, position:sl_details["point"], icon:icon.url};if (typeof sl_marker_options != "undefined" && typeof sl_marker_options === "object") {markerOpts = mergeArray(sl_marker_options, markerOpts);}var marker = new google.maps.Marker(markerOpts);determineShadow(icon, marker);if (function_exists("start_createMarker")) {start_createMarker();}html = buildMarkerHTML(sl_details);bindInfoWindow(marker, sl_map, sl_info_window, html);sl_marker_array.push(marker);if (function_exists("end_createMarker")) {end_createMarker();}return marker;}var resultsDisplayed = 0;var bgcol = "white";function createSidebarEntry(marker, sl_details) {if (function_exists("start_createSidebarEntry")) {start_createSidebarEntry();}if (document.getElementById("map_sidebar_td") != null) {document.getElementById("map_sidebar_td").style.display = "block";}var div = document.createElement("div");var html = buildSidebarHTML(sl_details);div.innerHTML = html;div.className = "results_entry";div.setAttribute("name", "results_entry");resultsDisplayed++;google.maps.event.addDomListener(div, "click", function() {google.maps.event.trigger(marker, "click");});if (function_exists("end_createSidebarEntry")) {end_createSidebarEntry();}return div;}function retrieveData(url, callback) {var request = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest;request.onreadystatechange = function() {if (request.readyState == 4) {request.onreadystatechange = doNothing;callback(request, request.status);if (function_exists("end_retrieveData")) {end_retrieveData();}}};request.open("GET", url, true);request.send(null);}function doNothing() {}function bindInfoWindow(marker, map, infoWindow, html) {var infowindow_click_function = function() {infoWindow.close();infoWindow.setContent(html);if (typeof sl_infowindow_options != "undefined" && typeof sl_infowindow_options === "object") {infoWindow.setOptions(sl_infowindow_options);}infoWindow.open(map, marker);};google.maps.event.addListener(marker, "click", infowindow_click_function);google.maps.event.addListener(marker, "visible_changed", function() {infoWindow.close();});}function clearLocations() {sl_info_window.close();for (var i = 0;i < sl_marker_array.length;i++) {sl_marker_array[i].setMap(null);}sl_marker_array.length = 0;}function determineShadow(icon, marker) {if (icon.url.indexOf("flag") != "-1") {marker.setShadow(sl_base + "/icons/flag_shadow_v3.png");} else {if (icon.url.indexOf("arrow") != "-1") {marker.setShadow(sl_base + "/icons/arrow_shadow_v3.png");} else {if (icon.url.indexOf("bubble") != "-1") {marker.setShadow(sl_base + "/icons/bubble_shadow_v3.png");} else {if (icon.url.indexOf("marker") != "-1") {marker.setShadow(sl_base + "/icons/marker_shadow_v3.png");} else {if (icon.url.indexOf("sign") != "-1") {marker.setShadow(sl_base + "/icons/sign_shadow_v3.png");} else {if (icon.url.indexOf("droplet") != "-1") {marker.setShadow(sl_base + "/icons/droplet_shadow_v3.png");} else {marker.setShadow(sl_base + "/icons/blank.png");}}}}}}}function map_type_check() {if (sl_map_type == "G_NORMAL_MAP") {sl_map_type_v3 = google.maps.MapTypeId.ROADMAP;} else {if (sl_map_type == "G_SATELLITE_MAP") {sl_map_type_v3 = google.maps.MapTypeId.SATELLITE;} else {if (sl_map_type == "G_HYBRID_MAP") {sl_map_type_v3 = google.maps.MapTypeId.HYBRID;} else {if (sl_map_type == "G_PHYSICAL_MAP") {sl_map_type_v3 = google.maps.MapTypeId.TERRAIN;} else {if (sl_map_type != google.maps.MapTypeId.ROADMAP && sl_map_type != google.maps.MapTypeId.SATELLITE && sl_map_type != google.maps.MapTypeId.HYBRID && sl_map_type != google.maps.MapTypeId.TERRAIN) {sl_map_type_v3 = google.maps.MapTypeId.ROADMAP;} else {sl_map_type_v3 = sl_map_type;}}}}}}function function_exists(func) {return eval("typeof window." + func + " === 'function'");}function is_array(arr) {return eval(typeof arr === "object" && arr instanceof Array);}function empty(value) {return eval(typeof value === "undefined");}function isset(value) {return eval(typeof value !== "undefined");}function mergeArray(array1, array2) {for (item in array1) {array2[item] = array1[item];}return array2;}function determineDirectionsLink(sl_details, html) {var homeAddress = sl_details["homeAddress"];if (homeAddress.split(" ").join("") != "") {html = html.split("sl_details['sl_directions_link']").join("'' + sl_directions_label + "'");} else {html = html.split("sl_details['sl_directions_link']").join("'' + sl_map_link_label + "'");}return html;}function sl_nl2br(str, is_xhtml) {var breakTag = is_xhtml || typeof is_xhtml === "undefined" ? "
" : "
";return str.replace(/\|\|sl-nl\|\|/g, breakTag);}if (!function_exists("buildSidebarHTML")) {var buildSidebarHTML = function(sl_details) {var street = sl_details["sl_address"];if (street.split(" ").join("") != "") {street += "
";} else {street = "";}if (sl_details["sl_address2"].split(" ").join("") != "") {street += sl_details["sl_address2"] + "
";}var city = sl_details["sl_city"];if (city.split(" ").join("") != "") {city += ", ";} else {city = "";}var state_zip = sl_details["sl_state"] + " " + sl_details["sl_zip"];if (sl_details["fullAddress"].split(",").join("").split(" ").join("") == "") {sl_details["fullAddress"] = sl_details["sl_latitude"] + "," + sl_details["sl_longitude"];}var homeAddress = sl_details["homeAddress"];var name = sl_details["sl_store"];var distance = sl_details["sl_distance"];var url = sl_details["sl_url"];if (url.search(/^https?\:\/\//i) != -1 && url.indexOf(".") != -1) {link = " | " + sl_website_label + "";} else {url = "";link = "";}sl_details["sl_distance_unit"] = sl_distance_unit;sl_details["sl_google_map_domain"] = sl_google_map_domain;if (function_exists("sl_results_template") && sl_results_template(sl_details)) {var html = decode64(sl_results_template(sl_details));html = determineDirectionsLink(sl_details, html);html = eval("'" + html + "'");} else {var distance_display = distance.toFixed(1) != "" && distance.toFixed(1) != "null" && distance.toFixed(1) != "NaN" ? "
" + distance.toFixed(1) + " " + sl_distance_unit : "";var html = '
' + name + "" + distance_display + '' + street + city + state_zip + ' ' + sl_directions_label +" " + link + "
";}return html;}}if (function_exists("buildMarkerHTML") != true) {var buildMarkerHTML = function(sl_details) {var street = sl_details["sl_address"];if (street.split(" ").join("") != "") {street += "
";} else {street = "";}if (sl_details["sl_address2"].split(" ").join("") != "") {street += sl_details["sl_address2"] + "
";}var city = sl_details["sl_city"];if (city.split(" ").join("") != "") {city += ", ";} else {city = "";}var state_zip = sl_details["sl_state"] + " " + sl_details["sl_zip"];if (sl_details["fullAddress"].split(",").join("").split(" ").join("") == "") {sl_details["fullAddress"] = sl_details["sl_latitude"] + "," + sl_details["sl_longitude"];}var homeAddress = sl_details["homeAddress"];var name = sl_details["sl_store"];var distance = sl_details["sl_distance"];var url = sl_details["sl_url"];var image = sl_details["sl_image"];var description = sl_details["sl_description"];var hours = sl_details["sl_hours"];var phone = sl_details["sl_phone"];var fax = sl_details["sl_fax"];var email = sl_details["sl_email"];var more_html = "";if (url.search(/^https?\:\/\//i)!=-1 && url.indexOf(".")!=-1) {more_html+="| " + sl_website_label +"";} else {url="";}if (image.indexOf(".")!=-1) {more_html+="
";} else {image="";}if (description!="") {more_html+="
"+description+"";} else {description="";}if (hours!="") {more_html+="
"+sl_hours_label+": "+hours;} else {hours="";}if (phone!="") {more_html+="
"+sl_phone_label+": "+phone;} else {phone="";}if (fax!="") {more_html+="
"+sl_fax_label+": "+fax;} else {fax="";}if (email!="") {more_html+="
"+sl_email_label+": "+email;} else {email="";}sl_details["sl_more_html"] = more_html;sl_details["sl_distance_unit"] = sl_distance_unit;sl_details["sl_google_map_domain"] = sl_google_map_domain;if (function_exists("sl_bubble_template") && sl_bubble_template(sl_details)) {sl_details["sl_distance"] = distance.toFixed(1);var html = decode64(sl_bubble_template(sl_details));html = determineDirectionsLink(sl_details, html);html = eval("'" + html + "'");} else {var html = '
' + name + "
" + street + city + state_zip + '
' + sl_directions_label + " " + more_html + "
"}return html;}}if (function_exists("buildDetails") != true) {var buildDetails = function(markerNode) {var details_array = {"fullAddress":markerNode.getAttribute("address"), "sl_address":markerNode.getAttribute("street"), "sl_address2":markerNode.getAttribute("street2"), "sl_city":markerNode.getAttribute("city"), "sl_state":markerNode.getAttribute("state"), "sl_zip":markerNode.getAttribute("zip"), "sl_latitude":markerNode.getAttribute("lat"), "sl_longitude":markerNode.getAttribute("lng"), "sl_store":markerNode.getAttribute("name"), "sl_description":sl_nl2br(markerNode.getAttribute("description")),"sl_url":markerNode.getAttribute("url"), "sl_hours":sl_nl2br(markerNode.getAttribute("hours")), "sl_phone":markerNode.getAttribute("phone"), "sl_fax":markerNode.getAttribute("fax"), "sl_email":markerNode.getAttribute("email"), "sl_image":markerNode.getAttribute("image"), "sl_tags":markerNode.getAttribute("tags"), "sl_distance":parseFloat(markerNode.getAttribute("distance")), "homeAddress":document.getElementById("addressInput").value, "point":new google.maps.LatLng(parseFloat(markerNode.getAttribute("lat")),parseFloat(markerNode.getAttribute("lng")))};if (typeof sl_xml_properties_array != "undefined") {if (is_array(sl_xml_properties_array)) {for (key in sl_xml_properties_array) {details_array[sl_xml_properties_array[key]] = sl_nl2br(markerNode.getAttribute(sl_xml_properties_array[key]));}}}details_array = sl_details_filter(details_array);return details_array;}};