var B = "block"; var N = "none"; var T = "true"; var F = "false"; var rba = "searchResultButonApplied"; var rbaa = "filterSelectedtBtn"; var rb = "filterinactivetab"; var Prototype = { Version: "1.4.0", ScriptFragment: "(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)", emptyFunction: function() { }, K: function(b) { return b } }; var Class = { create: function() { return function() { this.initialize.apply(this, arguments) } } }; var Abstract = new Object(); Object.extend = function(d, c) { for (property in c) { d[property] = c[property] } return d }; Object.inspect = function(d) { try { if (d == undefined) { return "undefined" } if (d == null) { return "null" } return d.inspect ? d.inspect() : d.toString() } catch (c) { if (c instanceof RangeError) { return "..." } throw c } }; Function.prototype.bind = function() { var e = this, f = $A(arguments), d = f.shift(); return function() { return e.apply(d, f.concat($A(arguments))) } }; Function.prototype.bindAsEventListener = function(c) { var d = this; return function(a) { return d.call(c, a || window.event) } }; Object.extend(Number.prototype, { toColorPart: function() { var b = this.toString(16); if (this < 16) { return "0" + b } return b }, succ: function() { return this + 1 }, times: function(b) { $R(0, this, true).each(b); return this } }); var Try = { these: function() { var h; for (var e = 0; e < arguments.length; e++) { var f = arguments[e]; try { h = f(); break } catch (g) { } } return h } }; var PeriodicalExecuter = Class.create(); PeriodicalExecuter.prototype = { initialize: function(c, d) { this.callback = c; this.frequency = d; this.currentlyExecuting = false; this.registerCallback() }, registerCallback: function() { setInterval(this.onTimerEvent.bind(this), this.frequency * 1000) }, onTimerEvent: function() { if (!this.currentlyExecuting) { try { this.currentlyExecuting = true; this.callback() } finally { this.currentlyExecuting = false } } } }; function $() { var f = new Array(); for (var d = 0; d < arguments.length; d++) { var e = arguments[d]; if (typeof e == "string") { e = ge(e) } if (arguments.length == 1) { return e } f.push(e) } return f } Object.extend(String.prototype, { stripTags: function() { return this.replace(/<\/?[^>]+>/gi, "") }, stripScripts: function() { return this.replace(new RegExp(Prototype.ScriptFragment, "img"), "") }, extractScripts: function() { var c = new RegExp(Prototype.ScriptFragment, "img"); var d = new RegExp(Prototype.ScriptFragment, "im"); return (this.match(c) || []).map(function(a) { return (a.match(d) || ["", ""])[1] }) }, evalScripts: function() { return this.extractScripts().map(eval) }, escapeHTML: function() { var c = document.createElement("div"); var d = document.createTextNode(this); c.appendChild(d); return c.innerHTML }, unescapeHTML: function() { var b = document.createElement("div"); b.innerHTML = this.stripTags(); return b.childNodes[0] ? b.childNodes[0].nodeValue : "" }, toQueryParams: function() { var b = this.match(/^\??(.*)$/)[1].split("&"); return b.inject({}, function(e, a) { var f = a.split("="); e[f[0]] = f[1]; return e }) }, toArray: function() { return this.split("") }, camelize: function() { var l = this.split("-"); if (l.length == 1) { return l[0] } var f = this.indexOf("-") == 0 ? l[0].charAt(0).toUpperCase() + l[0].substring(1) : l[0]; for (var m = 1, g = l.length; m < g; m++) { var h = l[m]; f += h.charAt(0).toUpperCase() + h.substring(1) } return f }, inspect: function() { return "'" + this.replace("\\", "\\\\").replace("'", "\\'") + "'" } }); String.prototype.parseQuery = String.prototype.toQueryParams; var $break = new Object(); var $continue = new Object(); var Enumerable = { each: function(d) { var e = 0; try { this._each(function(b) { try { d(b, e++) } catch (a) { if (a != $continue) { throw a } } }) } catch (f) { if (f != $break) { throw f } } }, all: function(c) { var d = true; this.each(function(a, b) { d = d && !!(c || Prototype.K)(a, b); if (!d) { throw $break } }); return d }, any: function(c) { var d = true; this.each(function(a, b) { if (d = !!(c || Prototype.K)(a, b)) { throw $break } }); return d }, collect: function(c) { var d = []; this.each(function(a, b) { d.push(c(a, b)) }); return d }, detect: function(c) { var d; this.each(function(a, b) { if (c(a, b)) { d = a; throw $break } }); return d }, findAll: function(c) { var d = []; this.each(function(a, b) { if (c(a, b)) { d.push(a) } }); return d }, grep: function(f, d) { var e = []; this.each(function(a, b) { var c = a.toString(); if (c.match(f)) { e.push((d || Prototype.K)(a, b)) } }); return e }, include: function(d) { var c = false; this.each(function(a) { if (a == d) { c = true; throw $break } }); return c }, inject: function(d, c) { this.each(function(a, b) { d = c(d, a, b) }); return d }, invoke: function(c) { var d = $A(arguments).slice(1); return this.collect(function(a) { return a[c].apply(a, d) }) }, max: function(c) { var d; this.each(function(a, b) { a = (c || Prototype.K)(a, b); if (a >= (d || a)) { d = a } }); return d }, min: function(c) { var d; this.each(function(a, b) { a = (c || Prototype.K)(a, b); if (a <= (d || a)) { d = a } }); return d }, partition: function(f) { var d = [], e = []; this.each(function(a, b) { ((f || Prototype.K)(a, b) ? d : e).push(a) }); return [d, e] }, pluck: function(c) { var d = []; this.each(function(a, b) { d.push(a[c]) }); return d }, reject: function(c) { var d = []; this.each(function(a, b) { if (!c(a, b)) { d.push(a) } }); return d }, sortBy: function(b) { return this.collect(function(d, a) { return { value: d, criteria: b(d, a)} }).sort(function(a, g) { var h = a.criteria, l = g.criteria; return h < l ? -1 : h > l ? 1 : 0 }).pluck("value") }, toArray: function() { return this.collect(Prototype.K) }, zip: function() { var d = Prototype.K, e = $A(arguments); if (typeof e.last() == "function") { d = e.pop() } var f = [this].concat(e).map($A); return this.map(function(a, b) { d(a = f.pluck(b)); return a }) }, inspect: function() { return "#<Enumerable:" + this.toArray().inspect() + ">" } }; Object.extend(Enumerable, { map: Enumerable.collect, find: Enumerable.detect, select: Enumerable.findAll, member: Enumerable.include, entries: Enumerable.toArray }); var $A = Array.from = function(f) { if (!f) { return [] } if (f.toArray) { return f.toArray() } else { var d = []; for (var e = 0; e < f.length; e++) { d.push(f[e]) } return d } }; Object.extend(Array.prototype, Enumerable); Array.prototype._reverse = Array.prototype.reverse; Object.extend(Array.prototype, { _each: function(c) { for (var d = 0; d < this.length; d++) { c(this[d]) } }, clear: function() { this.length = 0; return this }, first: function() { return this[0] }, last: function() { return this[this.length - 1] }, compact: function() { return this.select(function(b) { return b != undefined || b != null }) }, flatten: function() { return this.inject([], function(c, d) { return c.concat(d.constructor == Array ? d.flatten() : [d]) }) }, without: function() { var b = $A(arguments); return this.select(function(a) { return !b.include(a) }) }, indexOf: function(d) { for (var c = 0; c < this.length; c++) { if (this[c] == d) { return c } } return -1 }, reverse: function(b) { return (b !== false ? this : this.toArray())._reverse() }, shift: function() { var d = this[0]; for (var c = 0; c < this.length - 1; c++) { this[c] = this[c + 1] } this.length--; return d }, inspect: function() { return "[" + this.map(Object.inspect).join(", ") + "]" } }); var Hash = { _each: function(e) { for (key in this) { var d = this[key]; if (typeof d == "function") { continue } var f = [key, d]; f.key = key; f.value = d; e(f) } }, keys: function() { return this.pluck("key") }, values: function() { return this.pluck("value") }, merge: function(b) { return $H(b).inject($H(this), function(a, d) { a[d.key] = d.value; return a }) }, toQueryString: function() { return this.map(function(b) { return b.map(encodeURIComponent).join("=") }).join("&") }, inspect: function() { return "#<Hash:{" + this.map(function(b) { return b.map(Object.inspect).join(": ") }).join(", ") + "}>" } }; function $H(d) { var c = Object.extend({}, d || {}); Object.extend(c, Enumerable); Object.extend(c, Hash); return c } ObjectRange = Class.create(); Object.extend(ObjectRange.prototype, Enumerable); Object.extend(ObjectRange.prototype, { initialize: function(f, e, d) { this.start = f; this.end = e; this.exclusive = d }, _each: function(d) { var c = this.start; do { d(c); c = c.succ() } while (this.include(c)) }, include: function(b) { if (b < this.start) { return false } if (this.exclusive) { return b < this.end } return b <= this.end } }); var $R = function(f, e, d) { return new ObjectRange(f, e, d) }; var Ajax = { getTransport: function() { return Try.these(function() { return new ActiveXObject("Msxml2.XMLHTTP") }, function() { return new ActiveXObject("Microsoft.XMLHTTP") }, function() { return new XMLHttpRequest() }) || false }, activeRequestCount: 0 }; Ajax.Responders = { responders: [], _each: function(b) { this.responders._each(b) }, register: function(b) { if (!this.include(b)) { this.responders.push(b) } }, unregister: function(b) { this.responders = this.responders.without(b) }, dispatch: function(g, e, h, f) { this.each(function(b) { if (b[g] && typeof b[g] == "function") { try { b[g].apply(b, [e, h, f]) } catch (a) { } } }) } }; Object.extend(Ajax.Responders, Enumerable); Ajax.Responders.register({ onCreate: function() { Ajax.activeRequestCount++ }, onComplete: function() { Ajax.activeRequestCount-- } }); Ajax.Base = function() { }; Ajax.Base.prototype = { setOptions: function(b) { this.options = { method: "post", asynchronous: true, parameters: "" }; Object.extend(this.options, b || {}) }, responseIsSuccess: function() { return this.transport.status == undefined || this.transport.status == 0 || (this.transport.status >= 200 && this.transport.status < 300) }, responseIsFailure: function() { return !this.responseIsSuccess() } }; Ajax.Request = Class.create(); Ajax.Request.Events = ["Uninitialized", "Loading", "Loaded", "Interactive", "Complete"]; Ajax.Request.prototype = Object.extend(new Ajax.Base(), { initialize: function(c, d) { this.transport = Ajax.getTransport(); this.setOptions(d); this.request(c) }, request: function(e) { var h = this.options.parameters || ""; if (h.length > 0) { h += "&_=" } try { this.url = e; if (this.options.method == "get" && h.length > 0) { this.url += (this.url.match(/\?/) ? "&" : "?") + h } Ajax.Responders.dispatch("onCreate", this, this.transport); this.transport.open(this.options.method, this.url, this.options.asynchronous); if (this.options.asynchronous) { this.transport.onreadystatechange = this.onStateChange.bind(this); setTimeout((function() { this.respondToReadyState(1) }).bind(this), 10) } this.setRequestHeaders(); var f = this.options.postBody ? this.options.postBody : h; this.transport.send(this.options.method == "post" ? f : null) } catch (g) { this.dispatchException(g) } }, setRequestHeaders: function() { var c = ["X-Requested-With", "XMLHttpRequest", "X-Prototype-Version", Prototype.Version]; if (this.options.method == "post") { c.push("Content-type", "application/x-www-form-urlencoded"); if (this.transport.overrideMimeType) { c.push("Connection", "close") } } if (this.options.requestHeaders) { c.push.apply(c, this.options.requestHeaders) } for (var d = 0; d < c.length; d += 2) { this.transport.setRequestHeader(c[d], c[d + 1]) } }, onStateChange: function() { var b = this.transport.readyState; if (b != 1) { this.respondToReadyState(this.transport.readyState) } }, header: function(d) { try { return this.transport.getResponseHeader(d) } catch (c) { } }, evalJSON: function() { try { return eval(this.header("X-JSON")) } catch (e) { } }, evalResponse: function() { try { return eval(this.transport.responseText) } catch (e) { this.dispatchException(e) } }, respondToReadyState: function(g) { var m = Ajax.Request.Events[g]; var h = this.transport, e = this.evalJSON(); if (m == "Complete") { try { (this.options["on" + this.transport.status] || this.options["on" + (this.responseIsSuccess() ? "Success" : "Failure")] || Prototype.emptyFunction)(h, e) } catch (l) { this.dispatchException(l) } if ((this.header("Content-type") || "").match(/^text\/javascript/i)) { this.evalResponse() } } try { (this.options["on" + m] || Prototype.emptyFunction)(h, e); Ajax.Responders.dispatch("on" + m, this, h, e) } catch (l) { this.dispatchException(l) } if (m == "Complete") { this.transport.onreadystatechange = Prototype.emptyFunction } }, dispatchException: function(b) { (this.options.onException || Prototype.emptyFunction)(this, b); Ajax.Responders.dispatch("onException", this, b) } }); Ajax.Updater = Class.create(); Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { initialize: function(f, h, e) { this.containers = { success: f.success ? $(f.success) : $(f), failure: f.failure ? $(f.failure) : (f.success ? null : $(f)) }; this.transport = Ajax.getTransport(); this.setOptions(e); var g = this.options.onComplete || Prototype.emptyFunction; this.options.onComplete = (function(a, b) { this.updateContent(); g(a, b) }).bind(this); this.request(h) }, updateContent: function() { var c = this.responseIsSuccess() ? this.containers.success : this.containers.failure; var d = this.transport.responseText; if (!this.options.evalScripts) { d = d.stripScripts() } if (c) { if (this.options.insertion) { new this.options.insertion(c, d) } else { Element.update(c, d) } } if (this.responseIsSuccess()) { if (this.onComplete) { setTimeout(this.onComplete.bind(this), 10) } } } }); Ajax.PeriodicalUpdater = Class.create(); Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { initialize: function(e, f, d) { this.setOptions(d); this.onComplete = this.options.onComplete; this.frequency = (this.options.frequency || 2); this.decay = (this.options.decay || 1); this.updater = {}; this.container = e; this.url = f; this.start() }, start: function() { this.options.onComplete = this.updateComplete.bind(this); this.onTimerEvent() }, stop: function() { this.updater.onComplete = undefined; clearTimeout(this.timer); (this.onComplete || Prototype.emptyFunction).apply(this, arguments) }, updateComplete: function(b) { if (this.options.decay) { this.decay = (b.responseText == this.lastText ? this.decay * this.options.decay : 1); this.lastText = b.responseText } this.timer = setTimeout(this.onTimerEvent.bind(this), this.decay * this.frequency * 1000) }, onTimerEvent: function() { this.updater = new Ajax.Updater(this.container, this.url, this.options) } }); document.getElementsByClassName = function(f, e) { var d = ($(e) || document.body).getElementsByTagName("*"); return $A(d).inject([], function(b, a) { if (a.className.match(new RegExp("(^|\\s)" + f + "(\\s|$)"))) { b.push(a) } return b }) }; if (!window.Element) { var Element = new Object() } Object.extend(Element, { visible: function(b) { return $(b).style.display != N }, toggle: function() { for (var c = 0; c < arguments.length; c++) { var d = $(arguments[c]); Element[Element.visible(d) ? "hide" : "show"](d) } }, hide: function() { for (var c = 0; c < arguments.length; c++) { var d = $(arguments[c]); d.style.display = N } }, show: function() { for (var c = 0; c < arguments.length; c++) { var d = $(arguments[c]); d.style.display = "" } }, remove: function(b) { b = $(b); b.parentNode.removeChild(b) }, update: function(c, d) { $(c).innerHTML = d.stripScripts(); setTimeout(function() { d.evalScripts() }, 10) }, getHeight: function(b) { b = $(b); return b.offsetHeight }, classNames: function(b) { return new Element.ClassNames(b) }, hasClassName: function(d, c) { if (!(d = $(d))) { return } return Element.classNames(d).include(c) }, addClassName: function(d, c) { if (!(d = $(d))) { return } return Element.classNames(d).add(c) }, removeClassName: function(d, c) { if (!(d = $(d))) { return } return Element.classNames(d).remove(c) }, cleanWhitespace: function(d) { d = $(d); for (var e = 0; e < d.childNodes.length; e++) { var f = d.childNodes[e]; if (f.nodeType == 3 && !/\S/.test(f.nodeValue)) { Element.remove(f) } } }, empty: function(b) { return $(b).innerHTML.match(/^\s*$/) }, scrollTo: function(d) { d = $(d); var e = d.x ? d.x : d.offsetLeft, f = d.y ? d.y : d.offsetTop; window.scrollTo(e, f) }, getStyle: function(e, h) { e = $(e); var g = e.style[h.camelize()]; if (!g) { if (document.defaultView && document.defaultView.getComputedStyle) { var f = document.defaultView.getComputedStyle(e, null); g = f ? f.getPropertyValue(h) : null } else { if (e.currentStyle) { g = e.currentStyle[h.camelize()] } } } if (window.opera && ["left", "top", "right", "bottom"].include(h)) { if (Element.getStyle(e, "position") == "static") { g = "auto" } } return g == "auto" ? null : g }, setStyle: function(d, c) { d = $(d); for (name in c) { d.style[name.camelize()] = c[name] } }, getDimensions: function(g) { g = $(g); if (Element.getStyle(g, "display") != N) { return { width: g.offsetWidth, height: g.offsetHeight} } var h = g.style; var m = h.visibility; var o = h.position; h.visibility = "hidden"; h.position = "absolute"; h.display = ""; var l = g.clientWidth; var n = g.clientHeight; h.display = N; h.position = o; h.visibility = m; return { width: l, height: n} }, makePositioned: function(d) { d = $(d); var c = Element.getStyle(d, "position"); if (c == "static" || !c) { d._madePositioned = true; d.style.position = "relative"; if (window.opera) { d.style.top = 0; d.style.left = 0 } } }, undoPositioned: function(b) { b = $(b); if (b._madePositioned) { b._madePositioned = undefined; b.style.position = b.style.top = b.style.left = b.style.bottom = b.style.right = "" } }, makeClipping: function(b) { b = $(b); if (b._overflow) { return } b._overflow = b.style.overflow; if ((Element.getStyle(b, "overflow") || "visible") != "hidden") { b.style.overflow = "hidden" } }, undoClipping: function(b) { b = $(b); if (b._overflow) { return } b.style.overflow = b._overflow; b._overflow = undefined } }); var Toggle = new Object(); Toggle.display = Element.toggle; Abstract.Insertion = function(b) { this.adjacency = b }; Abstract.Insertion.prototype = { initialize: function(e, d) { this.element = $(e); this.content = d.stripScripts(); if (this.adjacency && this.element.insertAdjacentHTML) { try { this.element.insertAdjacentHTML(this.adjacency, this.content) } catch (f) { if (this.element.tagName.toLowerCase() == "tbody") { this.insertContent(this.contentFromAnonymousTable()) } else { throw f } } } else { this.range = this.element.ownerDocument.createRange(); if (this.initializeRange) { this.initializeRange() } this.insertContent([this.range.createContextualFragment(this.content)]) } setTimeout(function() { d.evalScripts() }, 10) }, contentFromAnonymousTable: function() { var b = document.createElement("div"); b.innerHTML = "<table><tbody>" + this.content + "</tbody></table>"; return $A(b.childNodes[0].childNodes[0].childNodes) } }; var Insertion = new Object(); Insertion.Before = Class.create(); Insertion.Before.prototype = Object.extend(new Abstract.Insertion("beforeBegin"), { initializeRange: function() { this.range.setStartBefore(this.element) }, insertContent: function(b) { b.each((function(a) { this.element.parentNode.insertBefore(a, this.element) }).bind(this)) } }); Insertion.Top = Class.create(); Insertion.Top.prototype = Object.extend(new Abstract.Insertion("afterBegin"), { initializeRange: function() { this.range.selectNodeContents(this.element); this.range.collapse(true) }, insertContent: function(b) { b.reverse(false).each((function(a) { this.element.insertBefore(a, this.element.firstChild) }).bind(this)) } }); Insertion.Bottom = Class.create(); Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion("beforeEnd"), { initializeRange: function() { this.range.selectNodeContents(this.element); this.range.collapse(this.element) }, insertContent: function(b) { b.each((function(a) { this.element.appendChild(a) }).bind(this)) } }); Insertion.After = Class.create(); Insertion.After.prototype = Object.extend(new Abstract.Insertion("afterEnd"), { initializeRange: function() { this.range.setStartAfter(this.element) }, insertContent: function(b) { b.each((function(a) { this.element.parentNode.insertBefore(a, this.element.nextSibling) }).bind(this)) } }); Element.ClassNames = Class.create(); Element.ClassNames.prototype = { initialize: function(b) { this.element = $(b) }, _each: function(b) { this.element.className.split(/\s+/).select(function(a) { return a.length > 0 })._each(b) }, set: function(b) { this.element.className = b }, add: function(b) { if (this.include(b)) { return } this.set(this.toArray().concat(b).join(" ")) }, remove: function(b) { if (!this.include(b)) { return } this.set(this.select(function(a) { return a != b }).join(" ")) }, toString: function() { return this.toArray().join(" ") } }; Object.extend(Element.ClassNames.prototype, Enumerable); var Field = { clear: function() { for (var b = 0; b < arguments.length; b++) { $(arguments[b]).value = "" } }, focus: function(b) { $(b).focus() }, present: function() { for (var b = 0; b < arguments.length; b++) { if ($(arguments[b]).value == "") { return false } } return true }, select: function(b) { $(b).select() }, activate: function(b) { b = $(b); b.focus(); if (b.select) { b.select() } } }; var Form = { serialize: function(l) { var h = Form.getElements($(l)); var m = new Array(); for (var f = 0; f < h.length; f++) { var g = Form.Element.serialize(h[f]); if (g) { m.push(g) } } return m.join("&") }, getElements: function(e) { e = $(e); var h = new Array(); for (tagName in Form.Element.Serializers) { var g = e.getElementsByTagName(tagName); for (var f = 0; f < g.length; f++) { h.push(g[f]) } } return h }, getInputs: function(n, r, q) { n = $(n); var l = n.getElementsByTagName("input"); if (!r && !q) { return l } var m = new Array(); for (var o = 0; o < l.length; o++) { var h = l[o]; if ((r && h.type != r) || (q && h.name != q)) { continue } m.push(h) } return m }, disable: function(h) { var g = Form.getElements(h); for (var e = 0; e < g.length; e++) { var f = g[e]; f.blur(); f.disabled = T } }, enable: function(h) { var g = Form.getElements(h); for (var e = 0; e < g.length; e++) { var f = g[e]; f.disabled = "" } }, findFirstElement: function(b) { return Form.getElements(b).find(function(a) { return a.type != "hidden" && !a.disabled && ["input", "select", "textarea"].include(a.tagName.toLowerCase()) }) }, focusFirstElement: function(b) { Field.activate(Form.findFirstElement(b)) }, reset: function(b) { $(b).reset() } }; Form.Element = { serialize: function(e) { e = $(e); var g = e.tagName.toLowerCase(); var h = Form.Element.Serializers[g](e); if (h) { var f = encodeURIComponent(h[0]); if (f.length == 0) { return } if (h[1].constructor != Array) { h[1] = [h[1]] } return h[1].map(function(a) { return f + "=" + encodeURIComponent(a) }).join("&") } }, getValue: function(e) { e = $(e); var f = e.tagName.toLowerCase(); var d = Form.Element.Serializers[f](e); if (d) { return d[1] } } }; Form.Element.Serializers = { input: function(b) { switch (b.type.toLowerCase()) { case "submit": case "hidden": case "password": case "text": return Form.Element.Serializers.textarea(b); case "checkbox": case "radio": return Form.Element.Serializers.inputSelector(b) } return false }, inputSelector: function(b) { if (b.checked) { return [b.name, b.value] } }, textarea: function(b) { return [b.name, b.value] }, select: function(b) { return Form.Element.Serializers[b.type == "select-one" ? "selectOne" : "selectMany"](b) }, selectOne: function(h) { var g = "", e, f = h.selectedIndex; if (f >= 0) { e = h.options[f]; g = e.value; if (!g && !("value" in e)) { g = e.text } } return [h.name, g] }, selectMany: function(m) { var l = new Array(); for (var f = 0; f < m.length; f++) { var g = m.options[f]; if (g.selected) { var h = g.value; if (!h && !("value" in g)) { h = g.text } l.push(h) } } return [m.name, l] } }; var $F = Form.Element.getValue; Abstract.TimedObserver = function() { }; Abstract.TimedObserver.prototype = { initialize: function(e, d, f) { this.frequency = d; this.element = $(e); this.callback = f; this.lastValue = this.getValue(); this.registerCallback() }, registerCallback: function() { setInterval(this.onTimerEvent.bind(this), this.frequency * 1000) }, onTimerEvent: function() { var b = this.getValue(); if (this.lastValue != b) { this.callback(this.element, b); this.lastValue = b } } }; Form.Element.Observer = Class.create(); Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { getValue: function() { return Form.Element.getValue(this.element) } }); Form.Observer = Class.create(); Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { getValue: function() { return Form.serialize(this.element) } }); Abstract.EventObserver = function() { }; Abstract.EventObserver.prototype = { initialize: function(d, c) { this.element = $(d); this.callback = c; this.lastValue = this.getValue(); if (this.element.tagName.toLowerCase() == "form") { this.registerFormCallbacks() } else { this.registerCallback(this.element) } }, onElementEvent: function() { var b = this.getValue(); if (this.lastValue != b) { this.callback(this.element, b); this.lastValue = b } }, registerFormCallbacks: function() { var c = Form.getElements(this.element); for (var d = 0; d < c.length; d++) { this.registerCallback(c[d]) } }, registerCallback: function(b) { if (b.type) { switch (b.type.toLowerCase()) { case "checkbox": case "radio": Event.observe(b, "click", this.onElementEvent.bind(this)); break; case "password": case "text": case "textarea": case "select-one": case "select-multiple": Event.observe(b, "change", this.onElementEvent.bind(this)); break } } } }; Form.Element.EventObserver = Class.create(); Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { getValue: function() { return Form.Element.getValue(this.element) } }); Form.EventObserver = Class.create(); Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { getValue: function() { return Form.serialize(this.element) } }); if (!window.Event) { var Event = new Object() } Object.extend(Event, { KEY_BACKSPACE: 8, KEY_TAB: 9, KEY_RETURN: 13, KEY_ESC: 27, KEY_LEFT: 37, KEY_UP: 38, KEY_RIGHT: 39, KEY_DOWN: 40, KEY_DELETE: 46, element: function(b) { return b.target || b.srcElement }, isLeftClick: function(b) { return (((b.which) && (b.which == 1)) || ((b.button) && (b.button == 1))) }, pointerX: function(b) { return b.pageX || (b.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)) }, pointerY: function(b) { return b.pageY || (b.clientY + (document.documentElement.scrollTop || document.body.scrollTop)) }, stop: function(b) { if (b.preventDefault) { b.preventDefault(); b.stopPropagation() } else { b.returnValue = false; b.cancelBubble = true } }, findElement: function(f, d) { var e = Event.element(f); while (e.parentNode && (!e.tagName || (e.tagName.toUpperCase() != d.toUpperCase()))) { e = e.parentNode } return e }, observers: false, _observeAndCache: function(g, h, e, f) { if (!this.observers) { this.observers = [] } if (g.addEventListener) { this.observers.push([g, h, e, f]); g.addEventListener(h, e, f) } else { if (g.attachEvent) { this.observers.push([g, h, e, f]); g.attachEvent("on" + h, e) } } }, unloadCache: function() { if (!Event.observers) { return } for (var b = 0; b < Event.observers.length; b++) { Event.stopObserving.apply(this, Event.observers[b]); Event.observers[b][0] = null } Event.observers = false }, observe: function(g, h, e, f) { var g = $(g); f = f || false; if (h == "keypress" && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || g.attachEvent)) { h = "keydown" } this._observeAndCache(g, h, e, f) }, stopObserving: function(g, h, e, f) { var g = $(g); f = f || false; if (h == "keypress" && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || g.detachEvent)) { h = "keydown" } if (g.removeEventListener) { g.removeEventListener(h, e, f) } else { if (g.detachEvent) { g.detachEvent("on" + h, e) } } } }); Event.observe(window, "unload", Event.unloadCache, false); var Position = { includeScrollOffsets: false, prepare: function() { this.deltaX = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; this.deltaY = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 }, realOffset: function(d) { var e = 0, f = 0; do { e += d.scrollTop || 0; f += d.scrollLeft || 0; d = d.parentNode } while (d); return [f, e] }, cumulativeOffset: function(d) { var e = 0, f = 0; do { e += d.offsetTop || 0; f += d.offsetLeft || 0; d = d.offsetParent } while (d); return [f, e] }, positionedOffset: function(d) { var e = 0, f = 0; do { e += d.offsetTop || 0; f += d.offsetLeft || 0; d = d.offsetParent; if (d) { p = Element.getStyle(d, "position"); if (p == "relative" || p == "absolute") { break } } } while (d); return [f, e] }, offsetParent: function(b) { if (b.offsetParent) { return b.offsetParent } if (b == document.body) { return b } while ((b = b.parentNode) && b != document.body) { if (Element.getStyle(b, "position") != "static") { return b } } return document.body }, within: function(d, e, f) { if (this.includeScrollOffsets) { return this.withinIncludingScrolloffsets(d, e, f) } this.xcomp = e; this.ycomp = f; this.offset = this.cumulativeOffset(d); return (f >= this.offset[1] && f < this.offset[1] + d.offsetHeight && e >= this.offset[0] && e < this.offset[0] + d.offsetWidth) }, withinIncludingScrolloffsets: function(e, f, g) { var h = this.realOffset(e); this.xcomp = f + h[0] - this.deltaX; this.ycomp = g + h[1] - this.deltaY; this.offset = this.cumulativeOffset(e); return (this.ycomp >= this.offset[1] && this.ycomp < this.offset[1] + e.offsetHeight && this.xcomp >= this.offset[0] && this.xcomp < this.offset[0] + e.offsetWidth) }, overlap: function(c, d) { if (!c) { return 0 } if (c == "vertical") { return ((this.offset[1] + d.offsetHeight) - this.ycomp) / d.offsetHeight } if (c == "horizontal") { return ((this.offset[0] + d.offsetWidth) - this.xcomp) / d.offsetWidth } }, clone: function(d, f) { d = $(d); f = $(f); f.style.position = "absolute"; var e = this.cumulativeOffset(d); f.style.top = e[1] + "px"; f.style.left = e[0] + "px"; f.style.width = d.offsetWidth + "px"; f.style.height = d.offsetHeight + "px" }, page: function(g) { var f = 0, h = 0; var e = g; do { f += e.offsetTop || 0; h += e.offsetLeft || 0; if (e.offsetParent == document.body) { if (Element.getStyle(e, "position") == "absolute") { break } } } while (e = e.offsetParent); e = g; do { f -= e.scrollTop || 0; h -= e.scrollLeft || 0 } while (e = e.parentNode); return [h, f] }, clone: function(o, m) { var h = Object.extend({ setLeft: true, setTop: true, setWidth: true, setHeight: true, offsetTop: 0, offsetLeft: 0 }, arguments[2] || {}); o = $(o); var n = Position.page(o); m = $(m); var l = [0, 0]; var g = null; if (Element.getStyle(m, "position") == "absolute") { g = Position.offsetParent(m); l = Position.page(g) } if (g == document.body) { l[0] -= document.body.offsetLeft; l[1] -= document.body.offsetTop } if (h.setLeft) { m.style.left = (n[0] - l[0] + h.offsetLeft) + "px" } if (h.setTop) { m.style.top = (n[1] - l[1] + h.offsetTop) + "px" } if (h.setWidth) { m.style.width = o.offsetWidth + "px" } if (h.setHeight) { m.style.height = o.offsetHeight + "px" } }, absolutize: function(g) { g = $(g); if (g.style.position == "absolute") { return } Position.prepare(); var n = Position.positionedOffset(g); var l = n[1]; var m = n[0]; var o = g.clientWidth; var h = g.clientHeight; g._originalLeft = m - parseFloat(g.style.left || 0); g._originalTop = l - parseFloat(g.style.top || 0); g._originalWidth = g.style.width; g._originalHeight = g.style.height; g.style.position = "absolute"; g.style.top = l + "px"; g.style.left = m + "px"; g.style.width = o + "px"; g.style.height = h + "px" }, relativize: function(e) { e = $(e); if (e.style.position == "relative") { return } Position.prepare(); e.style.position = "relative"; var f = parseFloat(e.style.top || 0) - (e._originalTop || 0); var d = parseFloat(e.style.left || 0) - (e._originalLeft || 0); e.style.top = f + "px"; e.style.left = d + "px"; e.style.height = e._originalHeight; e.style.width = e._originalWidth } }; if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { Position.cumulativeOffset = function(d) { var e = 0, f = 0; do { e += d.offsetTop || 0; f += d.offsetLeft || 0; if (d.offsetParent == document.body) { if (Element.getStyle(d, "position") == "absolute") { break } } d = d.offsetParent } while (d); return [f, e] } } var varAddressId = "-1"; var varProductListControlId = "ctl00_CP_PCC_ucAllProducts"; var bookmarksControlID = "ctl00_UserWebShopContentControl1_HistoryAndBookmarksControl1"; var NaviWebLightBox = { hideAll: function() { lboxes = document.getElementsByClassName("lbox"); lboxes.each(function(a) { Element.hide(a) }); if ($("NaviWeboverlay")) { Element.remove("NaviWeboverlay") } } }; function pageLoad(b, a) { var c = $find("CompleteExtender"); c._popupBehavior._element.style.zIndex = 6000 } NaviWebLightBox.base = Class.create(); NaviWebLightBox.base.prototype = { initialize: function(b, a) { HA(); this.element = $(b); this.options = Object.extend({ lightboxClassName: "lightbox", closeOnOverlayClick: false, externalControl: false }, a || {}); new Insertion.Before(this.element, "<div id='NaviWeboverlay' style='display:none;'></div>"); Element.addClassName(this.element, this.options.lightboxClassName); Element.addClassName(this.element, "lbox"); if (this.options.closeOnOverlayClick) { Event.observe($("NaviWeboverlay"), "click", this.hideBox.bindAsEventListener(this)) } if (this.options.externalControl) { Event.observe($(this.options.externalControl), "click", this.hideBox.bindAsEventListener(this)) } this.showBox() }, showBox: function() { Element.show("NaviWeboverlay"); this.center(); Element.show(this.element); return false }, hideBox: function(a) { Element.removeClassName(this.element, this.options.lightboxClassName); Element.hide(this.element); Element.remove("NaviWeboverlay"); return false }, center: function() { var b = 0; var c = 0; if (typeof (window.innerWidth) == "number") { b = window.innerWidth; c = window.innerHeight } else { if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { b = document.documentElement.clientWidth; c = document.documentElement.clientHeight } else { if (document.body && (document.body.clientWidth || document.body.clientHeight)) { b = document.body.clientWidth; c = document.body.clientHeight } } } this.element.style.position = "absolute"; this.element.style.zIndex = 1001; var d = 0; if (document.documentElement && document.documentElement.scrollTop) { d = document.documentElement.scrollTop } else { if (document.body && document.body.scrollTop) { d = document.body.scrollTop } else { if (window.pageYOffset) { d = window.pageYOffset } else { if (window.scrollY) { d = window.scrollY } } } } var a = Element.getDimensions(this.element); var f = (b - a.width) / 2; var e = (c - a.height) / 2 + d; f = (f < 0) ? 0 : f; e = (e < 0) ? 0 : e } }; function LoadHistoryAndBookmarks(a) { if (a == true) { LoadBrowsingLog(WishListBehaviourId); ge("dvHistoryAndBookmarks").style.display = B } else { ge("dvHistoryAndBookmarks").style.display = N } } function RemoveItemFromBrowsingLog(d, c) { ShowWishListLoader(); Anthem_InvokeControlMethod(bookmarksControlID, "RemoveItemFromBrowsingLog", [d], function(m) { var h = new Array(3); h = m.value; try { if (h[0] == T) { var a = "divBookMarkNew_" + c; var b = "divBookMark_" + c; var g = "divDetailPageRelatedBookmark_" + c; if (ge(a) != null) { ChangeToActiveBookmarkStyle(a, h[2], h[1]) } if (ge(b) != null) { ChangeToActiveBookmarkStyle(b, h[2], h[1]) } if (ge(g) != null) { ChangeToActiveBookmarkStyle(g, h[2], h[1]) } HideWishListLoader() } else { if (h[0] == F) { } } } catch (l) { } }) } function ChangeToActiveBookmarkStyle(c, a, b) { ge(c).title = b; ge(c).className = a } function HideButtons() { } function HideBanner() { ge("banner").style.display = N } function ShowCart(b) { } function ShowButtons() { } function RemoveSelectedProducts() { var b = ""; var c = ""; try { var l = document.forms[0].checkProducts; if (l.length) { for (var a = 0; a < l.length; a++) { if (l[a].checked) { b += l[a].value.split("_")[1] + ","; c += l[a].value.split("_")[0] + "," } } } else { if (l.checked) { b += l.value.split("_")[1] + ","; c += l.value.split("_")[0] + "," } } b = b.substring(0, b.length - 1); c = c.substring(0, c.length - 1); if (c != "") { ShowWishListLoader(); Anthem_InvokeControlMethod(bookmarksControlID, "RemoveSelectedItemsFromCart", [b], function(n) { var f = new Array(3); f = n.value; try { if (f[0] == T) { for (var e = 0; e < c.split(",").length; e++) { var d = "divBookMarkNew_" + c.split(",")[e]; var h = "divBookMark_" + c.split(",")[e]; var o = "divDetailPageRelatedBookmark_" + c.split(",")[e]; if (ge(d) != null) { ge(d).title = f[1]; ge(d).className = f[2] } if (ge(h) != null) { ge(h).title = f[1]; ge(h).className = f[2] } if (ge(o) != null) { ge(o).title = f[1]; ge(o).className = f[2] } } HideWishListLoader() } else { if (f[0] == F) { } } } catch (g) { } HideWishListLoader() }) } else { } } catch (m) { } finally { HA() } } function AddSelectedItemsToShoppingCart() { var o = document.forms[0].checkProducts; var a = ""; var q = ""; if (o.length) { for (var r = 0; r < o.length; r++) { if (o[r].checked) { var n = o[r].value.split("_")[0]; var b = "anchBrowsingAddToCart_" + n; var m = "divBrowsingAddToCart_" + n; if (ge(b) != null && ge(m) != null) { if (ge(m).className != "itemInCart") { a += n + "." + ge(n).value + ","; q += n + "." } } } } } else { if (o.checked) { var n = o.value.split("_")[0]; a += n + "." + ge(n).value + ","; q += n + "." } } a = a.substring(0, a.length - 1); q += q.substring(0, q.length - 1); if (q != "") { ShowWishListLoader(); Anthem_InvokeControlMethod(bookmarksControlID, "AddSelectedItemsToShoppingCart", [a], function(e) { var f = new Array(3); f = e.value; try { if (f[0] == T) { for (var d = 0; d < q.split(".").length; d++) { ChangeDivClass(q.split(".")[d], f[1], f[2]) } } else { } } catch (c) { } HideWishListLoader() }) } else { } } function GetLocalisedText(a) { Anthem_InvokeControlMethod(ProductsListControlClientId, "GetLocalisedText", [a], function(b) { var c = b.value }) } function LoadBrowsingLog(a) { ShowWishListLoader(); Anthem_InvokeControlMethod(bookmarksControlID, "LoadHistoryAndBookmarks", [a, true], function(b) { HideWishListLoader() }) } function HideSelectAndDeselectInBookmark() { } function ShowSelectAndDeselectInBookmark() { } function HideMyaccountDiv(d) { if (d != "") { var c = ""; c = d.split(","); if (c.length > 0) { for (i = 0; i < c.length; i++) { if ((typeof (c[i]) != "undefined") && (ge(c[i]) != null)) { ge(c[i]).style.display = N } } } } } function LoadAccountDetails(b) { if (b == dvOrdersClientId) { ge(b).className = "buttonActv"; ge("divOrders").style.display = B; ge("dvordersht").style.display = B; if (ge(dvAccountInformationClientId) != null) { ge(dvAccountInformationClientId).className = "buttonInActv"; ge("dvaccountinformationht").style.display = N; ge("divAccountInformation").style.display = N } if (ge(dvManageAddressClientId) != null) { ge(dvManageAddressClientId).className = "buttonInActv"; ge("dvmanageaddressht").style.display = N; ge("divManageAddress").style.display = N } if (ge(dvChangePasswordClientId) != null) { ge(dvChangePasswordClientId).className = "buttonInActv"; ge("dvchangepasswordht").style.display = N; ge("divChangePassword").style.display = N } if (ge(dvAlternateLoginClientId) != null) { ge(dvAlternateLoginClientId).className = "buttonInActv"; ge("dvAlternateLoginht").style.display = N; ge("divAlternateLogin").style.display = N } } else { if (b == dvAccountInformationClientId) { ge(b).className = "buttonActv"; ge("dvaccountinformationht").style.display = B; ge("divAccountInformation").style.display = B; if (ge(dvManageAddressClientId) != null) { ge(dvManageAddressClientId).className = "buttonInActv"; ge("dvmanageaddressht").style.display = N; ge("divManageAddress").style.display = N } if (ge(dvChangePasswordClientId) != null) { ge(dvChangePasswordClientId).className = "buttonInActv"; ge("dvchangepasswordht").style.display = N; ge("divChangePassword").style.display = N } if (ge(dvOrdersClientId) != null) { ge(dvOrdersClientId).className = "buttonInActv"; ge("dvordersht").style.display = N; ge("divOrders").style.display = N } if (ge(dvAlternateLoginClientId) != null) { ge(dvAlternateLoginClientId).className = "buttonInActv"; ge("dvAlternateLoginht").style.display = N; ge("divAlternateLogin").style.display = N } SetDefaultFocus() } else { if (b == dvManageAddressClientId) { ge(b).className = "buttonActv"; ge("dvmanageaddressht").style.display = B; ge("divManageAddress").style.display = B; if (ge(dvAccountInformationClientId) != null) { ge(dvAccountInformationClientId).className = "buttonInActv"; ge("dvaccountinformationht").style.display = N; ge("divAccountInformation").style.display = N } if (ge(dvOrdersClientId) != null) { ge(dvOrdersClientId).className = "buttonInActv"; ge("dvordersht").style.display = N; ge("divOrders").style.display = N } if (ge(dvChangePasswordClientId) != null) { ge(dvChangePasswordClientId).className = "buttonInActv"; ge("dvchangepasswordht").style.display = N; ge("divChangePassword").style.display = N } if (ge(dvAlternateLoginClientId) != null) { ge(dvAlternateLoginClientId).className = "buttonInActv"; ge("dvAlternateLoginht").style.display = N; ge("divAlternateLogin").style.display = N } } else { if (b == dvChangePasswordClientId) { if (ge(dvChangePasswordClientId) != null) { ge(b).className = "buttonActv"; ge("dvchangepasswordht").style.display = B; ge("divChangePassword").style.display = B } if (ge(dvAccountInformationClientId) != null) { ge(dvAccountInformationClientId).className = "buttonInActv"; ge("dvaccountinformationht").style.display = N; ge("divAccountInformation").style.display = N } if (ge(dvManageAddressClientId) != null) { ge(dvManageAddressClientId).className = "buttonInActv"; ge("dvmanageaddressht").style.display = N; ge("divManageAddress").style.display = N } if (ge(dvOrdersClientId) != null) { ge(dvOrdersClientId).className = "buttonInActv"; ge("dvordersht").style.display = N; ge("divOrders").style.display = N } if (ge(dvAlternateLoginClientId) != null) { ge(dvAlternateLoginClientId).className = "buttonInActv"; ge("dvAlternateLoginht").style.display = N; ge("divAlternateLogin").style.display = N } ge("ctl00_CP_MyAccountContentControl1_ChangePassword_txtoldpassword").focus() } else { if (b == dvAlternateLoginClientId) { if (ge(dvChangePasswordClientId) != null) { ge(b).className = "buttonActv"; ge("dvAlternateLoginht").style.display = B; ge("divAlternateLogin").style.display = B } if (ge(dvAccountInformationClientId) != null) { ge(dvAccountInformationClientId).className = "buttonInActv"; ge("dvaccountinformationht").style.display = N; ge("divAccountInformation").style.display = N } if (ge(dvManageAddressClientId) != null) { ge(dvManageAddressClientId).className = "buttonInActv"; ge("dvmanageaddressht").style.display = N; ge("divManageAddress").style.display = N } if (ge(dvChangePasswordClientId) != null) { ge(dvChangePasswordClientId).className = "buttonInActv"; ge("dvchangepasswordht").style.display = N; ge("divChangePassword").style.display = N } if (ge(dvOrdersClientId) != null) { ge(dvOrdersClientId).className = "buttonInActv"; ge("dvordersht").style.display = N; ge("divOrders").style.display = N } } } } } } } function SetDefaultFocus() { ge("ctl00_CP_MyAccountContentControl1_MyAccountInformation_txtFirstName").focus() } function ClearAccountInformation(b) { if (b == "dvaccountinformation") { ge("ctl00_CP_MyAccountContentControl1_MyAccountInformation_txtFirstName").value = ""; ge("ctl00_CP_MyAccountContentControl1_MyAccountInformation_txtLastName").value = ""; ge("ctl00_CP_MyAccountContentControl1_MyAccountInformation_txtEmail").value = "" } else { ge("ctl00_CP_MyAccountContentControl1_ChangePassword_txtoldpassword").value = ""; ge("ctl00_CP_MyAccountContentControl1_ChangePassword_txtnewpassword").value = ""; ge("ctl00_CP_MyAccountContentControl1_ChangePassword_txtConfirmPassword").value = "" } } function DeleteAddress() { SL(); Anthem_InvokeControlMethod(AddressDetailsControlClientId, "DeleteAddress", [varAddressId], function(b) { HA() }) } function SetDeleteAddress(b) { varAddressId = b; new NaviWebLightBox.base("dvDelete") } function SetThisAddressAsDefault(b) { SL(); Anthem_InvokeControlMethod(AddressDetailsControlClientId, "SetThisAddressAsDefault", [b], function(a) { HL() }) } function LoadEditAddressDetails(b) { SL(); Anthem_InvokeControlMethod(EditAddressDetailsControlClientId, "SetAddressDetails", [b], function(a) { new NaviWebLightBox.base("dvEditAddressDetails"); ge(FirstNameTextBoxClientId).focus(); ge(FirstNameTextBoxClientId).select() }) } function SetImage(b) { ge("mainImage").src = b } function GetLocalisedText(b) { Anthem_InvokeControlMethod(ProductDetailsClientId, "GetLocalisedText", [b], function(a) { var d = a.value }) } function LoadSpecifications(b) { if (b == "liReviews") { ge(b).className = "selected"; ge("reviews").style.display = B; if (ge("divMoviews") != null) { ge("divMoviews").className = "featureButton"; ge("divfilms").style.display = N } if (ge("liSpecifications") != null) { ge("divfeatures").style.display = N; ge("liSpecifications").className = "featureButton" } } else { if (b == "divMoviews") { ge(b).className = "selected"; ge("divfilms").style.display = B; if (ge("liSpecifications") != null) { ge("liSpecifications").className = "featureButton"; ge("divfeatures").style.display = N } if (ge("liReviews") != null) { ge("liReviews").className = "featureButton"; ge("reviews").style.display = N } } else { ge(b).className = "selected"; ge("divfeatures").style.display = B; if (ge("divMoviews") != null) { ge("divMoviews").className = "featureButton"; ge("divfilms").style.display = N } if (ge("liReviews") != null) { ge("liReviews").className = "featureButton"; ge("reviews").style.display = N } } } } function ClearReview() { ge("ctl00_CP_ProductDetails_txtTitle").value = ""; ge("ctl00_CP_ProductDetails_txtbody").value = "" } function GetLocalisedText(b) { Anthem_InvokeControlMethod(ProductsListControlClientId, "GetLocalisedText", [b], function(a) { var d = a.value }) } function RegisterNewUser() { ge(txtFirstName).value = ""; ge(txtLastName).value = ""; ge(txtFullName).value = ""; ge(txtEmailAddress).value = ""; ge(txtpassword).value = ""; ge(txtConfirmPassword).value = ""; if (ge(btnRedirectTOLogin)) { ge(btnRedirectTOLogin).style.visibility = "hidden" } ge("divRegisterScreen").style.display = B; ge("divMessageSector").className = ""; try { new NaviWebLightBox.base("divRegister"); ge(txtFirstName).focus() } catch (b) { } } function PasswordRecovery() { ge(txtDisplayName).value = ""; ge("divPasswordRecover").style.display = B; try { new NaviWebLightBox.base("divPasswordRecover"); ge(txtDisplayName).focus() } catch (b) { } } function HA() { NaviWebLightBox.hideAll() } function OnSuccess() { ge("divRegisterScreen").style.display = N; ge("divMessageSector").className = "successMessage" } function GetLocalisedText(b) { Anthem_InvokeControlMethod(ProductsListControlClientId, "GetLocalisedText", [b], function(a) { var d = a.value }) } function ShowRelatedProducts(b) { ShowShoppingCartLoader(); Anthem_InvokeControlMethod("ctl00_UserWebShopContentControl1_ShoppingCartContentControl_CartRelatedProducts", "BindRelatedProducts", [b, "ShoppingCart", defaultNumberOfRelatedProducts], function(a) { HideShoppingCartLoader() }) } function ShowAllRelatedProducts(b) { if (b == "ProductDetailsPage") { SL(); Anthem_InvokeControlMethod(ProductDetailsClientId, "BindAllRelatedProducts", [], function(a) { HL() }) } else { SL(); Anthem_InvokeControlMethod(RelatedProductsControlClientId, "BindAllRelatedProducts", [], function(a) { HL() }) } } function DeleteShoppingCartItem(f, d) { var g = "divProductsListAddToCartNew_" + d; var h = "divProductsListAddToCart_" + d; var b = "divContentPageAddToCart_" + d; var a = "divProductDetailsAddToCart_" + d; var e = "divDetailsRelatedProductsAddToCart_" + d; var c = "divCompareAddToCart_" + d; ShowShoppingCartLoader(); Anthem_InvokeControlMethod(ShoppingCartContentControlClientId, "DeleteShoppingCartId", [f], function(m) { var r = new Array(4); r = m.value; try { if (r[0] == T) { if (ge(g) != null) { ChangeActiveAddToCartStyle(g, "itemAddToCard", r[1]) } else { if (ge(e) != null) { ChangeActiveAddToCartStyle(e, "itemAddToCard", r[1]) } else { if (ge(h) != null) { ChangeActiveAddToCartStyle(h, "dtlsaddToCard", r[1]); var o = "anchProductsListAddToCart_" + d; if (ge(o) != null) { ge(o).innerHTML = r[1] } } else { if (ge(b) != null) { ChangeActiveAddToCartStyle(b, "dtlsaddToCard", r[1]); var l = "anchContentPageAddToCart_" + d; if (ge(l) != null) { ge(l).innerHTML = r[1] } } else { if (ge(a) != null) { ChangeActiveAddToCartStyle(a, "dtlsaddToCard", r[1]); var s = "anchProductDetailsAddToCart_" + d; if (ge(s) != null) { ge(s).innerHTML = r[1] } } else { if (ge(c) != null) { ChangeActiveAddToCartStyle(c, "dtlsaddToCard", r[1]); var q = "anchCompareAddToCart_" + d; if (ge(q) != null) { ge(q).innerHTML = r[1] } } } } } } } if (r[3] == "CartEmpty") { DisableShoppingcartCheckoutButton(); HideSelectAndDeselectInCheckout() } } else { if (r[0] == F) { } } } catch (n) { } }); HideShoppingCartLoader() } function ChangeActiveAddToCartStyle(c, a, b) { ge(c).className = a; ge(c).title = b } function SelectedCartItems(g) { var e = ge("ctl00_UserWebShopContentControl1_ShoppingCartContentControl_ShoppingCart_hfSelectedCartItems"); var f = ge("ctl00_UserWebShopContentControl1_ShoppingCartContentControl_ShoppingCart_hfSelectedProducts"); e.value = ""; f.value = ""; var h = document.forms[0].elements; for (i = 0; i < h.length; i++) { if (h[i].type == "checkbox" && h[i].name == "chkbx") { if (g == "check" && h[i].checked == true) { e.value += h[i].value + ","; f.value += h[i].parentNode.id + "," } } } } function ActiveCartProduct(b) { try { if (ge("lastSelectedProduct") != null) { ge(ge("lastSelectedProduct").value).className = "cartItem" } ge(b).className = "cartItemActv"; ge("lastSelectedProduct").value = b } catch (c) { } } function UpdateCart(b) { Anthem_InvokeControlMethod(UserWebShopContentControlClientId, "UpdateCartItems", [b], function(a) { }); HA() } function UpdateCartItems(b) { Anthem_InvokeControlMethod(LoginControlClientId, "UpdateCartItems", [b], function(a) { }); HA() } function GetSearch(h, f) { try { var g = ge(hfSearchClientId).value; ge(hfSearchClientId).value = f.get_value(); if (ge(hfSearchClientId).value != "") { Anthem_InvokeControlMethod(SearchControlClientId, "Search", [], function(a) { }) } } catch (e) { } } function DisableShoppingcartCheckoutButton() { } function HideSelectAndDeselectInCheckout() { } function ShowSelectAndDeselectInCheckout() { } function LoadCartList() { SL(); Anthem_InvokeControlMethod(ShoppingCartContentControlClientId, "BindingCartList", [], function(a) { try { var c = new Array(2); c = a.value; if (c[0] == T) { ShowSelectAndDeselectInCheckout(); HL(); new NaviWebLightBox.base("dvShoppingCart"); ge("divShoppingcartCheckout").className = "button" } else { if (c[0] == "CartEmpty") { HL(); ShowCartEmptyErrorMessage(c[1]) } else { if (c[0] == F) { SE(c[1]) } } } } catch (b) { } }) } function ShowCompareDiv() { ge("divCompareDown").style.display = B } function DeleteCompareProduct(b) { if (b != "" && b != null) { Anthem_InvokeControlMethod(ProductsCompareContentControlClientId, "DeleteCompareProduct", [b], function(a) { var e = ge("Inner"); var f = ge(ProductsCompareHiddenFieldControlId).value.split(","); e.style.width = f.length * 200 + 300 + "px" }) } } function HideProductCompare() { HA() } function DeleteAllCompareProduct() { Anthem_InvokeControlMethod(ProductsCompareContentControlClientId, "DeleteAllCompareProduct", [], function(b) { HideProductCompare() }) } function CheckCompareCheckBoxes() { if (ge(hfCompareProductIdsClientId) == null) { hfCompareProductIdsClientId = "ctl00_CP_PCC_ucAllProducts_PHC_hfCompareProductIds" } if (typeof (ge(hfCompareProductIdsClientId)) != "undefined") { if (ge(hfCompareProductIdsClientId).value != "") { var b = ""; b = ge(hfCompareProductIdsClientId).value.split(","); if (b.length > 0) { for (i = 0; i < b.length; i++) { if ((typeof (b[i]) != "undefined") && (ge(b[i]) != null) && (ge(b[i]).type == "checkbox")) { ge(b[i]).checked = true } } } } } } function LoadProductCompareContentFromProductList() { if (typeof (ge(hfCompareProductIdsClientId)) != "undefined") { window.location.href = ge(HdnSiteRootClientId).value + "ProductCompare.aspx?Compareids=" + ge(hfCompareProductIdsClientId).value } else { if (typeof (ge("ctl00_CP_PCC_ucAllProducts_PHC_hfCompareProductIds")) != "undefined") { window.location.href = ge(HdnSiteRootClientId).value + "ProductCompare.aspx?Compareids=" + ge("ctl00_CP_PCC_ucAllProducts_PHC_hfCompareProductIds").value } else { if (typeof (ge("ctl00_CP_PCC_ucProductsList_PHC_hfCompareProductIds")) != "undefined") { window.location.href = ge(HdnSiteRootClientId).value + "ProductCompare.aspx?Compareids=" + ge("ctl00_CP_PCC_ucProductsList_PHC_hfCompareProductIds").value } } } } function LoadProductCompareContentFromProductDetails(b) { if (b != "" && b != null) { SL(); Anthem_InvokeControlMethod(ProductsCompareContentControlClientId, "BindCompareProductsFromProductDetails", [b, true], function(a) { var e = ge("Inner"); var f = ge("ctl00_CP_ucProductDetails_ucProductsCompareContentControl_hdnCompareProductId").value.split(","); e.style.width = f.length * 200 + 300 + "px"; new NaviWebLightBox.base("dvProductsCompareContentControl"); ge("divNaviWebLoader").style.display == N }) } } function LoadProductCompareSpecifications(b) { ge("hdnShowAllSpecifications").value = b; SL(); Anthem_InvokeControlMethod(ProductsCompareContentControlClientId, "BindCompareProducts", [b], function(a) { if (b == "true") { ge("spnAllSpecifications").className = "allSpecificationsTxt"; ge("spnMatchingSpecifications").className = "matchingSpecificationsTxt" } if (b == "false") { ge("spnAllSpecifications").className = "matchingSpecificationsTxt"; ge("spnMatchingSpecifications").className = "allSpecificationsTxt" } HA() }) } function UncheckCompareCheckbox(b) { if (ge(b) != null) { if ((ge(b).type == "checkbox") && (ge(b).checked == true)) { ge(b).checked = false } } if (typeof (hfCompareProductIdsClientId) != "undefined") { if ((ge(hfCompareProductIdsClientId) != null) && (ge(hfCompareProductIdsClientId).value != null) && (ge(hfCompareProductIdsClientId).value != "")) { ge(hfCompareProductIdsClientId).value = ge(hfCompareProductIdsClientId).value.replace(b, ""); ge(hfCompareProductIdsClientId).value = ge(hfCompareProductIdsClientId).value.replace(",,", ","); ge(hfCompareProductIdsClientId).value = ge(hfCompareProductIdsClientId).value.replace(", ,", ","); if (ge(hfCompareProductIdsClientId).value.startsWith(",")) { ge(hfCompareProductIdsClientId).value = ge(hfCompareProductIdsClientId).value.substring(1) } if (ge(hfCompareProductIdsClientId).value.endsWith(",")) { ge(hfCompareProductIdsClientId).value = ge(hfCompareProductIdsClientId).value.substring(0, ge(hfCompareProductIdsClientId).value.length - 1) } } } } function UpdateCompareProductIds(b) { if (ge(hfCompareProductIdsClientId) == null) { if (typeof (ge("ctl00_CP_PCC_ucAllProducts_PHC_hfCompareProductIds")) != "undefined") { hfCompareProductIdsClientId = "ctl00_CP_PCC_ucAllProducts_PHC_hfCompareProductIds" } else { hfCompareProductIdsClientId = "ctl00_CP_PCC_ucFilters_PHC_hfCompareProductIds" } } if (b != null) { if ((ge(b).type == "checkbox") && (ge(b).checked == true)) { if ((ge(b).value != null) && (ge(b).value != "")) { if ((ge(hfCompareProductIdsClientId).value != null) && (ge(hfCompareProductIdsClientId).value != "")) { ge(hfCompareProductIdsClientId).value = ge(hfCompareProductIdsClientId).value + "," + ge(b).value } else { ge(hfCompareProductIdsClientId).value = ge(b).value } } } else { if ((ge(b).type == "checkbox") && (ge(b).checked == false)) { if ((ge(hfCompareProductIdsClientId).value != null) && (ge(hfCompareProductIdsClientId).value != "")) { ge(hfCompareProductIdsClientId).value = ge(hfCompareProductIdsClientId).value.replace(ge(b).value, ""); ge(hfCompareProductIdsClientId).value = ge(hfCompareProductIdsClientId).value.replace(",,", ","); ge(hfCompareProductIdsClientId).value = ge(hfCompareProductIdsClientId).value.replace(", ,", ","); if (ge(hfCompareProductIdsClientId).value.startsWith(",")) { ge(hfCompareProductIdsClientId).value = ge(hfCompareProductIdsClientId).value.substring(1) } if (ge(hfCompareProductIdsClientId).value.endsWith(",")) { ge(hfCompareProductIdsClientId).value = ge(hfCompareProductIdsClientId).value.substring(0, ge(hfCompareProductIdsClientId).value.length - 1) } } Anthem_InvokeControlMethod(ProductsCompareContentControlClientId, "RemoveProductIdFromSession", [ge(b).value], function(a) { }) } } } } function ShowCartEmptyErrorMessage(b) { ge("lblNaviWebErrorMessage").innerHTML = b; new NaviWebLightBox.base("divNaviWebErrorMessage") } function RedirectToCheckOut(a) { SL(); Anthem_InvokeControlMethod(ShoppingCartClientId, "RedirectToCheckOut", [], function(b) { }) } function isLoggedIn(b) { if ((b == "MyAccount") || (b == "Any")) { SL() } Anthem_InvokeControlMethod(AuthenticateduserControlClientId, "IsLoggedIn", [b], function(a) { try { var e = new Array(2); e = a.value; if (e[0] == T) { window.location.href = ge("ctl00_ucAuthenticatedUser_hdSiteRoot").value + "myaccount.aspx"; return false } else { if (e[0] == F) { window.location.href = ge("ctl00_ucAuthenticatedUser_hdSiteRoot").value + "login.aspx" } else { if (e[0] == "error") { SE(e[1]) } } } } catch (f) { } }) } function PreviousPage() { history.back(1) } function UserLogin(d, c) { if (c == "ButtonClick") { ShowLogInLoader(); Anthem_InvokeControlMethod(LoginControlClientId, "UserLogin", [], function(a) { HideLogInLoader() }) } else { if (d.which || d.keyCode) { if ((d.which == 13) || (d.keyCode == 13)) { ShowLogInLoader(); Anthem_InvokeControlMethod(LoginControlClientId, "UserLogin", [], function(a) { HideLogInLoader() }) } } } } function ValidateSelection() { try { var c = ge(hfSelectedCartItemsClientId).value; if (c == "") { return false } else { ShowShoppingCartLoader(); return true } } catch (d) { } } function ChangeAddToCartButtonStyle(l, q, r) { try { l = l.substring(0, l.length - 1); var h = l.split(","); var m = 0; for (m = 0; m < h.length; m++) { var o = "divListViewAddToCart_" + h[m]; ChangeDivClass(h[m], q, r); if (ge(o) != null) { ge(o).className = "listviewaddcartbg" } } } catch (n) { } } function LoadCompareFreeItems(b) { Anthem_InvokeControlMethod(FreeItemsControlClientId, "LoadFreeItems", [b], function(a) { ge("divCompareFreeItems").style.display = B }) } function LoadFreeItems(b) { SL(); Anthem_InvokeControlMethod(FreeItemsControlClientId, "LoadFreeItems", [b], function(a) { HL(); new NaviWebLightBox.base("dvFreeItems") }) } function LoadStocks(b) { Anthem_InvokeControlMethod(StocksControlClientId, "LoadStocks", [b], function(a) { }) } function SL() { new NaviWebLightBox.base("divNaviWebLoader"); ge("divNaviWebLoader").style.display = B } function HL() { if (ge("divNaviWebLoader").style.display == B) { HA() } } function ShowCheckoutLoader() { new NaviWebLightBox.base("divCheckoutLoader"); ge("divCheckoutLoader").style.display = B } function HideCheckoutLoader() { if (ge("divCheckoutLoader").style.display == B) { HA() } ge("divCheckoutLoader").style.display = N } function ShowShoppingCartLoader() { ge("divShoppingCartLoader").style.display = B } function HideShoppingCartLoader() { ge("divShoppingCartLoader").style.display = N } function ShowRelatedProductsLoader() { ge("divRelatedProductsLoader").style.display = B } function HideRelatedProductsLoader() { ge("divRelatedProductsLoader").style.display = N } function ShowWishListLoader() { ge("divWishListLoader").style.display = B } function HideWishListLoader() { ge("divWishListLoader").style.display = N } function ShowPagingLoader() { if (ge("divPagingLoader") != null) { ge("divPagingLoader").style.display = B } } function HidePagingLoader() { if (ge("divPagingLoader") != null) { ge("divPagingLoader").style.display = N } } function ShowBottomPagingLoader() { if (ge("divBottomPagingLoader") != null) { ge("divBottomPagingLoader").style.display = B } } function HideBottomPagingLoader() { if (ge("divBottomPagingLoader") != null) { ge("divBottomPagingLoader").style.display = N } } function ShowLogInLoader() { ge("divLogInLoader").style.display = B } function HideLogInLoader() { ge("divLogInLoader").style.display = N } function ShowBuyNowLoader() { ge("divBuyNowLoader").style.display = B } function HideBuyNowLoader() { ge("divBuyNowLoader").style.display = N } function ShowPasswordRecoveryLoader() { ge("divMessageSector").style.display = N; ge("divPasswordRecoveryLoader").style.display = B } function HidePasswordRecoveryLoader() { ge("divPasswordRecoveryLoader").style.display = N; ge("divMessageSector").style.display = B } function ShowSignUpLoader() { ge("divSignUpLoader").style.display = B } function HideSignUpLoader() { ge("divSignUpLoader").style.display = N; TrackPageView("/RegisterNewUser") } function ShowManageAddressLoader() { ge("divManageAddressLoader").style.display = B } function HideManageAddressLoader() { ge("divManageAddressLoader").style.display = N } function SE(b) { HL(); new NaviWebLightBox.base("divNaviWebErrorMessage") } function HideNaviWebErrorMessage() { HA() } function IsDigit(e, g) { try { var f = (e.which) ? e.which : event.keyCode; if ((f > 47 && f < 58) || (f == 8)) { if (g.value == "" && f == 48) { return false } else { return true } } else { return false } } catch (h) { } } function PageChanged(e, g) { try { var f = (e.which) ? e.which : event.keyCode; if (f == 13) { if (g.value != "") { return true } else { return false } } else { if ((f > 47 && f < 58) || (f == 8)) { if (g.value == "" && f == 48) { return false } else { return true } } else { return false } } } catch (h) { } } function goToTop() { location.href = "#top" } function TransferCartItems(b) { Anthem_InvokeControlMethod(UserWebShopContentControlClientId, "UpdateCartItems", [b], function(a) { }); HA() } function GoToCheckOut() { if (ge(QuantityTextBoxClientId).value == "") { ge("lblQuantityRequiredMsg").style.display = B } else { ShowBuyNowLoader(); ge("lblQuantityRequiredMsg").style.display = N; Anthem_InvokeControlMethod(BuyNowControlClientId, "GoToCheckOut", [], function(b) { HideBuyNowLoader() }) } } function CancelPayment() { Anthem_InvokeControlMethod(CheckOutItemsControlClientId, "CancelPayment", [], function(b) { }) } function ShowBuyNowMessage() { ge("lblQuantityRequiredMsg").style.display = B; HideBuyNowLoader() } function setProductDetails(d, c) { Anthem_InvokeControlMethod(AuthenticateduserControlClientId, "SetProductDetails", [d, c], function(a) { }) } function LoadBuyNowPopup(c, d) { if (c == true) { ge("lblQuantityRequiredMsg").style.display = N; new NaviWebLightBox.base("dvBuyNow"); ge(QuantityTextBoxClientId).focus(); Anthem_InvokeControlMethod(BuyNowControlClientId, "SetProductDetails", [d], function(a) { }) } else { ge("dvBuyNow").style.display = N } return false } function BuyNowFromProductList(d) { var c = "divProductsListBuyNow_" + d; if (ge(c) != null) { if (ge(c).className != "itemInCart") { if (d != null) { Anthem_InvokeControlMethod(ProductsListControlClientId, "BuyNowFromProductList", [d], function(a) { }) } } } } function BuyNowFromPromotionalProduct(e, d) { SelectedQty(); var f = "divProductsListBuyNow_" + e; if (ge(f) != null) { if (e != null) { Anthem_InvokeControlMethod(FreeItemsControlClientId, "BuyNowFromFreeItemsControl", [e, ge(d).value], function(a) { }) } } } function BuyNowFromProductDetails(d, c) { if (ge("divProductDetailsBuyNow") != null) { if (ge("divProductDetailsBuyNow").className != "itemInCart") { if (d != null) { Anthem_InvokeControlMethod(ProductDetailsClientId, "BuyNowFromProductDetails", [d, ge(c).value], function(a) { }) } } } } function BuyNowFromHistoryAndBookmarks(d) { var c = "divBrowsingBuyNow_" + d; if (ge(c) != null) { if (ge(c).className != "itemInCart") { if (d != null) { Anthem_InvokeControlMethod(bookmarksControlID, "BuyNowFromHistoryAndBookmarks", [d, ge(d).value], function(a) { }) } } } } function SetButtonText(b) { ge("anchorContinueShopping").innerHTML = b } function HideMessage() { document.getElementById("divPrint").style.display = "none"; document.getElementById("ctl00_CP_ucProductsCompareContentControl_divRemoveAllButton").style.display = "none" } function isNumberKey(d) { var c = (window.event) ? d.keyCode : d.which; if ((c > 47 && c < 58) || c == 8 || c == 0) { return true } else { return false } } function OnClickBookMark(d, c) { var e = c + "_" + d; if (ge(e).className != "WishList") { SL(); Anthem_InvokeControlMethod(ProductsListControlClientId, "AddToBookMark", [d], function(g) { try { var a = new Array(3); a = g.value; ge(e).title = a[1]; ge(e).className = "WishList" } catch (b) { } HL() }) } } function GetLocalisedText(b) { Anthem_InvokeControlMethod(ProductsListControlClientId, "GetLocalisedText", [b], function(a) { var d = a.value }) } function AddToCart(h, o, g, m, n) { var l = "1"; if ((g == "") || ge(g) != null) { if ((g == "") || (ge(g).className != "itemInAddToCard")) { if (m == "page") { SL() } else { if ((typeof (UserWebShopContentControlClientId) != "undefined" && m == UserWebShopContentControlClientId)) { } else { if ((typeof (CheckOutItemsControlClientId) != "undefined" && m == CheckOutItemsControlClientId)) { SL() } else { if (m == RelatedProductsControlClientId && g == "divDetailsRelatedProductsAddToCart_" + h) { SL() } else { if (m == bookmarksControlID) { SL() } else { if (m == RelatedProductsControlClientId) { ge("divShoppingCartLoader").style.display = B } else { if (m == ProductsCompareContentControlClientId) { ge("divNaviWebLoader").style.display == B } else { SL() } } } } } } } if (n == "1") { l = "1" } else { l = ge(n).value; if (l == "" || parseInt(l) <= 0) { l = "1" } } if (m != "page") { Anthem_InvokeControlMethod(m, "AddToShoppingCart", [h, l], function(c) { var a = new Array(3); a = c.value; try { if (a[0] == "true") { if (m == "page") { HL() } else { if ((typeof (UserWebShopContentControlClientId) != "undefined" && m == UserWebShopContentControlClientId)) { } else { if ((typeof (CheckOutItemsControlClientId) != "undefined" && m == CheckOutItemsControlClientId)) { HL() } else { if (m == RelatedProductsControlClientId && g == "divDetailsRelatedProductsAddToCart_" + h) { HL() } else { if (m == bookmarksControlID) { HL() } else { if (m == RelatedProductsControlClientId) { ge("divShoppingCartLoader").style.display = N } else { if (m == ProductsCompareContentControlClientId) { ge("divNaviWebLoader").style.display == N } else { HL() } } } } } } } ChangeDivClass(h, a[1], a[2]) } else { ActiveCartProduct(h) } } catch (b) { } }) } else { Anthem_InvokePageMethod("AddToShoppingCart", [h, l], function(c) { var a = new Array(3); a = c.value; try { if (a[0] == "true") { ChangeDivClass(h, a[1], a[2]); if (m == "page") { HL() } else { if ((typeof (UserWebShopContentControlClientId) != "undefined" && m == UserWebShopContentControlClientId)) { } else { if ((typeof (CheckOutItemsControlClientId) != "undefined" && m == CheckOutItemsControlClientId)) { HL() } else { if (m == RelatedProductsControlClientId && g == "divDetailsRelatedProductsAddToCart_" + h) { HL() } else { if (m == bookmarksControlID) { HL() } else { if (m == RelatedProductsControlClientId) { ge("divShoppingCartLoader").style.display = N } else { if (m == ProductsCompareContentControlClientId) { ge("divNaviWebLoader").style.display == N } else { HL() } } } } } } } } } catch (b) { } }) } } } } function MyQtyRdbFocus() { ge("rdbQuantity").checked = true } function SelectedQty() { if (ge("rdbQuantity").checked == true) { ge("hidQty").value = ge("txtquantity").value } else { for (i = 0; i < document.aspnetForm.rdbtn.length; i++) { if (document.aspnetForm.rdbtn[i].checked == true) { ge("hidQty").value = document.aspnetForm.rdbtn[i].value } } } } function AddToCart_MultiQuantity(g, m, f, h, l) { SelectedQty(); if (ge("hidQty").value != "" || ge("hidQty").value != "") { if ((f == "") || ge(f) != null) { if (h == "page") { SL() } else { if ((typeof (UserWebShopContentControlClientId) != "undefined" && h == UserWebShopContentControlClientId)) { } else { if ((typeof (CheckOutItemsControlClientId) != "undefined" && h == CheckOutItemsControlClientId)) { SL() } else { if (h == RelatedProductsControlClientId && f == "divDetailsRelatedProductsAddToCart_" + g) { SL() } else { if (h == bookmarksControlID) { SL() } else { if (h == RelatedProductsControlClientId) { ge("divShoppingCartLoader").style.display = B } else { if (h == ProductsCompareContentControlClientId) { ge("divNaviWebLoader").style.display == B } else { SL() } } } } } } } quantity = parseInt(ge(l).value); if (quantity == "" || parseInt(ge(l).value) <= 0) { quantity = "1" } if (h != "page") { Anthem_InvokeControlMethod(h, "AddToShoppingCart", [g, quantity], function(c) { var a = new Array(3); a = c.value; try { if (a[0] == "true") { if (h == "page") { HL() } else { if ((typeof (UserWebShopContentControlClientId) != "undefined" && h == UserWebShopContentControlClientId)) { } else { if ((typeof (CheckOutItemsControlClientId) != "undefined" && h == CheckOutItemsControlClientId)) { HL() } else { if (h == RelatedProductsControlClientId && f == "divDetailsRelatedProductsAddToCart_" + g) { HL() } else { if (h == bookmarksControlID) { HL() } else { if (h == RelatedProductsControlClientId) { ge("divShoppingCartLoader").style.display = N } else { if (h == ProductsCompareContentControlClientId) { ge("divNaviWebLoader").style.display == N } else { HL() } } } } } } } ChangeDivClass(g, a[1], a[2]) } else { ActiveCartProduct(g) } } catch (b) { } }) } else { Anthem_InvokePageMethod("AddToShoppingCart", [g, quantity], function(c) { var a = new Array(3); a = c.value; try { if (a[0] == "true") { ChangeDivClass(g, a[1], a[2]); if (h == "page") { HL() } else { if ((typeof (UserWebShopContentControlClientId) != "undefined" && h == UserWebShopContentControlClientId)) { } else { if ((typeof (CheckOutItemsControlClientId) != "undefined" && h == CheckOutItemsControlClientId)) { HL() } else { if (h == RelatedProductsControlClientId && f == "divDetailsRelatedProductsAddToCart_" + g) { HL() } else { if (h == bookmarksControlID) { HL() } else { if (h == RelatedProductsControlClientId) { ge("divShoppingCartLoader").style.display = N } else { if (h == ProductsCompareContentControlClientId) { ge("divNaviWebLoader").style.display == N } else { HL() } } } } } } } } } catch (b) { } }) } } if (ge("txtmyquantity") != null) { ge("txtmyquantity").value = ge("hidQty").value } } } function AddToCartFromProdDetail_MultiQuantity(g, m, f, h, l) { if ((f == "") || ge(f) != null) { if (h == "page") { SL() } else { if ((typeof (UserWebShopContentControlClientId) != "undefined" && h == UserWebShopContentControlClientId)) { } else { if ((typeof (CheckOutItemsControlClientId) != "undefined" && h == CheckOutItemsControlClientId)) { SL() } else { if (h == RelatedProductsControlClientId && f == "divDetailsRelatedProductsAddToCart_" + g) { SL() } else { if (h == bookmarksControlID) { SL() } else { if (h == RelatedProductsControlClientId) { ge("divShoppingCartLoader").style.display = B } else { if (h == ProductsCompareContentControlClientId) { ge("divNaviWebLoader").style.display == B } else { SL() } } } } } } } quantity = parseInt(ge(l).value); if (ge(l).value == "" || ge(l).value == null) { quantity = "1" } if (h != "page") { Anthem_InvokeControlMethod(h, "AddToShoppingCart", [g, quantity], function(c) { var a = new Array(3); a = c.value; try { if (a[0] == "true") { if (h == "page") { HL() } else { if ((typeof (UserWebShopContentControlClientId) != "undefined" && h == UserWebShopContentControlClientId)) { } else { if ((typeof (CheckOutItemsControlClientId) != "undefined" && h == CheckOutItemsControlClientId)) { HL() } else { if (h == RelatedProductsControlClientId && f == "divDetailsRelatedProductsAddToCart_" + g) { HL() } else { if (h == bookmarksControlID) { HL() } else { if (h == RelatedProductsControlClientId) { ge("divShoppingCartLoader").style.display = N } else { if (h == ProductsCompareContentControlClientId) { ge("divNaviWebLoader").style.display == N } else { HL() } } } } } } } ge(f).className = "dtlsItemInCart"; ge(f).title = a[1]; ge("anchProductDetailsAddToCart_" + g).innerHTML = a[1]; ge("anchProductDetailsAddToCart_" + g).style.cursor = "pointer" } else { ActiveCartProduct(g) } } catch (b) { } }) } else { Anthem_InvokePageMethod("AddToShoppingCart", [g, quantity], function(c) { var a = new Array(3); a = c.value; try { if (a[0] == "true") { ChangeDivClass(g, a[1], a[2]); if (h == "page") { HL() } else { if ((typeof (UserWebShopContentControlClientId) != "undefined" && h == UserWebShopContentControlClientId)) { } else { if ((typeof (CheckOutItemsControlClientId) != "undefined" && h == CheckOutItemsControlClientId)) { HL() } else { if (h == RelatedProductsControlClientId && f == "divDetailsRelatedProductsAddToCart_" + g) { HL() } else { if (h == bookmarksControlID) { HL() } else { if (h == RelatedProductsControlClientId) { ge("divShoppingCartLoader").style.display = N } else { if (h == ProductsCompareContentControlClientId) { ge("divNaviWebLoader").style.display == N } else { HL() } } } } } } } } } catch (b) { } }) } } } function ChangeDivClass(J, U, y) { var P = "divContentPageBuyNow_" + J; var E = "divContentPageAddToCart_" + J; var O = "anchContentPageAddToCart_" + J; var L = "divProductsListBuyNow_" + J; var V = "divBrowsingBuyNow_" + J; var K = "anchProductsListAddToCart_" + J; var M = "divProductsListAddToCart_" + J; var D = "anchProductDetailsAddToCart_" + J; var z = "divProductDetailsAddToCart_" + J; var G = "anchPromotionsAddToCart_" + J; var I = "divPromotionsAddToCart_" + J; var H = "anchRelatedProductsAddToCart_" + J; var C = "divRelatedProductsAddToCart_" + J; var Q = "anchBrowsingAddToCart_" + J; var R = "divBrowsingAddToCart_" + J; var S = "anchDetailsRelatedProductsAddToCart_" + J; var A = "divDetailsRelatedProductsAddToCart_" + J; if (ge(L) != null) { ge(L).className = "buy" } if (ge(V) != null) { ge(V).className = "buy" } if (ge(P) != null) { ge(P).className = "buy" } if (ge("divProductDetailsBuyNow") != null) { ge("divProductDetailsBuyNow").className = "buy" } if (ge(M) != null) { ge(K).innerHTML = U; ge(M).className = y; ge(K).title = U } if (ge(E) != null) { ge(O).innerHTML = U; ge(E).className = y; ge(O).title = U } if (ge(z) != null) { ge(D).innerHTML = U; ge(z).className = y; ge(D).title = U } if (ge(I) != null) { ge(G).innerHTML = U; ge(I).className = y; ge(G).title = U } if (ge(C) != null) { ge(H).innerHTML = U; ge(C).className = y; ge(H).title = U } if (ge(R) != null) { ge(Q).innerHTML = U; ge(R).className = y; ge(Q).title = U } if (ge(A) != null) { ge(S).innerHTML = U; ge(A).className = y; ge(S).title = U } } var isadvancedSearchVisible; var advancedSearchDivID; function ChangeSearchCategoryCheckboxStatus(r, m, q, s) { var o = ""; var n = document.forms[0].elements; for (i = 0; i < n.length; i++) { if (n[i].type == "checkbox" && n[i].name == m) { if (r == "CheckAll") { n[i].checked = true; o += n[i].value + ","; var l = document.forms[0].elements; for (j = 0; j < l.length; j++) { if (l[j].type == "checkbox" && l[j].name == q) { l[j].checked = true } } } else { if (r == "UnCheckAll") { n[i].checked = false; o = ""; if (s == "true") { var l = document.forms[0].elements; for (j = 0; j < l.length; j++) { if (l[j].type == "checkbox" && l[j].name == q) { l[j].checked = false } } } } else { if (r == "CheckMe" && n[i].checked == true) { o += n[i].value + "," } } } } } var n = document.forms[0].elements; for (i = 0; i < n.length; i++) { if (n[i].type == "checkbox" && n[i].name == q) { if (n[i].checked) { o += n[i].value + "," } } } o = o.substring(0, o.length - 1); var t = ge(hdnSelectedCatagoryIdsClientId); t.value = ""; t.value = o } function SelectAllDeselectAll(d, e) { var f = document.forms[0].elements; for (i = 0; i < f.length; i++) { if (f[i].type == "checkbox" && f[i].name == e) { if (d == "CheckAll") { f[i].checked = true } else { if (d == "UnCheckAll") { f[i].checked = false } } } } } function ChangeFilterCheckboxStatus(m, l) { var n = ge(m); if (n.type == "checkbox" && n.name == l && n.checked == true && n.value == "0") { var o = document.forms[0].elements; for (i = 0; i < o.length; i++) { if (o[i].type == "checkbox" && o[i].name == l && o[i].value != "0") { o[i].checked = false } } } if (n.type == "checkbox" && n.name == l && n.checked == true && n.value != "0") { var o = document.forms[0].elements; for (i = 0; i < o.length; i++) { if (o[i].type == "checkbox" && o[i].name == l && o[i].value == "0") { o[i].checked = false } } } if (n.type == "checkbox" && n.name == l && n.checked == false && n.value != "0") { var o = document.forms[0].elements; for (i = 0; i < o.length; i++) { if (o[i].type == "checkbox" && o[i].name == l && o[i].value == "0") { if (o[i].checked == true) { var r = ge("0"); if (r.type == "checkbox" && r.name == l) { r.checked = false } } } } } var q = ""; var h = document.forms[0].elements; for (i = 0; i < h.length; i++) { if (h[i].type == "checkbox" && h[i].name == "FilterStocks" && h[i].checked == true) { q += h[i].value + "," } } ChangeStyle(q, "divAnchFilterByStock") } function ChangeCheckboxStatus(r, m) { var q = ""; var n = document.forms[0].elements; for (i = 0; i < n.length; i++) { if (n[i].type == "checkbox" && n[i].name == m) { if (r == "CheckAll") { n[i].checked = true; q += n[i].value + "," } else { if (r == "UnCheckAll") { n[i].checked = false; q = "" } else { if (r == "CheckMe" && n[i].checked == true) { var l; if (m == "FilterPrice") { q += n[i].value + "," } if (m == "FilterStocks") { } else { q += n[i].value + "," } } else { if (r == "FeatureCheckMe" && n[i].checked == true) { q += n[i].value + "," } } } } } } q = q.substring(0, q.length - 1); if (m == "FilterManufacturers") { var o = ge("hdnFilterManufacturerIds"); o.value = ""; o.value = q; ChangeStyle(q, "divAnchFilterByManufacturer") } else { if (m == "FilterCatagories") { var s = ge("hdnFilterCatagoryIds"); s.value = ""; s.value = q; ChangeStyle(q, "divAnchFilterByCategory") } else { if (m == "FilterSubCatagories") { ChangeStyle(q, "divAnchFilterBySubCategory") } else { if (m == "FilterStocks") { ChangeStyle(q, "divAnchFilterByStock") } else { if (m == "FilterPrice") { ChangeStyle(q, "divAnchSortByPrice") } else { var t = ge("hdnFilterFeatureIds"); t.value = q; ChangeStyle(q, "divFeatureFilter_" + m) } } } } } } function ChangeStyle(c, d) { if (c == "") { ge(d).className = "disableUpdate" } else { ge(d).className = "update" } } function Show(b) { if (ge(b) != null) { if (ge(b).style.display != B) { ge(b).style.display = B } } } function Hide(b) { if (ge(b) != null) { if (ge(b).style.display != N) { ge(b).style.display = N } } } function ShowAdvancedSearch(g, m) { if ((g.which == 13) || (g.keyCode == 13)) { return true } else { var l = ge(txtSearchTermsClientId).value; var n = ge("hdnDefaultSearchText").value; if ((g.which == 27) || (g.keyCode == 27)) { if (l == n) { ge(txtSearchTermsClientId).value = "" } } else { if (l.length > 2 && l != n) { Hide(m) } else { Show(m) } isadvancedSearchVisible = true; advancedSearchDivID = m; document.onclick = HideAdvancedSearch } } var o = ge(hdnSelectedCatagoryIdsClientId); if (o.value == null) { o.value = "" } var h = $find("CompleteExtender"); h.set_contextKey(o.value) } function HideAdvancedSearch() { if (!isadvancedSearchVisible) { Hide(advancedSearchDivID) } else { isadvancedSearchVisible = false } } function FireSearchClickEvent(b) { fireEvent(ge(b), "click") } function fireEvent(h, f) { var g = h; if (document.createEvent) { var e = document.createEvent("MouseEvents"); e.initEvent(f, true, false); g.dispatchEvent(e) } else { if (document.createEventObject) { g.fireEvent("on" + f) } } } function WatermarkFocus(f) { var e = f.id; var d = ge("hdnDefaultSearchText").value; if (ge(e).value == d) { ge(e).value = "" } ge(e).className = "searchTextActive" } function WatermarkBlur(f) { var e = f.id; var d = ge("hdnDefaultSearchText").value; if (ge(e).value == "") { ge(e).className = "searchTextInActive"; ge(e).value = d } } function Validation(g, m) { try { if (m == "ButtonClick") { var l = ge(txtSearchTermsClientId).value.trim(); var n = ge("hdnDefaultSearchText").value; if (l == "" || l == n) { return false } else { return true } } else { if (m == "KeyPress") { var h = (g.which) ? g.which : event.keyCode; if ((h == 60) || (h == 62)) { return false } else { return true } } } } catch (o) { } } function LoadBrands(m) { var h = "filteractivetab"; var g = ge("hdnFilter"); var f = ge("hdnpopoutFilter"); if (g.value != "") { if ((ge(g.value).className != rba) && (ge(g.value).className != rbaa)) { ge(g.value).className = rb } else { if (ge(g.value).className = rbaa) { ge(g.value).className = rba } } ge(f.value).style.display = N } if (m == "dvBrands") { if (ge(m).className == rb) { ge(m).className = h } else { if (ge(m).className == rba) { ge(m).className = rbaa } } ge("dvmanufacturespopOut").style.display = B; ge("dvcategoriespopOut").style.display = N; ge("dvSortByPricepopOut").style.display = N; ge("dvPricepopOut").style.display = N; ge("dvstockspopOut").style.display = N; if (ge("dvCategories") != null) { if ((ge("dvCategories").className == rbaa) || (ge("dvCategories").className == rba)) { ge("dvCategories").className = rba } else { ge("dvCategories").className = rb } } if (ge("dvPrice") != null) { if ((ge("dvPrice").className != rba) && (ge("dvPrice").className != rbaa)) { ge("dvPrice").className = rb } else { if (ge("dvPrice").className = rbaa) { ge("dvPrice").className = rba } } } if (ge("dvStocks") != null) { if ((ge("dvStocks").className == rbaa) || (ge("dvStocks").className == rba)) { ge("dvStocks").className = rba } else { ge("dvStocks").className = rb } } } else { if (m == "dvCategories") { if (ge(m).className == rb) { ge(m).className = h } else { if (ge(m).className == rba) { ge(m).className = rbaa } } ge("dvmanufacturespopOut").style.display = N; ge("dvcategoriespopOut").style.display = B; ge("dvSortByPricepopOut").style.display = N; ge("dvPricepopOut").style.display = N; ge("dvstockspopOut").style.display = N; if (ge("dvBrands") != null) { if ((ge("dvBrands").className != rba) && (ge("dvBrands").className != rbaa)) { ge("dvBrands").className = rb } else { if (ge("dvBrands").className = rbaa) { ge("dvBrands").className = rba } } } if (ge("dvPrice") != null) { if ((ge("dvPrice").className != rba) && (ge("dvPrice").className != rbaa)) { ge("dvPrice").className = rb } else { if (ge("dvPrice").className = rbaa) { ge("dvPrice").className = rba } } } if (ge("dvStocks") != null) { if ((ge("dvStocks").className == rbaa) || (ge("dvStocks").className == rba)) { ge("dvStocks").className = rba } else { ge("dvStocks").className = rb } } } else { if (m == "dvStocks") { if (ge(m).className == rb) { ge(m).className = h } else { if (ge(m).className == rba) { ge(m).className = rbaa } } ge("dvmanufacturespopOut").style.display = N; ge("dvcategoriespopOut").style.display = N; ge("dvSortByPricepopOut").style.display = N; ge("dvPricepopOut").style.display = N; ge("dvstockspopOut").style.display = B; if (ge("dvBrands") != null) { if ((ge("dvBrands").className != rba) && (ge("dvBrands").className != rbaa)) { ge("dvBrands").className = rb } else { if (ge("dvBrands").className = rbaa) { ge("dvBrands").className = rba } } } if (ge("dvPrice") != null) { if ((ge("dvPrice").className != rba) && (ge("dvPrice").className != rbaa)) { ge("dvPrice").className = rb } else { if (ge("dvPrice").className = rbaa) { ge("dvPrice").className = rba } } } if (ge("dvCategories") != null) { if ((ge("dvCategories").className == rbaa) || (ge("dvCategories").className == rba)) { ge("dvCategories").className = rba } else { ge("dvCategories").className = rb } } } else { if (m == "dvSortByPrice") { ge(m).className = h; ge("dvmanufacturespopOut").style.display = N; ge("dvcategoriespopOut").style.display = N; ge("dvSortByPricepopOut").style.display = B } else { if (m == "dvPrice") { if (ge(m).className == rb) { ge(m).className = h } else { if (ge(m).className == rba) { ge(m).className = rbaa } } ge("dvmanufacturespopOut").style.display = N; ge("dvcategoriespopOut").style.display = N; ge("dvPricepopOut").style.display = B; ge("dvstockspopOut").style.display = N; if (ge("dvBrands") != null) { if ((ge("dvBrands").className != rba) && (ge("dvBrands").className != rbaa)) { ge("dvBrands").className = rb } else { if (ge("dvBrands").className = rbaa) { ge("dvBrands").className = rba } } } if (ge("dvCategories") != null) { if ((ge("dvCategories").className != rba) && (ge("dvCategories").className != rbaa)) { ge("dvCategories").className = rb } else { if (ge("dvCategories").className = rbaa) { ge("dvCategories").className = rba } } } if (ge("dvStocks") != null) { if ((ge("dvStocks").className == rbaa) || (ge("dvStocks").className == rba)) { ge("dvStocks").className = rba } else { ge("dvStocks").className = rb } } } else { var l = m + "_popout"; g.value = m; f.value = l; if (ge(m).className != rba) { ge(m).className = h } else { ge(m).className = rbaa } ge(l).style.display = B; ge("dvmanufacturespopOut").style.display = N; ge("dvcategoriespopOut").style.display = N; ge("dvSortByPricepopOut").style.display = N; ge("dvPricepopOut").style.display = N; ge("dvstockspopOut").style.display = N; if (ge("dvBrands") != null) { if ((ge("dvBrands").className != rba) && (ge("dvBrands").className != rbaa)) { ge("dvBrands").className = rb } else { if (ge("dvBrands").className = rbaa) { ge("dvBrands").className = rba } } } if (ge("dvCategories") != null) { if ((ge("dvCategories").className != rba) && (ge("dvCategories").className != rbaa)) { ge("dvCategories").className = rb } else { if (ge("dvCategories").className = rbaa) { ge("dvCategories").className = rba } } } if (ge("dvPrice") != null) { if ((ge("dvPrice").className != rba) && (ge("dvPrice").className != rbaa)) { ge("dvPrice").className = rb } else { if (ge("dvPrice").className = rbaa) { ge("dvPrice").className = rba } } } ge("dvSortByPrice").className = rb; if (ge("dvStocks") != null) { if ((ge("dvStocks").className == rbaa) || (ge("dvStocks").className == rba)) { ge("dvStocks").className = rba } else { ge("dvStocks").className = rb } } } } } } } } function LoadSearchCategories(h) { if (h != "") { var e = ""; var f; f = h.split(","); for (i = 0; i < f.length; i++) { var g = document.forms[0].elements; for (j = 0; j < g.length; j++) { k = i; if (g[j].type == "checkbox" && g[j].name == "SearchCatagories") { if (g[j].value == f[i]) { g[j].checked = true } else { if (k == 0) { g[j].checked = false } } } } } } } function CloseFilter(d, c) { Hide(d); if (ge(c).className == rbaa) { ge(c).className = rba } else { ge(c).className = rb } } function StartFiltering(u, C, A, J, D, t, z, H) { var x = ""; var v = document.forms[0].elements; for (i = 0; i < v.length; i++) { if (v[i].type == "checkbox" && v[i].name == J) { var I; if (A == "CheckMe" && v[i].checked == true) { if (J == "FilterPrice") { x += v[i].value + "," } else { if (J == "FilterSubCatagories") { x += v[i].value + "," } else { if (J == "FilterStocks") { x += v[i].value + ","; if (v[i].value == "0") { J = "changed"; x = "0" } } else { x += v[i].value + "," } } } } else { if (A == "FeatureCheckMe" && v[i].checked == true) { x += v[i].value + "F##F" } } } } var E = ""; var y; var G; if (u == "Manufacturer") { E = x } else { if (u == "Category") { E = x } else { if (u == "Price") { E = GetCurrentSortOption() } else { if (u == "Stock") { } else { if (u == "FeatureFilter") { E = x } } } } } if (u == "FeatureFilter" || u == "Pricing") { x = x + ","; x = x.replace("F##F,", "") } else { if (x != "1" && x != "" && x != "0") { x = x.substring(0, x.length - 1) } } E = x; var w; if ((E != "") && (E != ",")) { if (D == "DefaultPage") { w = "ctl00_CP_PCC_ucFilters" } else { w = "ctl00_CP_PCC_ucProductsList" } SL(); Anthem_InvokeControlMethod(w, "FilterResults", [E, u, C, "", D, z], function(c) { try { Hide(H); var a = new Array(2); a = c.value; if (a[0] == T) { var d = ge("hdnFilter"); d.value = ""; HL(); goToTop() } else { if (a[0] == F) { SE(a[1]) } } } catch (b) { } }); ShowOrHideAllProducts(T) } } function SetProductListControlId(b) { if (varProductListControlId != "ctl00_CP_PCC_ucProductsList") { varProductListControlId = b } } function SortListView(d, c) { SL(); Anthem_InvokeControlMethod(varProductListControlId, "SortListView", [d, c], function(a) { if (a.value == T) { HL() } }) } function SetSortClass(q) { var o = "divProductNameUp"; var s = "divProductNameDown"; var y = "divProductBrandUp"; var r = "divProductBrandDown"; var w = "divProductPriceUp"; var z = "divProductPriceDown"; var x = "ListViewArrowImgASC"; var u = "ListViewBlackDownArrowImg"; var v = "ListViewArrowImgDESC"; var t = "ListViewBlackUpArrowImg"; if ((ge(o) != null) && (ge(s) != null) && (ge(y) != null) && (ge(r) != null) && (ge(w) != null) && (ge(z) != null)) { if (q == "ProductName ASC") { ge(o).className = v; ge(s).className = t; ge(y).className = v; ge(r).className = x; ge(w).className = v; ge(z).className = x } if (q == "ProductName DESC") { ge(s).className = x; ge(o).className = u; ge(y).className = v; ge(r).className = x; ge(w).className = v; ge(z).className = x } if (q == "ManufacturerName ASC") { ge(y).className = v; ge(r).className = t; ge(o).className = v; ge(s).className = x; ge(w).className = v; ge(z).className = x } if (q == "ManufacturerName DESC") { ge(r).className = x; ge(y).className = u; ge(o).className = v; ge(s).className = x; ge(w).className = v; ge(z).className = x } if (q == "Price ASC") { ge(w).className = v; ge(z).className = t; ge(o).className = v; ge(s).className = x; ge(y).className = v; ge(r).className = x } if (q == "Price DESC") { ge(z).className = x; ge(w).className = u; ge(o).className = v; ge(s).className = x; ge(y).className = v; ge(r).className = x } } } function GetCurrentSortOption() { try { if (ge("rdbSortByPriceAscending").checked) { return ge("rdbSortByPriceAscending").value } else { return ge("rdbSortByPriceDescending").value } } catch (b) { } } function ClearingFilter(m, h, f, g, l) { if (f == "DefaultPage") { cid = "ctl00_CP_PCC_ucFilters" } else { cid = "ctl00_CP_PCC_ucProductsList" } SL(); Anthem_InvokeControlMethod(cid, "FilterResults", ["", m, h, "Clear", f], function(c) { try { Hide(l); var a = new Array(2); a = c.value; if (a[0] == T) { var d = ge("hdnFilter"); d.value = ""; if (m != "Stock") { ge(g).className = rb } HL(); goToTop() } else { if (a[0] == F) { SE(a[1]) } } ge("ctl00_CP_PCC_ucFilters_PHC_PH_pnlAppliedFilters").style.display = N } catch (b) { } }) } function ShowOrHideAllProducts(d) { try { if ((d == T) || (d == "True")) { ge("divUcAllProducts").style.display = N } else { ge("divUcAllProducts").style.display = B } } catch (c) { } } function ShowOrderDetails(b) { if (ge(b).style.display != B) { ge(b).style.display = B } else { ge(b).style.display = N } } function ShowOrderPrint(b) { window.open(ge("ctl00_CP_hdnSiteRoot").value + "SSL/OrderPrint.aspx?OrderId=" + b + "", "", "width=850, height=550, left=65, top=35, scrollbars=yes, menubar=no,resizable=no,directories=no,location=no") } function ge(b) { if (document.getElementById(b) != null) { return document.getElementById(b) } } function SearchFunction() { varProductListControlId = "ctl00_CP_PCC_ucProductsList"; hfCompareProductIdsClientId = "ctl00_CP_PCC_ucProductsList_PHC_hfCompareProductIds"; ProductsCompareContentControlClientId = "ctl00_CP_PCC_ucProductsList_PHC_ucProductsCompareContentControl"; ProductsCompareHiddenFieldControlId = "ctl00_CP_PCC_ucProductsList_PHC_ucProductsCompareContentControl_hdnCompareProductId" } function PrintProductCompare() { var b = ge("hdnShowAllSpecifications").value; window.open(ge(HdnCompareSiteRootClientId).value + "ProductComparePrint.aspx?showAllSpecs=" + b + "", "", "width=800, height=550, left=120, top=50, scrollbars=yes, menubar=no,resizable=no,directories=no,location=no") } function OnProductDetailsClickBookMark(e) { var d = "anchBookMark_" + e; var f = "divBookMark_" + e; if (ge(f).className == "bookmarkbg") { SL(); Anthem_InvokeControlMethod(ProductDetailsClientId, "AddToBookMark", [e], function(c) { try { var a = new Array(3); a = c.value; if (a[0] == T) { ge(f).title = a[1]; ge(f).className = "WishList" } else { if (a[0] == "error") { SE(a[1]) } } } catch (b) { } HL() }) } } function OnComparePageClickBookMark(e) { var d = "anchBookMark_" + e; var f = "divBookMark_" + e; if (ge(d) != null && ge(f) != null) { if (ge(f).className != "WishList") { SL(); Anthem_InvokeControlMethod(ProductsCompareContentControlClientId, "AddToBookMark", [e], function(c) { try { var a = new Array(3); a = c.value; if (a[0] == T) { ge(d).title = a[1]; ge(f).className = a[2]; ge("divwishList").className = "wishListhighlight" } else { if (a[0] == "error") { SE(a[1]) } } } catch (b) { } HL() }) } } } function ProductDetailRelatedProductBookMark(b) { var d = "divDetailPageRelatedBookmark_" + b; if (ge(d).className == "bookmarkbg") { SL(); Anthem_InvokeControlMethod(ProductDetailsClientId, "AddToBookMark", [b], function(g) { try { var a = new Array(3); a = g.value; if (a[0] == T) { ge(d).title = a[1]; ge(d).className = "WishList" } else { if (a[0] == "error") { SE(a[1]) } } } catch (c) { } HL() }) } } function ChangeDivClass(M, Y, A) { var S = "divContentPageBuyNow_" + M; var I = "divContentPageAddToCart_" + M; var R = "anchContentPageAddToCart_" + M; var P = "divProductsListBuyNow_" + M; var Z = "divBrowsingBuyNow_" + M; var O = "anchProductsListAddToCart_" + M; var Q = "divProductsListAddToCart_" + M; var G = "anchProductDetailsAddToCart_" + M; var C = "divProductDetailsAddToCart_" + M; var J = "anchPromotionsAddToCart_" + M; var L = "divPromotionsAddToCart_" + M; var K = "anchRelatedProductsAddToCart_" + M; var E = "divRelatedProductsAddToCart_" + M; var V = "anchBrowsingAddToCart_" + M; var W = "divBrowsingAddToCart_" + M; var X = "anchDetailsRelatedProductsAddToCart_" + M; var D = "divDetailsRelatedProductsAddToCart_" + M; var H = "divListViewAddToCart_" + M; var U = "divCompareAddToCart_" + M; if (ge(P) != null) { ge(P).className = "buy" } if (ge(Z) != null) { ge(Z).className = "buy" } if (ge(S) != null) { ge(S).className = "buy" } if (ge("divProductDetailsBuyNow") != null) { ge("divProductDetailsBuyNow").className = "buy" } if (ge(H) != null) { ge(H).className = "listviewcartbg"; ge(H).title = Y } if (ge(U) != null) { ge(U).className = A; ge(U).title = Y } if (ge(Q) != null) { ge(O).innerHTML = Y; ge(Q).className = A; ge(O).title = Y } if (ge(I) != null) { ge(R).innerHTML = Y; ge(I).className = A; ge(R).title = Y } if (ge(C) != null) { ge(G).innerHTML = Y; ge(C).className = A; ge(G).title = Y } if (ge(L) != null) { ge(J).innerHTML = Y; ge(L).className = A; ge(J).title = Y } if (ge(E) != null) { ge(K).innerHTML = Y; ge(E).className = A; ge(K).title = Y } if (ge(W) != null) { ge(V).innerHTML = Y; ge(W).className = A; ge(V).title = Y } if (ge(D) != null) { ge(X).innerHTML = Y; ge(D).className = A; ge(X).title = Y } } function GetLocalisedText(b) { Anthem_InvokeControlMethod(ProductDetailsClientId, "GetLocalisedText", [b], function(a) { var d = a.value }) } function UpdateReview() { var c = ge(txtTitleClientId).value; var d = ge(txtBodyClientId).value; if (c != "" && d != "") { SL(); ge("divReviewErrorMessage").style.display = N; Anthem_InvokeControlMethod(ProductDetailsClientId, "UpdateReview", [], function(f) { try { var a = new Array(2); a = f.value; if (a[0] == T) { ge("liReviews").className = "selected"; ge("reviews").style.display = B; ge("divfeatures").style.display = N; ge("liSpecifications").className = "featureButton"; ge("divReviewUpdatedMessage").style.display = B; ClearReview(); HL() } else { if (a[0] == F) { SE(a[1]) } } } catch (b) { } }) } else { ge("divReviewUpdatedMessage").style.display = N; ge("divReviewErrorMessage").style.display = B } } function ClearReview() { ge(txtTitleClientId).value = ""; ge(txtBodyClientId).value = "" } function PrintProductDetails(b) { window.open(ge("ctl00_CP_hdnSiteRoot").value + "ProductDetailsPrint.aspx?pid=" + b + "", "", "width=960, height=550, left=30, top=50, scrollbars=yes, menubar=no,resizable=no,directories=no,location=no") } function BuyNowFromContentPage(d) { var c = "divContentPageBuyNow_" + d; if (ge(c) != null) { if (ge(c).className != "itemInCart") { if (d != null) { Anthem_InvokePageMethod("BuyNowFromContentPage", [d], function(a) { }) } } } } function OnClickBookMarkFromContentPage(e) { var d = "anchBookMark_" + e; var f = "divBookMark_" + e; if (ge(f).className == "bookmarkbg") { SL(); Anthem_InvokePageMethod("AddToBookMark", [e], function(a) { ge(f).className = "WishList"; HA() }) } } function AddToCartFromContentPage(e) { var d = "anchContentPageAddToCart_" + e; var f = "divContentPageAddToCart_" + e; if (ge(f).className == "dtlsaddToCard") { SL(); Anthem_InvokePageMethod("AddToShoppingCart", [e, "1"], function(b) { var a = new Array(3); a = b.value; ge(f).className = "dtlsItemInCart"; ge(d).innerHTML = a[1]; HA() }) } } function TrackPageView(b) { pageTracker._trackPageview(b) } function LoadContent(b) { if (b == "reviews") { ge("reviews").style.display = B; ge("liReviews").className = "selected" } else { if (b == "divfilms") { ge("divfilms").style.display = B; ge("divMoviews").className = "selected" } } } function AddToShoppingCart(c, b, a) { var d = b + "_" + c; if (ge(d).className == "itemAddToCard" || ge(d).className == "dtlsaddToCard") { SL(); if (b == "divRelatedProductsAddToCart") { product = "divRelatedProductsAddToCart" } Anthem_InvokeControlMethod(a, "AddToShoppingCart", [c, "1"], function(e) { var g = new Array(3); g = e.value; try { if (g[0] == "true") { ChangeDivStyle(d, g[1], b, c); HA() } } catch (f) { } }) } } function ChangeDivStyle(b, d, c, a) { if (c == "divProductsListAddToCartNew") { ge(b).className = "itemInAddToCard" } else { if (c == "divProductsListAddToCart") { ge(b).className = "dtlsItemInCart"; ge("anchProductsListAddToCart_" + a).innerHTML = d } else { if (c == "divDetailsRelatedProductsAddToCart") { ge(b).className = "itemInAddToCard" } } } ge(b).title = d } function LightBoxAddToCart(b, c) { var a = b; if (c == "BookMarked" || c == "Cart") { ShowShoppingCartLoader(); var d; if (c == "Cart") { d = ge("Id_" + b).value } else { d = ge("QtyId_" + b).value } Anthem_InvokeControlMethod(ShoppingCartContentControlClientId, "AddToShoppingCart", [b, d], function(f) { if (c == "BookMarked") { var g = new Array(2); g = f.value; var e = "divBrowsingAddToCart_" + b; var h = "QtyId_" + b; if (ge(e) != null && ge(h) != null) { ge(e).className = "itemInAddToCard"; ge(e).title = g[1]; ge(h).disabled = true } } }); HideShoppingCartLoader() } else { if (ge(c + "_" + b).className == "itemAddToCard" && c == "CartRelatedProduct") { ShowShoppingCartLoader() } Anthem_InvokeControlMethod(ShoppingCartContentControlClientId, "AddToShoppingCart", [b, 1], function(e) { var g = new Array(3); g = e.value; try { if (g[0] == "true") { if (c == "MainProduct") { ChangeDivClass(b, g[1], g[2]) } else { if (c == "CartRelatedProduct") { ge(c + "_" + b).className = "disablebookmarkbg"; ge(c + "_" + b).style.cursor = "text"; HideShoppingCartLoader() } else { if (c == "divRelatedProductsAddToCart") { ge(c + "_" + b).className = "itemInCartPage"; ge("anchRelatedProductsAddToCart_" + b).innerHTML = g[1] } } } } } catch (f) { } }) } } function LightBoxBookMark(b) { if (ge("BookMarkId_" + b).className == "bookmarkbg") { ShowShoppingCartLoader(); Anthem_InvokeControlMethod(ProductsListControlClientId, "AddToBookMark", [b], function(a) { ge("BookMarkId_" + b).className = "WishList" }); HideShoppingCartLoader() } } function ComparePageAddToCart(c, b, a) { if (ge(b + c).className != "dtlsItemInCart") { SL(); Anthem_InvokeControlMethod(ProductsCompareContentControlClientId, "AddToShoppingCart", [c, 1], function(d) { var e = new Array(3); e = d.value; ge(a + c).innerHTML = e[1]; ge(b + c).className = e[2]; HA() }) } } function PopUP(a) { SL(); newwindow = window.open(a, "name", "height=400,width=700"); HL(); if (window.focus) { newwindow.focus() } return false } function RemoveSelectedProductsFromCart() { ShowShoppingCartLoader(); Anthem_InvokeControlMethod(ShoppingCartClientId, "RemoveProduct", [], function(a) { HideShoppingCartLoader() }) };
