﻿var Catalog = {}; $(document).ready(function() { $(".warranty-program-opt input").live("click", function() { var b = $(this); var a = b.parent().parent().parent().parent().parent().parent().parent(); a.find(".spanTermsAndCondsAccept").show() }); $(".waranty-program-none input").live("click", function() { var b = $(this); var a = b.parent().parent(); a.find(".spanTermsAndCondsAccept").hide() }) }); Catalog.Utils = { FormatUrl: function(a) { return document.location.protocol + "//" + document.location.host + "/" + a }, QueryString: function(d) { var c = location.search.substring(1, location.search.length); var b = false; var a = c.split("&"); for (i = 0; i < a.length; i++) { param_name = a[i].substring(0, a[i].indexOf("=")); if (param_name == d) { b = a[i].substring(a[i].indexOf("=") + 1) } } if (b) { return b } else { return "" } }, ReplaceQueryString: function(a, d, c) { var b = new RegExp("([?|&])" + d + "=.*?(&|$)", "i"); if (a.match(b)) { return a.replace(b, "$1" + d + "=" + c + "$2") } else { return a + "&" + d + "=" + c } } }; Catalog.Inventory = { skus: new Array(), AddControlToArray: function(a) { Catalog.Inventory.skus.push(a) }, RefreshControls: function(b) { if (Catalog.Inventory.skus.length > 0) { if ((readCookieName("Recognized") == null && readCookieName("SelectedStores") == null) || b == false) { var a = "/Catalog/ButtonControlContent.aspx?PopulateISA=false&AllowSecure=True&lang=" + document.documentElement.lang } else { var a = "/Catalog/ButtonControlContent.aspx?PopulateISA=true&AllowSecure=True&lang=" + document.documentElement.lang } JsLib.UI.InjectHTMLMultiple(a, Catalog.Inventory.skus.join("&"), Catalog.Inventory.skus) } } }; Catalog.Tabs = { currentTab: "", ActivateById: function(a) { url = location.href; if (Catalog.Utils.QueryString("ActiveTab") == "") { url += "&ActiveTab=" + a } else { url = url.replace("ActiveTab=" + Catalog.Utils.QueryString("ActiveTab"), "ActiveTab=" + a) } $redirect(url) }, OnMouseOver: function(a) { $get(a.id).className += " pdptab-hover" }, OnMouseOut: function(a) { $get(a.id).className = $get(a.id).className.replace("pdptab-hover", "") }, Initialize: function() { currentTab = ""; var b = Catalog.Tabs.Initialize.arguments; for (i = 1; i < b.length; i++) { ($get(b[i])).onmouseover = function() { Catalog.Tabs.OnMouseOver(this); return false }; ($get(b[i])).onmouseout = function() { Catalog.Tabs.OnMouseOut(this); return false }; ($get(b[0])).className = "pdptab roll" } } }; Catalog.Divs = { ShowHide: function(b) { var a = Catalog.Divs.ShowHide.arguments; if (!a[0].state) { a[0].state = a[1] } if (a[0].state == "1") { for (i = 6; i < a.length; i++) { ($get(a[i])).style.display = "none" } a[0].state = "0"; a[0].src = "/images/common/backgrounds/plus-sign.gif" } else { for (i = 6; i < a.length; i++) { ($get(a[i])).style.display = "block" } a[0].state = "1"; a[0].src = "/images/common/backgrounds/minus-sign.gif" } }, Initialize: function(b) { var a = Catalog.Divs.Initialize.arguments; if ($get(a[0]) != null) { if (a[1] == "0") { $get(a[0]).state = "0"; $get(a[0]).src = "/images/common/backgrounds/plus-sign.gif"; for (i = 6; i < a.length; i++) { ($get(a[i])).style.display = "none" } } else { $get(a[0]).state = "1"; $get(a[0]).src = "/images/common/backgrounds/minus-sign.gif"; for (i = 6; i < a.length; i++) { ($get(a[i])).style.display = "block" } } } } }; Catalog.DetailsTab = { SelectTabSpecWithPagination: function(e, b, f, a, c, g) { if (f == "" || f == null) { url = "Catalog/DetailsTabs.aspx?Sku=" + encodeURIComponent(e) + "&ActiveTab=" + encodeURIComponent(b) + "&Page=" + encodeURIComponent(a - 1) + "&PageSize=" + encodeURIComponent(c) + "&SortOption=" + encodeURIComponent(g) } else { url = "Catalog/DetailsTabs.aspx?Sku=" + encodeURIComponent(e) + "&ActiveTab=" + encodeURIComponent(b) + "&pcname=" + encodeURIComponent(f) + "&SortOption=" + encodeURIComponent(g) } var d = $httpRequest.loadText(Catalog.Utils.FormatUrl(url)); d = d.substring(d.indexOf('<div id="tableId"')); d = d.substring(0, d.indexOf("</form>")); $get("div" + b).innerHTML = d; $get("div" + b).style.display = "block" }, OpenGlossaryTermPopup: function(c, a) { var b = "../ResearchCentre/GlossaryTermDescription.aspx?GlossaryId=" + encodeURIComponent(c) + "&GlossaryAlternateSource=" + encodeURIComponent(a); window.open(b, "", "location=0,menubar=0,scrollbars=1,status=0,toolbar=0") }, SelectTabSpecWithPaginationExtended: function(f, b, g, a, c, h, e) { if (g == "" || g == null) { url = "Catalog/DetailsTabs.aspx?Sku=" + encodeURIComponent(f) + "&ActiveTab=" + encodeURIComponent(b) + "&Page=" + encodeURIComponent(a - 1) + "&PageSize=" + encodeURIComponent(c) + "&SortOption=" + encodeURIComponent(h) + "&IncludeParents=" + encodeURIComponent(e) } else { url = "Catalog/DetailsTabs.aspx?Sku=" + encodeURIComponent(f) + "&ActiveTab=" + encodeURIComponent(b) + "&pcname=" + encodeURIComponent(g) + "&SortOption=" + encodeURIComponent(h) + "&IncludeParents=" + encodeURIComponent(e) } var d = $httpRequest.loadText(Catalog.Utils.FormatUrl(url)); d = d.substring(d.indexOf('<div id="tableId"')); d = d.substring(0, d.indexOf("</form>")); $get("div" + b).innerHTML = d; $get("div" + b).style.display = "block" }, GetBundleDetails: function(b, c, d) { var a = "/Catalog/BundleTabDetailsContent.aspx?Sku=" + encodeURIComponent(b); JsLib.UI.InjectHTML(a, c, d) } }; Catalog.SearchResults = { GetContent: function(a, b, d) { Catalog.ProductCompare.InitializeFields(); var c = $get(Catalog.ProductCompare.lblSelectedProductIds).value; a = Catalog.Utils.ReplaceQueryString(a, "SelectedProductIds", c); $("#" + d).load(a + " #" + b, function() { $("a[href*=/product/]").each(function() { QuickViewInit(this) }) }); window.scrollTo(0, 0) }, GetContentWithPageSize: function(a, d, f, e) { var c = $get(e); var b = c.options[c.selectedIndex].value; a = Catalog.Utils.ReplaceQueryString(a, "PageSize", b); Catalog.SearchResults.GetContent(a, d, f) } }; Catalog.ProductCompareTab = { SelectCompareBrand: function(b, c, f, e, d) { var a = document.URL.valueOf; if (d == "" || d == null) { url = "/Catalog/ProductDetails.aspx?Sku=" + encodeURIComponent(c) + "&ActiveTab=" + encodeURIComponent(b) + "&CompareBrand=" + encodeURIComponent(f) + "&CompareCategory=" + encodeURIComponent(e) + "&SortOption=" + Catalog.Utils.QueryString("SortOption") } else { url = "/Catalog/ProductDetails.aspx?Sku=" + encodeURIComponent(c) + "&ActiveTab=" + encodeURIComponent(b) + "&CompareBrand=" + encodeURIComponent(f) + "&CompareCategory=" + encodeURIComponent(e) + "&pcname=" + encodeURIComponent(d) + "&SortOption=" + Catalog.Utils.QueryString("SortOption") } $redirect(url) }, GetContent: function(n, l, p, f, g, o, e, k, c, m, q, s, b, r) { Catalog.ProductCompare.InitializeFields(); if (q == "sortoption") { g = ($get(m).value) } var h = $get(Catalog.ProductCompare.lblSelectedProductIds).value; var a = 15; if (r) { a = r } var j = $get(l); if (j != null) { a = j.options[j.selectedIndex].value } var d = "/Catalog/ProductTabCompareContent.aspx?Sku=" + encodeURIComponent(n) + "&ItemsPerPage=" + encodeURIComponent(a) + "&CurrentItemIndex=" + encodeURIComponent(p) + "&CurrentPage=" + encodeURIComponent(f) + "&Sort=" + encodeURIComponent(g) + "&CurrentCategory=" + encodeURIComponent(o) + "&IncludeParents=" + encodeURIComponent(e) + "&SelectedProductIds=" + encodeURIComponent(h) + "&parentclass=" + encodeURIComponent(s) + "&subclass=" + encodeURIComponent(b); JsLib.UI.InjectHTML(d, k, c) } }; Catalog.QuickView = { GenerateHideQuickView: function(b, a) { var c = "<script type='text/javascript' language='javascript'>\r\nfunction HideQuickView" + b.replace(" ", "_") + "()\r\n{\r\n	$get('" + a + "').PopupControlBehavior.hidePopup();\r\n}<\/script>"; document.writeln(c) } }; Catalog.ProductImages = { ImageUrlIndex: 0, RotateImage: function(d, g, a, b) { var c = d.split(","); var f = c.length; var e = ""; if (Catalog.ProductImages.ImageUrlIndex < 0 || Catalog.ProductImages.ImageUrlIndex >= f) { Catalog.ProductImages.ImageUrlIndex = 0 } if (g.match("right")) { if (Catalog.ProductImages.ImageUrlIndex < f - 1) { ++Catalog.ProductImages.ImageUrlIndex; e = c[Catalog.ProductImages.ImageUrlIndex].toString(); $get(a).src = e; $get(b).innerText = " Image " + (Catalog.ProductImages.ImageUrlIndex + 1) + " of " + f } } if (g.match("left")) { if (Catalog.ProductImages.ImageUrlIndex > 0) { --Catalog.ProductImages.ImageUrlIndex; e = c[Catalog.ProductImages.ImageUrlIndex].toString(); $get(a).src = e; $get(b).innerText = " Image " + (Catalog.ProductImages.ImageUrlIndex + 1) + " of " + f } } } }; Catalog.MiniQuickView = { ShowMiniQuickView: function(a, c) { var d = $get(a); if (!d) { return } if (d.innerHTML == "") { var b = $httpRequest.loadText(c); b = b.substring(b.indexOf("<script")); d.innerHTML = b } d.style.display = "block" }, HideMiniQuickView: function(a) { var b = $get(a); b.style.display = "none" } }; Catalog.ProductCompare = { lblSelectedProductIds: "", lblSelectedProductCount: "", hidNotEnoughProductsErrorMessage: "", hidTooManyProducts: "", hidMaxProductsToCompare: "", hidMinProductsToCompare: "", boolInitialized: false, InitializeFields: function() { if (!Catalog.ProductCompare.boolInitialized) { Catalog.ProductCompare.lblSelectedProductIds = $get("hidSelectedProductIds_ID").value.replace("$", "_"); Catalog.ProductCompare.lblSelectedProductCount = $get("hidSelectedProductCount_ID").value.replace("$", "_"); Catalog.ProductCompare.hidNotEnoughProductsErrorMessage = $get("hidNotEnoughProductsMessage_ID").value.replace("$", "_"); Catalog.ProductCompare.hidTooManyProducts = $get("hidTooManyProductsMessage_ID").value.replace("$", "_"); Catalog.ProductCompare.hidMaxProductsToCompare = $get("hidMaxComparableProducts_ID").value.replace("$", "_"); Catalog.ProductCompare.hidMinProductsToCompare = $get("hidMinComparableProducts_ID").value.replace("$", "_"); Catalog.ProductCompare.boolInitialized = true } }, doCompare: function(f) { Catalog.ProductCompare.InitializeFields(); var c = "http://" + window.location.host; var j = $get(Catalog.ProductCompare.lblSelectedProductIds).value; var d = parseFloat($get(Catalog.ProductCompare.lblSelectedProductCount).value); var g = parseFloat($get(Catalog.ProductCompare.hidMaxProductsToCompare).value); var h = parseFloat($get(Catalog.ProductCompare.hidMinProductsToCompare).value); if (d > g) { var e = $get(Catalog.ProductCompare.hidTooManyProducts).value; e = e.replace("{0}", g); alert(e) } else { if (d < h) { var a = $get(Catalog.ProductCompare.hidNotEnoughProductsErrorMessage).value; a = a.replace("(2)", h); alert(a) } else { var b; j = j.replace("#,", ""); b = c + "/catalog/compare-result.aspx?ProductIds=" + encodeURIComponent(j) + "&returnPath=" + encodeURIComponent("" + f); $redirect(b) } } }, initHiddenFields: function(c, a, b) { }, initSelectedProductHiddenFields: function(b, a) { Catalog.ProductCompare.InitializeFields(); $get(Catalog.ProductCompare.lblSelectedProductIds.replace("$", "_")).value = b; $get(Catalog.ProductCompare.lblSelectedProductCount).value = a }, checkBoxClicked: function(b, a) { Catalog.ProductCompare.InitializeFields(); var e; var c = $get(Catalog.ProductCompare.lblSelectedProductIds.replace("$", "_")).value; var g = parseFloat($get(Catalog.ProductCompare.lblSelectedProductCount).value); if (b.checked) { c = c + "," + a; g = g + 1; var d = parseFloat($get(Catalog.ProductCompare.hidMaxProductsToCompare).value); if (g > d) { var d = parseFloat($get(Catalog.ProductCompare.hidMaxProductsToCompare).value); var f = $get(Catalog.ProductCompare.hidTooManyProducts).value; f = f.replace("{0}", d); alert(f); b.checked = false } else { $get(Catalog.ProductCompare.lblSelectedProductIds).value = c; $get(Catalog.ProductCompare.lblSelectedProductCount).value = g } } else { c = c.replace("," + a, ""); c = c.replace(a + ",", ""); c = c.replace(a, ""); if (g > 0) { g = g - 1 } $get(Catalog.ProductCompare.lblSelectedProductIds).value = c; $get(Catalog.ProductCompare.lblSelectedProductCount).value = g } }, Initialize: function(g, h, c) { Catalog.ProductCompare.InitializeFields(); var k = $get(Catalog.ProductCompare.lblSelectedProductIds).value; var b = parseFloat($get(Catalog.ProductCompare.lblSelectedProductCount).value); if (c != null && b > 0) { var f = k.split(","); for (var e = 0; e < c.length; e += 2) { for (var d = 0; d < f.length; d++) { if (f[d] == c[e]) { var a = $get(c[e + 1]); if (a != null) { a.checked = true } } } } } } }; function TermsPopup(b, c, e) { var d = document.getElementsByName(b); for (var f = 0; f <= d.length; f++) { if (d[f].checked) { var a = d[f].getAttribute("warrantyId"); if (a != null && a != "0") { $popUp(c + "&WarrantyId=" + encodeURIComponent(a) + "&Sku=" + encodeURIComponent(e), "", { scrollbars: true, status: false, width: 600, height: 400 }); break } } } } function UpdateTermsFrame(d, b) { var c = $get("TermsFrame"); if (d != null) { var a = d.getAttribute("warrantyId"); if (a != null && a != "0") { c.src = ("/Catalog/PspTerms.aspx?WarrantyId=" + encodeURIComponent(a) + "&Sku=" + encodeURIComponent(b)) } else { c.src = "" } } else { c.src = "" } } function WarrantyIsSelected(a) { if (a) { document.WarrantyChecked = true } else { document.WarrantyChecked = false } } function AcceptTermAndConditions(a) { basket.set_PSPTermAccepted(a.checked) } function AcceptTermAndConditionsFS(c, b, a) { btnContinue = $get(b); if (c.checked) { AcceptTermAndConditionsFSEnable(btnContinue) } else { if ((this.window.opener != undefined) && (this.window.opener.basket != undefined)) { if (this.window.opener.basket.PSP != "0") { AcceptTermAndConditionsFSDisable(btnContinue) } } else { if (this.window.basket.PSP != "0") { AcceptTermAndConditionsFSDisable(btnContinue) } } } if ((this.window.opener != undefined) && (this.window.opener.basket != undefined)) { this.window.opener.basket.set_PSPTermAccepted(c.checked) } else { if (this.window.basket != undefined) { this.window.basket.set_PSPTermAccepted(c.checked) } } } function AcceptTermAndConditionsFSEnable(a) { a.parentNode.disabled = false; a.disabled = false; a.src = a.src.replace(/continue_off.gif/, "continue.gif") } function AcceptTermAndConditionsFSDisable(a) { a.parentNode.disabled = true; a.disabled = true; a.src = a.src.replace(/continue.gif/, "continue_off.gif") } function PspConstituentSelected(d, c, b) { acceptCheckbox = $get(c + "_ChkAcceptTerms"); parentSpan = acceptCheckbox.parentNode; if (acceptCheckbox && parentSpan) { acceptCheckbox.parentNode.disabled = false; acceptCheckbox.disabled = false; acceptCheckbox.checked = false; parentSpan.style.visibility = "visible"; var a = d.getAttribute("warrantyId"); if (this.window.opener && this.window.opener.basket) { this.window.opener.basket.set_PSPTermAccepted(false); this.window.opener.basket.addAtBundlePSP(b, a) } else { if (this.window.basket) { this.window.basket.set_PSPTermAccepted(false); this.window.basket.addAtBundlePSP(b, a) } } } } function EnableTermAcceptStartupScript(c, b, a) { acceptCheckbox = $get(b + "_ChkAcceptTerms"); parentSpan = acceptCheckbox.parentNode; termsLink = $get(b + "_HypTerms"); additional = $get("warrantyterms"); if (acceptCheckbox && parentSpan && termsLink) { acceptCheckbox.parentNode.disabled = false; acceptCheckbox.disabled = false; basket.set_PSP(a) } } function EnableTermAccept(c, b) { wtc = $get(b + "_spanTermsAndCondsAccept"); if (wtc) { wtc.style.display = "inline" } acceptCheckbox = $get(b + "_ChkAcceptTerms"); parentSpan = acceptCheckbox.parentNode; termsLink = $get(b + "_HypTerms"); additional = $get("warrantyterms"); if (acceptCheckbox && parentSpan && termsLink) { acceptCheckbox.parentNode.disabled = false; acceptCheckbox.disabled = false; parentSpan.style.visibility = "visible"; termsLink.style.visibility = "visible"; var a = c.getAttribute("warrantyId"); basket.set_PSP(a) } } function FSOptionSelected(d, b) { var a = d.getAttribute("warrantyId"); var c = $get(b + "_ChkAcceptTerms"); c.checked = false; AcceptTermAndConditionsFSDisable(btnFSContinue); if (a != "0") { if (this.window.opener && this.window.opener.basket) { this.window.opener.basket.set_PSPTermAccepted(false); this.window.opener.basket.set_PSP(a) } else { if (this.window.basket) { this.window.basket.set_PSPTermAccepted(false); this.window.basket.set_PSP(a) } } } } function DisableTermAccept(b, a) { acceptCheckbox = $get(a + "_ChkAcceptTerms"); cartbutton = $get(a + "_btnAddWarrantytoCart"); parentSpan = acceptCheckbox.parentNode; termsLink = $get(a + "_HypTerms"); additional = $get("warrantyterms"); if (acceptCheckbox && parentSpan && termsLink) { acceptCheckbox.checked = false; acceptCheckbox.disabled = true; parentSpan.style.visibility = "visible"; termsLink.style.visibility = "visible"; basket.set_PSP("0"); basket.set_PSPTermAccepted(false) } } function FSNonOptionSelected(b, a) { this.window.opener.basket.set_PSP("0"); UpdateTermsFrame(null, null); if (btnFSContinue != null) { AcceptTermAndConditionsFSEnable(btnFSContinue) } } function FSNonOptionConstituentSelected(d, c, b) { acceptCheckbox = $get(c + "_ChkAcceptTerms"); parentSpan = acceptCheckbox.parentNode; if (acceptCheckbox && parentSpan) { acceptCheckbox.parentNode.disabled = false; acceptCheckbox.disabled = false; acceptCheckbox.checked = false; parentSpan.style.visibility = "visible"; var a = ""; if ((this.window.opener != undefined) && (this.window.opener.basket != undefined)) { this.window.opener.basket.set_PSPTermAccepted(false); this.window.opener.basket.addAtBundlePSP(b, a); var f = true; var e = this.window.opener.basket.PSP.split(","); for (i = 0; i < e.length; i++) { if (!(e[i] == "" || e[i] == "0")) { f = false; break } } if (f) { acceptCheckbox.checked = true; this.window.opener.basket.set_PSPTermAccepted(true) } } else { if (this.window.basket != undefined) { this.window.basket.set_PSPTermAccepted(false); this.window.basket.addAtBundlePSP(b, a); var f = true; var e = this.window.basket.PSP.split(","); for (i = 0; i < e.length; i++) { if (!(e[i] == "" || e[i] == "0")) { f = false; break } } if (f) { acceptCheckbox.checked = true; this.window.basket.set_PSPTermAccepted(true) } } } } } function LoadHelpTopic(a) { $popUp(a, "", { scrollbars: true, status: false, resizable: true }) } function PrePopulateBundlePSPs(a) { if ((this.window.opener != undefined) && (this.window.opener.basket != undefined)) { this.window.opener.basket.BundlePSP = new Array(a) } else { if (this.window.basket != undefined) { this.window.basket.BundlePSP = new Array(a) } } } function WarrantyIsSelected(a) { if (a) { document.WarrantyChecked = true } else { document.WarrantyChecked = false } } function AcceptTermAndConditions(a) { basket.set_PSPTermAccepted(a.checked) } function callBasket(b, a) { var c; if ((this.window.opener != undefined) && (this.window.opener.basket != null) && (this.window.opener.basket != undefined)) { this.window.opener.DisplayTermsNotAcceptedMessage = this.DisplayTermsNotAcceptedMessage; this.window.opener.basket.AddSelectedAccessoriesAndWarranty(true, b, a, "", this.window.opener); c = this.window.opener.basket.PSPTermAccepted } else { if (this.window.basket != undefined) { this.window.basket.AddSelectedAccessoriesAndWarranty(false, b, a, "", this.window.opener); c = this.window.basket.PSPTermAccepted } } if (c) { this.window.close() } return false } function DisplayTermsNotAcceptedMessage(a) { LblErrorMessage = $get("ucFsPspTermSelector_LblErrorMessage"); ChkAcceptTerms = $get("ucFsPspTermSelector_ChkAcceptTerms"); LblErrorMessage.style.visibility = "visible"; LblErrorMessage.innerHTML = "<SPAN>" + a + "</SPAN>" } function ToggleOnOff(a, b) { targetControl = $get(b); if (targetControl != null && a != null) { if (targetControl.style.display == "block") { a.src = "/images/common/buttons/plus.gif"; targetControl.style.display = "none"; targetControl.Visible = "false" } else { a.src = "/images/common/buttons/minus.gif"; targetControl.style.display = "block"; targetControl.Visible = "true" } } } function PopupWarranty(a) { if (document.WarrantyChecked) { $popUp(a, "", { scrollbars: true, status: false }) } return false } function PopupWarrantyFS(a) { $popUp(a, "", { scrollbars: true, status: false, width: 615, height: 590 }) } function PopupTermsAndConditions() { var a = $get("TermsFrame"); if ((a) && (a.src.trim() != "")) { path = a.src + "&Print=T"; $popUp(path, "", { scrollbars: true, status: false, width: 550, height: 500 }) } } function SetUniqueRadioButton(c, d) { re = new RegExp(c); var b; var a; for (i = 0; i < document.forms[0].elements.length; i++) { elm = document.forms[0].elements[i]; if (elm.type == "radio") { if (re.test(elm.name)) { elm.checked = false } if (elm.name == d.name) { b = d.parentNode.getAttribute("ProductID") } } if (elm.type == "hidden") { if (elm.name.indexOf("HdfSelectedProduct") > 0) { elm.value = b; a = elm } } } d.checked = true } function SetSelectedProductSku(a, b) { a.value = b } function GotoTop() { document.location.hash = "Top" } function ShowFSToolTip(a, b) { TargetToolTip = $get(b); TargetToolTip.style.visibility = "visible"; if (a.layerX) { TargetToolTip.style.left = a.layerX + "px"; TargetToolTip.style.top = a.layerY + "px" } else { TargetToolTip.style.left = a.offsetX + "px"; TargetToolTip.style.top = a.offsetY + "px" } TargetToolTip.style.zIndex = 999 } function HideFSToolTip(b, c) { function a() { TargetToolTip = $get(c); TargetToolTip.style.visibility = "hidden"; TargetToolTip.style.zIndex = -1 } setTimeout(a, 1500) } function Cancel() { this.window.close() } function PopupArtistsWorks(a) { $popUp(a, "", { scrollbars: true, status: false, width: 800, height: 420, resizable: true }) } function PreloadImages() { var f = navigator.appName; var h = navigator.appVersion; var c = parseFloat(h); if ((f == "Microsoft Internet Explorer") && (c < 7)) { var k = document; k.execCommand("BackgroundImageCache", false, true); if (k.images) { if (!k.MM_p) { k.MM_p = new Array() } var g; var e = k.MM_p.length; var b = PreloadImages.arguments; for (g = 0; g < b.length; g++) { if (b[g].indexOf("#") != 0) { k.MM_p[e] = new Image; k.MM_p[e++].src = b[g] } } } } } function IsIeSix() { var b = navigator.appName; var c = navigator.appVersion; var a = parseFloat(c); if ((b == "Microsoft Internet Explorer") && (a < 7)) { return true } else { return false } } function tab_hoverIn(a) { var b = document.getElementById(a); if (IsIeSix()) { if (b.className != "selected") { if (b.className == "lastclass") { b.className = "show-lastclass" } else { b.className = "show" } } } } function tab_hoverOut(a) { var b = document.getElementById(a); if (b.className != "selected") { if (b.className != "show-lastclass") { if (IsIeSix()) { b.removeAttribute("className", "show") } } else { if (IsIeSix()) { b.className = "lastclass" } } } } function PopulateCheckBoxList() { var c = document.getElementsByTagName("INPUT"); var a = new RegExp("^.*ucWarrantyPicker.*ChkAcceptTerms$"); var b = new Array(); for (var e = 0; e < c.length; e++) { var d = c[e]; if (a.test(d.id)) { b.push(d) } } return b } function ChangeButtonState(f) { var c = document.checkBoxes; var g = "en"; var d = $get("ctl00_CC_BtnAddSelectedToCart"); var a = d.firstChild; for (indx in c) { var j = c[indx]; if ((!j.disabled) && (!j.checked)) { var h = "/images/" + g + "/buttons/buy_selected_item_off.gif"; a.src = h; a.onmouseout = null; a.onmouseover = null; break } else { var a = d.firstChild; var e = "/images/" + g + "/buttons/buy_selected_item.gif"; var b = "/images/" + g + "/buttons/buy_selected_item_on.gif"; a.src = e; a.onmouseout = new Function("event", "this.src='" + e + "';"); a.onmouseover = new Function("event", "this.src='" + b + "';") } } } function LinkButtonEvents() { document.checkBoxes = PopulateCheckBoxList(); for (var b = 0; b < document.checkBoxes.length; b++) { var a = document.checkBoxes[b]; $addHandler(a, "click", ChangeButtonState) } } function PopupGlossary(a) { window.open(a, "glossary", "location=0,menubar=0,scrollbars=1,status=0,toolbar=0,width=585,height=480") } $(document).ready(function() { $(".a1-theme").each(function() { $(this).find(".buttons img").wrap('<a href="' + $(this).find("a").attr("href") + '"></a>') }); var a = $get("ctl00_CC_ctl00_MusicSearch1_BtnCollapse"); var b = $get("ctl00_CC_ctl00_MovieSearch1_BtnCollapse"); if (b) { ToggleOnOff(b, "adv-search-expand") } else { if (a) { ToggleOnOff(a, "adv-search-expand") } } });
