FBSM.C.currentTabIndex = '1'; FBSM.C.IDMap = new Object(); FBSM.C.tireFitmentGuideTireSizeInfo = null; FBSM.C.tireFitmentGuideTireSizeInfoIndex = 0; FBSM.C.SORT_COLUMN_INDEX = 0; FBSM.C.flashObjectCollection = new Object(); FBSM.C.SearchString = null; FBSM.C.RTP_JSON = null; FBSM.C.serviceDetailLocations = null; FBSM.C.unitSearch = ""; FBSM.C.defaultSortOrder = ""; FBSM.C.displayRequestQuote = true; FBSM.C.packageSubtotal = 0.0; FBSM.C.OmnitureHistory = new Array(); FBSM.C.loadCustomJavascriptParameters = function(val, type) { if (typeof s != "undefined") { if (val != "checkout_tab_shipping" || s.pageName != "checkout shipping") { if (val == "form_submit" || FBSM.C.OmnitureHistory.length == 0 || FBSM.C.OmnitureHistory[FBSM.C.OmnitureHistory.length - 1] != val) { if (val == "form_submit") { FBSM.C.OmnitureHistory.pop(); } else { FBSM.C.OmnitureHistory.push(val); } $.ajax({ type: "POST", url: "/Services/WidgetServices.asmx/getAjaxParams", data: "command=" + val + "&type=" + type, dataType: 'script', contentType: "application/x-www-form-urlencoded" }); FBSM.C.storeOmnitureEvars(); } } } }; FBSM.C.loadCustomJavascriptParametersFromSource = function(script) { if (typeof s != "undefined") { $.ajax({ type: "POST", url: "Services/WidgetServices.aspx", data: { "action": "getAjaxParamScript", "script": script }, dataType: 'script', contentType: "application/x-www-form-urlencoded" }); FBSM.C.storeOmnitureEvars(); } }; FBSM.C.storeOmnitureEvars = function() { if (typeof s != "undefined") { var data = new Array(51); var hasResults = false; for (i = 0; i < 51; i++) { if (typeof s["eVar" + i.toString()] != "undefined") { data[i] = s["eVar" + i.toString()].replace(/\|/g, "-"); hasResults = true; } else { data[i] = ""; } } if (hasResults) { $.ajax({ type: "POST", url: "Services/WidgetServices.aspx", data: { "action": "storeEvars", "evars": data.join("|") }, contentType: "application/x-www-form-urlencoded", success: function(res) {} }); } } }; FBSM.C.captchaRefresh = function(CaptchaId) { if ($("img[id='" + CaptchaId + "']").length > 0) { var date = new Date(); $("img[id='" + CaptchaId + "']").attr("src", $("img[id='" + CaptchaId + "']").attr("src").replace(/\&dt=\d*/ig, "") + "&dt=" + date.getTime()); } }; FBSM.C.showInfoDialog = function(body, title, width, height, dialogButtons) { if (dialogButtons == null) { dialogButtons = { Ok: function() { $(this).dialog('destroy'); } }; } if (body === "") body = "Success"; if ($.browser.msie) { width = width.toString().replace("px", ""); height = height.toString().replace("px", ""); } var $variantdialog = $('
') .html(body) .css({ 'text-align': 'left' }) .dialog({ title: title, modal: true, width: width, height: height, buttons: dialogButtons, open: function(event, ui) { $(this).parent().keydown(function(e) { $variantdialog.dialog('close'); e.preventDefault(); }); var dialog = $(event.target).parents(".ui-dialog.ui-widget"); var buttons = dialog.find(".ui-dialog-buttonpane").find("button"); if (buttons.length > 0) { $(buttons[0]).wrap(''); if (buttons.length > 1) { $(buttons[1]).wrap(''); } } }, close: function() { $(this).dialog("destroy"); } }); }; FBSM.C.clearFormElements = function(collection, labels) { $.each(collection, function (i, row) { if ($.inArray(row.id, labels) != -1) $(row).val(""); }); }; FBSM.C.buildXmlPopupMessage = function(res, collection, labels, buttons) { var output = ""; var title = ""; if ($("validationError", res).length > 0) { output += "