﻿var __agencyId = null; $.ajaxSetup({ type: "POST", contentType: "application/json; charset=utf-8", data: "{}", dataFilter: function (b) { var a; if (typeof JSON !== "undefined" && typeof JSON.parse === "function") a = JSON.parse(b); else a = eval("(" + b + ")"); return a.hasOwnProperty("d") ? a.d : a } }); function jQueryJsonAjax(d, a, b, c) { $.ajax({ url: "/Common/WebServices/Estrella.asmx/" + a, data: d, success: b, error: c }) } function jQueryJsonAjaxOneWay(b, a) { $.ajax({ url: "/Common/WebServices/Estrella.asmx/" + a, data: b }) } var __lastMiniNavTimeoutId = 0; function MasterMininav(a) { clearInterval(__lastMiniNavTimeoutId); $("#mstr_customer").hide(); $("#mstr_language").hide(); switch (a) { case 0: $("#mstr_customer").slideDown(); break; case 1: $("#mstr_language").slideDown(); break; case 2: $("#mstr_agent").slideDown() } __lastMiniNavTimeoutId = setTimeout(function () { $("#mstr_customer").slideUp(); $("#mstr_language").slideUp(); $("#mstr_agent").slideUp() }, 6e3) } function findAnAgentBox(a) { $("#faa-arrow").slideUp("fast"); switch (a) { case 1: $("#faa-city").slideUp("fast"); $("#faa-zip").slideDown("fast"); $("#faa-txtZipCode").focus(); break; case 2: $("#faa-zip").slideUp("fast"); $("#faa-city").slideDown("fast"); break; case 3: window.location.href = "/Agents/" + $("#faa-txtZipCode").val() + "/ZipCode.aspx" } } function UnBlockUi() { $.unblockUI() } function BlockUi(a) { $.blockUI({ message: '<div class="BlockUiLoader">' + a + "</div>" }) } function BlockUiWithClose(a) { $.blockUI({ message: '<div class="BlockUiLoader">' + a + '<hr /><a href="#" onclick="UnBlockUi()">Close</a></div>' }) } function BlockUiWithElement(a) { $.blockUI({ message: $("#" + a) }) } function FocusOn(a) { $("#" + a)[0].focus() } function Round5(a) { return Math.floor(a * 1e5) / 1e5 } function GetAllLocations(c) { var b = "{}", a = "GetAllLocations"; jQueryJsonAjax(b, a, c, function () { }) } function LocDetSms() { $("#loc-SendSms").toggle(); $("#loc-SendEmail").hide() } function LocDetEmail() { $("#loc-SendSms").hide(); $("#loc-SendEmail").toggle() } function LocGeneralSms(a) { BlockUiWithElement("loc-SendSms"); __agencyId = a } function LocGeneralEmail(a) { BlockUiWithElement("loc-SendEmail"); __agencyId = a } function SendContactInfoViaSms() { var b = $("#txtSMSNumber").val(), a = $("#smsCarrier").val(); BlockUi("Sending SMS"); var c = { agencyId: __agencyId, number: b, carrier: a }; jQueryJsonAjax(JSON.stringify(c), "SendContactInfoViaSms", function () { ResetSendContact(); BlockUiWithClose("<h3>SMS Sent</h3><p>The location contact information has been sent!</p>") }, function () { BlockUiWithClose("<h3>Ran into a Problem</h3><p>Something went wrong while sending you location info.</p><p>Make sure that required fields are filled.</p><p>Try again, if this continues, contact support</p>") }) } function SendContactInfoViaEmail() { var a = $("#txtsc-email").val(); BlockUi("Sending Email"); var b = { agencyId: __agencyId, email: a }; jQueryJsonAjax(JSON.stringify(b), "SendContactInfoViaEmail", function () { ResetSendContact(); BlockUiWithClose("<h3>Email Sent</h3><p>The location contact information has been sent!</p>") }, function () { BlockUiWithClose("<h3>Ran into a Problem</h3><p>Something went wrong while sending you location info.</p><p>Make sure that required fields are filled.</p><p>Try again, if this continues, contact support</p>") }) } function ResetSendContact() { $("#loc-SendSms").hide(); $("#loc-SendEmail").hide(); $("#txtSMSNumber").val(""); $("#txtEmail").val(""); UnBlockUi() } function FormatToTelephoneNumber(a) { return a.length === 7 ? a.substring(0, 3) + "-" + a.substring(3, 4) : a.length === 10 ? "(" + a.substring(0, 3) + ") " + a.substring(3, 6) + "-" + a.substring(6, 10) : a } __map = null; __pin = null; __mapLoaded = false; __mapPushPinIcon = "/common/images/pushpin_med.png"; function MapAddScript() { if (!__mapLoaded) try { Sys.loadScripts(["http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&onScriptLoad=MapLoaded"]) } catch (a) { } } function CreateMap() { __map = new VEMap("map"); __map.LoadMap(new VELatLong(25.92594, -80.20569), 9, VEMapStyle.Road, false, VEMapMode.Mode2D, true, 0); __map.AttachEvent("onendzoom", MapZoomEnd); __mapLoaded = true } function MapAttachClickEvent(a) { __map.AttachEvent("onclick", a) } function FindAddress(a) { __map.Find(null, a) } function MapGetLocationObjectFromPixel(b, a) { return __map.PixelToLatLong(new VEPixel(b, a)) } function MapZoomEnd() { var a = __map.GetZoomLevel(), b = __map.GetShapeLayerCount() } function MapCenterAndZoom(b, a) { a >= 12 && MapSetMediumIcon(); a < 12 && MapSetSmallIcon(); __map.SetCenterAndZoom(b, a) } function MapSetSmallIcon() { __mapPushPinIcon = "/common/images/pushpin_small.png" } function MapSetMediumIcon() { __mapPushPinIcon = "/common/images/pushpin_med.png" } function MapSetLargeIcon() { __mapPushPinIcon = "/common/images/pushpin_large.png" } function MapSetPin(c, b, a) { if (__pin) __pin.SetPoints(c); else { __pin = new VEShape(VEShapeType.Pushpin, c); __pin.SetCustomIcon(__mapPushPinIcon); __map.AddShape(__pin) } b && __pin.SetTitle(b); a && __pin.SetDescription(a) } function MapSetNewPin(d, e, c, b) { var a = new VEShape(VEShapeType.Pushpin, d); a.SetCustomIcon(__mapPushPinIcon); __map.AddShape(a); c && a.SetTitle(c); b && a.SetDescription(b) } function ZoomToBroward() { var a = new VELatLong(26.12338, -80.24277); __map.SetCenterAndZoom(a, 11) } function ZoomToDade() { var a = new VELatLong(25.76712, -80.27779); __map.SetCenterAndZoom(a, 11) } function ZoomToWestPalm() { var a = new VELatLong(26.64508, -80.11213); __map.SetCenterAndZoom(a, 11) } var __containerHidden = true; function ToggleContainerOptions() { if (__containerHidden) { $("#ContainerOptions").animate({ left: 0 }, 750, function () { $("#ContainerOptionsContainer").removeClass("OverflowContainer") }); __containerHidden = false } else { $("#ContainerOptionsContainer").addClass("OverflowContainer"); $("#ContainerOptions").animate({ left: 852 }, 750); __containerHidden = true } };
if (!this.JSON) this.JSON = {}; $.fn.json2Check = function () { } (function () { function c(a) { return a < 10 ? "0" + a : a } if (typeof Date.prototype.toJSON !== "function") { Date.prototype.toJSON = function () { return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + c(this.getUTCMonth() + 1) + "-" + c(this.getUTCDate()) + "T" + c(this.getUTCHours()) + ":" + c(this.getUTCMinutes()) + ":" + c(this.getUTCSeconds()) + "Z" : null }; String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function () { return this.valueOf() } } var h = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, f = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, a, d, i = { "\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, b; function g(a) { f.lastIndex = 0; return f.test(a) ? '"' + a.replace(f, function (a) { var b = i[a]; return typeof b === "string" ? b : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }) + '"' : '"' + a + '"' } function e(m, n) { var i, j, h, k, l = a, f, c = n[m]; if (c && typeof c === "object" && typeof c.toJSON === "function") c = c.toJSON(m); if (typeof b === "function") c = b.call(n, m, c); switch (typeof c) { case "string": return g(c); case "number": return isFinite(c) ? String(c) : "null"; case "boolean": case "null": return String(c); case "object": if (!c) return "null"; a += d; f = []; if (Object.prototype.toString.apply(c) === "[object Array]") { k = c.length; for (i = 0; i < k; i += 1) f[i] = e(i, c) || "null"; h = f.length === 0 ? "[]" : a ? "[\n" + a + f.join(",\n" + a) + "\n" + l + "]" : "[" + f.join(",") + "]"; a = l; return h } if (b && typeof b === "object") { k = b.length; for (i = 0; i < k; i += 1) { j = b[i]; if (typeof j === "string") { h = e(j, c); h && f.push(g(j) + (a ? ": " : ":") + h) } } } else for (j in c) if (Object.hasOwnProperty.call(c, j)) { h = e(j, c); h && f.push(g(j) + (a ? ": " : ":") + h) } h = f.length === 0 ? "{}" : a ? "{\n" + a + f.join(",\n" + a) + "\n" + l + "}" : "{" + f.join(",") + "}"; a = l; return h } } if (typeof JSON.stringify !== "function") JSON.stringify = function (h, c, f) { var g; a = ""; d = ""; if (typeof f === "number") for (g = 0; g < f; g += 1) d += " "; else if (typeof f === "string") d = f; b = c; if (c && typeof c !== "function" && (typeof c !== "object" || typeof c.length !== "number")) throw new Error("JSON.stringify"); return e("", { "": h }) }; if (typeof JSON.parse !== "function") JSON.parse = function (a, c) { var b; function d(f, g) { var b, e, a = f[g]; if (a && typeof a === "object") for (b in a) if (Object.hasOwnProperty.call(a, b)) { e = d(a, b); if (e !== undefined) a[b] = e; else delete a[b] } return c.call(f, g, a) } h.lastIndex = 0; if (h.test(a)) a = a.replace(h, function (a) { return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }); if (/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) { b = eval("(" + a + ")"); return typeof c === "function" ? d({ "": b }, "") : b } throw new SyntaxError("JSON.parse"); } } ());
(function (a) { if (/1\.(0|1|2)\.(0|1|2)/.test(a.fn.jquery) || /^1.1/.test(a.fn.jquery)) { alert("blockUI requires jQuery v1.2.3 or later!  You are using v" + a.fn.jquery); return } a.fn._fadeIn = a.fn.fadeIn; a.blockUI = function (a) { g(window, a) }; a.unblockUI = function (a) { e(window, a) }; a.growlUI = function (e, d, b) { var c = a('<div class="growlUI"></div>'); e && c.append("<h1>" + e + "</h1>"); d && c.append("<h2>" + d + "</h2>"); if (b == undefined) b = 3e3; a.blockUI({ message: c, fadeIn: 700, fadeOut: 1e3, centerY: false, timeout: b, showOverlay: false, css: a.blockUI.defaults.growlCSS }) }; a.fn.block = function (b) { return this.each(function () { if (a.css(this, "position") == "static") this.style.position = "relative"; if (a.browser.msie) this.style.zoom = 1; g(this, b) }) }; a.fn.unblock = function (a) { return this.each(function () { e(this, a) }) }; a.blockUI.version = 2.16; a.blockUI.defaults = { message: "<h1>Please wait...</h1>", css: { padding: 0, margin: 0, width: "30%", top: "40%", left: "35%", textAlign: "center", color: "#000", border: "3px solid #aaa", backgroundColor: "#fff", cursor: "wait" }, overlayCSS: { backgroundColor: "#000", opacity: "0.6" }, growlCSS: { width: "350px", top: "10px", left: "", right: "10px", border: "none", padding: "5px", opacity: "0.6", cursor: null, color: "#fff", backgroundColor: "#000", "-webkit-border-radius": "10px", "-moz-border-radius": "10px" }, baseZ: 1e3, centerX: true, centerY: true, allowBodyStretch: true, constrainTabKey: true, fadeIn: 200, fadeOut: 400, timeout: 0, showOverlay: true, focusInput: true, applyPlatformOpacityRules: true, onUnblock: null, quirksmodeOffsetHack: 4 }; var k = a.browser.msie && /MSIE 6.0/.test(navigator.userAgent), c = null, b = []; function g(n, f) { var i = n == window, g = f && f.message !== undefined ? f.message : undefined; f = a.extend({}, a.blockUI.defaults, f || {}); f.overlayCSS = a.extend({}, a.blockUI.defaults.overlayCSS, f.overlayCSS || {}); var y = a.extend({}, a.blockUI.defaults.css, f.css || {}); g = g === undefined ? f.message : g; i && c && e(window, { fadeOut: 0 }); if (g && typeof g != "string" && (g.parentNode || g.jquery)) { var q = g.jquery ? g[0] : g, o = {}; a(n).data("blockUI.history", o); o.el = q; o.parent = q.parentNode; o.display = q.style.display; o.position = q.style.position; o.parent && o.parent.removeChild(q) } var s = f.baseZ, r = a.browser.msie ? a('<iframe class="blockUI" style="z-index:' + s++ + ';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="about:blank"></iframe>') : a('<div class="blockUI" style="display:none"></div>'), p = a('<div class="blockUI blockOverlay" style="z-index:' + s++ + ';display:none;cursor:wait;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'), m = i ? a('<div class="blockUI blockMsg blockPage" style="z-index:' + s + ';display:none;position:fixed"></div>') : a('<div class="blockUI blockMsg blockElement" style="z-index:' + s + ';display:none;position:absolute"></div>'); g && m.css(y); (!f.applyPlatformOpacityRules || !(a.browser.mozilla && /Linux/.test(navigator.platform))) && p.css(f.overlayCSS); p.css("position", i ? "fixed" : "absolute"); a.browser.msie && r.css("opacity", "0.0"); a([r[0], p[0], m[0]]).appendTo(i ? "body" : n); var x = a.browser.msie && (a.browser.version < 8 || !a.boxModel) && (!a.boxModel || a("object,embed", i ? null : n).length > 0); if (k || x && m[0].style.setExpression) { i && f.allowBodyStretch && a.boxModel && a("html,body").css("height", "100%"); if ((k || !a.boxModel) && !i) var w = d(n, "borderTopWidth"), v = d(n, "borderLeftWidth"), u = w ? "(0 - " + w + ")" : 0, t = v ? "(0 - " + v + ")" : 0; a.each([r, p, m], function (d, e) { var a = e[0].style; a.position = "absolute"; if (d < 2) { i ? a.setExpression("height", "Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:" + f.quirksmodeOffsetHack + ') + "px"') : a.setExpression("height", 'this.parentNode.offsetHeight + "px"'); i ? a.setExpression("width", 'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"') : a.setExpression("width", 'this.parentNode.offsetWidth + "px"'); t && a.setExpression("left", t); u && a.setExpression("top", u) } else if (f.centerY) { i && a.setExpression("top", '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'); a.marginTop = 0 } else if (!f.centerY && i) { var c = f.css && f.css.top ? parseInt(f.css.top) : 0, b = "((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + " + c + ') + "px"'; a.setExpression("top", b) } }) } if (g) { m.append(g); (g.jquery || g.nodeType) && a(g).show() } a.browser.msie && f.showOverlay && r.show(); if (f.fadeIn) { f.showOverlay && p._fadeIn(f.fadeIn); g && m.fadeIn(f.fadeIn) } else { f.showOverlay && p.show(); g && m.show() } j(1, n, f); if (i) { c = m[0]; b = a(":input:enabled:visible", c); f.focusInput && setTimeout(h, 20) } else l(m[0], f.centerX, f.centerY); if (f.timeout) { var z = setTimeout(function () { i ? a.unblockUI(f) : a(n).unblock(f) }, f.timeout); a(n).data("blockUI.timeout", z) } } function e(e, d) { var k = e == window, f = a(e), h = f.data("blockUI.history"), l = f.data("blockUI.timeout"); if (l) { clearTimeout(l); f.removeData("blockUI.timeout") } d = a.extend({}, a.blockUI.defaults, d || {}); j(0, e, d); var g = k ? a("body").children().filter(".blockUI") : a(".blockUI", e); if (k) c = b = null; if (d.fadeOut) { g.fadeOut(d.fadeOut); setTimeout(function () { i(g, h, d, e) }, d.fadeOut) } else i(g, h, d, e) } function i(d, b, c, e) { d.each(function () { this.parentNode && this.parentNode.removeChild(this) }); if (b && b.el) { b.el.style.display = b.display; b.el.style.position = b.position; b.parent && b.parent.appendChild(b.el); a(b.el).removeData("blockUI.history") } if (typeof c.onUnblock == "function") c.onUnblock(e, c) } function j(b, i, g) { var d = i == window, h = a(i); if (!b && (d && !c || !d && !h.data("blockUI.isBlocked"))) return; !d && h.data("blockUI.isBlocked", b); if (b && !g.showOverlay) return; var e = "mousedown mouseup keydown keypress"; b ? a(document).bind(e, g, f) : a(document).unbind(e, f) } function f(d) { if (d.keyCode && d.keyCode == 9) if (c && d.data.constrainTabKey) { var e = b, g = !d.shiftKey && d.target == e[e.length - 1], f = d.shiftKey && d.target == e[0]; if (g || f) { setTimeout(function () { h(f) }, 10); return false } } return a(d.target).parents("div.blockMsg").length > 0 ? true : a(d.target).parents().children().filter("div.blockUI").length == 0 } function h(c) { if (!b) return; var a = b[c === true ? b.length - 1 : 0]; a && a.focus() } function l(a, g, h) { var b = a.parentNode, e = a.style, c = (b.offsetWidth - a.offsetWidth) / 2 - d(b, "borderLeftWidth"), f = (b.offsetHeight - a.offsetHeight) / 2 - d(b, "borderTopWidth"); if (g) e.left = c > 0 ? c + "px" : "0"; if (h) e.top = f > 0 ? f + "px" : "0" } function d(b, c) { return parseInt(a.css(b, c)) || 0 } })(jQuery);