var B = "block"; var N = "none"; var T = "true"; var F = "false"; var rba = "searchResultButonApplied"; var rbaa = "searchResultButonAppliedActive"; var rb = "searchResultButon"; var Prototype = { Version: "1.4.0", ScriptFragment: "(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)", emptyFunction: function() { }, K: function(a) { return a } }; var Class = { create: function() { return function() { this.initialize.apply(this, arguments) } } }; var Abstract = new Object(); Object.extend = function(a, b) { for (property in b) { a[property] = b[property] } return a }; Object.inspect = function(a) { try { if (a == undefined) { return "undefined" } if (a == null) { return "null" } return a.inspect ? a.inspect() : a.toString() } catch (b) { if (b instanceof RangeError) { return "..." } throw b } }; Function.prototype.bind = function() { var b = this, a = $A(arguments), c = a.shift(); return function() { return b.apply(c, a.concat($A(arguments))) } }; Function.prototype.bindAsEventListener = function(b) { var a = this; return function(c) { return a.call(b, c || window.event) } }; Object.extend(Number.prototype, { toColorPart: function() { var a = this.toString(16); if (this < 16) { return "0" + a } return a }, succ: function() { return this + 1 }, times: function(a) { $R(0, this, true).each(a); return this } }); var Try = { these: function() { var a; for (var d = 0; d < arguments.length; d++) { var c = arguments[d]; try { a = c(); break } catch (b) { } } return a } }; var PeriodicalExecuter = Class.create(); PeriodicalExecuter.prototype = { initialize: function(b, a) { this.callback = b; this.frequency = a; 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 a = new Array(); for (var c = 0; c < arguments.length; c++) { var b = arguments[c]; if (typeof b == "string") { b = ge(b) } if (arguments.length == 1) { return b } a.push(b) } return a } Object.extend(String.prototype, { stripTags: function() { return this.replace(/<\/?[^>]+>/gi, "") }, stripScripts: function() { return this.replace(new RegExp(Prototype.ScriptFragment, "img"), "") }, extractScripts: function() { var b = new RegExp(Prototype.ScriptFragment, "img"); var a = new RegExp(Prototype.ScriptFragment, "im"); return (this.match(b) || []).map(function(c) { return (c.match(a) || ["", ""])[1] }) }, evalScripts: function() { return this.extractScripts().map(eval) }, escapeHTML: function() { var b = document.createElement("div"); var a = document.createTextNode(this); b.appendChild(a); return b.innerHTML }, unescapeHTML: function() { var a = document.createElement("div"); a.innerHTML = this.stripTags(); return a.childNodes[0] ? a.childNodes[0].nodeValue : "" }, toQueryParams: function() { var a = this.match(/^\??(.*)$/)[1].split("&"); return a.inject({}, function(d, b) { var c = b.split("="); d[c[0]] = c[1]; return d }) }, toArray: function() { return this.split("") }, camelize: function() { var b = this.split("-"); if (b.length == 1) { return b[0] } var e = this.indexOf("-") == 0 ? b[0].charAt(0).toUpperCase() + b[0].substring(1) : b[0]; for (var a = 1, d = b.length; a < d; a++) { var c = b[a]; e += c.charAt(0).toUpperCase() + c.substring(1) } return e }, inspect: function() { return "'" + this.replace("\\", "\\\\").replace("'", "\\'") + "'" } }); String.prototype.parseQuery = String.prototype.toQueryParams; var $break = new Object(); var $continue = new Object(); var Enumerable = { each: function(c) { var b = 0; try { this._each(function(d) { try { c(d, b++) } catch (e) { if (e != $continue) { throw e } } }) } catch (a) { if (a != $break) { throw a } } }, all: function(b) { var a = true; this.each(function(d, c) { a = a && !!(b || Prototype.K)(d, c); if (!a) { throw $break } }); return a }, any: function(b) { var a = true; this.each(function(d, c) { if (a = !!(b || Prototype.K)(d, c)) { throw $break } }); return a }, collect: function(b) { var a = []; this.each(function(d, c) { a.push(b(d, c)) }); return a }, detect: function(b) { var a; this.each(function(d, c) { if (b(d, c)) { a = d; throw $break } }); return a }, findAll: function(b) { var a = []; this.each(function(d, c) { if (b(d, c)) { a.push(d) } }); return a }, grep: function(a, c) { var b = []; this.each(function(e, d) { var f = e.toString(); if (f.match(a)) { b.push((c || Prototype.K)(e, d)) } }); return b }, include: function(a) { var b = false; this.each(function(c) { if (c == a) { b = true; throw $break } }); return b }, inject: function(a, b) { this.each(function(d, c) { a = b(a, d, c) }); return a }, invoke: function(b) { var a = $A(arguments).slice(1); return this.collect(function(c) { return c[b].apply(c, a) }) }, max: function(b) { var a; this.each(function(d, c) { d = (b || Prototype.K)(d, c); if (d >= (a || d)) { a = d } }); return a }, min: function(b) { var a; this.each(function(d, c) { d = (b || Prototype.K)(d, c); if (d <= (a || d)) { a = d } }); return a }, partition: function(a) { var c = [], b = []; this.each(function(e, d) { ((a || Prototype.K)(e, d) ? c : b).push(e) }); return [c, b] }, pluck: function(b) { var a = []; this.each(function(d, c) { a.push(d[b]) }); return a }, reject: function(b) { var a = []; this.each(function(d, c) { if (!b(d, c)) { a.push(d) } }); return a }, sortBy: function(a) { return this.collect(function(c, b) { return { value: c, criteria: a(c, b)} }).sort(function(c, e) { var d = c.criteria, b = e.criteria; return d < b ? -1 : d > b ? 1 : 0 }).pluck("value") }, toArray: function() { return this.collect(Prototype.K) }, zip: function() { var c = Prototype.K, b = $A(arguments); if (typeof b.last() == "function") { c = b.pop() } var a = [this].concat(b).map($A); return this.map(function(e, d) { c(e = a.pluck(d)); return e }) }, 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(a) { if (!a) { return [] } if (a.toArray) { return a.toArray() } else { var c = []; for (var b = 0; b < a.length; b++) { c.push(a[b]) } return c } }; Object.extend(Array.prototype, Enumerable); Array.prototype._reverse = Array.prototype.reverse; Object.extend(Array.prototype, { _each: function(b) { for (var a = 0; a < this.length; a++) { b(this[a]) } }, 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(a) { return a != undefined || a != null }) }, flatten: function() { return this.inject([], function(b, a) { return b.concat(a.constructor == Array ? a.flatten() : [a]) }) }, without: function() { var a = $A(arguments); return this.select(function(b) { return !a.include(b) }) }, indexOf: function(a) { for (var b = 0; b < this.length; b++) { if (this[b] == a) { return b } } return -1 }, reverse: function(a) { return (a !== false ? this : this.toArray())._reverse() }, shift: function() { var a = this[0]; for (var b = 0; b < this.length - 1; b++) { this[b] = this[b + 1] } this.length--; return a }, inspect: function() { return "[" + this.map(Object.inspect).join(", ") + "]" } }); var Hash = { _each: function(b) { for (key in this) { var c = this[key]; if (typeof c == "function") { continue } var a = [key, c]; a.key = key; a.value = c; b(a) } }, keys: function() { return this.pluck("key") }, values: function() { return this.pluck("value") }, merge: function(a) { return $H(a).inject($H(this), function(b, c) { b[c.key] = c.value; return b }) }, toQueryString: function() { return this.map(function(a) { return a.map(encodeURIComponent).join("=") }).join("&") }, inspect: function() { return "#<Hash:{" + this.map(function(a) { return a.map(Object.inspect).join(": ") }).join(", ") + "}>" } }; function $H(a) { var b = Object.extend({}, a || {}); Object.extend(b, Enumerable); Object.extend(b, Hash); return b } ObjectRange = Class.create(); Object.extend(ObjectRange.prototype, Enumerable); Object.extend(ObjectRange.prototype, { initialize: function(a, b, c) { this.start = a; this.end = b; this.exclusive = c }, _each: function(a) { var b = this.start; do { a(b); b = b.succ() } while (this.include(b)) }, include: function(a) { if (a < this.start) { return false } if (this.exclusive) { return a < this.end } return a <= this.end } }); var $R = function(a, b, c) { return new ObjectRange(a, b, c) }; 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(a) { this.responders._each(a) }, register: function(a) { if (!this.include(a)) { this.responders.push(a) } }, unregister: function(a) { this.responders = this.responders.without(a) }, dispatch: function(b, d, a, c) { this.each(function(e) { if (e[b] && typeof e[b] == "function") { try { e[b].apply(e, [d, a, c]) } catch (f) { } } }) } }; Object.extend(Ajax.Responders, Enumerable); Ajax.Responders.register({ onCreate: function() { Ajax.activeRequestCount++ }, onComplete: function() { Ajax.activeRequestCount-- } }); Ajax.Base = function() { }; Ajax.Base.prototype = { setOptions: function(a) { this.options = { method: "post", asynchronous: true, parameters: "" }; Object.extend(this.options, a || {}) }, 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(b, a) { this.transport = Ajax.getTransport(); this.setOptions(a); this.request(b) }, request: function(d) { var a = this.options.parameters || ""; if (a.length > 0) { a += "&_=" } try { this.url = d; if (this.options.method == "get" && a.length > 0) { this.url += (this.url.match(/\?/) ? "&" : "?") + a } 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 c = this.options.postBody ? this.options.postBody : a; this.transport.send(this.options.method == "post" ? c : null) } catch (b) { this.dispatchException(b) } }, setRequestHeaders: function() { var b = ["X-Requested-With", "XMLHttpRequest", "X-Prototype-Version", Prototype.Version]; if (this.options.method == "post") { b.push("Content-type", "application/x-www-form-urlencoded"); if (this.transport.overrideMimeType) { b.push("Connection", "close") } } if (this.options.requestHeaders) { b.push.apply(b, this.options.requestHeaders) } for (var a = 0; a < b.length; a += 2) { this.transport.setRequestHeader(b[a], b[a + 1]) } }, onStateChange: function() { var a = this.transport.readyState; if (a != 1) { this.respondToReadyState(this.transport.readyState) } }, header: function(a) { try { return this.transport.getResponseHeader(a) } catch (b) { } }, 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(d) { var a = Ajax.Request.Events[d]; var c = this.transport, f = this.evalJSON(); if (a == "Complete") { try { (this.options["on" + this.transport.status] || this.options["on" + (this.responseIsSuccess() ? "Success" : "Failure")] || Prototype.emptyFunction)(c, f) } catch (b) { this.dispatchException(b) } if ((this.header("Content-type") || "").match(/^text\/javascript/i)) { this.evalResponse() } } try { (this.options["on" + a] || Prototype.emptyFunction)(c, f); Ajax.Responders.dispatch("on" + a, this, c, f) } catch (b) { this.dispatchException(b) } if (a == "Complete") { this.transport.onreadystatechange = Prototype.emptyFunction } }, dispatchException: function(a) { (this.options.onException || Prototype.emptyFunction)(this, a); Ajax.Responders.dispatch("onException", this, a) } }); Ajax.Updater = Class.create(); Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { initialize: function(c, a, d) { this.containers = { success: c.success ? $(c.success) : $(c), failure: c.failure ? $(c.failure) : (c.success ? null : $(c)) }; this.transport = Ajax.getTransport(); this.setOptions(d); var b = this.options.onComplete || Prototype.emptyFunction; this.options.onComplete = (function(f, e) { this.updateContent(); b(f, e) }).bind(this); this.request(a) }, updateContent: function() { var b = this.responseIsSuccess() ? this.containers.success : this.containers.failure; var a = this.transport.responseText; if (!this.options.evalScripts) { a = a.stripScripts() } if (b) { if (this.options.insertion) { new this.options.insertion(b, a) } else { Element.update(b, a) } } 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(b, a, c) { this.setOptions(c); this.onComplete = this.options.onComplete; this.frequency = (this.options.frequency || 2); this.decay = (this.options.decay || 1); this.updater = {}; this.container = b; this.url = a; 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(a) { if (this.options.decay) { this.decay = (a.responseText == this.lastText ? this.decay * this.options.decay : 1); this.lastText = a.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(a, b) { var c = ($(b) || document.body).getElementsByTagName("*"); return $A(c).inject([], function(d, e) { if (e.className.match(new RegExp("(^|\\s)" + a + "(\\s|$)"))) { d.push(e) } return d }) }; if (!window.Element) { var Element = new Object() } Object.extend(Element, { visible: function(a) { return $(a).style.display != N }, toggle: function() { for (var b = 0; b < arguments.length; b++) { var a = $(arguments[b]); Element[Element.visible(a) ? "hide" : "show"](a) } }, hide: function() { for (var b = 0; b < arguments.length; b++) { var a = $(arguments[b]); a.style.display = N } }, show: function() { for (var b = 0; b < arguments.length; b++) { var a = $(arguments[b]); a.style.display = "" } }, remove: function(a) { a = $(a); a.parentNode.removeChild(a) }, update: function(b, a) { $(b).innerHTML = a.stripScripts(); setTimeout(function() { a.evalScripts() }, 10) }, getHeight: function(a) { a = $(a); return a.offsetHeight }, classNames: function(a) { return new Element.ClassNames(a) }, hasClassName: function(a, b) { if (!(a = $(a))) { return } return Element.classNames(a).include(b) }, addClassName: function(a, b) { if (!(a = $(a))) { return } return Element.classNames(a).add(b) }, removeClassName: function(a, b) { if (!(a = $(a))) { return } return Element.classNames(a).remove(b) }, cleanWhitespace: function(c) { c = $(c); for (var b = 0; b < c.childNodes.length; b++) { var a = c.childNodes[b]; if (a.nodeType == 3 && !/\S/.test(a.nodeValue)) { Element.remove(a) } } }, empty: function(a) { return $(a).innerHTML.match(/^\s*$/) }, scrollTo: function(c) { c = $(c); var b = c.x ? c.x : c.offsetLeft, a = c.y ? c.y : c.offsetTop; window.scrollTo(b, a) }, getStyle: function(d, a) { d = $(d); var b = d.style[a.camelize()]; if (!b) { if (document.defaultView && document.defaultView.getComputedStyle) { var c = document.defaultView.getComputedStyle(d, null); b = c ? c.getPropertyValue(a) : null } else { if (d.currentStyle) { b = d.currentStyle[a.camelize()] } } } if (window.opera && ["left", "top", "right", "bottom"].include(a)) { if (Element.getStyle(d, "position") == "static") { b = "auto" } } return b == "auto" ? null : b }, setStyle: function(a, b) { a = $(a); for (name in b) { a.style[name.camelize()] = b[name] } }, getDimensions: function(d) { d = $(d); if (Element.getStyle(d, "display") != N) { return { width: d.offsetWidth, height: d.offsetHeight} } var c = d.style; var a = c.visibility; var e = c.position; c.visibility = "hidden"; c.position = "absolute"; c.display = ""; var b = d.clientWidth; var f = d.clientHeight; c.display = N; c.position = e; c.visibility = a; return { width: b, height: f} }, makePositioned: function(a) { a = $(a); var b = Element.getStyle(a, "position"); if (b == "static" || !b) { a._madePositioned = true; a.style.position = "relative"; if (window.opera) { a.style.top = 0; a.style.left = 0 } } }, undoPositioned: function(a) { a = $(a); if (a._madePositioned) { a._madePositioned = undefined; a.style.position = a.style.top = a.style.left = a.style.bottom = a.style.right = "" } }, makeClipping: function(a) { a = $(a); if (a._overflow) { return } a._overflow = a.style.overflow; if ((Element.getStyle(a, "overflow") || "visible") != "hidden") { a.style.overflow = "hidden" } }, undoClipping: function(a) { a = $(a); if (a._overflow) { return } a.style.overflow = a._overflow; a._overflow = undefined } }); var Toggle = new Object(); Toggle.display = Element.toggle; Abstract.Insertion = function(a) { this.adjacency = a }; Abstract.Insertion.prototype = { initialize: function(b, c) { this.element = $(b); this.content = c.stripScripts(); if (this.adjacency && this.element.insertAdjacentHTML) { try { this.element.insertAdjacentHTML(this.adjacency, this.content) } catch (a) { if (this.element.tagName.toLowerCase() == "tbody") { this.insertContent(this.contentFromAnonymousTable()) } else { throw a } } } else { this.range = this.element.ownerDocument.createRange(); if (this.initializeRange) { this.initializeRange() } this.insertContent([this.range.createContextualFragment(this.content)]) } setTimeout(function() { c.evalScripts() }, 10) }, contentFromAnonymousTable: function() { var a = document.createElement("div"); a.innerHTML = "<table><tbody>" + this.content + "</tbody></table>"; return $A(a.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(a) { a.each((function(b) { this.element.parentNode.insertBefore(b, 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(a) { a.reverse(false).each((function(b) { this.element.insertBefore(b, 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(a) { a.each((function(b) { this.element.appendChild(b) }).bind(this)) } }); Insertion.After = Class.create(); Insertion.After.prototype = Object.extend(new Abstract.Insertion("afterEnd"), { initializeRange: function() { this.range.setStartAfter(this.element) }, insertContent: function(a) { a.each((function(b) { this.element.parentNode.insertBefore(b, this.element.nextSibling) }).bind(this)) } }); Element.ClassNames = Class.create(); Element.ClassNames.prototype = { initialize: function(a) { this.element = $(a) }, _each: function(a) { this.element.className.split(/\s+/).select(function(b) { return b.length > 0 })._each(a) }, set: function(a) { this.element.className = a }, add: function(a) { if (this.include(a)) { return } this.set(this.toArray().concat(a).join(" ")) }, remove: function(a) { if (!this.include(a)) { return } this.set(this.select(function(b) { return b != a }).join(" ")) }, toString: function() { return this.toArray().join(" ") } }; Object.extend(Element.ClassNames.prototype, Enumerable); var Field = { clear: function() { for (var a = 0; a < arguments.length; a++) { $(arguments[a]).value = "" } }, focus: function(a) { $(a).focus() }, present: function() { for (var a = 0; a < arguments.length; a++) { if ($(arguments[a]).value == "") { return false } } return true }, select: function(a) { $(a).select() }, activate: function(a) { a = $(a); a.focus(); if (a.select) { a.select() } } }; var Form = { serialize: function(b) { var c = Form.getElements($(b)); var a = new Array(); for (var e = 0; e < c.length; e++) { var d = Form.Element.serialize(c[e]); if (d) { a.push(d) } } return a.join("&") }, getElements: function(d) { d = $(d); var a = new Array(); for (tagName in Form.Element.Serializers) { var b = d.getElementsByTagName(tagName); for (var c = 0; c < b.length; c++) { a.push(b[c]) } } return a }, getInputs: function(g, d, e) { g = $(g); var b = g.getElementsByTagName("input"); if (!d && !e) { return b } var a = new Array(); for (var f = 0; f < b.length; f++) { var c = b[f]; if ((d && c.type != d) || (e && c.name != e)) { continue } a.push(c) } return a }, disable: function(a) { var b = Form.getElements(a); for (var d = 0; d < b.length; d++) { var c = b[d]; c.blur(); c.disabled = T } }, enable: function(a) { var b = Form.getElements(a); for (var d = 0; d < b.length; d++) { var c = b[d]; c.disabled = "" } }, findFirstElement: function(a) { return Form.getElements(a).find(function(b) { return b.type != "hidden" && !b.disabled && ["input", "select", "textarea"].include(b.tagName.toLowerCase()) }) }, focusFirstElement: function(a) { Field.activate(Form.findFirstElement(a)) }, reset: function(a) { $(a).reset() } }; Form.Element = { serialize: function(d) { d = $(d); var b = d.tagName.toLowerCase(); var a = Form.Element.Serializers[b](d); if (a) { var c = encodeURIComponent(a[0]); if (c.length == 0) { return } if (a[1].constructor != Array) { a[1] = [a[1]] } return a[1].map(function(e) { return c + "=" + encodeURIComponent(e) }).join("&") } }, getValue: function(b) { b = $(b); var a = b.tagName.toLowerCase(); var c = Form.Element.Serializers[a](b); if (c) { return c[1] } } }; Form.Element.Serializers = { input: function(a) { switch (a.type.toLowerCase()) { case "submit": case "hidden": case "password": case "text": return Form.Element.Serializers.textarea(a); case "checkbox": case "radio": return Form.Element.Serializers.inputSelector(a) } return false }, inputSelector: function(a) { if (a.checked) { return [a.name, a.value] } }, textarea: function(a) { return [a.name, a.value] }, select: function(a) { return Form.Element.Serializers[a.type == "select-one" ? "selectOne" : "selectMany"](a) }, selectOne: function(a) { var b = "", d, c = a.selectedIndex; if (c >= 0) { d = a.options[c]; b = d.value; if (!b && !("value" in d)) { b = d.text } } return [a.name, b] }, selectMany: function(a) { var b = new Array(); for (var e = 0; e < a.length; e++) { var d = a.options[e]; if (d.selected) { var c = d.value; if (!c && !("value" in d)) { c = d.text } b.push(c) } } return [a.name, b] } }; var $F = Form.Element.getValue; Abstract.TimedObserver = function() { }; Abstract.TimedObserver.prototype = { initialize: function(b, c, a) { this.frequency = c; this.element = $(b); this.callback = a; this.lastValue = this.getValue(); this.registerCallback() }, registerCallback: function() { setInterval(this.onTimerEvent.bind(this), this.frequency * 1000) }, onTimerEvent: function() { var a = this.getValue(); if (this.lastValue != a) { this.callback(this.element, a); this.lastValue = a } } }; 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(a, b) { this.element = $(a); this.callback = b; this.lastValue = this.getValue(); if (this.element.tagName.toLowerCase() == "form") { this.registerFormCallbacks() } else { this.registerCallback(this.element) } }, onElementEvent: function() { var a = this.getValue(); if (this.lastValue != a) { this.callback(this.element, a); this.lastValue = a } }, registerFormCallbacks: function() { var b = Form.getElements(this.element); for (var a = 0; a < b.length; a++) { this.registerCallback(b[a]) } }, registerCallback: function(a) { if (a.type) { switch (a.type.toLowerCase()) { case "checkbox": case "radio": Event.observe(a, "click", this.onElementEvent.bind(this)); break; case "password": case "text": case "textarea": case "select-one": case "select-multiple": Event.observe(a, "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(a) { return a.target || a.srcElement }, isLeftClick: function(a) { return (((a.which) && (a.which == 1)) || ((a.button) && (a.button == 1))) }, pointerX: function(a) { return a.pageX || (a.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)) }, pointerY: function(a) { return a.pageY || (a.clientY + (document.documentElement.scrollTop || document.body.scrollTop)) }, stop: function(a) { if (a.preventDefault) { a.preventDefault(); a.stopPropagation() } else { a.returnValue = false; a.cancelBubble = true } }, findElement: function(a, c) { var b = Event.element(a); while (b.parentNode && (!b.tagName || (b.tagName.toUpperCase() != c.toUpperCase()))) { b = b.parentNode } return b }, observers: false, _observeAndCache: function(b, a, d, c) { if (!this.observers) { this.observers = [] } if (b.addEventListener) { this.observers.push([b, a, d, c]); b.addEventListener(a, d, c) } else { if (b.attachEvent) { this.observers.push([b, a, d, c]); b.attachEvent("on" + a, d) } } }, unloadCache: function() { if (!Event.observers) { return } for (var a = 0; a < Event.observers.length; a++) { Event.stopObserving.apply(this, Event.observers[a]); Event.observers[a][0] = null } Event.observers = false }, observe: function(b, a, d, c) { var b = $(b); c = c || false; if (a == "keypress" && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || b.attachEvent)) { a = "keydown" } this._observeAndCache(b, a, d, c) }, stopObserving: function(b, a, d, c) { var b = $(b); c = c || false; if (a == "keypress" && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || b.detachEvent)) { a = "keydown" } if (b.removeEventListener) { b.removeEventListener(a, d, c) } else { if (b.detachEvent) { b.detachEvent("on" + a, d) } } } }); 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(c) { var b = 0, a = 0; do { b += c.scrollTop || 0; a += c.scrollLeft || 0; c = c.parentNode } while (c); return [a, b] }, cumulativeOffset: function(c) { var b = 0, a = 0; do { b += c.offsetTop || 0; a += c.offsetLeft || 0; c = c.offsetParent } while (c); return [a, b] }, positionedOffset: function(c) { var b = 0, a = 0; do { b += c.offsetTop || 0; a += c.offsetLeft || 0; c = c.offsetParent; if (c) { p = Element.getStyle(c, "position"); if (p == "relative" || p == "absolute") { break } } } while (c); return [a, b] }, offsetParent: function(a) { if (a.offsetParent) { return a.offsetParent } if (a == document.body) { return a } while ((a = a.parentNode) && a != document.body) { if (Element.getStyle(a, "position") != "static") { return a } } return document.body }, within: function(c, b, a) { if (this.includeScrollOffsets) { return this.withinIncludingScrolloffsets(c, b, a) } this.xcomp = b; this.ycomp = a; this.offset = this.cumulativeOffset(c); return (a >= this.offset[1] && a < this.offset[1] + c.offsetHeight && b >= this.offset[0] && b < this.offset[0] + c.offsetWidth) }, withinIncludingScrolloffsets: function(d, c, b) { var a = this.realOffset(d); this.xcomp = c + a[0] - this.deltaX; this.ycomp = b + a[1] - this.deltaY; this.offset = this.cumulativeOffset(d); return (this.ycomp >= this.offset[1] && this.ycomp < this.offset[1] + d.offsetHeight && this.xcomp >= this.offset[0] && this.xcomp < this.offset[0] + d.offsetWidth) }, overlap: function(b, a) { if (!b) { return 0 } if (b == "vertical") { return ((this.offset[1] + a.offsetHeight) - this.ycomp) / a.offsetHeight } if (b == "horizontal") { return ((this.offset[0] + a.offsetWidth) - this.xcomp) / a.offsetWidth } }, clone: function(c, a) { c = $(c); a = $(a); a.style.position = "absolute"; var b = this.cumulativeOffset(c); a.style.top = b[1] + "px"; a.style.left = b[0] + "px"; a.style.width = c.offsetWidth + "px"; a.style.height = c.offsetHeight + "px" }, page: function(b) { var c = 0, a = 0; var d = b; do { c += d.offsetTop || 0; a += d.offsetLeft || 0; if (d.offsetParent == document.body) { if (Element.getStyle(d, "position") == "absolute") { break } } } while (d = d.offsetParent); d = b; do { c -= d.scrollTop || 0; a -= d.scrollLeft || 0 } while (d = d.parentNode); return [a, c] }, clone: function(e, a) { var c = Object.extend({ setLeft: true, setTop: true, setWidth: true, setHeight: true, offsetTop: 0, offsetLeft: 0 }, arguments[2] || {}); e = $(e); var f = Position.page(e); a = $(a); var b = [0, 0]; var d = null; if (Element.getStyle(a, "position") == "absolute") { d = Position.offsetParent(a); b = Position.page(d) } if (d == document.body) { b[0] -= document.body.offsetLeft; b[1] -= document.body.offsetTop } if (c.setLeft) { a.style.left = (f[0] - b[0] + c.offsetLeft) + "px" } if (c.setTop) { a.style.top = (f[1] - b[1] + c.offsetTop) + "px" } if (c.setWidth) { a.style.width = e.offsetWidth + "px" } if (c.setHeight) { a.style.height = e.offsetHeight + "px" } }, absolutize: function(d) { d = $(d); if (d.style.position == "absolute") { return } Position.prepare(); var f = Position.positionedOffset(d); var b = f[1]; var a = f[0]; var e = d.clientWidth; var c = d.clientHeight; d._originalLeft = a - parseFloat(d.style.left || 0); d._originalTop = b - parseFloat(d.style.top || 0); d._originalWidth = d.style.width; d._originalHeight = d.style.height; d.style.position = "absolute"; d.style.top = b + "px"; d.style.left = a + "px"; d.style.width = e + "px"; d.style.height = c + "px" }, relativize: function(b) { b = $(b); if (b.style.position == "relative") { return } Position.prepare(); b.style.position = "relative"; var a = parseFloat(b.style.top || 0) - (b._originalTop || 0); var c = parseFloat(b.style.left || 0) - (b._originalLeft || 0); b.style.top = a + "px"; b.style.left = c + "px"; b.style.height = b._originalHeight; b.style.width = b._originalWidth } }; if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { Position.cumulativeOffset = function(c) { var b = 0, a = 0; do { b += c.offsetTop || 0; a += c.offsetLeft || 0; if (c.offsetParent == document.body) { if (Element.getStyle(c, "position") == "absolute") { break } } c = c.offsetParent } while (c); return [a, b] } } 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(b) { Element.hide(b) }); if ($("NaviWeboverlay")) { Element.remove("NaviWeboverlay") } } }; function pageLoad(d, e) { var f = $find("CompleteExtender"); f._popupBehavior._element.style.zIndex = 6000 } NaviWebLightBox.base = Class.create(); NaviWebLightBox.base.prototype = { initialize: function(c, d) { HA(); this.element = $(c); this.options = Object.extend({ lightboxClassName: "lightbox", closeOnOverlayClick: false, externalControl: false }, d || {}); 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(b) { Element.removeClassName(this.element, this.options.lightboxClassName); Element.hide(this.element); Element.remove("NaviWeboverlay"); return false }, center: function() { var g = 0; var o = 0; if (typeof (window.innerWidth) == "number") { g = window.innerWidth; o = window.innerHeight } else { if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { g = document.documentElement.clientWidth; o = document.documentElement.clientHeight } else { if (document.body && (document.body.clientWidth || document.body.clientHeight)) { g = document.body.clientWidth; o = document.body.clientHeight } } } this.element.style.position = "absolute"; this.element.style.zIndex = 1001; var n = 0; if (document.documentElement && document.documentElement.scrollTop) { n = document.documentElement.scrollTop } else { if (document.body && document.body.scrollTop) { n = document.body.scrollTop } else { if (window.pageYOffset) { n = window.pageYOffset } else { if (window.scrollY) { n = window.scrollY } } } } var h = Element.getDimensions(this.element); var l = (g - h.width) / 2; var m = (o - h.height) / 2 + n; l = (l < 0) ? 0 : l; m = (m < 0) ? 0 : m; this.element.style.left = l + "px"; this.element.style.top = m + "px" } }; 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 b = new Array(3); b = m.value; try { if (b[0] == T) { var l = "anchBookMark_" + c; var a = "divBookMark_" + c; if (ge(l) != null && ge(a) != null) { ge(l).title = b[1]; ge(a).className = b[2] } HideWishListLoader() } else { if (b[0] == F) { } } } catch (h) { } }) } function HideButtons() { ge("divRemoveSelected").style.display = N; ge("divAddSelected").style.display = N } function HideBanner() { ge("banner").style.display = N } function ShowCart(b) { if (b == T) { ge("divAddSelected").style.display = B } else { ge("divAddSelected").style.display = N } } function ShowButtons() { ge("divRemoveSelected").style.display = B; ge("divAddSelected").style.display = B } 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(g) { var e = new Array(3); e = g.value; try { if (e[0] == T) { for (var d = 0; d < c.split(",").length; d++) { var o = "anchBookMark_" + c.split(",")[d]; var h = "divBookMark_" + c.split(",")[d]; if (ge(o) != null && ge(h) != null) { ge(o).title = e[1]; ge(h).className = e[2] } } HideWishListLoader() } else { if (e[0] == F) { } } } catch (f) { } 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) { if (a == HistoryBehaviourId) { if (ge("ctl00_UserWebShopContentControl1_HistoryAndBookmarksControl1_divHistory") != null) { ge("ctl00_UserWebShopContentControl1_HistoryAndBookmarksControl1_divHistory").className = "select" } ge("divBookmarks").className = "selectActv" } else { if (a == WishListBehaviourId) { ge("divBookmarks").className = "select"; if (ge("ctl00_UserWebShopContentControl1_HistoryAndBookmarksControl1_divHistory") != null) { ge("ctl00_UserWebShopContentControl1_HistoryAndBookmarksControl1_divHistory").className = "selectActv" } } } ShowWishListLoader(); Anthem_InvokeControlMethod(bookmarksControlID, "LoadHistoryAndBookmarks", [a, true], function(b) { HideWishListLoader() }) } function HideSelectAndDeselectInBookmark() { ge("divBookmarkSelectAll").style.display = N; ge("divBookmarkUnSelectAll").style.display = N } function ShowSelectAndDeselectInBookmark() { ge("divBookmarkSelectAll").style.display = B; ge("divBookmarkUnSelectAll").style.display = B } 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 == "divReviews") { ge(b).className = "featureButtonActv"; ge("reviews").style.display = B; if (ge("divMoviews") != null) { ge("divMoviews").className = "featureButton"; ge("divfilms").style.display = N } if (ge("divspecifications") != null) { ge("divfeatures").style.display = N; ge("divspecifications").className = "featureButton" } } else { if (b == "divMoviews") { ge(b).className = "featureButtonActv"; ge("divfilms").style.display = B; if (ge("divspecifications") != null) { ge("divspecifications").className = "featureButton"; ge("divfeatures").style.display = N } if (ge("divReviews") != null) { ge("divReviews").className = "featureButton"; ge("reviews").style.display = N } } else { ge(b).className = "featureButtonActv"; ge("divfeatures").style.display = B; if (ge("divMoviews") != null) { ge("divMoviews").className = "featureButton"; ge("divfilms").style.display = N } if (ge("divReviews") != null) { ge("divReviews").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) { ShowRelatedProductsLoader(); Anthem_InvokeControlMethod(RelatedProductsControlClientId, "BindRelatedProducts", [b, "ShoppingCart", defaultNumberOfRelatedProducts], function(a) { HideRelatedProductsLoader() }) } function ShowAllRelatedProducts(b) { if (b == "ProductDetailsPage") { SL(); Anthem_InvokeControlMethod(ProductDetailsClientId, "BindAllRelatedProducts", [], function(a) { HL() }) } else { ShowRelatedProductsLoader(); Anthem_InvokeControlMethod(RelatedProductsControlClientId, "BindAllRelatedProducts", [], function(a) { HideRelatedProductsLoader() }) } } function DeleteShoppingCartItem(f, e) { var d = "divListViewAddToCart_" + e; ShowShoppingCartLoader(); Anthem_InvokeControlMethod(ShoppingCartClientId, "DeleteShoppingCartId", [f], function(c) { var a = new Array(4); a = c.value; try { if (a[0] == T) { ChangeDivClass(e, a[1], a[2]); if (ge(d) != null) { ge(d).className = "listviewaddcartbg" } if (a[3] == "CartEmpty") { DisableShoppingcartCheckoutButton(); HideSelectAndDeselectInCheckout() } HideShoppingCartLoader() } else { if (a[0] == F) { } } } catch (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(d) { try { selectedCartItem = ge(hdnFirstCartItemIdClientId).value; if (selectedCartItem != "") { ge(selectedCartItem).className = "item" } ge(d).className = "itemActv"; ge(hdnFirstCartItemIdClientId).value = d } 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() { ge("divShoppingcartCheckout").className = "buttondisable" } function HideSelectAndDeselectInCheckout() { ge("divCheckoutSelectAll").style.display = N; ge("divCheckoutUnselectAll").style.display = N } function ShowSelectAndDeselectInCheckout() { ge("divCheckoutSelectAll").style.display = B; ge("divCheckoutUnselectAll").style.display = B } function LoadCartList() { SL(); Anthem_InvokeControlMethod(UserWebShopContentControlClientId, "BindCartList", [], function(e) { try { var f = new Array(2); f = e.value; if (f[0] == T) { ShowSelectAndDeselectInCheckout(); HL(); new NaviWebLightBox.base("dvShoppingCart"); ge("divShoppingcartCheckout").className = "button" } else { if (f[0] == "CartEmpty") { HL(); ShowCartEmptyErrorMessage(f[1]) } else { if (f[0] == F) { SE(f[1]) } } } } catch (d) { } }) } 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 (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() { SL(); Anthem_InvokeControlMethod(ProductsCompareContentControlClientId, "BindCompareProductsFromProductList", [ge(hfCompareProductIdsClientId).value, true], function(f) { var g = f.value; if (g == T) { var h = ge("Inner"); var e = ge(ProductsCompareHiddenFieldControlId).value.split(","); h.style.width = e.length * 200 + 300 + "px"; new NaviWebLightBox.base("dvProductsCompareContentControl"); ge("divNaviWebLoader").style.display = N } else { HL() } }) } 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; Anthem_InvokeControlMethod(ProductsCompareContentControlClientId, "BindCompareProducts", [b], function(a) { var e = ge("Inner"); var f = ge(ProductsCompareHiddenFieldControlId).value.split(","); e.style.width = f.length * 200 + 300 + "px"; if (b == "true") { ge("spnAllSpecifications").className = "allSpecificationsTxt"; ge("spnMatchingSpecifications").className = "matchingSpecificationsTxt" } if (b == "false") { ge("spnAllSpecifications").className = "matchingSpecificationsTxt"; ge("spnMatchingSpecifications").className = "allSpecificationsTxt" } new NaviWebLightBox.base("dvProductsCompareContentControl") }) } 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) { hfCompareProductIdsClientId = "ctl00_CP_PCC_ucAllProducts_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(c) { var d = ge(c).className; if (d == "button") { SL(); Anthem_InvokeControlMethod(ShoppingCartClientId, "RedirectToCheckOut", [], function(a) { }) } } 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 = "myaccount.aspx"; return false } else { if (e[0] == F) { window.location.href = "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("divPasswordRecoveryLoader").style.display = B } function HidePasswordRecoveryLoader() { ge("divPasswordRecoveryLoader").style.display = N } 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() { HA() } 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(e) { var d = "anchBookMark_" + e; var f = "divBookMark_" + e; if (ge(d) != null && ge(f) != null) { if (ge(f).className != "markhighlight") { SL(); Anthem_InvokeControlMethod(ProductsListControlClientId, "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 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 != "itemInCart" && ge(g).className != "listviewcartbg")) { 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 ((f == "") || (ge(f).className != "itemInCart" && ge(f).className != "listviewcartbg")) { 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() } } } } } } } 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) { } }) } } } } 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 = "searchResultButonActv"; 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").className == rbaa) || (ge("dvCategories").className == rba)) { ge("dvCategories").className = rba } else { ge("dvCategories").className = rb } 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").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").className != rba) && (ge("dvBrands").className != rbaa)) { ge("dvBrands").className = rb } else { if (ge("dvBrands").className = rbaa) { ge("dvBrands").className = rba } } 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").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 (typeof (ge("dvBrands")) != "undefined") { if ((ge("dvBrands").className != rba) && (ge("dvBrands").className != rbaa)) { ge("dvBrands").className = rb } else { if (ge("dvBrands").className = rbaa) { ge("dvBrands").className = rba } } } if (typeof (ge("dvPrice")) != "undefined") { if ((ge("dvPrice").className != rba) && (ge("dvPrice").className != rbaa)) { ge("dvPrice").className = rb } else { if (ge("dvPrice").className = rbaa) { ge("dvPrice").className = rba } } } if (typeof (ge("dvCategories")) != "undefined") { 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").className != rba) && (ge("dvBrands").className != rbaa)) { ge("dvBrands").className = rb } else { if (ge("dvBrands").className = rbaa) { ge("dvBrands").className = rba } } 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").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").className != rba) && (ge("dvBrands").className != rbaa)) { ge("dvBrands").className = rb } else { if (ge("dvBrands").className = rbaa) { ge("dvBrands").className = rba } } 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").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").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("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("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(d) != null && ge(f) != null) { if (ge(f).className != "markhighlight") { SL(); Anthem_InvokeControlMethod(ProductDetailsClientId, "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 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("divReviews").className = "featureButtonActv"; ge("reviews").style.display = B; ge("divfeatures").style.display = N; ge("divspecifications").className = "featureButton"; ge("divReviewUpdatedMessage").style.display = B; HL() } else { if (a[0] == F) { SE(a[1]) } } } catch (b) { } }) } else { ge("divReviewUpdatedMessage").style.display = N; ge("divReviewErrorMessage").style.display = B } } function LoadSpecifications(b) { if (b == "divReviews") { ge(b).className = "featureButtonActv"; ge("reviews").style.display = B; if (ge("divMoviews") != null) { ge("divMoviews").className = "featureButton"; ge("divfilms").style.display = N } if (ge("divspecifications") != null) { ge("divfeatures").style.display = N; ge("divspecifications").className = "featureButton" } } else { if (b == "divMoviews") { ge(b).className = "featureButtonActv"; ge("divfilms").style.display = B; if (ge("divspecifications") != null) { ge("divspecifications").className = "featureButton"; ge("divfeatures").style.display = N } if (ge("divReviews") != null) { ge("divReviews").className = "featureButton"; ge("reviews").style.display = N } } else { ge(b).className = "featureButtonActv"; ge("divfeatures").style.display = B; if (ge("divMoviews") != null) { ge("divMoviews").className = "featureButton"; ge("divfilms").style.display = N } if (ge("divReviews") != null) { ge("divReviews").className = "featureButton"; ge("reviews").style.display = N } } } } function ClearReview() { ge(txtTitleClientId).value = ""; ge(txtBodyClientId).value = "" } function PrintProductDetails(b) { window.open("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(d) != null && ge(f) != null) { if (ge(f).className != "markhighlight") { SL(); Anthem_InvokePageMethod("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 makeMenuRequest(h, l, m) { l = l || createMenu; h = h ? "?language=" + h : ""; var g = "MenuHandler.ashx" + h + "&userlogedIn=" + m; var f = YAHOO.util.Connect.asyncRequest("GET", g, { success: function(a) { var b = YAHOO.lang.JSON.parse(a.responseText); if (l) { l(b) } }, failure: function(a) { alert("XHR Failure") } }, null) } function createMenu(e) { ge("menu").style.visibility = "visible"; ge("menu").style.overflow = "hidden"; ge("menu").style.height = "auto"; ge("menubottom").style.visibility = "hidden"; ge("menubottom").style.overflow = "hidden"; var d = new YAHOO.widget.MenuBar("productsandservices", { showdelay: 0, autosubmenudisplay: true, position: "static", hidedelay: 750, lazyload: true, minscrollheight: 160 }); var f = e; d.subscribe("beforeRender", function() { if (this.getRoot() == this) { for (var a = 0, b = f.length; a < b; a++) { this.getItem(a).cfg.setProperty("submenu", f[a]) } } }); d.render(); ge("menu").style.visibility = "visible"; ge("menu").style.overflow = "visible"; ge("menu").style.height = "auto"; ge("menubottom").style.visibility = "visible"; ge("menubottom").style.overflow = "visible" } function LoadJasonScript(d, c) { YAHOO.util.Event.onContentReady("productsandservices", function() { makeMenuRequest(d, createMenu, c) }) } function TrackPageView(b) { pageTracker._trackPageview(b) } function LoadContent(b) { if (b == "reviews") { ge("reviews").style.display = B } else { if (b == "divfilms") { ge("divfilms").style.display = B } } } function HideRelatedProductHeader() { document.getElementById("divRelatedProducts").style.display = "none"; document.getElementById("detailLeft").style.display = "none" } function LoadContent(a) { if (a == "reviews") { ge("reviews").style.display = B; ge("divReviews").className = "featureButtonActv" } else { if (a == "divfilms") { ge("divfilms").style.display = B; ge("divMoviews").className = "featureButtonActv" } } };