var enableCartPreviewRollover = true, delayCartPreviewRollover = 0; try { $(document).ready(function() { swfobject.embedSWF("/projects/enewsfloater/assets/enew_button.swf", "enewscnt", "160", "160", "9.0.45", "", {}, { wmode: "opaque" }, {}); initializeFloater(); $("#holiday_days_button").click(function() { $("#holiday_days_div").fadeIn(); $("#holiday_days_div").css("left", $(document).width() / 2 - $("#holiday_days_div").width() / 2 + 243) }); $("#holiday_div_close").click(function() { $("#holiday_days_div").fadeOut() }); $(window).resize(function() { $("#enewsfloater").css("left", $("body").width() / 2 + 460); $("#enewsfloater").css("top", 185) }) }) } catch (e) { } function DisableButton(a) { window.setTimeout("$get('" + a.id + "').disabled=true;", 1) } function SelectUniqueRadioButton(a, b) { re = RegExp(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 } b.checked = true } function AddCurrentPageToBookmark() { title = document.title; url = document.location.href; if (title != null && title != "" && url != null && url != "") if (window.sidebar) window.sidebar.addPanel(title, url, ""); else if (window.external) window.external.AddFavorite(url, title); else if (window.opera && window.print) return true } function clickOpenCloseDetails(a, b) { var c; if (a.closed != "undefined" && a.closed != null) c = a.closed; else if (c = a.attributes.closed) c = c.value; var d = a.attributes.closetext; if (d) d = d.value; var f = a.attributes.opentext; if (f) f = f.value; if (c) if (c == "true" || c == true) { a.closed = false; setText(a.id, d); setSign(a, "minus"); toggleLayer(b, true) } else { a.closed = true; setText(a.id, f); setSign(a, "plus"); toggleLayer(b, false) } else { a.closed = true; setText(a.id, f); setSign(a, "plus"); toggleLayer(b, false) } } function setText(a, b) { if (a.innerText) a.innerText = b; else a.innerHTML = b } function setSign(a, b) { if (a) a.attributes["class"].value = b } function toggleLayer(a, b) { var c; if (document.getElementById) c = $get(a); else if (document.all) c = document.all[a]; else if (document.layers) c = document.layers[a]; c.style.display = b ? "block" : "none" } var monthValidationScript = "", yearValidationScript = "", isInitialized = false; function ToggleExpiryDateValidation(a, b, c) { a = $get(a).value; if (!isInitialized) { monthValidationScript = $get(b).clientvalidationfunction; yearValidationScript = $get(c).clientvalidationfunction; isInitialized = true } if (a == "BBY") { $get("CreditCardUCAddressInfo").style.display = "none"; monthValidationScript = $get(b).clientvalidationfunction; $get(b).clientvalidationfunction = ""; yearValidationScript = $get(c).clientvalidationfunction; $get(c).clientvalidationfunction = "" } else { $get("CreditCardUCAddressInfo").style.display = "block"; $get(b).clientvalidationfunction = monthValidationScript; $get(c).clientvalidationfunction = yearValidationScript } } var browser = null, newbrowser = true, check = false; function init() { if (document.layers) { layerRef = "document.layers"; styleSwitch = ""; screenSize = window.innerWidth; browser = "ns4" } else if (document.all) { layerRef = "document.all"; styleSwitch = ".style"; screenSize = document.body.clientWidth + 18; browser = "ie4" } else if (document.getElementById) { layerRef = "document.getElementByID"; styleSwitch = ".style"; browser = "dom1" } else { browser = "none"; newbrowser = false } check = true } function showHover(a, b, c) { check && browser != "none" && $get(c).style.visibility != "visible" && setSrc($get(a), b) } function Box(a, b, c, d) { if (check) if (browser != "none") { if (browser == "dom1") $get(d).style.visibility = a; else eval(layerRef + '["' + d + '"]' + styleSwitch + '.visibility="' + a + '"'); setSrc($get(b), c) } } function hideDdls(a) { if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) if (new Number(RegExp.$1) < 7) { var b = document.getElementsByTagName("select"); if (a == "hide") for (i = 0; i < b.length; i++) b[i].style.visibility = "hidden"; else if (a == "show") for (i = 0; i < b.length; i++) b[i].style.visibility = "visible" } } function setSrc(a, b) { a.src = b } function setClass(a, b) { a.className = b } function CartPreviewBox(a, b, c, d, f, g) { if (enableCartPreviewRollover) delayCartPreviewRollover > 0 ? window.setTimeout("DisplayCartPreviewBox('" + a + "','" + b + "','" + c + "','" + d + "','" + f + "','" + g + "')", delayCartPreviewRollover) : DisplayCartPreviewBox(a, b, c, d, f, g) } function DisplayCartPreviewBox(a, b, c, d, f, g) { if (check) if (browser != "none") { if (browser == "dom1") $get(g).style.visibility = a; else eval(layerRef + '["' + g + '"]' + styleSwitch + '.visibility="' + a + '"'); setSrc($get(b), c); setClass($get(d), f) } } function startTimeCartPreview(a, b) { if ($get(a)) var c = $get(a); c.style.visibility != "hidden" && hideCartPreview(b) } function hideCartPreview(a) { CartPreviewBox("hidden", "smartquickcart", a, "globaldiv", "showview", "cartpreviewdiv") } function LimitInputText(a, b) { return a < b ? true : false } function LimitInputTextOnPaste(a, b, c) { if (a >= b) return false; c = c.document.selection.createRange(); a = b - a + c.text.length; a = window.clipboardData.getData("Text").substr(0, a); c.text = a; return false } init(); function handleAnchorTagKeyPress(a, b) { var c; if (window.event) c = b.keyCode; else if (b.which) c = b.which; if (c == 32 || c == 13) a.onclick() } function popUp(a) { sealWin = window.open(a, "win", "toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=820,height=720"); self.name = "mainWin" } function loadStylesheet(a) { var b = document.createElement("link"); b.setAttribute("rel", "stylesheet"); b.setAttribute("type", "text/css"); b.setAttribute("href", a); typeof b != "undefined" && document.getElementsByTagName("head")[0].appendChild(b) } function createCookie(a, b, c) { if (c) { var d = new Date; d.setTime(d.getTime() + c * 24 * 60 * 60 * 1E3); c = "; expires=" + d.toGMTString() } else c = ""; document.cookie = a + "=" + b + c + "; path=/" } function readCookie(a) { a = a + "="; for (var b = document.cookie.split(";"), c = 0; c < b.length; c++) { for (var d = b[c]; d.charAt(0) == " "; ) d = d.substring(1, d.length); if (d.indexOf(a) == 0) return d.substring(a.length, d.length) } return null } function eraseCookie(a) { createCookie(a, "", -1) } function initializeFloater() { $("#enewsfloater").css("left", $("body").width() / 2 + 460); $("#enewsfloater").css("top", 185) } function fsFlashTrack(a, b) { trackEvent.event("event.link", { lid: a }); window.location = b } function fsFlashTrackAction(a) { trackEvent.event("event.link", { lid: a }) };
