function MapHelper() { } MapHelper.AgencyLayerDojoClickConnection = null; MapHelper.CrimesLayerDojoClickConnection = null; MapHelper.GetGraphicsLayer = function (a) { var b = Map.Map.getLayer(a); return b == void 0 || b == null ? (ConsoleLogHelper.AddMessage("GetGraphicsLayer failed. Layer (" + a + ") is undefined or null"), null) : b }; MapHelper.ClearGraphicsLayer = function (a) { var b = Map.Map.getLayer(a); if (b == void 0 || b == null) return ConsoleLogHelper.AddMessage("ClearGraphicsLayer failed. Layer (" + a + ") is undefined or null"), null; b.clear() };
MapHelper.GetAgencies = function () { var a = Configuration.WebRoot + "GetAgencies.aspx"; MapHelper.ShowLoadingMessage("black", ""); $.getJSON(a, function (a) { MapHelper.GetAgenciesFinished(a) }) };
MapHelper.GetAgenciesFinished = function (a) {
    if (a != void 0 && a != null) {
        var b; b = null; b = a.agencies; if (b != void 0 && b != null) MapHelper.CreateAgencyHashTable(b), MapHelper.AddAgenciesToMap(), $("#agencies-panel td.list-cell").html(HtmlGenerator.BuildAgenciesList(Map)); else if (a.errorMessage != void 0 && a.errorMessage != null) b = a.errorMessage, $("#loading-message").attr("class", "error").html("<h4>We're having some issues ... </h4>" + b).show().modal({ appendTo: "form", close: false, escClose: false, overlayClose: false, opacity: 15,
            overlayCss: { backgroundColor: "#000"}
        }); else if (a.loginExpiredMessage != void 0 && a.loginExpiredMessage != null) b = a.loginExpiredMessage, $("#loading-message").attr("class", "time-expired").html("<h4>Oops!</h4>" + b + '<br/><br/><a class="button" href="' + Configuration.WebRoot + 'login.aspx">LOGIN</a>').show().modal({ appendTo: "form", close: false, escClose: false, overlayClose: false, opacity: 15, overlayCss: { backgroundColor: "#000"} })
    } 
};
MapHelper.CreateAgencyHashTable = function (a) { Map.AgencyHashTable = {}; dojo.forEach(a, function (a) { Map.AgencyHashTable[a.AgencyID] = a }) };
MapHelper.AddAgenciesToMap = function () {
    var a = null, b = null, c = {}, b = null, f = new esri.SpatialReference({ wkid: Configuration.SpatialReferenceWKID_BING }), e = 0, a = MapHelper.GetGraphicsLayer("agencyLayer"); if (a != null && Map.AgencyHashTable != void 0 && Map.AgencyHashTable != null) {
        a.clear(); MapHelper.AgencyLayerDojoClickConnection != void 0 && MapHelper.AgencyLayerDojoClickConnection != null && dojo.disconnect(MapHelper.AgencyLayerDojoClickConnection); for (var d in Map.AgencyHashTable) b = Map.AgencyHashTable[d], c = { AgencyID: b.AgencyID,
            Description: b.Description, CrimeCount: b.CrimeCount, Url: b.Url, ZoomLevel: b.Level, X: b.X, Y: b.Y
        }, b = new esri.geometry.Point(b.X, b.Y, f), a.add(new esri.Graphic(b, Configuration.AgencySymbol, c)), e++; Configuration.IsShowingCrime || $("#status-message").html('<strong class="counter-bubble"><span>' + e + ' agencies</span></strong><p>Click a blue pin (<img src="' + Configuration.WebRoot + 'images/blue-pin.gif" alt="Blue pin" title="Blue pin" />) and zoom in to view crime.</p>'); MapHelper.AgencyLayerDojoClickConnection = dojo.connect(a,
"onClick", function (a) { Configuration.IsCrimeInfoWindow = false; Map.Map.infoWindow.setContent('<p class="loading">Fetching agency content ...</p>'); a = a.graphic.attributes.AgencyID; if (Map.AgencyHashTable[a].HasContent == void 0 || Map.AgencyHashTable[a].HasContent == null || Map.AgencyHashTable[a].HasContent == false) MapHelper.GetAgencyCrimeInfo(a, true, false); else { var b = HtmlGenerator.BuildAgencyInfoWindowHtml(Map.AgencyHashTable[a]); Map.Map.infoWindow.setContent(b) } MapHelper.ShowInfoWindow("agencyLayer", a) })
    } $("#loading-message").attr("class") ==
"black" && $("#loading-message").fadeOut("fast")
}; MapHelper.GetAgencyCrimeInfo = function (a, b, c) { $.getJSON(Configuration.WebRoot + "GetAgencyCrimeInfo.aspx?aid=" + a, function (f) { MapHelper.GetAgencyCrimeInfoFinished(f, a, b, c) }) };
MapHelper.GetAgencyCrimeInfoFinished = function (a, b, c, f) {
    if (a != void 0 && a != null) if (a.CrimeCount != void 0 && a.CrimeCount != null) Map.AgencyHashTable[b].CrimeCount = a.CrimeCount, Map.AgencyHashTable[b].LastIncidentDate = a.LastIncidentDate, Map.AgencyHashTable[b].HasContent = true, c != void 0 && c != null && c == true ? (a = HtmlGenerator.BuildAgencyInfoWindowHtml(Map.AgencyHashTable[b]), Map.Map.infoWindow.setContent(a), MapHelper.ShowInfoWindow("agencyLayer", b)) : f != void 0 && f != null && f == true && (a = new Date(UtilitiesHelper.FormatIncidentDate(Map.AgencyHashTable[b].LastIncidentDate)),
a = $.datepicker.formatDate("m/dd/yy", a), MapHelper.ZoomToPointAndDate(Map.AgencyHashTable[b].X, Map.AgencyHashTable[b].Y, Map.AgencyHashTable[b].Level, false, a)); else if (a.errorMessage != void 0 && a.errorMessage != null) errorMessage = a.errorMessage, $("#loading-message").attr("class", "error").html("<h4>We're having some issues ... </h4>" + errorMessage).show().modal({ appendTo: "form", close: false, escClose: false, overlayClose: false, opacity: 15, overlayCss: { backgroundColor: "#000"} }); else if (a.loginExpiredMessage != void 0 &&
a.loginExpiredMessage != null) errorMessage = a.loginExpiredMessage, $("#loading-message").attr("class", "time-expired").html("<h4>Oops!</h4>" + errorMessage + '<br/><br/><a class="button" href="' + Configuration.WebRoot + 'login.aspx">LOGIN</a>').show().modal({ appendTo: "form", close: false, escClose: false, overlayClose: false, opacity: 15, overlayCss: { backgroundColor: "#000"} })
};
MapHelper.ProcessCustomUrl = function () {
    var a = ""; Configuration.SelectedDateBegin != void 0 && Configuration.SelectedDateBegin != null && Configuration.SelectedDateBegin != "" && Configuration.SelectedDateEnd != void 0 && Configuration.SelectedDateEnd != null && Configuration.SelectedDateEnd != "" && (UtilitiesHelper.SetDateBoundaries(Configuration.SelectedDateBegin, Configuration.SelectedDateEnd), $("#inputStartDate").datepicker("setDate", Configuration.SelectedDateBegin), $("#inputEndDate").datepicker("setDate", Configuration.SelectedDateEnd),
EventBinderHelper.EnableResetDatePickerButton()); if (Configuration.SelectedCrimeCodes != void 0 && Configuration.SelectedCrimeCodes != null && (a = Configuration.SelectedCrimeCodes.split(","), a != void 0 && a != null && a != "" && a.length > 0)) {
        UtilitiesHelper.UncheckAllCrimeTypes(); for (var b = 0; b < a.length; b++) switch (a[b]) {
            case "AR": $(".check-box-form input[value='AR']")[0].checked = true; break; case "AS": $(".check-box-form input[value='AS']")[0].checked = true; break; case "BU": $(".check-box-form input[value='BU']")[0].checked =
true; break; case "DP": $(".check-box-form input[value='DP']")[0].checked = true; break; case "DR": $(".check-box-form input[value='DR']")[0].checked = true; break; case "DU": $(".check-box-form input[value='DU']")[0].checked = true; break; case "FR": $(".check-box-form input[value='FR']")[0].checked = true; break; case "HO": $(".check-box-form input[value='HO']")[0].checked = true; break; case "VT": $(".check-box-form input[value='VT']")[0].checked = true; break; case "RO": $(".check-box-form input[value='RO']")[0].checked = true;
                break; case "SX": $(".check-box-form input[value='SX']")[0].checked = true; break; case "TH": $(".check-box-form input[value='TH']")[0].checked = true; break; case "VA": $(".check-box-form input[value='VA']")[0].checked = true; break; case "VB": $(".check-box-form input[value='VB']")[0].checked = true; break; case "WE": $(".check-box-form input[value='WE']")[0].checked = true
        } 
    } Configuration.SelectedMapCache != void 0 && Configuration.SelectedMapCache != null && EventBinderHelper.SetCurrentMapCache(Configuration.SelectedMapCache);
    var c = Map.Map.getLayer(Map.Map.layerIds[0]).tileInfo.lods.length - Configuration.MaxIncidentZoomLevel; Configuration.SelectedZoomLevel != void 0 && Configuration.SelectedZoomLevel != null && Configuration.SelectedZoomLevel != "" && (c = parseInt(Configuration.SelectedZoomLevel, 10)); if (Configuration.SelectedX != void 0 && Configuration.SelectedX != null && Configuration.SelectedX != "" && Configuration.SelectedY != void 0 && Configuration.SelectedY != void 0 && Configuration.SelectedY != "") {
        var a = new esri.SpatialReference({ wkid: Configuration.SpatialReferenceWKID_BING }),
f = new esri.geometry.Point(parseFloat(Configuration.SelectedX), parseFloat(Configuration.SelectedY), a); setTimeout(function () { Map.Map.centerAndZoom(f, c) }, 500)
    } else Configuration.SelectedAgencyID != null && Configuration.SelectedAgencyID != "" ? (a = Configuration.WebRoot + "GetAgency.aspx?aid=" + Configuration.SelectedAgencyID, $.getJSON(a, function (a) { MapHelper.GetAgencyPointByIDFinished(a) })) : Configuration.SelectedStateID != null && Configuration.SelectedStateID != "" ? (a = Configuration.WebRoot + "GetState.aspx?sid=" + Configuration.SelectedStateID,
$.getJSON(a, function (a) { MapHelper.GetPointByIDFinished(a) })) : Configuration.SelectedRegionID != null && Configuration.SelectedRegionID != "" && (a = Configuration.WebRoot + "GetRegion.aspx?rid=" + Configuration.SelectedRegionID, $.getJSON(a, function (a) { MapHelper.GetPointByIDFinished(a) })); a = jQuery.browser.msie ? 1500 : 500; if (Configuration.SelectedAddress != null && Configuration.SelectedAddress != "") if ($("#main-address-search").val(Configuration.SelectedAddress), Configuration.SelectedBufferRadius != null && Configuration.SelectedBufferRadius !=
"") { if (Configuration.SelectedBufferRadius == ".2" || Configuration.SelectedBufferRadius == ".094696") Configuration.SelectedBufferRadius = "0" + Configuration.SelectedBufferRadius; $("#address-form-radius-list option[value='" + Configuration.SelectedBufferRadius + "']").attr("selected", "selected"); setTimeout(function () { MapHelper.FocusAroundAddress("#main-address-search", false) }, a) } else Configuration.SelectedMeasureStartX != null && Configuration.SelectedMeasureStartX != void 0 && Configuration.SelectedMeasureStartY != null &&
Configuration.SelectedMeasureStartY != void 0 && setTimeout(function () { MapHelper.FocusAroundAddress("#main-address-search", true) }, a)
};
MapHelper.GetAgencyPointByIDFinished = function (a) {
    var b = new esri.SpatialReference({ wkid: Configuration.SpatialReferenceWKID_BING }), c = null; if (a != void 0 && a != null && a != "") {
        if (a.LastIncidentDate != void 0 && a.LastIncidentDate != null && a.LastIncidentDate != "") {
            var f = new Date(UtilitiesHelper.FormatIncidentDate(a.LastIncidentDate)), e = new Date; if (f.getFullYear() > e.getFullYear() - 5 && f.getFullYear() < e.getFullYear() + 5) {
                setTimeout(function () { MapHelper.ZoomToPointAndDate(a.X, a.Y, a.Level, false, UtilitiesHelper.FormatIncidentDate(a.LastIncidentDate)) },
500); return
            } 
        } else if (a.errorMessage != void 0 && a.errorMessage != null) { errorMessage = a.errorMessage; $("#loading-message").attr("class", "error").html("<h4>We're having some issues ... </h4>" + errorMessage).show().modal({ appendTo: "form", close: false, escClose: false, overlayClose: false, opacity: 15, overlayCss: { backgroundColor: "#000"} }); return } else if (a.loginExpiredMessage != void 0 && a.loginExpiredMessage != null) {
            errorMessage = a.loginExpiredMessage; $("#loading-message").attr("class", "time-expired").html("<h4>Oops!</h4>" +
errorMessage + '<br/><br/><a class="button" href="' + Configuration.WebRoot + 'login.aspx">LOGIN</a>').show().modal({ appendTo: "form", close: false, escClose: false, overlayClose: false, opacity: 15, overlayCss: { backgroundColor: "#000"} }); return
        } c = new esri.geometry.Point(a.X, a.Y, b); setTimeout(function () { Map.Map.centerAndZoom(c, a.Level) }, 500)
    } 
};
MapHelper.GetPointByIDFinished = function (a) {
    var b = new esri.SpatialReference({ wkid: Configuration.SpatialReferenceWKID_BING }), c = null; if (a != void 0 && a != null && a != "") if (a.X != void 0 && a.X != null) c = new esri.geometry.Point(a.X, a.Y, b), setTimeout(function () { Map.Map.centerAndZoom(c, a.Level) }, 500); else if (a.errorMessage != void 0 && a.errorMessage != null) errorMessage = a.errorMessage, $("#loading-message").attr("class", "error").html("<h4>We're having some issues ... </h4>" + errorMessage).show().modal({ appendTo: "form", close: false,
        escClose: false, overlayClose: false, opacity: 15, overlayCss: { backgroundColor: "#000"}
    }); else if (a.loginExpiredMessage != void 0 && a.loginExpiredMessage != null) errorMessage = a.loginExpiredMessage, $("#loading-message").attr("class", "time-expired").html("<h4>Oops!</h4>" + errorMessage + '<br/><br/><a class="button" href="' + Configuration.WebRoot + 'login.aspx">LOGIN</a>').show().modal({ appendTo: "form", close: false, escClose: false, overlayClose: false, opacity: 15, overlayCss: { backgroundColor: "#000"} })
};
MapHelper.GetCrimes = function () {
    var a = Configuration.WebRoot + "GetIncidents.aspx", b = ""; MapHelper.ShowLoadingMessage("black", ""); b = MapHelper.GetCrimeSearchQueryString(true); Configuration.CurrentXHR != null && Configuration.CurrentXHR.abort(); b != void 0 && b != null ? Configuration.CurrentXHR = $.getJSON(a + b, function (a) { MapHelper.GetCrimesFinished(a) }) : $("#loading-message").attr("class", "error").html("<h4>We're having some issues ... </h4> There was a problem gathering data from the application.").show().modal({ appendTo: "form",
        close: false, escClose: false, overlayClose: false, opacity: 15, overlayCss: { backgroundColor: "#000"}
    })
};
MapHelper.GetCrimesFinished = function (a) {
    Configuration.CurrentXHR = null; a != void 0 && a != null && (a.incidents != void 0 && a.incidents != null ? MapHelper.ProcessCrimes(a.incidents) : a.errorMessage != void 0 && a.errorMessage != null ? $("#loading-message").attr("class", "error").html("<h4>We're having some issues ... </h4>" + a.errorMessage).show().modal({ appendTo: "form", close: false, escClose: false, overlayClose: false, opacity: 15, overlayCss: { backgroundColor: "#000"} }) : a.loginExpiredMessage != void 0 && a.loginExpiredMessage != null &&
$("#loading-message").attr("class", "time-expired").html("<h4>Oops!</h4>" + a.loginExpiredMessage + '<br/><br/><a class="button" href="' + Configuration.WebRoot + 'login.aspx">LOGIN</a>').show().modal({ appendTo: "form", close: false, escClose: false, overlayClose: false, opacity: 15, overlayCss: { backgroundColor: "#000"} }))
};
MapHelper.ProcessCrimes = function (a) {
    var b = "", c = ""; if (a != void 0 && a != null && a.length > 0) a.length == 1 ? b = a.length + " crime" : (b = a.length + " crimes", a.length >= Configuration.MaximumRecordCount && (b = "+" + a.length + " crimes", c = "red-alert", MapHelper.ShowLoadingMessage("red", 'The map can\'t plot any more crimes. <a class="link" onclick="javascript:Map.Map.setLevel((Map.Map.getLevel() + 1));">Zoom In</a>.'))), $("#status-message").html('<strong class="counter-bubble ' + c + '"><span>' + b + "</span></strong> <p>between <a onclick=\"$('a#dates-nav-link').click();\">" +
$.datepicker.formatDate("m/d/yy", IncidentSearchParameters.DateBegin) + " - " + $.datepicker.formatDate("m/d/yy", IncidentSearchParameters.DateEnd) + "</a></p>"), MapHelper.CreateHashTable(a), MapHelper.AddFeaturesToMap(a), EventBinderHelper.EnableChartButton(), EventBinderHelper.EnableReportButton(), EventBinderHelper.EnablePrintButton(), EventBinderHelper.EnableSendLinkButton(), EventBinderHelper.EnableLinkButton(); else if (MapHelper.ClearGraphicsLayer("crimesLayer"), Map.CrimeHashTable = {}, Configuration.IsShowingIncidents =
false, $("#status-message").html('<strong class="counter-bubble"><span>0 crimes</span></strong> <p>between <a onclick="$(\'a#dates-nav-link\').click();">' + $.datepicker.formatDate("m/dd/yy", IncidentSearchParameters.DateBegin) + " - " + $.datepicker.formatDate("m/dd/yy", IncidentSearchParameters.DateEnd) + "</a></p>"), setTimeout("$('#loading-message').fadeOut('slow');", 500), EventBinderHelper.DisableToolbarButton("chart"), EventBinderHelper.DisableToolbarButton("report"), EventBinderHelper.DisableToolbarButton("print"),
EventBinderHelper.DisableToolbarButton("link"), EventBinderHelper.DisableToolbarButton("send"), AgencyFilterHelper.BuildFilterAgencyList(), Configuration.IsCrimeInfoWindow == true) MapHelper.CloseInfoWindow(), Configuration.IsCrimeInfoWindow = false; $("#loading-message").attr("class") == "black" && $("#loading-message").fadeOut("fast")
};
MapHelper.AddFeaturesToMap = function (a) {
    var b = {}, c = null, f = new esri.SpatialReference({ wkid: Configuration.SpatialReferenceWKID_BING }), e = -1, d = {}, g = false; layer = MapHelper.GetGraphicsLayer("crimesLayer"); if (layer != null) {
        layer.clear(); MapHelper.CrimesLayerDojoClickConnection != void 0 && MapHelper.CrimesLayerDojoClickConnection != null && dojo.disconnect(MapHelper.CrimesLayerDojoClickConnection); Configuration.UsingLargeIcons ? layer.setRenderer(Map.LargeSymbolRenderer) : layer.setRenderer(Map.MiniSymbolRenderer); a.length >
0 && Map.AgencyHashTable != void 0 && Map.AgencyHashTable != null && Map.AgencyHashTable[a[0].AgencyID] != void 0 && Map.AgencyHashTable[a[0].AgencyID] != null && $("#main-sample-address").text("Try: " + Map.AgencyHashTable[a[0].AgencyID].SampleAddress); var i = new esri.symbol.Font(Configuration.UsingLargeIcons ? "10pt" : "7pt", esri.symbol.Font.STYLE_NORMAL, esri.symbol.Font.VARIANT_NORMAL, esri.symbol.Font.WEIGHT_BOLD, "Verdana"), k = new esri.symbol.TextSymbol; k.setColor(new dojo.Color([255, 255, 255])); k.setFont(i); for (var i = "",
l = 0; l < a.length; l++) {
            var h = a[l], b = { CaseNumber: h.CaseNumber, CrimeCode: h.CrimeCode, Description: h.Description, Location: h.Location, ObjectID: h.ObjectID, DateReported: h.DateReported, X: h.X, Y: h.Y }, c = new esri.geometry.Point(h.Y, h.X, f); i != h.Y.toString() + "|" + h.X.toString() && (g = false); i = h.Y.toString() + "|" + h.X.toString(); if (Map.CrimeHashTable[i].length > 1) {
                for (var b = [], j = 0; j < Map.CrimeHashTable[i].length; j++) b.push({ CaseNumber: Map.CrimeHashTable[i][j].CaseNumber, CrimeCode: Map.CrimeHashTable[i][j].CrimeCode, Description: Map.CrimeHashTable[i][j].Description,
                    Location: Map.CrimeHashTable[i][j].Location, ObjectID: Map.CrimeHashTable[i][j].ObjectID, DateReported: Map.CrimeHashTable[i][j].DateReported, X: Map.CrimeHashTable[i][j].X, Y: Map.CrimeHashTable[i][j].Y
                }); g == false && (Configuration.UsingLargeIcons ? (layer.add(new esri.Graphic(c, Map.LargeMultiCrimeSymbol, b)), k.setOffset(0, 18)) : (layer.add(new esri.Graphic(c, Map.MiniMultiCrimeSymbol, b)), k.setOffset(1, 11)), k.setText(Map.CrimeHashTable[i].length), layer.add(new esri.Graphic(new esri.geometry.Point(c, f), k)), g = true)
            } else g =
false, Configuration.UsingLargeIcons ? layer.add(new esri.Graphic(c, Configuration.LargeCrimeSymbols[dojo.indexOf(Configuration.CrimeCodes, h.CrimeCode)], b)) : layer.add(new esri.Graphic(c, Configuration.MiniCrimeSymbols[dojo.indexOf(Configuration.CrimeCodes, h.CrimeCode)], b)); Configuration.SelectedCrimeID != void 0 && Configuration.SelectedCrimeID != null && Configuration.SelectedCrimeID == h.ObjectID && (e = l); if (!d[h.AgencyID]) d[h.AgencyID] = h.AgencyName
        } if (d != void 0 && d != null && (AgencyFilterHelper.BuildFilterAgencyList(d),
Configuration.SelectedFilterAgencyID != void 0 && Configuration.SelectedFilterAgencyID != null)) AgencyFilterHelper.SetFilterAgency(Configuration.SelectedFilterAgencyID), Configuration.SelectedFilterAgencyID = null; MapHelper.CrimesLayerDojoClickConnection = dojo.connect(layer, "onClick", function (a) {
    Configuration.IsCrimeInfoWindow = true; if (a.graphic.attributes != void 0 && a.graphic.attributes != null) {
        var b, c = ""; if (a.graphic.attributes.length == void 0) b = a.graphic.attributes.ObjectID, c = a.graphic.attributes.Y.toString() +
"|" + a.graphic.attributes.X.toString(); else if (a.graphic.attributes.length > 0) b = a.graphic.attributes[0].ObjectID, c = a.graphic.attributes[0].Y.toString() + "|" + a.graphic.attributes[0].X.toString(); a = HtmlGenerator.GetIncidentInfoWindowHtml(Map.CrimeHashTable[c], Map.AgencyHashTable); Map.Map.infoWindow.setContent(a); MapHelper.ShowInfoWindow("crimesLayer", b)
    } 
}); if (Configuration.SelectedCrimeID != "" && e != -1) {
            i = a[e].Y.toString() + "|" + a[e].X.toString(); d = Map.Map.getLayer(Map.Map.layerIds[0]).tileInfo.lods.length -
Configuration.MaxIncidentZoomLevel; f = new esri.geometry.Point(parseFloat(a[e].Y), parseFloat(a[e].X), f); Map.Map.centerAndZoom(f, d); f = HtmlGenerator.GetIncidentInfoWindowHtml(Map.CrimeHashTable[i], Map.AgencyHashTable); Map.Map.infoWindow.setContent(f); var m = a[e].ObjectID; setTimeout(function () { MapHelper.ShowInfoWindow("crimesLayer", m) }, 500); Configuration.SelectedCrimeID = ""; e = -1
        } 
    } $("#loading-message").attr("class") == "black" && $("#loading-message").fadeOut("fast")
};
MapHelper.CreateHashTable = function (a) { var b = ""; Map.CrimeHashTable = {}; dojo.forEach(a, function (a) { b = a.Y.toString() + "|" + a.X.toString(); Map.CrimeHashTable[b] || (Map.CrimeHashTable[b] = []); dojo.some(Map.CrimeHashTable[b], function (b) { return b.ObjectID == a.ObjectID }) || Map.CrimeHashTable[b].push(a) }) };
MapHelper.ShowInfoWindow = function (a, b) {
    var c = null, f = false, e = 0; dojo.forEach(Map.Map.getLayer(a).graphics, function (d, g) { if (d.attributes && d.attributes.length == void 0) switch (a) { case "crimesLayer": d.attributes.ObjectID == b && (c = d); break; case "agencyLayer": d.attributes.AgencyID == b && (c = d) } else if (d.attributes != void 0 && d.attributes != null && d.attributes.length > 0) { f = true; for (g = 0; g < d.attributes.length; g++) if (d.attributes[g].ObjectID == b) { c = d; e = g; break } } }); c != void 0 && c != null ? (Map.Map.infoWindow.resize(Configuration.InfoWindowBaseWidth,
Configuration.InfoWindowBaseHeight), Map.Map.infoWindow.show(Map.Map.toScreen(c.geometry), Map.Map.getInfoWindowAnchor(Map.Map.toScreen(c.geometry))), f && MapHelper.ShowIncidentInfoWindowTab("table#iw_", e)) : ConsoleLogHelper.AddMessage("MapHelper.ShowInfoWindow failed. target is undefined or null.")
}; MapHelper.OnInfoWindowShow = function () { MapHelper.UpdateInfoWindow() };
MapHelper.UpdateInfoWindow = function () { var a = 0; $(".top .right .user .layout").children().each(function () { a += $(this).innerHeight() }); Map.Map.infoWindow.resize(Configuration.InfoWindowBaseWidth, a + 40) }; MapHelper.ShowIncidentInfoWindowTab = function (a, b) { for (var c = $(".incident-info-window.tabbed table").length, f = 0; f < c; f++) f == b ? $(a + f.toString()).show() : $(a + f.toString()).hide(); MapHelper.UpdateInfoWindow() };
MapHelper.ShowAddressGraphicInfoWindow = function () { var a = HtmlGenerator.BuildAddressMarkerInfoWindow(); Map.Map.infoWindow.resize(350, 150); Map.Map.infoWindow.setContent(a); Map.Map.infoWindow.show(Map.Map.toScreen(AddressFocusHelper.AddressGraphic.geometry), Map.Map.getInfoWindowAnchor(Map.Map.toScreen(AddressFocusHelper.AddressGraphic.geometry))); Configuration.IsCrimeInfoWindow = false };
MapHelper.ShowAddressGraphicDistanceInfoWindow = function () { var a = HtmlGenerator.BuildAddressDistanceInfoWindow(); Map.Map.infoWindow.resize(350, 150); Map.Map.infoWindow.setContent(a); Map.Map.infoWindow.show(Map.Map.toScreen(AddressDistanceHelper.AddressGraphic.geometry), Map.Map.getInfoWindowAnchor(Map.Map.toScreen(AddressDistanceHelper.AddressGraphic.geometry))); Configuration.IsCrimeInfoWindow = false }; MapHelper.NextIncident = function () { dijit.byId("iw_stackContainer").forward() }; MapHelper.PrevIncident = function () { dijit.byId("iw_stackContainer").back() };
MapHelper.CloseInfoWindow = function () { Map.Map.infoWindow.hide() }; MapHelper.FocusAroundAddress = function (a, b) { Configuration.IsMeasuringDistance = b != void 0 && b != null ? b : false; MapHelper.GeocodeAddress(a) };
MapHelper.GeocodeAddress = function (a) { a = $(a).val(); a != void 0 && a != null && a != "Enter an address:" ? (MapHelper.ShowLoadingMessage("black", ""), $("#address-form-search, #main-address-search, #get-distance-text-address").val(a), BingGeocoderHelper.GeocodeAddress(a, Map.Map, MapHelper.GeocodingFinished)) : ($("#loading-message").fadeOut(), MapHelper.ShowLoadingMessage("red", "<a onclick=\"$('#loading-message').fadeOut();\" class=\"close\"></a>To focus on a location, please enter an address and click 'Search.'")) };
MapHelper.GeocodingFinished = function (a) {
    if (a != null) {
        if (a.length == 0) { if (MapHelper.ShowLoadingMessage("red", '<a onclick="$(\'#loading-message\').fadeOut();" class="close"></a>The address you entered could not be found.'), Configuration.HasDefaultExtentSet == true) Map.Map.setExtent(Configuration.DefaultExtent, false), Configuration.HasDefaultExtentSet = false } else if (a.length == 1) if (Configuration.IsMeasuringDistance) {
            var b = Configuration.SelectedMeasureStartX != void 0 && Configuration.SelectedMeasureStartX != null &&
Configuration.SelectedMeasureStartX != "" ? Configuration.SelectedMeasureStartX : Map.Map.toMap(Map.Map.infoWindow.coords).x, c = Configuration.SelectedMeasureStartY != void 0 && Configuration.SelectedMeasureStartY != null && Configuration.SelectedMeasureStartY != "" ? Configuration.SelectedMeasureStartY : Map.Map.toMap(Map.Map.infoWindow.coords).y; AddressDistanceHelper.MeasureDistance(b, c, a[0].X, a[0].Y, a[0].Address, null)
        } else Configuration.SelectedX != void 0 && Configuration.SelectedX != null && Configuration.SelectedX != "" ? (AddressFocusHelper.ShouldZoomToExtent =
false, Configuration.SelectedX = null, Configuration.SelectedY = null) : AddressFocusHelper.ShouldZoomToExtent = true, AddressFocusHelper.PlaceAddressGraphic(a[0].X, a[0].Y, a[0].Address); else {
            b = ""; b = '<div class="label">Did you mean:</div><a class="clear" onclick="$(\'#did-you-mean-panel\').hide();">Clear?</a>'; b += '<p class="list">'; for (c = 0; c < a.length; c++) b += Configuration.IsMeasuringDistance ? c + 1 + '. <a onclick="AddressDistanceHelper.MeasureDistance(' + Map.Map.toMap(Map.Map.infoWindow.coords).x + "," + Map.Map.toMap(Map.Map.infoWindow.coords).y +
", " + a[c].X + ", " + a[c].Y + ",'" + a[c].Address + "', null); $('#did-you-mean-panel').hide();\">" + a[c].Address + "</a><br/>" : c + 1 + '. <a onclick="AddressFocusHelper.PlaceAddressGraphic(' + a[c].X + ", " + a[c].Y + ", '" + a[c].Address + "'); $('#did-you-mean-panel').hide();\">" + a[c].Address + "</a><br/>"; b += "</p>"; $("#did-you-mean-panel").html(b); UtilitiesHelper.ShowDidYouMeanPanel()
        } $("#loading-message").fadeOut()
    } else if (MapHelper.ShowLoadingMessage("red", '<a onclick="$(\'#loading-message\').fadeOut();" class="close"></a>The address you entered could not be found.'),
Configuration.HasDefaultExtentSet == true) Map.Map.setExtent(Configuration.DefaultExtent, false), Configuration.HasDefaultExtentSet = false
};
MapHelper.SetMapExtentSearchParameters = function () {
    if (isNaN(Map.Map.extent.xmin) || Map.Map.extent.xmin == void 0 || Map.Map.extent.xmin == null) return false; if (isNaN(Map.Map.extent.ymin) || Map.Map.extent.ymin == void 0 || Map.Map.extent.ymin == null) return false; if (isNaN(Map.Map.extent.xmax) || Map.Map.extent.xmax == void 0 || Map.Map.extent.xmax == null) return false; if (isNaN(Map.Map.extent.ymax) || Map.Map.extent.ymax == void 0 || Map.Map.extent.ymax == null) return false; IncidentSearchParameters.ExtentXMin = Map.Map.extent.xmin;
    IncidentSearchParameters.ExtentYMin = Map.Map.extent.ymin; IncidentSearchParameters.ExtentXMax = Map.Map.extent.xmax; IncidentSearchParameters.ExtentYMax = Map.Map.extent.ymax; return true
}; MapHelper.SetSelectedCrimeTypesSearchParameters = function () { var a = ""; $(".check-box-form input[name='crime-types-check-list']").each(function () { $(this).attr("checked") && (a += a.length > 0 ? "," + $(this).val() : $(this).val()) }); IncidentSearchParameters.CrimeTypes = a.length > 0 ? a : null; return true };
MapHelper.SetSelectedDateRangeSearchParameters = function () { IncidentSearchParameters.DateBegin = $("#inputStartDate").datepicker("getDate"); IncidentSearchParameters.DateEnd = $("#inputEndDate").datepicker("getDate"); return UtilitiesHelper.IsDate(IncidentSearchParameters.DateBegin) == false ? false : UtilitiesHelper.IsDate(IncidentSearchParameters.DateEnd) == false ? false : true }; MapHelper.SetFilterAgencyParameter = function () { IncidentSearchParameters.FilterAgencyID = AgencyFilterHelper.FilterAgencyID; return true };
MapHelper.GetCrimeSearchQueryString = function (a) {
    var b = false, b = MapHelper.SetMapExtentSearchParameters(); if (b == false) return ConsoleLogHelper.AddMessage("The map's extent is invalid. \r\n\r\nxmin = " + Map.Map.extent.xmin + "\r\nymin = " + Map.Map.extent.ymin + "\r\nxmax = " + Map.Map.extent.xmax + "\r\nymax = " + Map.Map.extent.ymax), null; b = MapHelper.SetSelectedDateRangeSearchParameters(); if (b == false) return ConsoleLogHelper.AddMessage("The calendars's dates are invalid. \r\n\r\nStart date = " + IncidentSearchParameters.DateBegin +
"\r\nEnd date = " + IncidentSearchParameters.DateEnd), null; b = MapHelper.SetSelectedCrimeTypesSearchParameters(); if (b == false) return null; b = MapHelper.SetFilterAgencyParameter(); return b == false ? null : MapHelper.BuildCrimeSearchQueryString(a)
};
MapHelper.BuildCrimeSearchQueryString = function (a) {
    var b = ""; if (IncidentSearchParameters.DateBegin != void 0 && IncidentSearchParameters.DateBegin != null && IncidentSearchParameters.DateBegin != "" && IncidentSearchParameters.DateEnd != void 0 && IncidentSearchParameters.DateEnd != null && IncidentSearchParameters.DateEnd != "") b += "?db=" + $.datepicker.formatDate("m/dd/yy", IncidentSearchParameters.DateBegin) + "+00:00:00&de=" + $.datepicker.formatDate("m/dd/yy", IncidentSearchParameters.DateEnd) + "+23:59:00"; else throw "IncidentParameterException";
    IncidentSearchParameters.CrimeTypes != void 0 && IncidentSearchParameters.CrimeTypes != null && IncidentSearchParameters.CrimeTypes != "" && (b += b.length > 0 ? "&ccs=" : "?ccs=", b += IncidentSearchParameters.CrimeTypes); AddressFocusHelper.AddressText != void 0 && AddressFocusHelper.AddressText != null && (b += b.length > 0 ? "&add=" + escape(AddressFocusHelper.AddressText) : "?add=" + escape(AddressFocusHelper.AddressText)); AddressFocusHelper.AddressBufferGraphic != void 0 && AddressFocusHelper.AddressBufferGraphic != null && AddressFocusHelper.AddressBufferCenterLat !=
void 0 && AddressFocusHelper.AddressBufferCenterLat != null && AddressFocusHelper.AddressBufferCenterLng != void 0 && AddressFocusHelper.AddressBufferCenterLng != null && AddressFocusHelper.AddressBufferRadius != void 0 && AddressFocusHelper.AddressBufferRadius != null && (b += b.length > 0 ? "&bcy=" + AddressFocusHelper.AddressBufferCenterLat + "&bcx=" + AddressFocusHelper.AddressBufferCenterLng + "&br=" + AddressFocusHelper.AddressBufferRadius : "?bcy=" + AddressFocusHelper.AddressBufferCenterLat + "&bcx=" + AddressFocusHelper.AddressBufferCenterLng +
"&br=" + AddressFocusHelper.AddressBufferRadius); if (a == true) if (Map.Map.extent != void 0 && Map.Map.extent != null) b += "&xmin=" + Map.Map.extent.xmin + "&ymin=" + Map.Map.extent.ymin + "&xmax=" + Map.Map.extent.xmax + "&ymax=" + Map.Map.extent.ymax; else throw "IncidentParameterException"; else if (Map.Map.extent != void 0 && Map.Map.extent != null) b += "&mcx=" + Map.Map.extent.getCenter().x + "&mcy=" + Map.Map.extent.getCenter().y + "&zl=" + Map.Map.getLevel(); else throw "IncidentParameterException"; IncidentSearchParameters.FilterAgencyID != void 0 &&
IncidentSearchParameters.FilterAgencyID != null && IncidentSearchParameters.FilterAgencyID != "" && (b += b.length > 0 ? "&faid=" + IncidentSearchParameters.FilterAgencyID : "?faid=" + IncidentSearchParameters.FilterAgencyID); return b
};
MapHelper.BuildMapLinkQueryString = function () {
    var a = ""; if (Map.Map.extent != void 0 && Map.Map.extent != null) a += "?ll=" + Map.Map.extent.getCenter().x + "," + Map.Map.extent.getCenter().y; else throw "InvalidMapLinkException"; a += "&z=" + Map.Map.getLevel() + "&mc=" + EventBinderHelper.GetCurrentMapCache(); IncidentSearchParameters.CrimeTypes != void 0 && IncidentSearchParameters.CrimeTypes != null && IncidentSearchParameters.CrimeTypes != "" && (a += "&cc=" + IncidentSearchParameters.CrimeTypes); if (IncidentSearchParameters.DateBegin != void 0 &&
IncidentSearchParameters.DateBegin != null && IncidentSearchParameters.DateBegin != "" && IncidentSearchParameters.DateEnd != void 0 && IncidentSearchParameters.DateEnd != null && IncidentSearchParameters.DateEnd != "") a += "&db=" + $.datepicker.formatDate("m/dd/yy", IncidentSearchParameters.DateBegin) + "&de=" + $.datepicker.formatDate("m/dd/yy", IncidentSearchParameters.DateEnd), a = a.replace(/ /g, "+"); else throw "InvalidMapLinkException"; AddressFocusHelper.AddressText != void 0 && AddressFocusHelper.AddressText != null ? (a += "&loc=" +
AddressFocusHelper.AddressText.replace(/ /g, "+"), AddressFocusHelper.AddressBufferGraphic != void 0 && AddressFocusHelper.AddressBufferGraphic != null && AddressFocusHelper.AddressBufferCenterLat != void 0 && AddressFocusHelper.AddressBufferCenterLat != null && AddressFocusHelper.AddressBufferCenterLng != void 0 && AddressFocusHelper.AddressBufferCenterLng != null && AddressFocusHelper.AddressBufferRadius != void 0 && AddressFocusHelper.AddressBufferRadius != null && (a += "&br=" + AddressFocusHelper.AddressBufferRadius)) : AddressDistanceHelper.AddressText !=
void 0 && AddressDistanceHelper.AddressText != null && (a += "&loc=" + AddressDistanceHelper.AddressText, Configuration.IsMeasuringDistance == true && Map.Map.infoWindow.coords != void 0 && Map.Map.infoWindow.coords != null && (a += "&mll=" + Map.Map.toMap(Map.Map.infoWindow.coords).x + "," + Map.Map.toMap(Map.Map.infoWindow.coords).y)); AgencyFilterHelper.FilterAgencyID != void 0 && AgencyFilterHelper.FilterAgencyID != null && AgencyFilterHelper.FilterAgencyID != "" && (a += "&faid=" + IncidentSearchParameters.FilterAgencyID); if (Map.Map.infoWindow.isShowing ==
true) { var b = $("#info-window-object-id").val(); b != void 0 && b != null && b != "" && (a += "&iid=" + b) } Configuration.UsingLargeIcons == false && (a += "&mini=y"); return a
};
MapHelper.WireMapMoveEvents = function () {
    dojo.connect(Map.Map, "onExtentChange", function () {
        if (Map.Map.getLevel() >= Configuration.ShowingIncidentsZoomLevel) {
            if (Configuration.HasDefaultExtentSet == true) Configuration.HasDefaultExtentSet = false; Configuration.IsShowingCrime = true; MapHelper.GetCrimes(); EventBinderHelper.EnableNavigation(); $("#use-mini-icons-button").show(); AddressFocusHelper.AddressBufferGraphic != void 0 && AddressFocusHelper.AddressBufferGraphic != null && EventBinderHelper.AnimateClearBufferButton();
            AgencyFilterHelper.FilterAgencyID != void 0 && AgencyFilterHelper.FilterAgencyID != null && EventBinderHelper.AnimateRemoveFilterButton()
        } else {
            Configuration.CurrentXHR != void 0 && Configuration.CurrentXHR != null && Configuration.CurrentXHR.abort(); if (Configuration.HasAgencies == false) MapHelper.GetAgencies(), Configuration.HasAgencies = true; if (Configuration.IsShowingCrime) Configuration.IsShowingCrime = false, MapHelper.ClearGraphicsLayer("crimesLayer"), AddressDistanceHelper.RemovePolylineOverlay(), AddressFocusHelper.RemoveAddressFocus(),
AgencyFilterHelper.RemoveFilterAgency(), EventBinderHelper.DisableNavigation(), UtilitiesHelper.ResizeMap(), $("#use-mini-icons-button").hide(), $("#loading-message").fadeOut("fast"); var a = 0, b; for (b in Map.AgencyHashTable) a++; $("#status-message").html('<strong class="counter-bubble"><span>' + a + ' agencies</span></strong><p>Click a blue pin (<img src="' + Configuration.WebRoot + 'images/blue-pin.gif" alt="Blue pin" title="Blue pin" />) and zoom in to view crime.</p>')
        } 
    }); dojo.connect(Map.Map, "onZoom", MapHelper.OnZoom);
    dojo.connect(Map.Map, "onZoomEnd", MapHelper.OnZoomEnd)
}; MapHelper.OnZoom = function () { $("#drag-zoom-in-button").removeClass("active"); $("#drag-zoom-out-button").removeClass("active"); Map.ToolBar.deactivate(esri.toolbars.Navigation.ZOOM_IN); Map.ToolBar.deactivate(esri.toolbars.Navigation.ZOOM_OUT) }; MapHelper.OnZoomEnd = function (a, b, c, f) { f < Configuration.ShowingIncidentsZoomLevel && MapHelper.CloseInfoWindow() };
MapHelper.DragZoomIn = function () { $("#drag-zoom-in-button").addClass("active"); $("#drag-zoom-out-button").removeClass("active"); Map.ToolBar.activate(esri.toolbars.Navigation.ZOOM_IN) }; MapHelper.DragZoomOut = function () { $("#drag-zoom-out-button").addClass("active"); $("#drag-zoom-in-button").removeClass("active"); Map.ToolBar.activate(esri.toolbars.Navigation.ZOOM_OUT) };
MapHelper.JumpToAgency = function () {
    if ($("select#agency-list").val() != void 0 && $("select#agency-list").val() != null && $("select#agency-list").val() != "") {
        var a = $("select#agency-list").val().split(","); if (a != void 0 && a != null) {
            var b = a[3]; Map.AgencyHashTable[b].HasContent == void 0 || Map.AgencyHashTable[b].HasContent == null || Map.AgencyHashTable[b].HasContent == false ? MapHelper.GetAgencyCrimeInfo(b, false, true) : (b = new Date(UtilitiesHelper.FormatIncidentDate(Map.AgencyHashTable[b].LastIncidentDate)), b = $.datepicker.formatDate("m/dd/yy",
b), MapHelper.ZoomToPointAndDate(parseFloat(a[0]), parseFloat(a[1]), a[2], false, b))
        } 
    } else ConsoleLogHelper.AddMessage("MapHelper.JumpToAgency failed. 'select#agency-list' is undefined or null."); $("select#agency-list").val("Choose an agency:")
}; MapHelper.ZoomToPoint = function (a, b, c, f) { AddressFocusHelper.RemoveAddressFocus(); AddressDistanceHelper.RemovePolylineOverlay(); AgencyFilterHelper.RemoveFilterAgency(); Map.Map.centerAndZoom(new esri.geometry.Point(parseFloat(a), parseFloat(b)), c); f && Map.Map.infoWindow.show() };
MapHelper.ZoomToPointAndDate = function (a, b, c, f, e) { var d = new Date, g = new Date; g.setTime(Date.parse(e)); d.setTime(Date.parse(e)); d = new Date(d.getFullYear(), d.getMonth(), d.getDate() - Configuration.DefaultDateRange); UtilitiesHelper.SetDateBoundaries(d, g); $("#inputStartDate").datepicker("setDate", d); $("#inputEndDate").datepicker("setDate", g); EventBinderHelper.EnableResetDatePickerButton(); MapHelper.ZoomToPoint(a, b, c, f) };
MapHelper.ZoomToNationalOverview = function () { Configuration.CurrentXHR != void 0 && Configuration.CurrentXHR != null && Configuration.CurrentXHR.abort(); Map.Map.setExtent(Configuration.DefaultExtent, false); Map.Map.infoWindow.hide() };
MapHelper.ToggleIconSizes = function () { Configuration.UsingLargeIcons ? (Configuration.UsingLargeIcons = false, $("#use-mini-icons-button").text("Use Large Icons").addClass("active")) : (Configuration.UsingLargeIcons = true, $("#use-mini-icons-button").text("Use Mini Icons").removeClass("active")); UtilitiesHelper.ToggleFilterFormImages(Configuration.UsingLargeIcons); MapHelper.GetCrimes() };
MapHelper.ZoomToCrime = function (a) {
    var b, c; dojo.forEach(Map.Map.getLayer("crimesLayer").graphics, function (e, d) { if (e.attributes && e.attributes.length == void 0) e.attributes.ObjectID == a && (b = e, c = b.attributes.Y.toString() + "|" + b.attributes.X.toString()); else if (e.attributes != void 0 && e.attributes != null && e.attributes.length > 0) { isStackedLocation = true; for (d = 0; d < e.attributes.length; d++) if (e.attributes[d].ObjectID == a) { b = e; stackedLocationIndex = d; c = e.attributes[d].Y.toString() + "|" + e.attributes[d].X.toString(); break } } });
    if (b) { Map.Map.centerAndZoom(b.geometry, Map.Map.getLayer(Map.Map.layerIds[0]).tileInfo.lods.length - Configuration.MaxIncidentZoomLevel); var f = HtmlGenerator.GetIncidentInfoWindowHtml(Map.CrimeHashTable[c], Map.AgencyHashTable); Map.Map.infoWindow.setContent(f); setTimeout(function () { MapHelper.ShowInfoWindow("crimesLayer", a) }, 500); Configuration.IsCrimeInfoWindow = true } else MapHelper.ShowLoadingMessage("red", '<a onclick="$(\'#loading-message\').fadeOut();" class="close"></a>That crime is not on the map, or could not be found.')
};
MapHelper.PanToCrime = function (a, b, c, f) {
    var e = new Date, d = $("#inputStartDate").datepicker("getDate"), g = $("#inputEndDate").datepicker("getDate"), i = new esri.SpatialReference({ wkid: Configuration.SpatialReferenceWKID_BING }), k = Map.Map.extent.getCenter(), a = new esri.geometry.Point([a, b], i); e.setTime(Date.parse(f)); Configuration.SelectedCrimeID = c; if (e < d || e > g) g = d = e, d.setDate(e.getDate() - 2), g.setDate(e.getDate() + 2), UtilitiesHelper.SetDateBoundaries(d, g), $("#inputStartDate").datepicker("setDate", d), $("#inputEndDate").datepicker("setDate",
g), EventBinderHelper.EnableResetDatePickerButton(); k == a ? MapHelper.GetCrimes() : Map.Map.centerAt(a)
}; MapHelper.ShowZoomInMessage = function () { $("#loading-message span").html('<a onclick="$(\'#loading-message\').fadeOut();" class="close">&nbsp;</a>Sorry, but you must be <strong>zoomed in further</strong> to use these tools.<br/>Click on one of the blue pin markers on the map, to zoom in.'); $("#loading-message").attr("class", "red"); $("#loading-message").show() };
MapHelper.ShowLoadingMessage = function (a, b) {
    $("#loading-message span").html(b); $("#loading-message").removeAttr("class").addClass(a); if (jQuery.browser.msie && jQuery.browser.version <= 6) {
        switch (a) {
            case "green": backgroundColor = "#c1d88f"; borderColor = "#70b353"; break; case "red": backgroundColor = "#dd909e"; borderColor = "#a42f31"; break; case "yellow": backgroundColor = "#f9e994", borderColor = "#e0a72d"; case "black": backgroundColor = "#2e2e2e", borderColor = "#000000", $("#loading-message span").html('<img src="' + Configuration.WebRoot +
'images/black-spinner.gif" alt="Loading" title="Loading" border="0" style="padding: 5px;" />')
        } $("#loading-message").css({ "background-color": backgroundColor })
    } $("#loading-message").show()
}; MapHelper.ResetDatePicker = function () { var a = new Date, b = new Date; EventBinderHelper.DisableResetDatePickerButton(); a.setDate(b.getDate() - Configuration.DefaultDateRange); UtilitiesHelper.SetDateBoundaries(a, b); $("#inputStartDate").datepicker("setDate", a); $("#inputEndDate").datepicker("setDate", b); MapHelper.GetCrimes() };
