 /*!
  * Global library Philips Internet (Stripped Internet version)
  * Version: 4.6.8
  * Build: 2
  * Date: November 19, 2009
  */


var _page = (function () {

	Function.prototype.bindArgs = function (scope, args, event) {
		var reference = this;
		return function (e) {
			reference.apply(scope, (event ?(args || []).concat([(e || window.event)]): (args || arguments))); // Only append event as last element when args and event has been set.
		};
	};

	if (typeof Array.prototype.push !== "function") {
		Array.prototype.push = function (value) {
			this[this.length] = value;
		};
	}

	var Core = function () {

		var util = {
			trim: function (str) {
				return str.replace(/^\s+|\s+$/g, '');
			},
			clean: function (str) {
				return util.trim(str.replace(/\s{2,}/g, ' '));
			},
			hasElement: function (obj, elem) {
				for (var i = 0; i < obj.length; i += 1) {
					if (obj[i] === elem) {
						return true;
					}
				}
				return false;
			},
			getTime: function () {
				return (new Date().getTime());
			}
		},

			dom = (function () {
				var d = document,
					l = d.layers,
					op = navigator.userAgent.indexOf('Opera') !== -1,
					px = 'px';

				return {
					hasClass: function (el, sClassName) {
						if (el) {
							return (el.className.indexOf(sClassName, ' ') > -1)? true: false;
						}
					},
					addClass: function (el, sClassName) {
						if (el && !dom.hasClass(el, sClassName)) {
							el.className = util.clean(el.className + ' ' + sClassName);
						}
					},
					setClass: function (el, sClassName) {
						if (el) {
							el.className = sClassName;
						}
					},
					removeClass: function (el, sClassName) {
						if (el) {
							el.className = util.clean(el.className.replace(new RegExp('(^|\\s)' + sClassName + '(?:\\s|$)'), '$1'));
						}
					},
					findPosY: function (obj) {
						var curtop = 0;
						if (obj) {
							if (obj.offsetParent) {
								while (obj.offsetParent) {
									curtop += obj.offsetTop;
									obj = obj.offsetParent;
								}
							} else if (obj.y) {
								curtop += obj.y;
							}
						}
						return curtop;
					},
					findPosX: function (obj) {
						var curleft = 0;
						if (obj) {
							if (obj.offsetParent) {
								while (obj.offsetParent) {
									curleft += obj.offsetLeft;
									obj = obj.offsetParent;
								}
							} else if (obj.x) {
								curleft += obj.x;
							}
						}
						return curleft;
					},
					getScreenHeight: function () {
						var pos = "";
						if (typeof self.innerHeight !== "undefined") {
							pos = self.innerHeight;
						} else if (document.documentElement && document.documentElement.clientHeight) {
							pos = document.documentElement.clientHeight;
						} else if (document.body) {
							pos = document.body.clientHeight;
						}
						return pos;
					},
					getScreenWidth: function () {
						var pos = "";
						if (typeof self.innerWidth !== "undefined") {
							pos = self.innerWidth;
						} else if (document.documentElement && document.documentElement.clientWidth) {
							pos = document.documentElement.clientWidth;
						} else if (document.body) {
							pos = document.body.clientWidth;
						}
						return pos;
					},
					getScrollPosTop: function () {
						var pos = "";
						if (typeof self.pageYOffset !== "undefined") {
							pos = self.pageYOffset;
						} else if (document.documentElement && document.documentElement.scrollTop) {
							pos = document.documentElement.scrollTop;
						} else if (document.body) {
							pos = document.body.scrollTop;
						}
						return pos;
					},
					setOpacity: function (obj, opacity) {
						if (opacity === 0) {
							if (obj.style.visibility !== "hidden") {
								obj.style.visibility = "hidden";
							}
						} else {
							if (obj.style.visibility !== "visible") {
								obj.style.visibility = "visible";
							}
						}
						if (!obj.currentStyle || !obj.currentStyle.hasLayout) {
							obj.style.zoom = 1;
						}
						if (_page.browser.isIE) {
							if (opacity === 1) {
								try {
									obj.style.cssText = obj.style.cssText.replace(/filter:[^;]*;/i, "");
								} catch (e) {
									obj.style.filter = '';
								}
							} else {
								obj.style.filter = "alpha(opacity=" + opacity * 100 + ")";
							}
						}
						obj.style.opacity = opacity;
					},
					discardElement: function (el) {
						var garbageBin = document.getElementById('p-ieleakgarbagebin');
						if (!garbageBin) {
							garbageBin = document.createElement('div');
							garbageBin.id = 'p-ieleakgarbagebin';
							garbageBin.style.display = 'none';
							document.body.appendChild(garbageBin);
						}
						garbageBin.appendChild(el);
						garbageBin.innerHTML = '';
					},
					gE: function (e, f) {
						if (l) {
							var V, W, t;
							f = (f)? f: self;
							V = f.document.layers;
							if (V) {
								if (V[e]) {
									return V[e];
								}
								for (W = 0;W < V.length; W += 1) {
									t = arguments.callee(e, V[W += 1]);
								}
								return t;
							}
						}
						if (d.getElementById) {
							return d.getElementById(e);
						}
						if (d.all) {
							return d.all[e];
						} else {
							return null;
						}
					},
					sE: function (e) {
						if (l) {
							e.visibility = 'show';
						} else {
							e.style.visibility = 'inherit';
						}
					},
					hE: function (e) {
						if (l) {
							e.visibility = 'hide';
						} else {
							e.style.visibility = 'hidden';
						}
					},
					dE: function (e) {
						e.style.display = 'block';
					},
					nE: function (e) {
						e.style.display = 'none';
					},
					sZ: function (e, z) {
						if (l) {
							e.zIndex = z;
						} else {
							e.style.zIndex = z;
						}
					},
					sX: function (e, x) {
						if (l) {
							e.left = x;
						} else if (op) {
							e.style.pixelLeft = x;
						} else {
							e.style.left = x + 'px';
						}
					},
					sY: function (e, y) {
						if (l) {
							e.top = y;
						} else if (op) {
							e.style.pixelTop = y;
						} else {
							e.style.top = y + 'px';
						}
					},
					sW: function (e, w) {
						if (l) {
							e.clip.width = w;
						} else if (op) {
							e.style.pixelWidth = w;
						} else {
							e.style.width = w + 'px';
						}
					},
					gW: function (e) {
						if (l) {
							return e.clip.width;
						} else if (op) {
							return e.style.pixelWidth;
						} else {
							return e.style.width;
						}
					},
					sH: function (e, h) {
						if (l) {
							e.clip.height = h;
						} else if (op) {
							e.style.pixelHeight = h;
						} else {
							e.style.height = h + 'px';
						}
					},
					sC: function (e, t, r, b, x) {
						var X;
						if (l) {
							X = e.clip;
							X.top = t;
							X.right = r;
							X.bottom = b;
							X.left = x;
						} else {
							e.style.clip = 'rect(' + t + px + ' ' + r + px + ' ' + b + px + ' ' + x + px + ')';
						}
					},
					wH: function (e, h) {
						if (l) {
							var Y = e.document;
							Y.open();
							Y.write(h);
							Y.close();
						}
						if (e.innerHTML) {
							e.innerHTML = h;
						}
					}
				};
			})(),

			/* STATIC CLASS : TRANSITION
				- Credits: Easing Equations by Robert Penner, <http://www.robertpenner.com/easing/>.
			*/
			transition = {
				bounce: {
					easeOut: function (t, b, c, d) {
						if ((t /= d) < (1 / 2.75)) {
							return c * (7.5625 * t * t) + b;
						} else if (t < (2 / 2.75)) {
							return c * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75) + b;
						} else if (t < (2.5 / 2.75)) {
							return c * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375) + b;
						} else {
							return c * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375) + b;
						}
					},
					easeIn: function (t, b, c, d) {
						return c - transition.bounce.easeOut(d - t, 0, c, d) + b;
					},
					easeInOut: function (t, b, c, d) {
						if (t < d / 2) {
							return transition.bounce.easeIn(t * 2, 0, c, d) * 0.5 + b;
						} else {
							return transition.bounce.easeOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;
						}
					}
				},
				expo: {
					easeIn: function (t, b, c, d) {
						return (t === 0)? b: c * Math.pow(2, 10 * (t / d - 1)) + b;
					},
					easeOut: function (t, b, c, d) {
						return (t === d)? b + c: c * (-Math.pow(2, -10 * t / d) + 1) + b;
					},
					easeInOut: function (t, b, c, d) {
						if (t === 0) {
							return b;
						}
						if (t === d) {
							return b + c;
						}
						if ((t /= d / 2) < 1) {
							return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
						}
						return c / 2 * (-Math.pow(2, -10 * (t -= 1)) + 2) + b;
					}
				},
				linear: function (t, b, c, d) {
					return c * t / d + b;
				}
			},

			events = {
				__listeners: [],
				add: function (el, type, fn) {
					if (el) {
						if (el.addEventListener) {
							el.addEventListener(type, fn, false);
						} else if (el.attachEvent) {
							el.attachEvent('on' + type, fn);
						}
						var event = {
							el: el,
							type: type,
							fn: fn
						};
						_page.events.__listeners.push(event);
						return event;
					}
				},
				remove: function (el, type, fn) {
					if (el) {
						if (el.removeEventListener) {
							el.removeEventListener(type, fn, false);
						}
						else if (el.detachEvent) {
							el.detachEvent('on' + type, fn);
						}
					}
				},
				removeSafe: function (event) {
					if (event) {
						var el = event.el, i,
						type = event.type,
						fn = event.fn;
						_page.events.remove(el, type, fn);
						for (i = 0; i < this.__listeners.length; i += 1) {
							if (this.__listeners[i] === event) {
								_page.events.__listeners.splice(i, 1);
								break;
							}
						}
					}
				},
				removeAll: function () {
					while (_page.events.__listeners.length > 0) {
						_page.events.removeSafe(_page.events.__listeners[0]);
					}
				},
				cancel: function (e) {
					if (!e) {
						e = window.event || {};
					}
					if (e.stopPropagation) {
						e.stopPropagation();
					}
					if (e.preventDefault) {
						e.preventDefault();
					}
					e.cancelBubble = true;
					e.cancel = true;
					e.returnValue = false;
					return false;
				},
				getTarget: function (e) {
					var targ;
					if (!e) {
						e = window.event;
					}
					if (e.target) {
						targ = e.target;
					} else if (e.srcElement) {
						targ = e.srcElement;
					}
					if (targ.nodeType === 3) { // defeat Safari bug
						targ = targ.parentNode;
					}
					return targ;
				},
				start: function (obj, type, args) {
					args = (!args? arguments: args);
					if (typeof obj[type] === "function") {
						obj[type].apply(obj, args);
					}
				}
			},
			customEvents = function (that) {
				var registry = {};
				that.fireEvent = function (event, parameters) {
					var array,
						func,
						handler,
						i,
						test,
						proceed = true,
						params,
						type = typeof event === "string"? event: event.type;
					if (registry.hasOwnProperty(type)) {
						array = registry[type].methods;
						for (i = 0; i < array.length; i += 1) {
							handler = array[i];
							func = handler.method;
							if (typeof func === "string") {
								func = this[func];
							}
							params = handler.parameters.concat(parameters || []);
							func.apply(this, params.length > 0? params: [event]);
							if (registry[type].cancelled) {
								proceed = registry[type].cancelled = false;
								break;
							}
						}
					}
					return proceed;
				};
				that.addEvent = function (type, method, parameters) {
					if (typeof method ===  "function") {
						var handler = {
							method: method,
							parameters: parameters || []
						};
						if (registry.hasOwnProperty(type)) {
							registry[type].methods.push(handler);
						} else {
							registry[type] = {};
							registry[type].methods = [handler];
						}
					}
					return this;
				};
				that.removeEvent = function (event, method) {
					var array,
						handler,
						i,
						type = typeof event === "string"? event: event.type;
					if (registry.hasOwnProperty(type)) {
						array = registry[type].items;
						for (i = 0; i < array.length; i += 1) {
							handler = array[i];
							if (method == handler.method) {
								array.splice(i, 1);
								break;
							}
						}
					}
				};
				that.cancelEvent = function (event) {
					var type = typeof event === "string"? event: event.type;
					if (registry.hasOwnProperty(type)) {
						registry[type].cancelled = true;
					}
				};
				return that;
			},
			BrowserDetect, Animation;

		/* CLASS: Browser detection   */
		BrowserDetect = function () {
			var ua = navigator.userAgent.toLowerCase();
			this.isGecko       = (ua.indexOf('gecko') !== -1 && ua.indexOf('safari') === -1);
			this.isAppleWebKit = (ua.indexOf('applewebkit') !== -1);
			if (ua.indexOf('opera') !== -1) {
				this.isOpera = true;
				this.name = "Opera";
			}
			if ((ua.indexOf('msie') !== -1 && !this.isOpera && (ua.indexOf('webtv') === -1))) {
				this.isIE = true;
				this.name = "Internet Explorer";
			}
			if (this.isGecko && ua.indexOf('gecko/') + 14 === ua.length) {
				this.isMozilla = true;
				this.name = "Mozilla";
			}
			if (this.isGecko? (ua.indexOf('netscape') !== -1): ((ua.indexOf('mozilla') !== -1) && !this.isOpera && !this.isSafari && (ua.indexOf('spoofer') === -1) && (ua.indexOf('compatible') === -1) && (ua.indexOf('webtv') === -1) && (ua.indexOf('hotjava') === -1))) {
				this.isNS = true;
				this.name = "Netscape";
			}
			if (ua.indexOf('firebird/') !== -1) {
				this.isFirebird = true;
				this.name = "Firebird";
			}
			if (ua.indexOf('firefox/') !== -1) {
				this.isFirefox = true;
				this.name = "FireFox";
			}
			if (ua.indexOf('safari/') !== -1) {
				this.isSafari = true;
				this.name = "Safari";
			}
			if (ua.indexOf('konqueror') !== -1) {
				this.isKonqueror = true;
				this.name = "Konqueror";
			}
			if (ua.indexOf('omniweb') !== -1) {
				this.isOmniweb = true;
				this.name = "Omniweb";
			}
			if (ua.indexOf('webtv') !== -1) {
				this.isWebtv = true;
				this.name = "WebTV";
			}
			if (ua.indexOf('icab') !== -1) {
				this.isICab = true;
				this.name = "Icab";
			}
			if (ua.indexOf('camino') !== -1) {
				this.isCamino = true;
				this.name = "Camino";
			}
			this.isIECompatible = ((ua.indexOf('msie') !== -1) && !this.isIE);
			this.isNSCompatible = ((ua.indexOf('mozilla') !== -1) && !this.isNS && !this.isMozilla);
			this.geckoVersion = ((this.isGecko)? ua.substring((ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14)): -1);
			this.equivalentMozilla = ((this.isGecko)? parseFloat(ua.substring(ua.indexOf('rv:') + 3)): -1);
			this.versionMinor = parseFloat(navigator.appVersion);
			if (this.isGecko && !this.isMozilla) {
				if (this.isFirefox) {
					this.versionMinor = parseFloat(ua.substring(ua.indexOf('firefox/') + 8, ua.length));
				} else {
					this.versionMinor = parseFloat(ua.substring(ua.indexOf('/', ua.indexOf('gecko/') + 6) + 1));
				}
			} else if (this.isMozilla) {
				this.versionMinor = parseFloat(ua.substring(ua.indexOf('rv:') + 3));
			} else if (this.isIE && this.versionMinor >= 4) {
				this.versionMinor = parseFloat(ua.substring(ua.indexOf('msie ') + 5));
			} else if (this.isSafari) {
				this.versionMinor = parseFloat(ua.substring(ua.indexOf('safari/') + 7));
			} else if (this.isOmniweb) {
				this.versionMinor = parseFloat(ua.substring(ua.indexOf('omniweb/v') + 9));
			} else if (this.isOpera && !this.isMac) {
				this.versionMinor = parseFloat(ua.substring(ua.indexOf('opera') + 6));
			}
			this.versionMajor = parseInt(this.versionMinor, 10);
			this.isDOM = (document.getElementById && document.createElement? true: false);
			this.isDOM1 = (document.getElementById? true: false);
			this.isDOM2Event = (document.addEventListener && document.removeEventListener? true: false);
			this.isDHTML = (document.getElementById || document.all || document.layers? true: false);
			this.mode = document.compatMode? document.compatMode: 'BackCompat';
			if (ua.indexOf('win') !== -1) {
				this.isWin = true;
				this.platform = "win";
			}
			if (this.isWin && (ua.indexOf('95') !== -1 || ua.indexOf('98') !== -1 || ua.indexOf('nt') !== -1 || ua.indexOf('win32') !== -1 || ua.indexOf('32bit') !== -1 || ua.indexOf('xp') !== -1)) {
				this.isWin32 = true;
				this.platform = "win32";
			}
			if (ua.indexOf('mac') !== -1) {
				this.isMac = true;
				this.platform = "mac";
			}
			if (ua.indexOf('x11') !== -1) {
				this.isMac = true;
				this.platform = "unix";
			}
			if (ua.indexOf('linux') !== -1) {
				this.isMac = true;
				this.platform = "linux";
			}
			this.isNS6x = (this.isNS && this.versionMajor === 6);
			this.isNS6up = (this.isNS && this.versionMajor >= 6);
			this.isNS7x = (this.isNS && this.versionMajor === 7);
			this.isNS7up = (this.isNS && this.versionMajor >= 7);
			this.isIE5x = (this.isIE && this.versionMajor === 5);
			this.isIE55 = (this.isIE && this.versionMinor === 5.5);
			this.isIE5up = (this.isIE && this.versionMajor >= 5);
			this.isIE6x = (this.isIE && this.versionMajor === 6);
			this.isIE6up = (this.isIE && this.versionMajor >= 6);
			this.isIE7up = (this.isIE && this.versionMajor >= 7);
		};

		/* CLASS: ANIMATION   */
		Animation = function (obj, params) {
			this.initialize(obj, params);
		};
		Animation.prototype = {
			initialize: function (obj, params) {
				this.options = params;
				this.options.fps = parseInt(this.options.fps || 50, 10);
				this.options.duration = parseInt(this.options.duration || 0, 10);
				this.elNode = obj;
				this.running = false;
			},
			start: function (obj) {
				this.running = true;
				this.onStart();
				for (var id in obj) {
					if (obj.hasOwnProperty(id)) {
						this.style = id;
						this.from = obj[id][0];
						this.to = obj[id][1];
					}
				}
				this.change = this.to - this.from;
				this.now = this.from;
				this.timeStart = util.getTime();
				this.set(this.from);
				this.timer = window.setInterval(this.tween.bindArgs(this), Math.round(1000 / this.options.fps));
			},
			tween: function () {
				var time = util.getTime();
				if (time < this.timeStart + this.options.duration) {
					this.now = Math.round(this.options.transition.apply(this, [time - this.timeStart, this.from, this.change, this.options.duration]) * 100) / 100;
					this.set(this.now);
				} else {
					this.set(this.to);
					this.stop();
					this.onComplete();
				}
			},
			set: function (value, obj) {
				obj = obj || this.elNode;
				switch (this.style) {
				case "height":
				case "left":
				case "right":
					obj.style[this.style] = value + 'px';
					break;
				case "opacity":
					_page.dom.setOpacity(obj, value);
					break;
				default:
					obj.style[this.style] = value;
				}
			},
			stop: function () {
				window.clearInterval(this.timer);
				this.running = false;
				this.elNode = null;
			},
			onComplete: function () {
				if (this.options.onComplete) {
					events.start(this.options, 'onComplete');
				}
			},
			onStart: function () {
				if (this.options.onStart) {
					events.start(this.options, 'onStart');
				}
			}
		};

		this.onContentReady = (function () {
			var loadFn = [], initialized = false, ready = false,
				doLoad = function () {
					ready = true;
					for (var i = 0 ;i < loadFn.length; i += 1) {
						try {
							loadFn[i].call(document);
						} catch (err) {}
					}
					loadFn = [];
				},
				init = function () {
					if (initialized) {
						return;
					}
					initialized = true;
					if (document.addEventListener) {
						document.addEventListener("DOMContentLoaded", function () {
							document.removeEventListener("DOMContentLoaded", arguments.callee, false);
							doLoad();
						}, false);
					} else if (document.attachEvent) {
						document.attachEvent("onreadystatechange", function () {
							if (document.readyState === "complete") {
								document.detachEvent("onreadystatechange", arguments.callee);
								doLoad();
							}
						});
						if (document.documentElement.doScroll && !window.frameElement) {
							(function () {
								if (ready) {
									return;
								}
								try {
									document.documentElement.doScroll("left");
								} catch (error) {
									setTimeout(arguments.callee, 0);
									return;
								}
								doLoad();
							})();
						}
					}
					_page.onLoad(doLoad);
				};
			return function (fn) {
				if (ready) {
					fn.call(document);
				} else {
					loadFn[loadFn.length] = fn;
					init();
				}
			};
		})();

		this.onLoad = (function () {
			var loadFn = [], initialized = false, loaded = false, existing,
				doLoad = function () {
					loaded = true;
					for (var i = 0 ;i < loadFn.length; i += 1) {
						try {
							loadFn[i].call(document);
						} catch (err) {}
					}
					loadFn = [];
				},
				init = function () {
					if (initialized) {
						return;
					}
					initialized = true;
					if (typeof window.addEventListener !== 'undefined') {
						window.addEventListener('load', function () {}, false); // Dummy function inorder to prevent removal of doLoad listner
						window.addEventListener('load', doLoad, false);
					} else if (typeof document.addEventListener !== 'undefined') {
						document.addEventListener('load', doLoad, false);
					} else if (typeof window.attachEvent !== 'undefined') {
						window.attachEvent('onload', doLoad);
					} else {
						if (typeof window.onload === 'function') {
							existing = window.onload;
							window.onload = function () {
								existing();
								doLoad();
							};
						} else {
							window.onload = doLoad;
						}
					}
				};
			return function (fn) {
				if (loaded) {
					fn.call(document);
				} else {
					loadFn[loadFn.length] = fn;
					init();
				}
			};
		})();

		this.loadJSFile = function (src, test, callback , charset, noCache) {
			var js = null, loadTimeout, done, timeStart, charSetType, isTimeout, complete, load, uniqueUrl;
			loadTimeout = 10000; //10 secs, only applicable for Safari / Opera < 9
			done = false;
			timeStart = new Date().getTime();
			charSetType = (charset)? charset: null;
			uniqueUrl = function (url) {
				url = url || "";
				return (url += (url.indexOf("?") > -1? "&": "?") + "nocache=" + new Date().getTime());
			};
			isTimeout = function () {
				var timeCur = new Date().getTime();
				return parseInt(timeCur, 10) - parseInt(timeStart, 10) > loadTimeout;
			};
			complete = function () {
				if (!done) {
					done = true;
					callback();
					if (js) {
						js.parentNode.removeChild(js);
						js = null;
					}
				}
			};
			load = (function () {
				var head, call;
				js = document.createElement('script');
				js.src = (typeof noCache !== "undefined" && noCache)? uniqueUrl(src): src;
				js.type = "text/javascript";
				if (charSetType) {
					js.charset = charSetType;
				}
				head = document.getElementsByTagName('head')[0];
				head.appendChild(js);
				js.onload = js.onreadystatechange = function () {
					if (!this.readyState || /loaded|complete/.test(this.readyState)) {
						complete();
					}
				};
				if (/WebKit|Khtml/i.test(navigator.userAgent) || (window.opera && (window.opera.version? parseInt(window.opera.version(), 10) <= 9: true))) {
					(function () {
						call = false;
						try {
							call = test.call();
						} catch (e) {}
						if (call) {
							complete();
						} else {
							if (!isTimeout()) {
								setTimeout(arguments.callee, 100);
							}
						}
					})();
				}
			});
			window.setTimeout(load, 100); // Need timeout for IE
		};

		this.util = util;
		this.dom = dom;
		this.events = events;
		this.implementCustomEvents = customEvents;
		this.transition = transition;
		this.Animation = Animation;
		this.browser = new BrowserDetect();
	};

	return new Core();
})();

_page.events.add(window, 'unload', _page.events.removeAll);
var gE = _page.dom.gE;

_page.getCRSCServer = function () {
	var script_files, i, global_location, global_id;
	script_files = document.getElementsByTagName("SCRIPT");
	for(i=0;i<script_files.length;i++){
		global_location = script_files[i].src;
		global_id = global_location.indexOf('/crsc/scripts/lib_global');
		if(global_id!=-1){
			return global_location.substring(0,global_id);
		}
	}
	return (window.location.protocol == "https:"? "https:": "http:") + "//www.crsc.philips.com";
};

_page.getCRSCNavServer = function () {
	var crsc_server = _page.crsc_nav_server || _page.getCRSCServer();
	return ( crsc_server.indexOf('.crsc.philips.com') !=-1 ? crsc_server :(window.location.protocol=="https:"?"https:":"http:") + "//www.crsc.philips.com" );
};

_page.switchHandler = function (open_link, target, language_switch) {
	var open_page = false, extra, w, intwidth, intheight;
	if (language_switch === "" || typeof(language_switch) === "undefined") {
		open_page = true;
	} else {
		if (confirm(_page.text.confirmation2.replace("{LANGUAGE}", language_switch))) {
			open_page = true;
		} else {
			open_page = false;
		}
	}
	if (open_page) {
		if (target === "" || typeof(target) === "undefined") {
			target = "_self";
			extra = "";
		} else if (target === "popup") {
			target = "_blank";
			extra = "height=500,width=700,toolbar=yes,scrollbars=yes";
		} else {
			extra = "";
		}
		w = window.open(open_link, target, extra);
		if (target === "popup") {
			intwidth = parseInt(screen.availWidth, 10);
			intheight = parseInt(screen.availHeight, 10);
			if (intwidth > 0 && intheight > 0) {
				w.moveTo(((intwidth - popup_width) / 2), ((intheight - popup_height) / 2));
				w.focus();
			}
		}
	}
	return false;
};

_page.setlocale = function (locale, url) {
	var newLink, current_url, x, y, expires, new_str, str;
	newLink = escape(url || _page.getLocaleURL(locale));
	current_url = escape(window.location);
	x = current_url.indexOf("philips.com/");
	y = current_url.indexOf("philips.com%3A"); // allow philips with port
	if (x !== -1 || y !== -1) {
		expires = new Date();
		expires.setFullYear(expires.getFullYear() + 1);
		new_str = "Philips=userlocale=" + locale + ";expires=" + expires.toGMTString() + ";path=/;domain=philips.com";
		document.cookie = new_str;
		_page.switchHandler(unescape(newLink), "");
	} else {
		str = Math.round(Math.random() * 100000).toString();
		document.write('<script language="Javascript" type="text/javascript" src="http://www.crsc.philips.com/cookie/setcookie.asp?LocaleID=' + locale + '&URL=' + newLink + '&random=' + str + '"></script>');
	}
};

_page.changelocale = function (locale, url) {
	var strCheckLocale, newLink, blnRedirect;
	strCheckLocale = (_page.selectedLocale !== ""? _page.selectedLocale: _page.locale);
	newLink = url || _page.getLocaleURL(locale);
	if (locale === "") {
		alert(_page.text.alert2);
	} else if (locale === strCheckLocale) {
		alert(_page.text.alert1);
	} else {
		blnRedirect = false;
		if (locale !== "others") {
			if (confirm(_page.text.confirmation1)) {
				_page.switchHandler("Javascript:_page.setlocale('" + locale + "','" + newLink + "');", "");
			} else {
				blnRedirect = true;
			}
		} else {
			blnRedirect = true;
		}
		if (blnRedirect) {
			_page.switchHandler(newLink, "");
		}
	}
};

_page.getLocaleURL = function (locale) {
	return _page.locales[locale];
};

_page.getlocale = function () {
	var current_url, x, strCookie, start, end, return_cookie;
	current_url = escape(window.location);
	x = current_url.indexOf("philips.com/");
	if (x !== -1) {
		strCookie = unescape(document.cookie);
		start = strCookie.indexOf("userlocale=");
		if (start !== -1) {
			start += 11;
			end = start + 5;
			if (strCookie.substring(start, end) === "globa") {
				return_cookie = "global";
			} else {
				return_cookie = strCookie.substring(start, end);
			}
			return return_cookie;
		} else {
			return "";
		}
	} else {
		return "N/A";
	}
};

_page.getSiteLevelByLocale = function (locale) {
	var country = locale.split("_")[0], level;
	for (level in _page.siteLevelList) {
		if (_page.util.hasElement(_page.siteLevelList[level], country)) {
			return level;
		}
	}
	return "";
};

_page.getMetaElementByName = function () {
	var meta;
	return function (name, force) {
		var el, i, metatags;
		if (typeof meta === "undefined" || force) {
			meta = {};
			metatags = document.getElementsByTagName("meta");
			for (i = 0; i < metatags.length; i += 1) {
				el = metatags[i];
				meta[el.name.toLowerCase()] = el || "";
			}
		}
		return meta[name.toLowerCase()] || {};
	};
}();

_page.fieldValidation = function (fieldId, params) {
	fieldId = fieldId || "";
	params = params || {};
	var createWarning = function () {
			if (!elWarning) { // checks existence global variable
				elWarning = document.createElement("div");
				elWarning.id = warningId;
				elWarning.innerHTML = "<div><strong class=\"p-content\">" + warningText + "</strong></div>";
				elParent = gE(parentId);
				if (elParent) {
					elParent.appendChild(elWarning);
					return elWarning;
				}
			}
		},
		hideWarning = function () {
			elWarning = elWarning || gE(warningId);
			if (elWarning) {
				_page.dom.nE(elWarning);
				_page.events.removeSafe(evtClick);
				_page.events.removeSafe(evtKeydown);
			}
		},
		showWarning = function () {
			elWarning = elWarning || gE(warningId) || createWarning();
			if (elWarning && elField) {
				_page.dom.dE(elWarning);
				evtClick = _page.events.add(document, "click", hideWarning);
				evtKeydown = _page.events.add(elField, "keydown", hideWarning);
			}
		},
		isValid = function () {
			if (typeof params.isValidFn === "function") {
				return !params.isValidFn.apply(window, [elField.value, compareText]);
			} else {
				return true;
			}
		},
		parentId = params.parentId || "p-header-search",
		warningId = params.warningId || "p-header-warning-search",
		warningText = params.warningText || "",
		elWarning, elField, evtClick, evtKeydown, elParent, compareText;
		elField = gE(fieldId) || {};
		compareText = params.compareText || elField.defaultValue;
	return {
		validate: function (e) {
			var blnSuccess = isValid();
			if (!blnSuccess) {
				showWarning();
				gE(fieldId).focus();
				_page.events.cancel(e);
			}
			return blnSuccess;
		}
	};
};

_page.useIframe = (_page.browser.isIE5up &&  !_page.browser.isIE7up && (!_page.browser.isIE5x || _page.browser.isIE55))? true: false;
_page.text = {};										// Defined in locale files
_page.link = {};										// Defined in locale files
_page.topNav = [];
_page.locales = {};
_page.area = "";										// Active area

_page.getDesignVersion = function (key) {
	var designLocalesList = {};
	return (designLocalesList[key] && designLocalesList[key][_page.locale]? designLocalesList[key][_page.locale]: 1);
};

_page.crsc_server = _page.getCRSCServer();  			// Get location of the Global library file. Used to determine where the files need to be included from.
_page.crsc_nav_server = _page.getCRSCNavServer(); 		// Force location of the nav directory to the any production / staging CRSC server.
_page.consumer_nav_server = (window.location.protocol === "https:"? "https:": "http:") + "//www.consumer.philips.com";
_page.siteLevel = ""; 									// Current locale site level
_page.siteLevelList = {									// Based on countries
	"3": ["us", "de", "cn", "gb", "fr", "it", "br", "nl", "es", "ru", "jp", "in", "kr", "be", "se", "global", "ar", "at", "au", "ca", "ch", "cz", "dk", "hk", "mx", "nz", "pl", "pt", "ru", "tr", "tw"],
	"2": ["bg", "ce", "cl", "fi", "gr", "hu", "ie", "my", "me", "no", "pk", "ph", "ro", "sg", "sk", "th", "ua", "za", "co", "pe"],
	"1": ["kz", "id", "uy", "by", "hr", "lv", "lt", "si", "uz", "vn", "yu", "ve", "ee", "il"]
};
_page.sIFR = {
	"swf": {
		"GillSansLight": 			{"src": _page.crsc_server + "/crsc/images/sifr_gillsanslight_3.436.swf", "languages": ["da", "de", "en", "es", "fi", "fr", "it", "nl", "no", "pt", "sv"]},			//   22.8 kb
		"GillSansAltOneWGLLight": 	{"src": _page.crsc_server + "/crsc/images/sifr_gillsansaltonewgllight_3.436.swf", "languages": ["da", "de", "en", "es", "fi", "fr", "it", "nl", "no", "pt", "sv", "sk", "ro", "ru", "bg", "cs", "el", "hu", "pl", "id", "tr", "hr", "et"]}		//  35 kb
	},
	"js": {
		"core": 			{"src": _page.crsc_server + "/crsc/scripts/sifr-3.436.js"},
		"config": 			{"src": _page.crsc_server + "/crsc/scripts/sifr-config-3.436.js"}
	},
	"fontFamily": {
		"GillSans": ["GillSansLight", "GillSansAltOneWGLLight"]
	}
};
_page.sIFR.getSWFByFont = function (params) {
	params = params || {};
	params.language = params.language || "en";
	params.fontWeight = params.fontWeight || "Normal";
	params.fontFamily = (params.fontFamily || "GillSans") + (params.fontWeight !== "Normal"? params.fontWeight: "");
	var swfKeys = _page.sIFR.fontFamily[params.fontFamily] || [];
	for (var i = 0; i < swfKeys.length; i += 1) {
		var swfKey = swfKeys[i];
		var oSWF = _page.sIFR.swf[swfKey];
		if (oSWF && _page.util.hasElement(oSWF.languages, params.language)) {
			return oSWF;
		}
	}
};
_page.disabledLocalesSIFR = ["zh","ko","he","ja","cs","sk","pl","ro","ru","bg","el","th","tr","hu", "hr", "et", "lv", "lt", "vi", "id"];

_page.countryInfo = {
	"ar": {"en": {"name": "Argentina"}},
	"au": {"en": {"name": "Australia"}},
	"at": {"en": {"name": "Austria"}, "de": {"name": "\u00D6sterreich", "sortKey": "Ost"}},
	"be": {"en": {"name": "Belgium"}, "nl": {"name": "Belgi\u00EB"}, "fr": {"name": "Belgique"}},
	"bg": {"en": {"name": "Bulgaria"}, "bg": {"name": "\u0411\u044A\u043B\u0433\u0430\u0440\u0438\u044F", "sortKey": "Bul"}},
	"br": {"en": {"name": "Brazil"}, "pt": {"name": "Brasil"}},
	"ca": {"en": {"name": "Canada"}},
	"ce": {"en": {"name": "Central America"}},
	"cl": {"en": {"name": "Chile"}},
	"cn": {"en": {"name": "China"}, "zh": {"name": "\u4E2D\u56FD", "sortKey": "Chi"}},
	"co": {"en": {"name": "Colombia"}},
	"hr": {"en": {"name": "Croatia"}},
	"cu": {"en": {"name": "Cuba"}},
	"cy": {"en": {"name": "Cyprus"}},
	"cz": {"en": {"name": "Czech Republic"}, "cs": {"name": "\u010Cesk\u00E1 Republika", "sortKey": "Cze"}},
	"dk": {"en": {"name": "Denmark"}, "da": {"name": "Danmark"}},
	"ee": {"en": {"name": "Estonia"}},
	"eg": {"en": {"name": "Egypt"}},
	"fi": {"en": {"name": "Finland"}, "fi": {"name": "Suomi"}},
	"fr": {"en": {"name": "France"}},
	"de": {"en": {"name": "Germany"}, "de": {"name": "Deutschland"}},
	"gr": {"en": {"name": "Greece"}, "el": {"name": "\u0395\u03BB\u03BB\u03AC\u03B4\u03B1", "sortKey": "Gre"}},
	"hk": {"en": {"name": "Hong Kong"}, "zh": {"name": "\u9999\u6E2F\u7279\u5225\u884C\u653F\u5340", "sortKey": "Hon"}},
	"hu": {"en": {"name": "Hungary"}, "hu": {"name": "Magyarorsz\u00E1g"}},
	"is": {"en": {"name": "Iceland"}},
	"in": {"en": {"name": "India"}},
	"id": {"en": {"name": "Bahasa Indonesia"}},
	"ir": {"en": {"name": "Iran"}},
	"iq": {"en": {"name": "Iraq"}},
	"ie": {"en": {"name": "Ireland"}},
	"il": {"en": {"name": "Israel"}},
	"it": {"en": {"name": "Italy"}, "it": {"name": "Italia"}},
	"jp": {"en": {"name": "Japan"}, "ja": {"name": "\u65E5\u672C", "sortKey": "Jap"}},
	"kr": {"en": {"name": "Korea"}, "ko": {"name": "\uD55C\uAD6D", "sortKey": "Kor"}},
	"lt": {"en": {"name": "Lithuania"}},
	"lu": {"en": {"name": "Luxembourg"}},
	"lv": {"en": {"name": "Latvia"}},
	"my": {"en": {"name": "Malaysia"}},
	"mx": {"en": {"name": "Mexico"}, "es": {"name": "M\u00E9xico"}},
	"me": {"en": {"name": "Middle East and Africa"}},
	"ma": {"en": {"name": "Morocco"}},
	"nl": {"en": {"name": "Netherlands"}, "nl": {"name": "Nederland"}},
	"nz": {"en": {"name": "New Zealand"}},
	"no": {"en": {"name": "Norway"}, "no": {"name": "Norge"}},
	"om": {"en": {"name": "Oman"}},
	"pk": {"en": {"name": "Pakistan"}},
	"pe": {"en": {"name": "Peru"}},
	"ph": {"en": {"name": "Philippines"}},
	"pl": {"en": {"name": "Poland"}, "pl": {"name": "Polska"}},
	"pt": {"en": {"name": "Portugal"}},
	"ro": {"en": {"name": "Romania"}, "ro": {"name": "Rom\u00E2nia"}},
	"ru": {"en": {"name": "Russian Federation"}, "ru": {"name": "\u0420\u043E\u0441\u0441\u0438\u0439\u0441\u043A\u0430\u044F \u0424\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F", "sortKey": "Rus"}},
	"sa": {"en": {"name": "Saudi Arabia"}},
	"sg": {"en": {"name": "Singapore"}},
	"sk": {"en": {"name": "Slovakia"}, "sk": {"name": "Slovensko"}},
	"si": {"en": {"name": "Slovenia"}},
	"za": {"en": {"name": "South Africa"}},
	"es": {"en": {"name": "Spain"}, "es": {"name": "Espa\u00F1a"}},
	"se": {"en": {"name": "Sweden"}, "sv": {"name": "Sverige"}},
	"ch": {"en": {"name": "Switzerland"}, "de": {"name": "Schweiz"}, "fr": {"name": "Suisse"}},
	"tw": {"en": {"name": "Taiwan"}, "zh": {"name": "\u53F0\u7063", "sortKey": "Tai"}},
	"th": {"en": {"name": "Thailand"}, "th": {"name": "\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22", "sortKey": "Tha"}},
	"tn": {"en": {"name": "Tunisia"}},
	"tr": {"en": {"name": "Turkey"}, "tr": {"name": "T\u00FCrkiye", "sortKey": "Tur"}},
	"ua": {"en": {"name": "Ukraine"}, "ru": {"name": "\u0423\u043A\u0440\u0430\u0457\u043D\u0430", "sortKey": "Ukr"}},
	"ae": {"en": {"name": "United Arab Emirates"}},
	"gb": {"en": {"name": "United Kingdom"}},
	"us": {"en": {"name": "United States"}},
	"uy": {"en": {"name": "Uruguay"}},
	"ve": {"en": {"name": "Venezuela"}}
};

_page.countries = {};
for (cCode in _page.countryInfo) {
	if (_page.countryInfo.hasOwnProperty(cCode) && typeof cCode === "string") {
		_page.countries[cCode] = _page.countryInfo[cCode].en.name;
	}
}

_page.languages = {
	"bg": "\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438",
	"cs": "\u010Ce\u0161tina",
	"da": "Dansk",
	"de": "Deutsch",
	"el": "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE",
	"en": "English",
	"es": "Espa\u00F1ol",
	"et": "Eesti keel",
	"fi": "Suomeksi",
	"fr": "Fran\u00E7ais",
	"he": "\u05E2\u05D1\u05E8\u05D9\u05EA",
	"hr": "Croatian",
	"hu": "Magyar",
	"id": "Indonesian",
	"it": "Italiano",
	"ja": "\u65E5\u672C",
	"ka": "Georgian",
	"ko": "\uD55C\uAD6D\uC5B4",
	"lt": "Lietuvi\u0173",
	"lv": "Lietuvi\u0173",
	"my": "Burmese",
	"ms": "Bahasa Melay",
	"nl": "Nederlands",
	"no": "Norsk",
	"pl": "Polski",
	"pt": "Portugu\u00EAs",
	"ro": "Rom\u00E2n\u0103",
	"ru": "\u0420\u0443\u0441\u0441\u043A\u0438\u0439",
	"sk": "Sloven\u010Dina",
	"sv": "Svenska",
	"th": "\u0E44\u0E17\u0E22",
	"tr": "T\u00FCrk\u00E7e",
	"zh": "\u4E2D\u6587",
	"za": "Chuang"
};

/* CLASS: TABBED NAVIGATION  */
_page.Tabs = function (_id, params) {
	params = params || {};
	this.options = {
		activeId:				(params.activeId? params.activeId: ""),
		animationOptions: 		(params.animationOptions? params.animationOptions: null),
		remoteOptions: 			(params.remoteOptions? params.remoteOptions: null),
		processAfterAnimation: 	(typeof params.processAfterAnimation !== "undefined"? params.processAfterAnimation: false),
		useIframeType:			(params.useIframeType? params.useIframeType: null),
		keepBodyOpen:			(typeof params.keepBodyOpen !== "undefined"? params.keepBodyOpen: false),
		onBeforeBodyOpen: 		(params.onBeforeBodyOpen? params.onBeforeBodyOpen: null),
		onBodyClose:			(params.onBodyClose? params.onBodyClose: null),
		onTabSwitch:			(params.onTabSwitch? params.onTabSwitch: null)
	};
	this.id = _id;
	this.items = [];
	this.activeId = (typeof(this.options.activeId) !== "undefined"? this.options.activeId: "");
	this.openId = '';
	this.bodyOpen = false;
	switch (this.options.useIframeType) {
	case "1":
		this.iframeId = "p-navigator-iframe"; 		// Full Iframe - IE
		break;
	case "2":
		this.iframeId = "p-navigator-iframe-body"; 	// Partial Iframe - Linux
		break;
	default:
		this.iframeId = "";
	}
	this.effectClose = null;
	this.effectOpen = null;
	_page.implementCustomEvents(this);
	this.addEvent('beforeBodyOpen', this.options.onBeforeBodyOpen);
	this.addEvent('bodyClose', this.options.onBodyClose);
	this.addEvent('tabSwitch', this.options.onTabSwitch);
	this.init();
};
_page.Tabs.prototype = {
	init: function () {
		var tabList, tabChilds, i, elTab, tabId, iframe, tabClose, createTabIframes, tabAnchor;
		tabList = gE(this.id + "-tabs");
		if (!tabList) {
			return;
		}
		tabChilds = tabList.getElementsByTagName("li");
		for (i = 0; i < tabChilds.length; i += 1) {
			elTab = tabChilds[i];
			tabId = elTab.id;
			tabId = tabId.substring(tabId.indexOf("tab-") + 4, tabId.length);
			this.items[this.items.length] = tabId;
			elTab.onclick = this.open.bindArgs(this, [tabId], true);
			if (tabId === this.options.activeId) {
				_page.dom.addClass(elTab, "p-active");
			}
			if (this.options.useIframeType === "2") {
				tabAnchor = elTab.firstChild;
				if (tabAnchor) {
					iframe = this.createIframe("p-tab-" + tabId + "-iframe", "p-tab-iframe", tabAnchor);
					if (iframe) {
						_page.dom.dE(iframe);
					}
				}
			}
		}
		if (this.iframeId !== "") {
			this.createIframe(this.iframeId, "", gE(this.id));
		}
		tabClose = gE(this.id + "-close");
		if (tabClose) {
			tabClose.onclick = this.close.bindArgs(this, null, true);
		}
	},
	createIframe: function (id, className, elParent) {
		if (elParent) {
			var iframe = document.createElement("iframe");
			iframe.id = id;
			iframe.frameBorder = "0";
			iframe.scroll = "none";
			iframe.src = "javascript:false;";
			_page.dom.addClass(iframe, className);
			elParent.appendChild(iframe);
			return iframe;
		}
	},
	toggle: function (_id) {
		var id, elTab, elContent, i, className;
		this.lastOpenId = this.openId;
		if (this.options.keepBodyOpen && this.bodyOpen && _id === this.openId) {
			return;	// when body remains open, don't close again
		}
		this.openId = _id || "";
		if (this.bodyOpen === false && this.openId === "") {
			return;	// tabs and body not active
		}
		if (this.onTabSwitch() === false) {
			this.openId = this.lastOpenId // reset open id;
			return; // allow event hook to disallow the navigation tab toggling
		}
		for (i = 0;i < this.items.length;i += 1) {
			id = this.items[i];
			elTab = gE(this.id + "-tab-" + id);
			elContent = gE(this.id + "-content-" + id);
			if (id === this.openId) {			// do active one
				className = (this.activeId === id? "p-open-active": "p-open");
				elContent.style.display = "block";
				if (!this.options.keepBodyOpen) {
					elTab.onclick = this.close.bindArgs(this, null, true);
				}
			} else if (this.openId === "") {	// close
				className = (this.activeId === id? "p-active": "");
				elContent.style.display = "none";
				elTab.onclick = this.open.bindArgs(this, [id], true);
			} else {						// do the rest except the active one
				className = (this.activeId === id && this.activeId !==""? "p-closed-active": "p-closed");
				elContent.style.display = "none";
				if (id === this.lastOpenId) {
					elTab.onclick = this.open.bindArgs(this, [id], true);
				}
			}
			elTab.className = (i === 0? "p-first ":"" ) + className;
		}

		if (this.openId === "") {
			this.closeBodyAnimated();
		} else if (this.openId !== "" && !this.bodyOpen) {
			this.openBodyAnimated();
		}
		if (this.bodyOpen) {
			if (this.options.processAfterAnimation && this.effectOpen && this.effectOpen.running) {
				this.effectOpen.onComplete = this.getContent.bindArgs(this, [_id]);
			} else {
				this.getContent(_id);
			}
		}
	},
	open: function (_id, _event) {
		if (_event) {
			_page.events.cancel(_event);
		}
		this.toggle(_id);
	},
	close: function (_event) {
		if (_event) {
			_page.events.cancel(_event);
		}
		this.toggle();
	},
	closeBody: function () {
		var elBody = gE(this.id + "-body-wrapper");
		if (elBody) {
			_page.dom.nE(elBody);
		}
		if (this.iframeId !== "") {
			_page.dom.nE(gE(this.iframeId));
		}
		this.onBodyClose();
	},
	closeBodyAnimated: function () {
		var fxRunningClose, pane;
		this.bodyOpen = false;
		if (this.effectOpen) {
			this.effectOpen.stop();
		}
		fxRunningClose = (this.effectClose? this.effectClose.running: false);
		if (this.options.animationOptions !== null && !fxRunningClose && this.options.animationOptions.close) {
			pane = document.getElementById(this.id + '-body');
			this.effectClose = new _page.Animation(pane, this.options.animationOptions.close);
			this.effectClose.start(this.options.animationOptions.close.start);
			this.effectClose.onComplete = this.closeBody.bindArgs(this);
		} else {
			this.closeBody();
		}
	},
	openBody: function () {
		var elBody = gE(this.id + "-body-wrapper");
		if (elBody) {
			_page.dom.dE(elBody);
		}
		if (this.iframeId !== "") {
			_page.dom.dE(gE(this.iframeId));
		}
	},
	openBodyAnimated: function () {
		this.onBeforeBodyOpen();
		this.bodyOpen = true;
		if (this.options.animationOptions !== null && this.options.animationOptions.open) {
			if (this.effectClose) {
				this.effectClose.stop();
			}
			var pane = document.getElementById(this.id + '-body');
			this.effectOpen = new _page.Animation(pane, this.options.animationOptions.open);
			this.effectOpen.start(this.options.animationOptions.open.start);
		}
		this.openBody();
	},
	getContent: function (_id, _url) {
		var that,
			remoteOptions = this.options.remoteOptions[_id] || this.options.remoteOptions["*"];
		if (!remoteOptions.loaded && remoteOptions.url !== "") {
			that = this;
			window.setTimeout(function () {
				_page.loadJSFile(remoteOptions.url, remoteOptions.validateContent, that.onRemoteComplete.bindArgs(that, [_id]), remoteOptions.charset, remoteOptions.noCache);
			}, 100);
			this.showLoader();
		} else if (remoteOptions.onComplete) {
			this.onRemoteComplete(_id);
		}
	},
	onRemoteComplete: function (_id) {
		var remoteOptions = this.options.remoteOptions[_id] || this.options.remoteOptions["*"];
		remoteOptions.loaded = true;
		_page.events.start(remoteOptions, 'onComplete', [this.id + "-content-" + _id]);
	},
	showLoader: function () {
		var elBody, elLoader;
		elBody = gE(this.id + "-body");
		elLoader = document.createElement("div");
		elLoader.id = this.id + "-body-loading";
		elBody.appendChild(elLoader);
		elLoader.innerHTML = '<img src="' + _page.crsc_server + '/crsc/images/loading_ring_fullframe.gif" alt="Loading..." />';
	},
	hideLoader: function () {
		var elLoader = gE(this.id + "-body-loading");
		if (elLoader) {
			_page.dom.discardElement(elLoader);
		}
	},
	fadeIn: function () {
		var elBody, elLoader, objFade;
		elBody = gE(this.id + "-body");
		elLoader = document.createElement("div");
		elLoader.id = this.id + "-body-fade";
		elBody.appendChild(elLoader);
		objFade = new _page.Animation(elLoader, {duration: 500, transition: _page.transition.linear, onComplete: function (elRemove) {
				_page.dom.discardElement(elRemove);
			}.bindArgs(null, [elLoader])
		});
		objFade.start({'opacity': [1, 0]});
	},
	onBeforeBodyOpen: function () {
		this.fireEvent("beforeBodyOpen", [this.openId]);
	},
	onBodyClose: function () {
		this.fireEvent("bodyClose", [this.openId]);
	},
	onTabSwitch: function () {
		return this.fireEvent("tabSwitch", [this.openId]);
	}
};


/* CLASS: TOP NAVIGATION 2 */
_page.TopNav2 = function (id, params) {
	params = params || {};
	params.type = params.type || "";
	this._id = id;
	this._tabId = "p-" + this._id.split("-")[1];
	this.options = {
		type: 				(typeof params.type !== "undefined"? params.type: "standard"),
		transparency: 		(typeof params.transparency !== "undefined"? params.transparency: (params.type === "inbody"? (_page.browser.isMac || _page.browser.platform === "linux" ? false: true): false)), // By Default ony enable transparency for inbody navigation type
		locale: 			(typeof params.locale !== "undefined"? params.locale: _page.locale || "global"),
		onload: 			(typeof params.onload !== "undefined"? params.onload: false),
		animation: 			(typeof params.animation !== "undefined"? params.animation: (_page.browser.platform === "linux"? false: true)), // Disable animation for Linux
		activeId: 			(typeof params.activeId !== "undefined"? params.activeId: ""),
		compatMode:			(typeof params.compatMode !== "undefined"? params.compatMode: this.requireCompatMode()),
		onBeforeBodyOpen: 	(typeof params.onBeforeBodyOpen !== "undefined"? params.onBeforeBodyOpen: _page.topNavOnBeforeBodyOpen || null),
		onBodyClose: 		(typeof params.onBodyClose !== "undefined"? params.onBodyClose: _page.topNavOnBodyClose || null),
		onTabSwitch: 		(typeof params.onTabSwitch !== "undefined"? params.onTabSwitch: _page.topNavOnTabSwitch || null)
	};
	this.navSections = {
		"3": {"consumer": ["Consumer products", "http://www.consumer.philips.com"], "shop": [], "live": [], "medical": ["Healthcare", "http://www.healthcare.philips.com"], "lighting": ["Lighting", "http://www.lighting.philips.com"], "support": ["Contact and Support", "http://www.philips.com/support"], "about": ["Company and press", "http://www.philips.com/about"]},
		"2": {"consumer": ["Consumer products", "http://www.consumer.philips.com"], "shop": [], "live": [], "medical": ["Healthcare", "http://www.healthcare.philips.com"], "lighting": ["Lighting", "http://www.lighting.philips.com"], "support": ["Contact and Support", "http://www.philips.com/support"], "about": ["Company and press", "http://www.philips.com/about"]},
		"1": {"about": ["About Philips", "http://www.philips.com"], "contact": ["Contact Philips", "http://www.philips.com"]}
	};
	this.contentMarketingLocales = "ar_es,at_de,au_en,be_fr,be_nl,bg_bg,br_pt,ca_en,ca_fr,ce_es,ch_de,ch_fr,cl_es,cn_zh,co_es,cz_cs,de_de,dk_da,es_es,fi_fi,fr_fr,gb_en,global,gr_el,hk_en,hk_zh,hu_hu,ie_en,in_en,it_it,jp_ja,kr_ko,me_en,mx_es,my_en,nl_nl,no_no,nz_en,pe_es,ph_en,pk_en,pl_pl,pt_pt,ro_ro,ru_ru,se_sv,sg_en,sk_sk,th_th,tr_tr,tw_zh,ua_ru,us_en,za_en,ve_es,by_hr,hr_en,ee_et,lv_lv,lt_lt,yu_en,si_en,id_id,il_he,kz_ru,uz_ru,vn_vi,uy_es";
	this.siteLevel = _page.getSiteLevelByLocale(this.options.locale);
	this.textFadeRequired = true;
	this.processed = {};
	var arrLocale = this.options.locale.split("_");
	this.country = arrLocale[0] || "";
	this.language = arrLocale[1] || "en";
	if (this.options.onload) {
		_page.onContentReady(this.init.bindArgs(this));
	}
};
_page.TopNav2.prototype = {
	init: function () {
		if (!this.options.compatMode) {
			this.initTabs();
		}
	},
	requireCompatMode: function () {
		try {
			(function () {}.bindArgs(window))();
			return false;
		} catch (e) {
			return true;
		}
	},
	initTabs: function (tabId) {
		var that = this;
		var _tabId = tabId || this._tabId,
			tabParams = {
				activeId: this.options.activeId,
				animationOptions: (this.options.animation)?
				{
					open: {
						id: "",
						start: {'height': [1, 449]}, 	// 1 = necessary for IE 5.5 to avoid flickering
						duration: 900,
						transition: _page.transition.expo.easeOut,
						onStart: this.setAnimationText.bindArgs(this, [this.textFadeRequired])	// Make sure the content is hidden for the text fade
					},
					close: {
						id: "",
						start: {'height': [449, 1]}, // 1 = necessary for IE 5.5 to avoid flickering
						duration: 500,
						transition: _page.transition.expo.easeOut
					}
				}:
				null,
				remoteOptions: {
					"consumer": {
						url: _page.consumer_nav_server + "/nav/consumer/nav_consumer_" + this.options.locale + ".js",
						noCache: true,
						onComplete: this.processContent.bindArgs(this),
						loaded: false,
						validateContent: function () {
							return typeof _page.headerNav.content.consumer === 'object';
						},
						charset: "utf-8"
					},
					"support": {
						url: _page.consumer_nav_server + "/nav/support/nav_support_" + this.options.locale + ".js",
						noCache: true,
						onComplete: this.processContent.bindArgs(this),
						loaded: false,
						validateContent: function () {
							return typeof _page.headerNav.content.support === 'object';
						},
						charset: "utf-8"
					},
					"*": {	// Other tabs
						url: _page.crsc_nav_server + "/nav/nav_" + this.options.locale + ".js",
						noCache: true,
						onComplete: this.processContent.bindArgs(this),
						loaded: false,
						validateContent: function () {
							return typeof headernav === 'object';
						},
						charset: "utf-8"
					}
				},
				processAfterAnimation: true,
				useIframeType: (_page.browser.platform === "linux" || _page.useIframe? (_page.browser.platform === "linux" && this.options.type === "inbody"? "2": "1"): null),
				onTabSwitch: function (openId) {
					that.onTabSwitch(openId);
				},
				onBeforeBodyOpen: this.options.onBeforeBodyOpen,
				onBodyClose: this.options.onBodyClose
			};
		tabParams.remoteOptions.shop = tabParams.remoteOptions.consumer;
		tabParams.remoteOptions.live = tabParams.remoteOptions.consumer;
		if (this.options.locale === "global") {
			tabParams.remoteOptions.consumer = null;
		}
		this.tabs = new _page.Tabs(_tabId, tabParams);
		window.setTimeout(this.autoOpenTab.bindArgs(this), 10);
	},
	getOpenTabId: function () {
		if (this.tabs) {
			return this.tabs.openId || "";
		}
	},
	closeAllTabs: function () {
		if (this.tabs) {
			this.tabs.close();
		}
	},
	setAnimationText: function (fadeRequired) {
		this.textFadeRequired = (typeof fadeRequired !== "undefined"? fadeRequired: this.textFadeRequired);
	},
	autoOpenTab: function () {
		var params = this.getHashParams(),
			openId = params[1] || "",
			openSubId = params[2] || "";
		if (openId !== "" && this.isValidSection(openId)) {
			this.setSectionActiveId(openId, openSubId);
			this.tabs.open(openId);
		}
	},
	isValidSection: function (section) {
		return (this.navSections[this.siteLevel][section]? true: false);
	},
	setSectionActiveId: function (section, subId) {
		section = section || "";
		subId = subId || "";
		if (this.navSections[this.siteLevel][section] && subId !== "") {
			this.navSections[this.siteLevel][section][2] = subId;
		}
	},
	getSectionActiveId: function (section) {
		section = section || "";
		var obj = this.navSections[this.siteLevel][section] || [];
		return obj[2];
	},
	getHashParams: function (sHash) {
		try {
			sHash = sHash || window.location.hash;
		} catch (e) {
			sHash = sHash || "";
		}
		return (sHash.match(new RegExp("headernav\/([^\/]*)\/?([^\/]*)", "i")) || []);
	},
	hideContent: function () {
		var i, elTabAnchor, id,
			elContent = gE("p-navigator-content-" + this.tabs.openId);
		if (elContent) {
			elContent.style.left = -2000 + "px";
		}
	},
	showContent: function () {
		var elContent, objFade, that = this, tabAnchor, pagename = "", division = "";
		elContent = gE("p-navigator-content-" + this.tabs.openId);
		if (elContent) {
			this.tabs.hideLoader();
			elContent.style.left = "auto";
			if (this.textFadeRequired && !_page.browser.isMac && this.options.animation) {
				this.tabs.fadeIn();
				this.textFadeRequired = false;
			}
			_page.dom.sE(elContent); // necessary for IE 5.5/6 to force redraw
			tabAnchor = gE('p-navigator-tab-' + this.tabs.openId);
			tabAnchor.className = (this.options.activeId === this.tabs.openId? "p-body-open-active": "p-body-open");
			if (_page.metrics && _page.metrics.trackAjax) {
				switch (this.tabs.openId) {
					case "consumer":
						division = "CP";
						pagename = "header_consumer";
						break;
					case "shop":
						division = "CP";
						pagename = "header_shop";
						break;
					case "lighting":
						division = "LI";
						pagename = "header_lighting";
						break;
					case "support":
						division = "SP";
						pagename = "header_support";
						break;
					case "medical":
						division = "HC";
						pagename = "header_healthcare";
						break;
					case "about":
						division = "CO";
						pagename = "header_corporate";
						break;
					default:
						break;
				}
				if (!this.hasWebPresence(this.tabs.openId) ) {
					pagename = "header_noweb:" + that.country + "_" + that.language;
				}
				if (pagename !== "") {
					window.setTimeout(function () {
						_page.metrics.trackAjax({
							"division": division,
							"section": "main",
							"pagename": pagename,
							"country": that.country,
							"language": that.language,
							"catalogtype": ""
						});
					}, 500);
				}
			}
		}
	},
	processContent: function (_id) {
		var objResponse, section, obj, countryRanking, sFeedKey, elGrid, maxLimit, showMore, lastCol, colMax, promotionCount, popularCount, promotionShow, popularShow, paramsLS, lsConsumer, html, oSearch, sIFRActive, locale, onClickText, sIFRGillSansSrc,
			elCategories, elGridInner, i,
			_helper = _page.html_helper.topnav,
			elParent = gE(_id);
		if (!elParent) {
			return;
		}
		section = _id.substring(_id.indexOf("content-") + 8, _id.length);
		locale = this.options.locale;
		if (!this.processed[section] && this.tabs.bodyOpen) {
			objResponse = this.contentObjForSection(section, locale);
			obj = objResponse[section];
			sIFRGillSansSrc = _helper.getSIFRSwf(locale);
			sIFRActive = _helper.isSIFRActive(locale) && typeof sIFRGillSansSrc !== "undefined";
			if (sIFRActive) {
				_page.dom.addClass(gE("p-navigator-content-wrapper"), "p-sIFR-enabled");
			}
			this.processed[section] = _helper.buildAltMessageGrid(elParent, obj);	// Create alt message if necessary
			if (!this.processed[section]) {
				this.processed[section] = true;
				countryRanking = this.siteLevel;
				sFeedKey = obj? countryRanking + "_" + section: "";
				switch (sFeedKey) {
				case "3_consumer":
				case "2_consumer":
					if (locale === "global") {
						elGrid = _helper.buildGrid(elParent, 'p-grid-3').addCols("p-column-1", "p-divider", "p-column-2", "p-column-3");
						elGrid.col[0].appendElement(_helper.createColHeader('h4', obj.language_selector));
						lsConsumer = new _page.LS('2', {
							remoteUrl: _page.crsc_server + "/crsc/locales/homepages_consumer",
							localeFlag: "global",
							localeText: "Choose country / language",
							showRows: 9,
							listHeight: 309, // 228 / Set list height if can't determined dynamically
							keepActive: true,
							removeLocaleList: ["global", "others"]
						});
						elGrid.col[0].innerHTML += lsConsumer.html();
						window.setTimeout(lsConsumer._show.bindArgs(lsConsumer), 500);
						elGrid.col[2].appendElement(_helper.createColHeader('h4', obj.new_products));
						_helper.buildList(elGrid.col[2], obj.new_products, "product", true);
						elGrid.col[3].appendElement(_helper.createColHeader('h4', {name: "&nbsp;"}));// dummy spacer
						_helper.buildList(elGrid.col[3], obj.new_products, "product");
						elGrid.removeEmptyCols();
						elGrid.equalHeight();
					} else {
						this.consumerCatalog = _helper.catalog().init({
							source: obj.catalog,
							elParent: elParent,
							activeItem: this.getSectionActiveId("consumer"),
							country: this.country,
							language: this.language
						});
						_helper.buildBottomLinksExtra(elParent, obj.links);
					}
					break;
				case "3_shop":
				case "2_shop":
					html = "";
					elGrid = _helper.buildGrid(elParent, 'p-grid-6').addCols("p-column-1", "p-column-2");
					if	(obj.online_store) {
						elGrid.col[0].appendElement(_helper.createColHeader('h4', obj.online_store));
						elDiv = document.createElement('div');
						_page.dom.addClass(elDiv, "p-banner");
						onClickText = "s.linkTrackVars = 'eVar3,eVar9,events';";
						onClickText += "s.linkTrackEvents = 'event22,event25';";
						onClickText += "s.events = 'event22,event25';";
						onClickText += "s.eVar3 = 'CP:main:shop';";
						onClickText += "s.eVar9 = 'philips';";
						onClickText += "s.tl(true, 'o', 'CP:main:shop_buyatphilips');";
						elDiv.innerHTML = _helper.createLink({
							name: _helper.createImage(obj.online_store.banner),
							href: obj.online_store.banner.href,
							onClickText: onClickText
						});
						elGrid.col[0].appendElement(elDiv);
					}
					if (obj.local_store) {
						elGrid.col[1].appendElement(_helper.createColHeader('h4', obj.local_store));
						elDiv = document.createElement('div');
						_page.dom.addClass(elDiv, "p-banner");
						onClickText = "s.linkTrackVars = 'None';";
						onClickText += "s.linkTrackEvents = 'None';";
						onClickText += "s.tl(true, 'o', 'CP:main:shop_findaretailstore');";
						elDiv.innerHTML = _helper.createLink({
							name: _helper.createImage(obj.local_store.banner),
							href: obj.local_store.banner.href,
							onClickText: onClickText
						});
						if (obj.local_store.search) {
							oSearch = obj.local_store.search;
							html += '<form id="p-shop-localstore-form" name="shop_localstore_form" method="POST" action="' + (oSearch.targetURL || '') + '">\n';
							html += '	<fieldset>\n';
							html += '		<label for="p-shopquery">' + (oSearch.submitValue || "Search") + '</label>\n';
							html += '		<input type="text" size="30" id="p-shopquery" name="searchAddress" class="p-keyword" onclick="this.value=\'\';" value="' + (oSearch.inputValue || "") + '" />\n';
							html += '		<input type="hidden" name="country" value="' + this.country + '" />\n';
							html += '		<input type="hidden" name="language" value="' + this.language + '" />\n';
							html += '		<input type="hidden" name="catalogType" value="CONSUMER" />\n';
							html += 		_helper.buildButton({name: (oSearch.submitValue || "Search"), type: "action", eId: "p-shop-localstore-submit", evtOnClick: "document.shop_localstore_form.submit()" });
							html += '	</fieldset>\n';
							html += '</form>\n';
						}
						elDiv.innerHTML += html;
						elGrid.col[1].appendElement(elDiv);
					}
					elGrid.removeEmptyCols();
					elGrid.equalHeight();
					break;
				case "3_live":
				case "2_live":
					var buildContentBlock = function (elTarget, oSource) {
						oSource = oSource || {};
						elTarget.appendElement(_helper.createHeader('h4', oSource, "p-subheader"));
						elTarget.innerHTML +=  '<p class="p-description">' + _helper.createLink({name: oSource.description, href: oSource.href}) + '</p>';
						_helper.clickable(elTarget, oSource.href);
					};
					var elBanner = document.createElement("div");
					_page.dom.addClass(elBanner, "p-banner");
					elBanner.innerHTML = _helper.createLink({
						name: _helper.createImage(obj.banner),
						href: obj.banner.href
					});
					elParent.appendChild(elBanner);
					var oCategories = obj.categories || {};
					elGrid = _helper.buildGrid(elParent, 'p-columns').addCols("p-col-1", "p-col-2", "p-col-3");
					buildContentBlock(elGrid.col[0], oCategories.latest_video);
					buildContentBlock(elGrid.col[1], oCategories.upload_video);
					elGrid.col[2].appendElement(_helper.createHeader('h4', oCategories.explore_channels, "p-subheader"));
					_helper.buildList(elGrid.col[2], oCategories.explore_channels, "marker-2", true);
					elGrid.style.background = "url(" + oCategories.src + ") no-repeat";
					if (sIFRActive) {
						_helper.replaceSIFR(sIFRGillSansSrc, {
							selector: '#p-navigator-content-live h4',
							css: ['.sIFR-root {color: #992c96;}','a {color: #992c96; text-decoration: none;}','a:hover {color: #992c96; text-decoration: underline; }']
						});
					}
					break;
				case "3_medical":
				case "2_medical":
					if (obj.seduction && obj.groups) {
						var that = this;
						html = '';
						html += 	'<div id="p-hc-header">';
						html += 		'<div id="p-hc-header-content">\n'; 	// We need a separate div for IE 6 transparency to remain flexible
						html += 			_page.html_helper.topnav.createLink(obj) + "<span class=\"p-marker-2\">&nbsp;</span>";
						html += 		'</div>';
						html += 		'<div class="p-shadow-bottom"></div>\n'; 	// We need a separate div for IE 6 transparency to remain flexible
						html += 	'</div>';
						var oSeductions = obj.seduction;
						if (oSeductions) {
							var htmlNav = '';
							var htmlSlider = '';
							var htmlFader = '';

							for (i = 0; i < oSeductions.length; i += 1) {
								var oSeduction = oSeductions[i];
								var classLast = (i === (oSeductions.length - 1)? 'class="p-last"': '');
								var classActiveDefault = (i === 0? 'class="p-active-default" ': '');
								htmlNav +=		'<li ' + classLast + '>' + _page.html_helper.topnav.createLink({name: (i + 1), href: "javascript:void(0)"}) + '</li>\n';
								htmlSlider +=	'<li ' + classLast + '>' + _page.html_helper.topnav.createLink({name: '<img src="' + oSeduction.src + '" alt="' + oSeduction.alt + '"></img>', href: oSeduction.href}) + '</li>\n';
								htmlFader +=	'<li ' + classActiveDefault + classLast + 'style="background-color:' + oSeduction.css["background-color"] + ';"><h4 class="p-subheader"><a href="' + oSeduction.href + '">' + oSeduction.name + '</a></h4><p class="p-description"><a href="' + oSeduction.href + '">' + oSeduction.description + '</a></p></li>\n';
							}

							html += '<div id="p-hc-seduction" class="p-hp-slider">\n';
							html += 	'<div class="p-hp-slider-nav" id="p-hc-seduction-nav-wrapper">\n';
							html += 		'<ul id="p-hc-seduction-nav">\n';
							html += 			htmlNav;
							html += 		'</ul>\n';
							html += 	'</div>\n';
							html += 	'<div class="p-hp-slider-content">\n';
							html += 		'<ul id="p-hc-seduction-content">\n';
							html += 			htmlSlider;
							html += 		'</ul>\n';
							html += 	'</div>\n';
							html += 	'<div class="p-hp-slider-active">\n';
							html += 		'<ul id="p-hc-seduction-active" class="p-carroussel">\n';
							html += 			htmlFader;
							html += 		'</ul>\n';
							html += 	'</div>\n';
							html += '</div>\n';
						}
						var oGroups = obj.groups;
						if (oGroups) {
							var htmlContent = '', iItem = 0, classFirst;
							htmlNav = '';
							for (var id in oGroups) {
								var oGroup = oGroups[id];
								classFirst = (iItem === 0? 'class="p-first"': "");
								htmlNav 	+= 	'<li id="p-hc-body-tab-' + id + '" ' + classFirst + ' ><span class="p-header"><a href="javascript:void(0)"><nobr>' + oGroup.name + '</nobr></a></span><div>' + oGroup.name + '</div></li>\n';
								htmlContent += 	'<div id="p-hc-body-content-' + id + '" class="p-tab-content"></div>\n';
								iItem += 1;
							}

							html += '<div id="p-hc-body">\n';
							html += 	'<div class="p-shadow-top">&nbsp;</div>\n'; 	// We need a separate div for IE 6 transparency to remain flexible
							html += 	'<div id="p-hc-body-tabs-wrapper" class="p-clearfix">\n';
							html += 		'<ul id="p-hc-body-tabs">\n';
							html += 			htmlNav;
							html += 		'</ul>\n';
							html += 	'</div>\n';
							html += 	'<div id="p-hc-body-content-wrapper">\n';
							html += 		htmlContent;
							html += 	'</div>\n';
							html += '</div>\n';

						}
						elParent.innerHTML = html;

						var clickableSeductionBlocks = function () {
							var elWrapper = gE("p-hc-seduction-active");
							if (elWrapper) {
								var elCarItems = elWrapper.getElementsByTagName("li");
								for (var i = 0; i < elCarItems.length; i += 1) {
									var href = oSeductions[i].href;
									_helper.clickable(elCarItems[i], href);
								}
							}
						};
						clickableSeductionBlocks();

						var replaceSeductionItemsSIFR = function () {
							var elWrapper = gE("p-hc-seduction-active");
							if (elWrapper) {
								var elCarItems = elWrapper.getElementsByTagName("li");
								for (var i = 0; i < elCarItems.length; i += 1) {
									var elTexts = elCarItems[i].childNodes;
									_helper.replaceSIFR(sIFRGillSansSrc, {
										elements: elTexts,
										css: ['.sIFR-root {color: #ffffff;}','a {color: #ffffff; text-decoration: none;}','a:hover {color: #ffffff; text-decoration: none; }']
									});
								}
							}
						};

						if (sIFRActive) {
							replaceSeductionItemsSIFR();
						}

						var colors = {
							"*": "#0B5ED7",
							"products": "#7CBD2A",
							"education": "#F58F08",
							"support": "#992C96"
						};
						var getColorBySection = function (section) {
							section = section || "";
							return colors[section] || colors["*"];
						};

						var fixedFontSizeSIFR = (_page.browser.isMac? 18: 20);	// Fonts are visually smaller, which causes wrapping of text on a Mac
						var replaceListItemSIFR = function (id, section) {
							_helper.replaceSIFR(sIFRGillSansSrc, {
								selector: '#p-hc-body-tabs li#' + id + ' span',
								css: ['.sIFR-root {font-size:' + fixedFontSizeSIFR + 'px; text-align: center;}','a { text-decoration: none; color:#666666;}','a:link { color:#666666 }','a:hover { color: ' + getColorBySection(section) + ';}'],
								onRelease: function (fi) {
									that.healthcare.tabs.open(section);
								}
							});
						};
						var replaceListItemActiveSIFR = function (id, section) {
							_helper.replaceSIFR(sIFRGillSansSrc, {
								selector: '#p-hc-body-tabs li#' + id + ' div',
								css: ['.sIFR-root {font-size: ' + fixedFontSizeSIFR + 'px; color:' + getColorBySection(section) + '; text-align: center;}'],
								onRelease: function (fi) {
									that.healthcare.tabs.open(section);
								}
							});
						};
						var replaceTabsSIFR = function () {
							var elWrapper = gE('p-hc-body-tabs');
							if (elWrapper) {
								var elItems = elWrapper.getElementsByTagName("li");
								for (var i = 0; i < elItems.length; i += 1) {
									var id = elItems[i].id;
									section = id.substring(id.lastIndexOf("-") + 1, id.length);
									replaceListItemSIFR(id, section);
									replaceListItemActiveSIFR(id, section);
								}
							}
						};
						if (sIFRActive) {
							replaceTabsSIFR();
						}

						var showExitLink = function (url) {
							return (!/(?:medical|healthcare)\.philips.com/i.test(url) && /^http/i.test(url));
						};

						var tabsProcessed = {};
						var processContent = function (id) {
							var section = id.substring(id.indexOf("content-") + 8, id.length);
							var elParent = gE(id);
							if (!tabsProcessed[section]) {
								if (!obj.groups) {
									return;
								}
								var oGroup = obj.groups[section] || {};
								var oCategories = oGroup.categories || {};
								elParent.innerHTML = "";
								if (section === "products") {
									var colsMaxSize = {
										"*": 1,
										"product": 3
									};
									var iBlock = 0;

									for (var key in oCategories) {
										var iColsMax = colsMaxSize[key] || colsMaxSize["*"];
										var elBlock = document.createElement("div");
										_page.dom.addClass(elBlock, "p-product-cat");
										elParent.appendChild(elBlock);
										var oCategory = oCategories[key];
										elBlock.className = "p-product-cat p-size-" + iColsMax;
										elBlock.appendChild(_helper.createCaretHeader('h5', oCategory, '2'));
										var iCol = 1;
										do {
											_helper.buildList(elBlock, oCategory, "link2", true, {moreLink: (iCol === iColsMax? oCategory.href: ""), showExitLink: showExitLink});
											iCol += 1;
										}
										while (oCategory.start < oCategory.items.length && iCol <= iColsMax);
										if (iBlock === 0) {
											_page.dom.addClass(elBlock, "p-first");
										}
										iBlock += 1;
									}

								} else {
									if (oCategories.main) {
										var elNav = document.createElement("div");
										_page.dom.addClass(elNav, "p-nav");
										elNav.appendChild(_helper.createCaretHeader('h5', oCategories.main, '2'));
										elParent.appendChild(elNav);
										_helper.buildList(elNav, oCategories.main, "link2", true, {showExitLink: showExitLink});
									}
									var maxPromotionSlots = 1;
									var availableSlots = 3;
									var oPromo = oGroup.promotions || [];
									var oArticles = oGroup.articles || [];
									if (oArticles.length > 0) {
										var elArticles = document.createElement("div");
										_page.dom.addClass(elArticles, "p-articles");
										oArticles.max = (oPromo.length >= maxPromotionSlots? (availableSlots - maxPromotionSlots): availableSlots);
										_helper.buildList(elArticles, oArticles, "module", false, {showExitLink: showExitLink});
										elParent.appendChild(elArticles);
									}
									if (oPromo.length > 0) {
										var elPromo = document.createElement("div");
										_page.dom.addClass(elPromo, "p-promotions");
										oPromo.max = availableSlots - oArticles.length;
										_helper.buildList(elPromo, oPromo, "module", false, {showExitLink: showExitLink});
										elParent.appendChild(elPromo);
									}
								}
								tabsProcessed[section] = true;
							}
							var objFade = new _page.Animation(elParent, {duration: 1000, transition: _page.transition.linear});
							objFade.start({'opacity': [0, 1]});
						};

						this.healthcare = this.healthcare || {};
						this.healthcare.seductionSlider = new _page.HomepageSlider();
						this.healthcare.seductionSlider.init("p-hc-seduction", {
							autoPlay: {
								interval: 10000
							}
						});

						this.tabs.addEvent('tabSwitch', function (openId) {
							var slider = (that.healthcare && that.healthcare.seductionSlider? that.healthcare.seductionSlider: {});
							if (openId === "medical" && slider.startAutoPlay) {
								slider.startAutoPlay();
							} else if (slider.stopAutoPlay) {
								slider.stopAutoPlay();
							}
						});

						this.healthcare.tabs = new _page.Tabs("p-hc-body", {
							"keepBodyOpen": true,
							"remoteOptions": {
								"*": {
									"loaded": true,
									"onComplete": processContent
								}
							}
						});
						this.healthcare.tabs.open((this.getSectionActiveId("medical") || "home"));
					} else if (obj.country && obj.product) {
						paramsLS = {type: '2', params: {remoteUrl: _page.crsc_server + "/crsc/locales/homepages_medical", showRows: 7}};
						_helper.buildNoWebPresenceGrid(elParent, obj, paramsLS);
					} else {
						elGrid = _helper.buildGrid(elParent, 'p-grid-2').addCols("p-column-1", "p-column-2", "p-divider", "p-column-3");
						elGrid.col[0].appendElement(_helper.createColHeader('h4', obj.professional));
						_helper.buildCategoryList(elGrid.col[0], obj.professional, true);
						_helper.buildCategoryList(elGrid.col[1], obj.professional, false);
						elGrid.col[1].appendElement(_helper.createColHeader('h4', obj.personal));
						_helper.buildCategoryList(elGrid.col[1], obj.personal, false);
						elGrid.col[3].appendElement(_helper.createColHeader('h4', obj.articles));
						obj.articles = obj.articles || [];
						obj.articles.max = 2;
						_helper.buildList(elGrid.col[3], obj.articles, "article");
						elGrid.removeEmptyCols();
						elGrid.equalHeight();
						_helper.buildBottomLinks(elParent, obj.links);
					}
					break;
				case "3_lighting":
				case "2_lighting":
					if (obj.catalog) {
						this.lightingCatalog = _helper.catalog().init({
							source: obj.catalog,
							elParent: elParent,
							activeItem: this.getSectionActiveId("lighting"),
							country: this.country,
							language: this.language,
							groupHover: false,
							groupBrowse: false,
							useBannersByListOrder: true
						});
						_helper.buildBottomLinks(elParent, obj.links, 5);
					} else if (obj.country && obj.product) {
						paramsLS = {type: '2', params: {remoteUrl: _page.crsc_server + "/crsc/locales/homepages_lighting", showRows: 7}};
						_helper.buildNoWebPresenceGrid(elParent, obj, paramsLS);
					} else {
						elGrid = _helper.buildGrid(elParent, 'p-grid-2').addCols("p-column-1", "p-column-2", "p-divider", "p-column-3");
						elGrid.col[0].appendElement(_helper.createColHeader('h4', obj.professional));
						_helper.buildCategoryList(elGrid.col[0], obj.professional, true);
						_helper.buildCategoryList(elGrid.col[1], obj.professional, false);
						elGrid.col[1].appendElement(_helper.createColHeader('h4', obj.consumer));
						_helper.buildCategoryList(elGrid.col[1], obj.consumer, false);
						elGrid.col[3].appendElement(_helper.createColHeader('h4', obj.articles));
						obj.articles = obj.articles || [];
						obj.articles.max = 2;
						_helper.buildList(elGrid.col[3], obj.articles, "article");
						elGrid.removeEmptyCols();
						elGrid.equalHeight();
						_helper.buildBottomLinks(elParent, obj.links);
					}
					break;
				case "3_support":
				case "2_support":
					if (locale === "global") {

						elGrid = _helper.buildGrid(elParent, 'p-grid-9').addCols("p-column-1", "p-divider", "p-column-2");
						elGrid.col[0].appendElement(_helper.createColHeader('h3', obj.consumer));
						elGrid.col[1].appendElement(_helper.createColHeader('h4', obj.other));

						elGridInner = _helper.buildGrid(elParent, 'p-columns').addCols("p-col-1", "p-col-2");
						elGrid.col[0].appendElement(elGridInner);

						lsConsumer = new _page.LS('2', {
							remoteUrl: _page.crsc_server + "/crsc/locales/homepages_support",
							localeFlag: "global",
							localeText: "Choose country / language",
							showRows: 6,
							listHeight: 260, //Set list height if can't determined dynamically
							keepActive: true,
							removeLocaleList: ["global", "others"]
						});
						elGridInner.col[1].innerHTML += lsConsumer.html();
						window.setTimeout(lsConsumer._show.bindArgs(lsConsumer), 500);

						elGrid.equalHeight();

						elGridInner.syncColsHeight(elGridInner.col[0]);

						_helper.addDescription(elGridInner.col[0], obj.consumer, false);

						elCategories = document.createElement("div");
						elCategories.className = "p-categories-container-lower";
						obj.other.categories = obj.other.categories || [];
						for (i in obj.other.categories) {
							if ( obj.other.categories.hasOwnProperty(i) ) {
								_helper.buildListSingleLine(elCategories, obj.other.categories[i], i===0);
							}
						}
						elGrid.col[2].appendElement(elCategories);

						elGridInner.removeEmptyCols();
						elGrid.removeEmptyCols();
					} else {
						if (obj.links_help && obj.links_help.length > 0) {
							elGrid = _helper.buildGrid(elParent, 'p-grid-10 p-tab-content-bottom-shadow').addCols("p-column-1", "p-divider", "p-column-2");
							elGrid.col[0].appendElement(_helper.createColHeader('h3', obj.consumer));
							_helper.buildList(elGrid.col[0], obj.links_help, "help", false);
							elCategories = document.createElement("div");
							elCategories.className = "p-categories-container";
							obj.other.categories = obj.other.categories || [];
							for (i in obj.other.categories) {
								if ( obj.other.categories.hasOwnProperty(i) ) {
									_helper.buildListSingleLine(elCategories, obj.other.categories[i], i===0);
								}
							}
							elGrid.col[2].appendElement(elCategories);
						} else {
							elGrid = _helper.buildGrid(elParent, 'p-grid-9').addCols("p-column-1", "p-divider", "p-column-2");
							elGrid.col[0].appendElement(_helper.createColHeader('h3', obj.consumer));
							elGrid.col[2].appendElement(_helper.createColHeader('h4', obj.other));
							elGrid.equalHeight();
							_helper.addDescription(elGrid.col[0], obj.consumer, true);
							obj.consumer.catalog.max = 7;
							obj.consumer.catalog.groups = obj.consumer.catalog.groups || [];
							_helper.buildTiles(elGrid.col[0], obj.consumer.catalog);
							elCategories = document.createElement("div");
							elCategories.className = "p-categories-container";
							obj.other.categories = obj.other.categories || [];
							for (i in obj.other.categories) {
								if ( obj.other.categories.hasOwnProperty(i) ) {
									_helper.buildListSingleLine(elCategories, obj.other.categories[i], i===0);
								}
							}
							elGrid.col[2].appendElement(elCategories);
							_helper.buildBottomLinksExtra(elParent, obj.links);
						}

					}

					if (sIFRActive) {
						_helper.replaceSIFR(sIFRGillSansSrc, {selector: '#p-navigator-content-support .p-col-header h3', css:['.sIFR-root {color: #992c96}']});
						_helper.replaceSIFR(sIFRGillSansSrc, {selector: '#p-navigator-content-support h4', css: ['.sIFR-root {.leading: -6}']});
					}
					break;
				case "3_about":
				case "2_about":
					var showStatement = (obj.statement && (obj.featured_news || obj.featured_news.length < 2)) ? true : false;
					elGrid = _helper.buildGrid(elParent, 'p-grid-8').addCols("p-column-1", "p-divider", "p-column-2", "p-column-3");
					elGrid.col[0].appendElement(_helper.createColHeader('h4', obj.company));
					_helper.buildCategoryList(elGrid.col[0], obj.company, false);
					elGrid.col[2].appendElement(_helper.createColHeader('h4', obj.latest_news));
					_helper.buildList(elGrid.col[2], obj.latest_news, "news");
					if (obj.featured_news) {
						obj.featured_news.name = obj.featured_news.items.length ? obj.featured_news.items[0].header : "";
						elGrid.col[3].appendElement(_helper.createColHeader('h4', obj.featured_news));
						obj.featured_news = obj.featured_news || [];
						obj.featured_news.max = 2;
						_helper.buildList(elGrid.col[3], obj.featured_news, "feature");
						if (obj.featured_news.items.length === 1) {
							_helper.buildStatement(elGrid.col[3], obj.statement);
						}
					}
					elGrid.removeEmptyCols();
					elGrid.equalHeight();
					_helper.buildBottomLinks(elParent, obj.links);
					if (showStatement && sIFRActive) {
						_helper.replaceSIFR(sIFRGillSansSrc, {selector: '#p-navigator-content-wrapper .p-statement', css:['.sIFR-root {color:'+obj.statement.color+'}']});
					}
					break;
				case "1_about":
					paramsLS = {type: '2', params: {remoteUrl: _page.crsc_server + "/crsc/locales/homepages", localeFlag: "global", localeText: "Choose country / language", showRows: 7}};
					_helper.buildNoWebPresenceGrid(elParent, obj, paramsLS);
					break;
				case "1_contact":
					elGrid = _helper.buildGrid(elParent, 'p-grid-5').addCols("p-column-1");
					elGridInner = _helper.buildGrid(elParent, 'p-columns').addCols("p-col-1 p-content","p-col-2 p-content");
					elGridInner.col[0].innerHTML += (obj.block1 && obj.block1.html? obj.block1.html: "");
					elGridInner.col[1].innerHTML += (obj.block1 && obj.block2.html? obj.block2.html: "");
					elGridInner.removeEmptyCols();
					elGrid.col[0].appendChild(_helper.createColHeader('h4', obj.block1));
					elGrid.col[0].appendElement(elGridInner);
					elGrid.removeEmptyCols();
					elGrid.equalHeight();
					break;
				default:
					_helper.buildAltMessageGrid(elParent, {alt: {name: "Error", html: "<p>Section could not be found in data feed...</p>"}});
					break;
				}
				if (sIFRActive && (section !== "consumer" || locale === "global") && section !=="live") {
					_helper.replaceSIFR(sIFRGillSansSrc, {selector: '#p-navigator-content-wrapper .p-col-header h4', css: ['.sIFR-root {.leading: -6}']});
					_helper.replaceSIFR(sIFRGillSansSrc, {selector: '#p-navigator-content-wrapper .p-statement'});
				}
			}
		}
		this.showContent();
	},
	contentObjForSection: function (section, locale) {
		return (_page.headerNav && ((section === "consumer" && locale !== "global") || section === "shop" || section === "live" || section === "support")? _page.headerNav.content: typeof headernav !== "undefined"? headernav: {}) || {};
	},
	hasWebPresence: function (section) {
		var obj = this.contentObjForSection(section, this.options.locale)[section];
		var countryRanking = this.siteLevel;
		var sFeedKey = obj? countryRanking + "_" + section: "";
		var bReturn = true;
		switch (sFeedKey) {
			case "3_lighting":
			case "2_lighting":
			case "3_medical":
			case "2_medical":
				if (obj.country && obj.product) {
					bReturn = false;
				}
				break;
			default:
				break;
		}
		return bReturn;
	},
	hasContent: function (openId) {
		var contentMarketingLocales = this.contentMarketingLocales;
		var available = (contentMarketingLocales.indexOf(this.options.locale) > -1 || openId === "support");
		var localesAvailable = [];
		if (!available) {
			var arrLocales = contentMarketingLocales.split(",");
			for (var i = 0; i < arrLocales.length; i+=1) {
				var locale = arrLocales[i];
				var arrLocale = locale.split("_");
				var country = arrLocale[0];
				var language = arrLocale[1] || "en";
				if (country === this.country) {
					var objLocale = {
						name:locale,
						countryLabel: (_page.countryInfo[country] && _page.countryInfo[country][language])? _page.countryInfo[country][language].name: "",
						languageLabel: _page.languages[language] || ""
					};
					localesAvailable.push(objLocale);
				}
			}
		}
		return {
			available: available,
			section: openId,
			localesAvailable: localesAvailable
		};
	},
	onTabSwitch: function (openId) {
		var proceed = true,
			objHasContent = this.hasContent(openId);
			this.injectBodyElement();
		if (openId !== "" && objHasContent.available === false) {
			(this.tabs.options.remoteOptions[openId] || this.tabs.options.remoteOptions["*"]).loaded = true;
			if (typeof _page.topNavContentNotAvailable === "function") {
				proceed = _page.topNavContentNotAvailable(objHasContent);
			}
		}
		if (proceed === false) {
			this.tabs.cancelEvent("tabSwitch");
		} else {
			this.hideContent();
		}
	},
	htmlTabs: function () {
		var html, classNavNames, _navSections, navId, navObj, tabText, tabLink;
		html = "";
		classNavNames = (this.options.type !== ""? "p-" + this.options.type + " ": "") + (this.options.transparency? "p-opacity": "");
		html += "<div id=\"" + this._id + "\" " + (classNavNames !== ""? "class=\"" + classNavNames + "\"": "") + ">\n";
		html += "	<div id=\"p-navigator-tabs-wrapper\" class=\"p-clearfix\">\n";
		html += "		<ul id=\"p-navigator-tabs\">\n";
		_navSections = this.navSections[this.siteLevel];
		for (navId in _navSections) {
			if (typeof navId === "string") {
				navObj = (_page.topNav[(navId)] || {})[0] || _navSections[navId];
				tabText = navObj[0] || "";
				tabLink = navObj[1] || "";
				if (tabText !== "") {
					html += "		<li id=\"p-navigator-tab-" + navId + "\"><a href=\"" + (this.options.compatMode? tabLink: "javascript:void(0)") + "\"><span><nobr>" + tabText + "</nobr></span></a></li>\n";
				}
			}
		}
		html += "		</ul>\n";
		html += "	</div>\n";
		html += '</div>\n';
		return html;
	},
	htmlBody: function (type) {
		var html = "", navId, obj, i;
		html += "		<div id=\"p-navigator-body\">\n";
		html += "			<div id=\"p-navigator-shadow-wrapper\">\n";
		html += '				<div class="p-shadow-left"></div>\n';
		html += "				<div id=\"p-navigator-content-wrapper\">\n";
		for (i = 0;i < this.tabs.items.length;i += 1) {
			navId = this.tabs.items[i];
			html += "				<div id=\"p-navigator-content-" + navId + "\" class=\"p-tab-content\"></div>\n";
		}
		html += "				</div>\n";
		html += '				<div class="p-shadow-right"></div>\n';
		html += '			</div>\n';
		html += "			<a id=\"p-navigator-close\" class=\"p-close\" href=\"javascript:void(0)\"></a>\n";
		html += '		</div>\n';
		html += '		<div class="p-shadow-bottom"></div>\n';
		switch (type) {
		case "html":
			obj = "	<div id=\"p-navigator-body-wrapper\" class=\"p-clearfix\" >\n" + html + "<div>\n";
			break;
		case "element":
			obj = document.createElement("div");
			obj.id = "p-navigator-body-wrapper";
			obj.className = "p-clearfix";
			obj.innerHTML = html;
			break;
		default:
			break;
		}
		return obj;
	},
	injectBodyElement: function () {
		var elWrapper, tabClose,
			wrapperId = "p-navigator-body-wrapper";
		if (!gE(wrapperId)) {
			gE(this._id).appendChild(this.htmlBody("element"));
			tabClose = gE(this._id + "-close");
			if (tabClose) {
				tabClose.onclick = this.tabs.close.bindArgs(this.tabs, null, true);
			}
		}
	}
};

/* STATIC CLASS:  HTML_HELPER */
_page.html_helper = {
	topnav: {
		buildBottomLinks: function (oTarget, oSource, max) {
			var elWrapper;
			if (oSource) {
				oSource.max = max || 3;
			}
			elWrapper = document.createElement("div");
			_page.dom.addClass(elWrapper, "p-tab-content-bottom p-tab-content-bottom-shadow");
			this.buildList(elWrapper, oSource, "sitespecific", false);
			oTarget.appendChild(elWrapper);
		},
		buildBottomLinksExtra: function (oTarget, oSource, max) {
			var elWrapper;
			if (oSource) {
				oSource.max = max || 3;
			}
			elWrapper = document.createElement("div");
			_page.dom.addClass(elWrapper, "p-tab-content-bottom-large p-tab-content-bottom-shadow");
			this.buildList(elWrapper, oSource, "sitespecific", false);
			oTarget.appendChild(elWrapper);
		},
		buildGrid: function (oTarget, sGridName) {
			var elGrid, elCol, i;
			elGrid = document.createElement("div");
			_page.dom.addClass(elGrid, sGridName);
			if (oTarget) {
				oTarget.appendChild(elGrid);
			}
			elGrid.addCols = function (sColName) {
				var appendElement = function (el) {
					if (el) {
						this.appendChild(el);
					}
					return this;
				};
				this.col = [];
				for (i = 0;i < arguments.length;i += 1) {
					elCol = document.createElement("div");
					_page.dom.addClass(elCol, arguments[i]);
					this.appendChild(elCol);
					this.col[i] = elCol;
					this.col[i].appendElement = appendElement;
					elCol = null;
				}
				return this;
			};
			elGrid.removeEmptyCols = function () {
				var curCol, prevCol, colStyle, i, hasDivider;
				for (i = (this.col.length - 1); i >= 0; i -= 1) {
					prevCol = this.col[i + 1] || null;
					curCol = this.col[i];
					hasDivider = _page.dom.hasClass(curCol, "p-divider");
					if ((prevCol === null && hasDivider) || (curCol.innerHTML === "" && !hasDivider)) {
						_page.dom.discardElement(curCol);
						this.col.splice(i, 1);			// Remove element from column array
					}
				}
				this.cleanUp();
				return this;
			};
			elGrid.equalHeight = function (size) {
				var blnGetSize, elCol, elHeader, maxSize = 0, multiLine = false;
				blnGetSize = (typeof size === "undefined"? true: false);
				for (i = 0; i < this.col.length; i += 1) {
					elCol = this.col[i];
					elWrapper = elCol.firstChild;
					if (elWrapper) {
						elHeader = elWrapper.firstChild;
						if (elHeader && (/h4/i).test(elHeader.nodeName)) {
							if (blnGetSize) {
								size = parseInt(elHeader.offsetHeight, 10);
								multiLine = ((!multiLine && i > 0)? size !== maxSize: multiLine);
								maxSize = (size > maxSize? size: maxSize);
							} else {
								elWrapper.style.height = size + "px";
							}
						}
					}
				}
				if (blnGetSize && multiLine) {
					arguments.callee.apply(this, [maxSize]);
				}
				return maxSize;
			};
			elGrid.syncColsHeight = function (oSource, iDelta) {
				iDelta = iDelta || 0;
				var curCol;
				for (i = 0; i < this.col.length; i += 1) {
					curCol = this.col[i];
					curCol.style.height = ((oSource.clientHeight - (curCol.offsetTop - oSource.offsetTop))) + iDelta + "px";
				}
			};
			elGrid.cleanUp = function () {
				elGrid = null;
			};
			return elGrid;

		},
		getSIFRSwf: function (locale) {
			locale = locale || "";
			var language = locale.split("_")[1] || "en";
			return _page.sIFR.getSWFByFont({language: language});
		},
		isSIFRActive: function () {
			if (typeof sIFR !== "undefined") {
				return (typeof sIFR.isActive !== "undefined"? sIFR.isActive: false);
			}
			return false;
		},
		replaceSIFR: function (oSIFR, oParams) {
			if (typeof sIFR !== "undefined") {
				if (sIFR.replace) {
					oParams = oParams || {};
					oParams.wmode = oParams.wmode || "transparent";
					oParams.ratios = oParams.ratios || [7, 1.32, 11, 1.31, 13, 1.24, 14, 1.25, 19, 1.23, 27, 1.2, 34, 1.19, 42, 1.18, 47, 1.17, 48, 1.18, 69, 1.17, 74, 1.16, 75, 1.17, 1.16];
					sIFR.replace(oSIFR, oParams);
				}
			}
		},
		buildList: function (oTarget, oSource, type, autoFit, params) {
			if (typeof oSource === "undefined") {
				return;
			}
			var strCurLanguage, iCharLimit, useImages, useHeader, elList, curItem, elListItem, tmpHTML, i, span, strName,
				checkDoubleLine = false, limitLine = false, linkType;
			params = params || {};
			params.moreLink = params.moreLink || "";
			type = type || "";
			oSource.start = oSource.start || 0;
			oSource.items = oSource.items || oSource.categories || oSource;
			oSource.max = oSource.max || oSource.items.length;
			if (oSource.start >= oSource.max || oSource.items.length === 0) {
				return;
			}
			strCurLanguage = _page.locale.split("_")[1] || "en";
			iCharLimit = (strCurLanguage === "ja" || strCurLanguage === "zh" || strCurLanguage === "th" || strCurLanguage === "ko"? 40: 95);
			useImages = (type === "article" || type === "product" || type === "feature"? true: false);
			elList = document.createElement("ul");
			if (type !== "") {
				_page.dom.addClass(elList, "p-" + type + "-list");
			}
			oTarget.appendChild(elList);
			for (i = oSource.start; i < oSource.max;i += 1) {
				curItem = oSource.items[i];
				if (typeof curItem === "undefined") {
					break;
				}
				elListItem = document.createElement("li");
				if (curItem.type === "home" || curItem.type === "register" || curItem.type === "contact") {
					_page.dom.addClass(elListItem, "p-" + type + "-list-item-" + curItem.type);
				}
				elList.appendChild(elListItem);
				tmpHTML = "";
				useHeader = (type === "feature" && i > 0? true: false);
				if (useHeader) {
					tmpHTML += (curItem.header? "<div class=\"p-col-header\"><h4>" + curItem.header + "</h4></div>": "");
				}
				if (useImages) {
					_page.dom.addClass(elListItem, "p-clearfix");
					tmpHTML += (curItem.src? "<div class=\"p-image\">" + _page.html_helper.topnav.createLink({name: "<img src=\"" + curItem.src + "\" alt=\"" + (curItem.alt? curItem.alt: "") + "\"></img>", href: curItem.href}) + "</div>": "");
				}
				switch (type) {
				case "product":
					tmpHTML += "<div class=\"p-content\">";
					tmpHTML += (curItem.href? "<a href=\"" + curItem.href + "\">": "");
					tmpHTML += (curItem.name? "<span class=\"p-subheader\">" + curItem.name + "</span>": "");
					tmpHTML += (curItem.special? "<span class=\"p-special\">" + curItem.special + "</span>": "");
					tmpHTML += (curItem.href? "</a>": "");
					tmpHTML += "</div>";
					break;
				case "link2":
					linkType = (_page.html_helper.topnav.showExitLink(curItem, params.showExitLink)? "exit": "");
					tmpHTML += _page.html_helper.topnav.createLink(curItem, null, linkType);
					limitLine = true;
					break;
				case "module":
					linkType = (_page.html_helper.topnav.showExitLink(curItem, params.showExitLink)? "exit": "");
					if (curItem.src) {
						moduleClass = (curItem.description? "p-module-b": "p-module-a");
					} else {
						moduleClass = "p-module-c";
					}
					_page.dom.addClass(elListItem, moduleClass);
					tmpHTML += (curItem.src?"<div class=\"p-image\">" + this.createLink({name: (this.createImage(curItem)), href: curItem.href}) + "</div>\n": "");
					tmpHTML += "<div class=\"p-content\">";
					tmpHTML += (curItem.name? "<h5 class=\"p-subheader\">" + (moduleClass === "p-module-b"? _page.html_helper.topnav.createLink(curItem): curItem.name) + "</h5>":"");
					tmpHTML += (curItem.description? "<p class=\"p-description\">" + curItem.description + "</p>":"");
					tmpHTML += (moduleClass !== "p-module-b"? "<span class=\"p-moreinfo\">" + _page.html_helper.topnav.createLink({name: curItem.hrefName + "", href: curItem.href}, null, linkType) + "</span>" : "");
					tmpHTML += "</div>";
					break;
				case "article":
					tmpHTML += "<div class=\"p-content\">";
					tmpHTML += (curItem.name? "<h5 class=\"p-subheader\">" + _page.html_helper.topnav.createLink(curItem) + "</h5>":"");
					tmpHTML += (curItem.description? "<p class=\"p-description\">" + _page.html_helper.topnav.limitChar(curItem.description, iCharLimit) + "</p>":"");
					tmpHTML += "<span class=\"p-moreinfo\">" + _page.html_helper.topnav.createLink({name: (_page.text.readmore || _page.text.more_label || "More") + "<span class=\"p-marker-2\">&nbsp;</span>", href: curItem.href}) + "</span>";
					tmpHTML += "</div>";
					break;
				case "news":
					var iNewsLinkCharLimit = 0, iNewsBodyCharLimit = 80;
					tmpHTML += "<div class=\"p-content\">";
					tmpHTML += (curItem.date? "<span class=\"p-date\">" + curItem.date + "</span>": "");
					tmpHTML += (curItem.name? "<h5 class=\"p-subheader\">" + _page.html_helper.topnav.createLink(curItem, iNewsLinkCharLimit) + "</h5>": "");
					tmpHTML += ((curItem.description && (curItem.name && curItem.name.length <= 140)) ? "<p class=\"p-description\">" + _page.html_helper.topnav.limitChar(curItem.description, iNewsBodyCharLimit) + "</p>":"");
					tmpHTML += "</div>";
					break;
				case "help":
					var html = '';
					html += (curItem.type? "<span class=\"p-icon-" + curItem.type + "\"></span>":"");
					html += (curItem.name? "<span class=\"p-subheader\">" + curItem.name + "</span>":"");
					html += (curItem.description? "<span class=\"p-description\">" + curItem.description + "</span>":"");
					tmpHTML += _page.html_helper.topnav.createLink({name:html ,href: curItem.href});
					break;
				case "feature":
					var iFeatureLinkCharLimit = 80, iFeatureBodyCharLimit = 80;
					tmpHTML += "<div class=\"" + (curItem.src? "p-content" : "p-content-no-image") + "\">";
					tmpHTML += (curItem.name? "<h5 class=\"p-subheader\">" + _page.html_helper.topnav.createLink(curItem, iFeatureLinkCharLimit) + "</h5>":"");
					tmpHTML += (curItem.description? "<p class=\"p-description\">" + curItem.description + "</p>":"");
					tmpHTML += "</div>";
					break;
				case "cat2":
					tmpHTML += "<div class=\"p-image\">" + this.createLink({name: (this.createImage(curItem)), href: curItem.href}) + "</div>\n";
					tmpHTML += "<div class=\"p-content\">" + this.createLink({name: "<span>" + curItem.name + "</span>", href: curItem.href}) + "</div>\n";
					tmpHTML += "&nbsp;\n"; // Do not remove this, necessary for IE to overcome the white space gap bug between list items.
					checkDoubleLine = true;
					break;
				case "marker-2":
					tmpHTML += (curItem.name? "<h5>" + _page.html_helper.topnav.createLink(curItem) + "<span class=\"p-marker-2\">&nbsp;</span></h5>": "");
					break;
				case "sitespecific":
					strName = 	(curItem.name && curItem.name !== ""? "<span class=\"p-subheader\">" + curItem.name + "<span class=\"p-marker-1\">&nbsp;</span></span>": "") + // Header
									(curItem.description && curItem.description !== ""? "<span class=\"p-description\">" + curItem.description + "</span>": ""); // Text
					if (curItem.href && curItem.href !== "") {
						tmpHTML += this.createLink({name: strName, href: curItem.href, onClickText: curItem.onClickText});
					} else {
						tmpHTML += "<a>" + strName + "</a>";
					}
					if (i === (oSource.max - 1)) {
						elListItem.className += " p-lastitem";
					}
					break;
				default:
					tmpHTML += _page.html_helper.topnav.createLink(curItem);
					limitLine = true;
					break;
				}
				elListItem.innerHTML = tmpHTML;
				if (limitLine) {
					this.limitLines(elListItem.firstChild, elListItem, 21, "...");
				}
				if (checkDoubleLine) {
					span = elListItem.getElementsByTagName("span")[0];
					if (span && span.offsetHeight > 30) {
						_page.dom.addClass(span, "p-doubleline");
					}
				}
				if (autoFit && _page.html_helper.topnav.contentHeightOverflow(oTarget, elList)) {
					_page.dom.discardElement(elListItem);
					oSource.start = i;
					if (params.moreLink !== "") {
						var elPrevListItem = elList.childNodes[elList.childNodes.length - 1];
						if (elPrevListItem) {
							elPrevListItem.innerHTML = "<span class=\"p-moreinfo\">" + _page.html_helper.topnav.createLink({name: "..." + (_page.text.more_label || _page.text.readmore || "More"), href: params.moreLink}) + "</span>";
						}
					}
					break;
				}
			}
			if (type === "cat2" && i < oSource.max) {
				_page.dom.addClass(elList, "p-cat2-list p-bottom-shadow");
			}
			if (type === "sitespecific") {
				_page.dom.addClass(elList, "p-maxitems-" + oSource.max);
			}
			oSource.start = i;
			return (elList.childNodes || []).length;
		},
		buildCategoryList: function (oTarget, oSource, autoFit, limitSubItems, showMoreSubItems) {  // Removed elList
			if (!oSource) {
				return;
			}
			var iLimitSubItems, iShowMoreSubItems, sSubCatItemSep, sCatDescription, curCatItem, elListItem, strCatItemLink, elHeader, sSubCatHTML, bSubCatItemLimit, bSubCatShowMore, iSubCatItemsLength, curSubCatItem, curSubCatItemLink, elEntry, i, x, elList;
			iLimitSubItems = limitSubItems || null;	   		// Limit the visible items
			iShowMoreSubItems = showMoreSubItems || null; 	// Show more link  from number of items
			if (autoFit) {
				oTarget.style.overflow = "hidden";
			}
			oSource.categories = oSource.categories || [];
			oSource.categories = oSource.categories.concat(oSource.add_categories || []); 	// Concat add_categories array to categories
			oSource.add_categories = [];													// Reset add_categories array after concatenation
			oSource.start = (oSource.start? oSource.start: 0);
			oSource.max = oSource.max || oSource.categories.length; // added
			if (oSource.start >= oSource.max) {
				return;
			}
			sSubCatItemSep = ",";
			sCatDescription = _page.text.category_intro; // Not used anymore
			elList = document.createElement("ul");
			oTarget.appendChild(elList);
			_page.dom.addClass(elList, "p-cat-list");
			for (i = oSource.start; i < oSource.max; i += 1) { // changed
				curCatItem = oSource.categories[i];
				if (!curCatItem) {
					break;
				}
				elListItem = document.createElement("li");
				elList.appendChild(elListItem);
				strCatItemLink = curCatItem.href || "";
				elHeader = _page.html_helper.topnav.createHeader('h5', curCatItem);
				elListItem.appendChild(elHeader);
				_page.dom.addClass(elHeader, "p-clearfix");
				if (curCatItem.items) {
					if (curCatItem.items.length > 0) {
						sSubCatHTML = '';
						bSubCatItemLimit = (iLimitSubItems !== null? iLimitSubItems < curCatItem.items.length: false);
						bSubCatShowMore = (iShowMoreSubItems !== null? iShowMoreSubItems <= curCatItem.items.length: bSubCatItemLimit);
						iSubCatItemsLength = (bSubCatItemLimit? iLimitSubItems: curCatItem.items.length);
						for (x = 0; x < iSubCatItemsLength; x += 1) {
							curSubCatItem = curCatItem.items[x];
							curSubCatItemLink = _page.html_helper.topnav.createLink(curSubCatItem);
							sSubCatHTML += (x !== 0 && curSubCatItemLink !== ""? sSubCatItemSep + " ": "") + curSubCatItemLink;
						}
						if (sSubCatHTML !== "") {
							sSubCatHTML += (bSubCatShowMore? sSubCatItemSep + " " + _page.html_helper.topnav.createLink({name: "...", href: strCatItemLink}): "");
							elEntry = document.createElement("p");
							elListItem.appendChild(elEntry);
							elEntry.innerHTML = sSubCatHTML;
						}
					}
				}
				if (autoFit && _page.html_helper.topnav.contentHeightOverflow(oTarget, elList)) {
					_page.dom.discardElement(elListItem);
					oSource.start = i;
					break;
				}
			}
			oSource.start = i;
		},
		buildListSingleLine: function (oTarget, oSource, bExtraSpace) {
			if (!oSource) {
				return;
			}

			var i, elList, elListItem, elEntry, curSubCatItem, elListHeader;

			elListHeader = document.createElement("h4");
			if (bExtraSpace) {
				elListHeader.className = "p-support-category-header-extra";
			} else {
				elListHeader.className = "p-support-category-header";
			}
			oTarget.appendChild(elListHeader);
			elListHeader.innerHTML = oSource.name;

			elList = document.createElement("ul");
			elList.className = "p-link-list";

			oTarget.appendChild(elList);

			for (i in oSource.items) {

				if ( oSource.items.hasOwnProperty(i) ) {

					curSubCatItem = oSource.items[i];

					elListItem = document.createElement("li");
					elList.appendChild(elListItem);

					elEntry = document.createElement("a");
					elListItem.appendChild(elEntry);

					elEntry.innerHTML = curSubCatItem.name;
					elEntry.setAttribute("href", curSubCatItem.href);

				}
			}
		},
		addDescription: function (oTarget, oSource, bTight) {

			if (!oSource) {
				return;
			}

			var elDescription;

			elDescription = document.createElement("div");
			if (bTight) {
				elDescription.className = "p-support-description-tight";
			} else {
				elDescription.className = "p-support-description";
			}
			elDescription.innerHTML = oSource.description;

			oTarget.appendChild(elDescription);

		},
		buildTiles: function (oTarget, oSource) {
			if (!oSource) {
				return;
			}

			var elTile, elImage, elHref1, elHref2, elBr, elTitle, elUL, elLI;
			var oProduct;

			elTitle = document.createElement("h4");
			elTitle.className = "p-support-subheader";
			if (oSource.groups.length > 0) {
				elTitle.innerHTML = oSource.name;
			}
			oTarget.appendChild(elTitle);

			for (var i in oSource.groups) {

				if ( oSource.groups.hasOwnProperty(i) ) {

					oProduct = oSource.groups[i];

					var blShowallIsNeeded = (oProduct.type === "showall"); // (oProduct.type == "showall" && oSource.groups.length > oSource.max+1);
					var blItemMayBeShown  = (oProduct.type !== "showall" && i < oSource.max);

					if (blItemMayBeShown || blShowallIsNeeded) {

						elTile = document.createElement("div");
						elTile.className = "p-product-tile";

						elImage = document.createElement("img");
						elImage.setAttribute("src", oProduct.src);
						elImage.className = "p-product-tile-image";
						elImage.setAttribute("title", oProduct.name);
						if (typeof oProduct.alt !== "undefined") {
							elImage.setAttribute("alt", oProduct.alt);
						}

						elBr = document.createElement("br");

						elHref1 = document.createElement("a");
						elHref1.setAttribute("href", oProduct.href);
						elHref1.appendChild(elImage);
						elHref1.setAttribute("title", oProduct.name);

						elHref2 = document.createElement("a");
						elHref2.setAttribute("href", oProduct.href);
						elHref2.setAttribute("title", oProduct.name);

						elTile.appendChild(elHref1);
						elTile.appendChild(elBr);

						elHref2.innerHTML = oProduct.name;

						if (oProduct.type === "showall") {

							elUL = document.createElement("ul");
							elUL.className = "p-link-list";
							elLI = document.createElement("li");
							elUL.appendChild(elLI);
							elLI.appendChild(elHref2);

							elTile.appendChild(elUL);

						} else {

							elTile.appendChild(elHref2);

						}

						oTarget.appendChild(elTile);
					}
				}
			}
		},
		buildStatement: function (oTarget, oSource) {
			if (!oSource) {
				return;
			}
			var cssString = 'color:' + oSource.color;
			elContainer = document.createElement('div');
			if (oSource.name) {
				elContainer.appendChild(_page.html_helper.topnav.createColHeader('h4', oSource));
			}
			elStatement = document.createElement('div');
			elStatement.className = 'p-statement';
			elStatement.style.cssText = cssString;
			elStatement.setAttribute('style',cssString);
			elStatement.innerHTML = oSource.description;
			elContainer.appendChild(elStatement);
			oTarget.appendElement(elContainer);
		},
		buildNoWebPresenceGrid: function (oTarget, oSource, paramsLS) {
			if (!oSource) {
				return;
			}
			var elGrid, elLinks, lsConsumer;
			elGrid = _page.html_helper.topnav.buildGrid(oTarget, 'p-grid-4').addCols("p-column-1 p-content", "p-divider", "p-column-2");
			elGrid.col[0].appendElement(_page.html_helper.topnav.createColHeader('h4', oSource.country));
			elGrid.col[0].innerHTML += oSource.country.html;
			elGrid.col[2].appendElement(_page.html_helper.topnav.createColHeader('h4', oSource.product));
			elGrid.col[2].innerHTML += "<p>" + (oSource.product.description || "") + "</p><br />\n";
			lsConsumer = new _page.LS(paramsLS.type, paramsLS.params);
			elGrid.col[2].innerHTML += lsConsumer.html() + "<br />";
			if (oSource.general) {
				elGrid.col[2].appendElement(_page.html_helper.topnav.createColHeader('h4', oSource.general));
				elGrid.col[2].innerHTML += "<p class=\"p-notopmargin\">" + (oSource.general.description || "") + "</p><br />\n";
				elLinks = _page.html_helper.topnav.buildGrid(elGrid.col[2], 'p-columns').addCols("p-col-1", "p-col-2");
				_page.html_helper.topnav.buildCategoryList(elLinks.col[0], oSource.general, true);
				_page.html_helper.topnav.buildCategoryList(elLinks.col[1], oSource.general, true);
				elLinks.removeEmptyCols();
			}
			elGrid.removeEmptyCols();
			elGrid.equalHeight();
			lsConsumer.init();
		},
		buildAltMessageGrid: function (oTarget, oSource) {
			if (!oSource) {
				return;
			}
			var altBuilt = false, i = 0, elGrid, id;
			for (id in oSource) {
				if (oSource.hasOwnProperty(id)) {
					i += 1;
				}
			}
			if (i === 1 && oSource.alt) {
				elGrid = _page.html_helper.topnav.buildGrid(oTarget, 'p-grid-5').addCols("p-column-1");
				elGrid.col[0].appendChild(_page.html_helper.topnav.createColHeader('h4', (oSource.alt.name? oSource.alt: {name: "&nbsp;"})));
				elGrid.col[0].innerHTML += oSource.alt.html;
				elGrid.removeEmptyCols();
				altBuilt = true;
			}
			return altBuilt;
		},
		limitChar: function (str, max, end) {
			str = str || "";
			max = max || 90;
			end = end || "...";
			var divEncode, afterWord, afterTotal, beforeWord;
			divEncode = document.createElement("div");
			divEncode.id = "p-encode-test";
			divEncode.innerHTML = str;
			str = divEncode.innerHTML;
			_page.dom.discardElement(divEncode);
			afterTotal = str.substring(max);
			afterWord = afterTotal.substring(0, afterTotal.indexOf(" "));
			beforeWord = str.substring(0, max);
			return beforeWord + (_page.util.trim(afterTotal) !== "" || _page.util.trim(afterWord) !== ""? afterWord + end: "");
		},
		showExitLink: function (oSource, exitLinkFn) {
			var url = oSource.href || "";
			if (url !== "" && typeof exitLinkFn === "function") {
				return exitLinkFn(url);
			}
		},
		limitLines: function (el, elCompare, maxHeight, ellipsis) {
			var shortenStringByHyphen = function (str) {
				if (str) {
					var match = str.match(/(.*)(?:\s|-)+[^\s\-]*$/i) || [];
					return match[1];
				}
			};
			ellipsis = ellipsis || "...";
			maxHeight = maxHeight || 0;
			var title = el.innerHTML;
			el.title = title;
			while (elCompare.offsetHeight > maxHeight && typeof title !== "undefined" ) {
				title = shortenStringByHyphen(title);
				if (typeof title !== "undefined") {
					el.innerHTML = title + ellipsis;
				}
			}
		},
		clickable: function (elTarget, href) {
			href = href || "";
			if (href !== "") {
				_page.dom.addClass(elTarget, "p-click");
				_page.events.add(elTarget, 'click', function (event) {
					_page.events.cancel(event);
					window.location = href;
				});
			}
		},
		contentHeightOverflow: function (oTarget, oSource) {
			oSource = oSource || oTarget.lastChild;
			var offsetTopSource = oSource.offsetTop; // parentNode seems to tbe the offsetParent in IE
			return (oSource && oTarget && ((oSource.offsetHeight + offsetTopSource) > oTarget.offsetHeight)? true: false);
		},
		buildButton: function (oSource) {
			oSource = oSource || {};
			var htmlClass, htmlOnClick, htmlId;
			htmlClass = " class=\"p-button" + (oSource.type && oSource.type !== ""? "-" + oSource.type: "") + "\"";
			htmlOnClick = (oSource.evtOnClick && oSource.evtOnClick !== ""? " onclick=\"" + oSource.evtOnClick + "\"": "");
			htmlId = (oSource.eId && oSource.eId !== ""? " id=\"" + oSource.eId + "\"": "");
			return "<table cellspacing=\"0\"" + htmlId + htmlClass + htmlOnClick + " ><tr><td><div>" + _page.html_helper.topnav.createLink(oSource) + "</div></td></tr></table>";
		},
		buildMultipleButtons: function (oSource) {
			if (!oSource || oSource.length === 0) {
				return;
			}
			var elBtnContainer = document.createElement("div"), i;
			_page.dom.addClass(elBtnContainer, "p-buttons p-clearfix");
			for (i = 0; i < oSource.length; i += 1) {
				elBtnContainer.innerHTML += _page.html_helper.topnav.buildButton(oSource[i]);
			}
			return elBtnContainer;
		},
		createHRule: function () {
			var elRule = document.createElement("div");
			elRule.appendChild(document.createElement("hr"));
			_page.dom.addClass(elRule, "p-hrule");
			return elRule;
		},
		createColHeader: function (elName, oSource) {
			var elHeader = this.createHeader(elName, oSource), elDiv;
			if (elHeader) {
				elDiv = document.createElement('div');
				_page.dom.addClass(elDiv, "p-col-header");
				elDiv.appendChild(elHeader);
			}
			return elDiv || elHeader;
		},
		createCaretHeader: function (elName, oSource, type, parentClass) {
			var elHeader = this.createHeader(elName, oSource, parentClass), elSpan;
			if (elHeader) {
				elCaret = document.createElement("span");
				_page.dom.addClass(elCaret, "p-marker" + (type !== ""? "-" + type :""));
				elCaret.innerHTML = "&nbsp;";
				elHeader.appendChild(elCaret);
			}
			return elSpan || elHeader;
		},
		createHeader: function (elName, oSource, className) {
			var elHeader = null, strHeader;
			className = className || "";
			strHeader = _page.html_helper.topnav.createLink(oSource);
			if (strHeader !== "") {
				elHeader = document.createElement(elName);
				if (className !== "") {
					_page.dom.addClass(elHeader, className);
				}
				elHeader.innerHTML = strHeader;
			}
			return elHeader;
		},
		createImage: function (oSource) {
			if (typeof oSource === "undefined") {
				return "";
			}
			var imgSrc = (oSource.src && oSource.src !== ""? " src=\"" + oSource.src + "\"": ""),
				imgAlt = " alt=\"" + (oSource.alt || "") + "\"",
				imgHeight = (oSource.height && oSource.height !== ""? " height=\"" + oSource.height + "\"": ""),
				imgWidth = (oSource.width && oSource.width !== ""? " width=\"" + oSource.width + "\"": "");
			return (imgSrc !== ""? "<img" + imgSrc + imgAlt + imgHeight + imgWidth + " ></img>": "");
		},
		createLink: function (oSource, iCharLimit, sType) {
			iCharLimit = iCharLimit || 0;
			sType = sType || "";
			var src = oSource || {}, name = src.name || "", href = src.href || "", onClickText = src.onClickText || "", prefix = "", postfix = "";
			var click = onClickText !== "" ? " onclick=\"javascript:" + onClickText + "\"" : "";
			if (sType === "exit") {
				postfix += "<span class=\"p-icon-exit\">&nbsp;</span>";
			}
			return (href !== "" && name !== ""? prefix + "<a " + (src.id? "id=\"" + src.id + "\"": "") + "href=\"" + href + "\"" + click + ">" + (iCharLimit !== 0 ? _page.html_helper.topnav.limitChar(name, iCharLimit) : name) + "</a>" + postfix: name);
		}
	}
};

_page.html_helper.topnav.catalog = (function () {
	var instCount = -1;
	return function () {
		var html = '', oGroups = [], animSlide, elContent, elNavs, elBlocks = [], helper = _page.html_helper.topnav, selUid, country, language, builtBlocks = {},
			catWrapperId, catNavWrapperId, catNavId, catNavItemId, catContentWrapperId, catContentId, catContentItemId,
			groupHover, groupBrowse, useBannersByListOrder,
			defaultIndex = 0,
			activeIndex = -1,
			maxGroups = 8,
			maxItemsPerColumn = 5,
			maxCatColumns = 2,
			needsPNGFix = /MSIE (5\.5|6)/.test(navigator.userAgent),
			setBackground = function (el, path) {
				var usePNGFix, imgStyleKey, styleValue;
				if (el && path !== "") {
					usePNGFix = (needsPNGFix === true? path.indexOf(".png") > -1: needsPNGFix);
					imgStyleKey = usePNGFix ?"filter" :"background";
					styleValue = usePNGFix ?"progid:DXImageTransform.Microsoft.AlphaImageLoader (src='" + path + "',sizingMethod='crop')": "url(" + path + ") no-repeat";
					el.style[imgStyleKey] = styleValue;
				}
			},
			getMaxCatColumnsById = function (id) {
				return (/ACCESSORIES/i).test(id || "")? 3: maxCatColumns;
			},
			getGroupIndexById = function (id) {
				id = id || "";
				if (id !== "") {
					var i, z, oCategories,
						reg = new RegExp(id, 'i');
					for (i = 0; i < oGroups.length; i += 1) {
						if (reg.test((oGroups[i].uid || ""))) {
							return i;
						}
						oCategories = oGroups[i].categories || [];
						for (z = 0; z < oCategories.length; z += 1) {
							if (reg.test((oCategories[z].uid || ""))) {
								return i;
							}
						}
					}
				}
			},
			getBannersBySize = function (aBannerItems, selIndex) {
				var i, aTmp = [];
				for (i = 0; i < aBannerItems.length; i += 1) {
					if (selIndex === (parseInt(aBannerItems[i].size, 10) || 0)) {
						aTmp.push(aBannerItems[i]);
					}
				}
				return aTmp;
			},
			omniTrack = function () {
				var productGroup = (selUid.match(/(.*)_gr/i) || [])[1] || "";
				if (_page.metrics && _page.metrics.trackAjax && productGroup !== "") {
					window.setTimeout(function () {
						_page.metrics.trackAjax({
							"division": "CP",
							"section": "main",
							"country": country,
							"language": language,
							"catalogtype": "consumer",
							"productgroup": productGroup,
							"productcategory": "",
							"productsubcategory": "",
							"productid": ""
						});
					}, 200);
				}
			},
			buildGroupCatalog = function (index) {
				index = index || 0;
				var allowedCols, oCategories, elBlock, columnsCount, bannerSize, oBanner, firstBanner, elImage, elCol, z, availableBanners, i, oBanners, elBanner,
					oGroup = oGroup || oGroups[index];
				if (!oGroup || builtBlocks[index]) {
					return;
				}
				allowedCols = getMaxCatColumnsById(oGroup.uid);
				oCategories = oGroup.categories || [];
				elBlock = gE(catContentItemId + "-" + index);
				columnsCount = 0;
				for (z = 0; z < oCategories.length; z += maxItemsPerColumn) {
					oGroup.max = z + maxItemsPerColumn;
					columnsCount += 1;
					elCol = document.createElement("div");	// Additional div wrapper is necessary for IE 5.5 list item width/indent bug
					elCol.className = "p-column";
					elBlock.appendChild(elCol);
					helper.buildList(elCol, oGroup, "cat2", false);
					if (columnsCount === allowedCols) {
						break;
					}
				}
				if (oGroup.country_specific && oGroup.country_specific.categories) {
					columnsCount += 1;
				}
				if (useBannersByListOrder === true) {
					oBanners = oGroup.banners || [];
					for (i = 0; i < oBanners.length; i += 1) {
						oBanner = oBanners[i];
						elBanner = createBanner(oBanner);
						if (elBanner) {
							elBlock.appendChild(elBanner);
							columnsCount += parseInt(oBanner.size, 10);
						}
					}
				} else {
					bannerSize = 4 - columnsCount;
					availableBanners = getBannersBySize(oGroup.banners || [], bannerSize);
					oBanner = availableBanners[Math.floor(Math.random() * availableBanners.length)];
					elBanner = createBanner(oBanner);
					if (elBanner) {
						elBlock.appendChild(elBanner);
						columnsCount += bannerSize;
					}
				}
				if (oGroup.country_specific) {
					elCol = document.createElement("div");
					elCol.className = "p-column";
					elCol.appendChild(helper.createHeader('h4', oGroup.country_specific));
					helper.buildList(elCol, oGroup.country_specific, "sitespecific", false); // link
					elBlock.appendChild(elCol);
				}
				if (columnsCount === 0) {
					elBlock.innerHTML += "&nbsp;";
				}
				builtBlocks[index] = true;
			},
			buildAllGroupCatalog = function () {
				for (var i = 0; i < maxGroups; i += 1) {
					buildGroupCatalog(i);
				}
			},
			createBanner = function (banner) {
				if (banner) {
					var elImage = document.createElement("div");
					_page.dom.addClass(elImage, "p-image p-size-" + banner.size);
					elImage.innerHTML += helper.createLink({ // Additional div image wrapper necessary for IE 5.5 float / margin bug
						"name": helper.createImage({"src": banner.src, "alt": banner.alt}),
						"href": banner.href
					});
					return elImage;
				}
			},
			setGroupImage = function (el, type) {
				if (el) {
					var index, path, styleValue, usePNGFix;
					type = type || "";
					if (type !== "Hover" && _page.dom.hasClass(el, "p-active")) {
						return;
					}
					index = el.id.split("-")[3] || -1;
					path = (oGroups && oGroups[index] && oGroups[index]["src" + type]? oGroups[index]["src" + type]: "");
					setBackground(el, path);
				}
			},
			selectGroup = function (params) {
				params = params || {};
				var i, curLeft, newLeft, elBlock, elNav,
					selIndex = params.index || getGroupIndexById(params.uid) || activeIndex,
					animate = typeof params.animate !== "undefined"? params.animate: true;
				selIndex = selIndex >= maxGroups? maxGroups - 1: (selIndex < 0? 0: selIndex);
				selUid = params.uid || oGroups[selIndex].uid || "";
				if (selIndex !== activeIndex) {
					activeIndex = activeIndex === -1? defaultIndex: activeIndex;
					buildGroupCatalog(selIndex);
					if (animSlide && animSlide.running) {
						animSlide.stop();
					}
					for (i = 0; i < maxGroups; i += 1) {
						elNav = elNavs[i];
						if (elNav) {
							if (i === (selIndex - 1)) {
								_page.dom.addClass(elNav, "p-active");
								setGroupImage(elNav, "Hover");
							} else {
								_page.dom.removeClass(elNav, "p-active");
								setGroupImage(elNav);
							}
						}
						elBlock = elBlocks[i] = (elBlocks[i] || gE(catContentItemId + "-" + i));
						if (elBlock) {
							elBlock.style.display = (i === selIndex || i === activeIndex? "block": "none");
						}
					}
					if (selIndex > activeIndex) { 	// Right
						curLeft = 0;
						newLeft = -940;
					} else { 					// Left
						curLeft = -940;
						newLeft = 0;
					}
					elContent = elContent || gE(catContentId);
					if (animate) {
						animSlide = new _page.Animation(elContent, {duration: 800, transition: _page.transition.expo.easeOut});
						animSlide.start({'left': [curLeft, newLeft]});
					} else {
						_page.dom.sX(elContent, newLeft);
					}
					activeIndex = selIndex;
					omniTrack();
				}
			},
			mouseClick = function (index, event) {
				_page.events.cancel(event);
				selectGroup({index: index});
			},
			preloadImage = function (src) {
				src = src || "";
				if (document.images && src !== "") {
					var img = new Image();
					img.src = src;
				}
			};

		return {
			init: function (params) {
				instCount += 1;
				params = params || {};
				var oGroup, elNav, elList, i, selIndex,
					oSource = params.source || {},
					oTarget = params.elParent,
					prefix = "p-ca" + instCount + "-";
				groupHover = (typeof params.groupHover !== "undefined"? params.groupHover: true);
				groupBrowse = (typeof params.groupHover !== "undefined"? params.groupBrowse: true);
				useBannersByListOrder = (typeof params.useBannersByListOrder !== "undefined"? params.useBannersByListOrder: false);
				catWrapperId = 			prefix + "w"; 	// p-cl-wrapper
				catNavWrapperId = 		prefix + "nw"; 	// p-cl-nav-wrapper
				catNavId = 				prefix + "n"; 	// p-cl-nav
				catNavItemId = 			prefix + "ni";	// p-cl-nav-x
				catContentWrapperId =	prefix + "cw";	// p-cl-content wrapper
				catContentId = 			prefix + "c";	// p-cl-content
				catContentItemId = 		prefix + "ci";	// p-cl-block-x
				oGroups = oSource.groups;
				if (!oGroups) {
					return;
				}
				selIndex = getGroupIndexById(params.activeItem || "") || defaultIndex;
				country = params.country;
				language = params.language;
				html += "<div id=\"" + catWrapperId + "\" class=\"p-cat-wrapper\">\n";
				html += "<div id=\"" + catNavWrapperId + "\" class=\"p-cat-nav-wrapper\">\n";
				html += "	<ul id=\"" + catNavId + "\" class=\"p-cat-nav\">\n";
				for (i = 1; i < maxGroups; i += 1) {
					oGroup = oGroups[i];
					if (oGroup) {
						html += "			<li><a href=\"" + (oGroup.href || "javascript:void(0)") + "\">" + oGroup.name + "</a></li>\n";
					}
				}
				html += "	</ul>\n";
				html += "</div>\n";
				html += "<div id=\"" + catContentWrapperId + "\" class=\"p-cat-content-wrapper\">\n";
				html += "	<div id=\"" + catContentId + "\" class=\"p-cat-content\">\n";
				for (i = 0; i < maxGroups; i += 1) {
					oGroup = oGroups[i];
					if (oGroup) {
						html += "			<div id=\"" + catContentItemId + "-" + i + "\" class=\"p-cat-block\"></div>\n";
					}
				}
				html += "	</div>\n";
				html += "</div>\n";
				html += "</div>\n";
				oTarget.innerHTML  = html;
				elList = gE(catNavId);
				elNavs = elList.getElementsByTagName("li");
				for (i = 0; i < elNavs.length; i += 1) {
					elNav = elNavs[i];
					elNav.id = catNavItemId + "-" + (i + 1);
					preloadImage(oGroups[i + 1].src || ""); 	 // Preload group image hovers
					preloadImage(oGroups[i + 1].srcHover || ""); // Preload group image
					if (groupHover) {
						_page.events.add(elNav, "mouseover", setGroupImage.bindArgs(null, [elNav, "Hover"]));
						_page.events.add(elNav, "mouseout", setGroupImage.bindArgs(null, [elNav]));
					}
					if (groupBrowse) {
						_page.events.add(elNav.firstChild, "click", mouseClick.bindArgs(null, [i + 1], true));
					}
				}
				buildAllGroupCatalog();
				selectGroup({index: selIndex, animate: false});
				return this;
			},
			selectGroup: function (id) {
				selectGroup({uid: id});
			}
		};
	};
})();

_page.SimpleRotator = function () {
	this.idWrapper = '';
	this.elImages = [];
	this.objAnimate = null;
	this.hasRun = false;
	_page.implementCustomEvents(this);
};
_page.SimpleRotator.prototype = {
	init: function (id) {
		this.idWrapper = id;
		var elWrapper = gE(this.idWrapper);
		if (elWrapper) {
			this.elImages = elWrapper.getElementsByTagName("li");
			for (var i = 0; i < this.elImages.length; i += 1) {
				this.elImages[i].id = this.idWrapper + "-itm-" + i;
			}
		}
	},
	getActiveImage: function () {
		if (this.hasRun === false) {
			for (var i = 0;i < this.elImages.length; i += 1) {
				var elImage = this.elImages[i];
				if (_page.dom.hasClass(elImage, "p-active-default")) {
					return  elImage;
				}
			}
		}
		return this.elImages[this.elImages.length - 1];
	},
	isSelected: function (el, index) {
		return 	el.id.indexOf(this.idWrapper + "-itm-" + index) > -1;
	},
	getTargetImage: function (index) {
		for (var i = 0;i < this.elImages.length; i += 1) {
			if (this.isSelected(this.elImages[i], index)) {
				return this.elImages[i];
			}
		}
	},
	startAnimation: function (elTo) {
		if (this.objAnimate && this.objAnimate.running) {
			this.objAnimate.stop();
		}
		this.objAnimate = new _page.Animation(elTo, {duration: 700, transition: _page.transition.linear});
		this.objAnimate.start({'opacity': [0, 1]});
	},
	switchItem: function (index) {
		var elActive = this.getActiveImage();
		if (!this.isSelected(elActive, index)) {
			var elTarget = this.getTargetImage(index);
			if (elTarget) {
				elTarget.style.opacity = 0;
				elTarget.style.visibility = "hidden";
				elTarget.style.zIndex = 1;
				elTarget.parentNode.appendChild(elTarget);
				this.startAnimation(elTarget);
				this.fireEvent('itemSwitch', [index]);
				this.hasRun = true;
			}
		}
		return false;
	}
};

_page.SimpleSlider = function () {
	this.params = {};
	this.elItems = [];
	this.itemWidth = 0;
	this.elNavItems = [];
	this.animSlide = null;
	this.defaultIndex = 0;
	this.activeIndex = 0;
	this.elContent = null;
	this.animate = true;
	this.autoPlayEvent = null;
	_page.implementCustomEvents(this);
};
_page.SimpleSlider.prototype = {
	init: function (id, parameters) {
		this.params = parameters || {};
		this.params.autoPlay = this.params.autoPlay || {};
		var that = this;
		var elWrapper = gE(id + "-content"), i;
		if (elWrapper) {
			this.elContent = elWrapper;
			this.elItems = elWrapper.getElementsByTagName("li");
			var itemWidth = this.elItems[0].offsetWidth;
			elWrapper.style.width = (this.elItems.length * itemWidth) + 'px';
			var elNav = gE(id + "-nav");
			this.elNavItems = elNav.getElementsByTagName("li");
			var elNavClick = function (count, event) {
				_page.events.cancel(event);
				that.switchItem(count);
			};
			for (i = 0; i < this.elNavItems.length; i += 1) {
				_page.events.add(this.elNavItems[i].firstChild, "click", elNavClick.bindArgs(null, [i], true));
			}
			this.startAutoPlay();
		}
	},
	switchItem: function (index, auto) {
		var i, curLeft, newLeft, elBlock, elNav;
		var navItemsCount = this.elNavItems.length;
		var selIndex = typeof index !== "undefined"? (index > (navItemsCount - 1)? 0: index): this.activeIndex;

		if (selIndex !== this.activeIndex) {
			this.activeIndex = (this.activeIndex === -1? this.defaultIndex: this.activeIndex);
			this.startAutoPlay();
			if (this.animSlide && this.animSlide.running) {
				if (auto) {
					return;			  // skip animation and restart autoplay
				} else {
					this.animSlide.stop(); // manual action, stop animation
				}
			}

			for (i = 0; i < navItemsCount; i += 1) {
				elNav = this.elNavItems[i];
				if (i === selIndex) {
					_page.dom.addClass(elNav, "p-active");
				} else {
					_page.dom.removeClass(elNav, "p-active");
				}
			}

			curLeft = parseInt(this.elContent.style.left, 10) || 0;
			newLeft = 0;
			diffWidth = selIndex * this.elItems[0].offsetWidth;
			newLeft -= diffWidth;

			if (this.animate) {
				animSlide = new _page.Animation(this.elContent, {duration: 800, transition: _page.transition.expo.easeOut});
				animSlide.start({'left': [curLeft, newLeft]});
			} else {
				_page.dom.sX(elContent, newLeft);
			}
			this.activeIndex = selIndex;
			this.fireEvent('itemSwitch', [selIndex]);
		}
	},
	stopAutoPlay: function () {
		clearInterval(this.autoPlayEvent);
	},
	startAutoPlay: function (interval) {
		interval = interval || this.params.autoPlay.interval;
		var that = this;
		if (typeof interval !== "undefined") {
			this.stopAutoPlay();
			this.autoPlayEvent = window.setInterval(function () {
				that.switchItem(that.activeIndex + 1, true);
			}, interval);
		}
	}
};

_page.HomepageSlider = function () {};
_page.HomepageSlider.prototype = {
	init: function (id, params) {
		var that = this;
		params = params || {};
		this.rotation = new _page.SimpleRotator();
		this.rotation.init(id + "-active");
		this.slider = new _page.SimpleSlider();
		this.slider.addEvent('itemSwitch', function (index) {
			that.rotation.switchItem(index);
		});
		this.slider.init(id, params);
	},
	stopAutoPlay: function () {
		if (this.slider) {
			this.slider.stopAutoPlay();
		}
	},
	startAutoPlay: function (ms) {
		if (this.slider) {
			this.slider.startAutoPlay(ms);
		}
	}
};


_page.altLocaleFlag = "";							// allow alternative locale flag (Country C)
_page.altLocaleText = "";							// allow alternative locale text (Country C)
_page.selectedLocale = "";							// allow other selected locale in localelist (Country C)
_page.LS = function (type, params) {
	this.hoverId = "p-ls-hover-";
	this.listId = "p-ls-container-";
	this.listHeaderId = "p-ls-header-";
	this.listBodyId = "p-ls-body-";
	this.listIframeId = "p-lsIF-";
	params = params || {};
	this.options = {
		wrapperId: (params.wrapperId? params.wrapperId: undefined),
		keepActive: (typeof(params.keepActive) !== "undefined"? params.keepActive: false),
		localeFlag: (params.localeFlag? params.localeFlag: _page.altLocaleFlag || _page.locale),
		localeText: (params.localeText? params.localeText: _page.altLocaleText),
		collapseDirection: (params.collapseDirection? params.collapseDirection: 'auto'),
		showRows: (params.showRows? params.showRows: 9), 										// Default rows 9
		listHeight: (params.listHeight? params.listHeight: 275), 								// Default height defined in styles, may be overruled for faillover
		data: (params.data? params.data: _page.getLocalesArray || []),							// Requires an array of locales, input can be array or function
		remoteUrl: (params.remoteUrl? params.remoteUrl: ""),
		remoteOptions: params.remoteOptions || {},
		removeLocaleList: params.removeLocaleList || []
	};
	this.type = type;
	this.options.remoteOptions.onComplete = (this.options.remoteOptions.onComplete?this.options.remoteOptions.onComplete:this._remoteComplete.bindArgs(this));
	_page.LS.arrIndex += 1;
	this.arrIndex = _page.LS.arrIndex;
	this.id = this.options.wrapperId || "p-ls-" + this.arrIndex;
	this.timerShow = 0;
	this.timerHide = 0;
	this.rows = this.options.showRows;
	this.move = this.options.collapseDirection;
	this.switchOverflow = (_page.browser.isMac && _page.browser.isGecko?true:false);
	this.localeArray = [];
	this.dataLoaded = false;
	this.loading = false;
	this.elList = null;
	this.listActive = false;
	if (this.options.onContentReady) {
		_page.onContentReady(this.init.bindArgs(this));
	}
};
_page.LS.arrIndex = -1;
_page.LS.prototype = {
	init: function () {
		var elWrapper = gE(this.id),
			elHover = elWrapper.getElementsByTagName("div")[0];
		if (elHover) {
			elHover.id = 'p-ls-hover-' + this.arrIndex;
		}
		this.initEvents();
	},
	initEvents: function () {
		_page.events.add(gE('p-ls-hover-' + this.arrIndex), 'click', this._mClick.bindArgs(this));
		if (!this.options.keepActive) {
			_page.events.add(gE(this.id), 'mouseover', this._mOver.bindArgs(this));
			_page.events.add(gE(this.id), 'mouseout', this._mOut.bindArgs(this));
		}
	},
	_load: function (renderImages) {
		this.loading = true;
		this._getData();
		if (this.dataLoaded) {
			this._update();
			this._visible(true);
			if (renderImages) {
				this._renderImages();
			}
			this._resize();
			this._position();
			this._hidden(true);
			this.loading = false;
		}
	},
	_remoteComplete: function () {
		this.localeArray = _page.processLocales() || [];
		if (this._localesTmp) {
			_page.locales = this._localesTmp;
		}
		this.dataLoaded = true;
		this._show();
	},
	_getData: function () {
		var id;
		if (this.dataLoaded === false) {
			if (this.options.remoteUrl !== "") {
				this._localesTmp = {};
				for (id in _page.locales) {
					if (_page.locales.hasOwnProperty(id)) {
						this._localesTmp[id] = _page.locales[id];
					}
				}
				_page.locales = {};
				_page.loadJSFile(this.options.remoteUrl, function () {
					var filled = false;
					for (id in _page.locales) {
						if (_page.locales.hasOwnProperty(id)) {
							filled = true;
							break;
						}
					}
					return filled;
				}, this.options.remoteOptions.onComplete);
			} else {
				this.localeArray = typeof this.options.data === "function"? this.options.data(): this.options.data;
				this.dataLoaded = true;
			}
		}
	},
	_mClick: function (e) {
		_page.events.cancel(e);
		clearTimeout(this.timerHide);
		clearTimeout(this.timerShow);
		this._show();
	},
	_mOver: function () {
		clearTimeout(this.timerHide);
		this.timerShow = setTimeout(this._show.bindArgs(this), '1000');
	},
	_mOut: function () {
		clearTimeout(this.timerShow);
		this.timerHide = setTimeout(this._hide.bindArgs(this), '500');
	},
	_show: function (e) {
		var elList, elLSBody, elFlag, elIframe;
		if (this.listActive === false) {
			this._load(true);
		}
		elList = gE(this.listId + this.arrIndex);
		if (elList) {
			elLSBody = gE('p-ls-body-' + this.arrIndex);
			if (elLSBody && this.switchOverflow) {
				elLSBody.style.overflow = "auto";
			}
			if (this.type === '1') {
				elFlag = gE('p-flag-' + this.arrIndex);
				if (elFlag) {
					_page.dom.addClass(elFlag, 'p-flag-on');
				}
			}
			if (_page.useIframe) {
				elIframe = gE('p-lsIF-' + this.arrIndex);
				if (elIframe) {
					_page.dom.sE(elIframe);
				}
			}
			this._visible();
			this.listActive = true;
		}
	},
	_hide: function () {
		var elList, elListBody, elFlag, elIframe;
		elList = gE(this.listId + this.arrIndex);
		if (elList) {
			elListBody = gE('p-ls-body-' + this.arrIndex);
			if (elListBody && this.switchOverflow) {
				elListBody.style.overflow = "hidden";
			}
			if (this.type === '1') {
				elFlag = gE('p-flag-' + this.arrIndex);
				if (elFlag) {
					_page.dom.addClass(elFlag, 'p-flag');
				}
			}
			if (_page.useIframe) {
				elIframe = gE('p-lsIF-' + this.arrIndex);
				if (elIframe) {
					_page.dom.hE(elIframe);
				}
			}
			this._hidden();
			this.listActive = false;
		}
	},
	html: function () {
		var strFlagLocale, strCountry, strLanguage, strFlagSource, strLocaleText, strHTML, crsc, strArrowName, classClick, strCountryLabel;
		strFlagLocale = this.options.localeFlag;
		strCountry = strFlagLocale.split("_")[0];
		strLanguage = strFlagLocale.split("_")[1] || "en";
		strFlagSource = "flag_" + strCountry + ".gif";
		if (this.options.localeText === "") {
			strCountryLabel = _page.countryInfo[strCountry]? (_page.countryInfo[strCountry][strLanguage] || _page.countryInfo[strCountry]["en"]).name: "Global";
			this.options.localeText = (strCountryLabel) + " / " + _page.languages[strLanguage];
		}
		strLocaleText = this.options.localeText;
		strHTML = "";
		strHTML += "<div class=\"p-ls-wrapper-" + this.type + "\" id=\"p-ls-" + this.arrIndex + "\" >";
		crsc = _page.crsc_server;
		strArrowName = (_page.direction === 'ltr'? "arrow_bottom_right.gif": "arrow_bottom_left.gif");
		classClick = (this.options.keepActive !== true? "p-click": "");
		if (this.type === "1") {
			strHTML += "<div class=\"p-ls-hover-container-1 " + classClick + "\" id=\"p-ls-hover-" + this.arrIndex + "\"><nobr><img alt=\"" + strLocaleText + "\" src=\"" + crsc + "/crsc/images/" + strFlagSource + "\" id=\"p-flag-" + this.arrIndex + "\" class=\"p-flag\" />&nbsp;<img alt=\"Show locale list\" src=\"" + crsc + "/crsc/images/" + strArrowName + "\" id=\"p-arrow-bottom-right-" + this.arrIndex + "\" class=\"p-arrow-bottom-right\" /></nobr></div>\n";
		} else if (this.type === "2") {
			strHTML += "<div class=\"p-ls-hover-container-2\">\n<a href=\"javascript:void(0);\">\n<img alt=\"\" src=\"" + crsc + "/crsc/images/" + strFlagSource + "\" class=\"p-flag\" /><span>" + strLocaleText + "</span></a>\n</div>\n";
		}
		strHTML += "</div>";
		return strHTML;
	},
	_renderImages: function () {
		if (this.imagesRendered) {
			return;
		}
		var arrLocales, strLocale, strCurCountry, elLink, strNewClass, i;
		arrLocales = this.localeArray;
		for (i = 0; i < arrLocales.length; i += 1) {
			strLocale = arrLocales[i][0];
			strCurCountry = (strLocale.indexOf("_") === -1? strLocale: strLocale.substring(0, 2));
			elLink = gE("p-ls-list-" + this.arrIndex + "-flag-" + strCurCountry);
			strNewClass = "p-flag-" + strCurCountry;
			if (elLink) {
				_page.dom.addClass(elLink, strNewClass);
			}
		}
		this.imagesRendered = false;
	},
	_removeLocales: function () {
		var arrLocales, strLocale, i;
		if (this.options.removeLocaleList.length === 0) {
			return;
		}
		arrLocales = this.localeArray;
		for (i = 0; i < arrLocales.length; i += 1) {
			strLocale = arrLocales[i][0];
			if (_page.util.hasElement(this.options.removeLocaleList, strLocale)) {
				arrLocales.splice(i, 1);
			}
		}
	},
	_update: function () {
		if (this.updated) {
			return;
		}
		var arrLocales, crsc, strCurCountry = '', strLastCountry = '', strLocale = '', strHTMLBody = '', overFlow, arrLocalesMax, elFlagDimensions, elContainer, strHTMLHeader, i, elWrapper, strHTML;
		this._setAutoMovement();
		this._removeLocales();
		arrLocales = this.localeArray;
		crsc = _page.crsc_server;
		overFlow = (this.switchOverflow? "style=\"overflow:hidden\"": "");
		strHTMLBody += "<div id=\"p-ls-body-" + this.arrIndex + "\" class=\"p-ls-body\" " + overFlow + ">\n";
		strHTMLBody += "<table class=\"p-ls-list\" cellspacing=\"0\" border=\"0\">\n";
		arrLocalesMax = arrLocales.length;
		for (i = 0; i < arrLocalesMax; i += 1) {
			strLocale = arrLocales[i][0];
			strCurCountry = (strLocale.indexOf("_") === -1? strLocale: strLocale.substring(0, 2));
			if (strCurCountry !== strLastCountry) {
				elFlagDimensions = {width: '17', height: '13'};
				if (strCurCountry === "global" || strCurCountry === "me_en" || strCurCountry === "ce_es" || strCurCountry === "others") {
					elFlagDimensions = {width: '14', height: '14'};
				}
				strHTMLBody +=
				(i !== 0? "</ul></td></tr>\n": "") +
				"<tr><td class=\"p-ls-list-left\"><a id=\"p-ls-list-" + this.arrIndex + "-flag-" + strCurCountry + "\" href=\"" + arrLocales[i][3] + "\" onclick=\"_page.changelocale('" + strLocale + "');return false;\" /></td><td  class=\"p-ls-list-right\"><ul class=\"p-ls-localelist\">\n";
			}
			strHTMLBody += "<li><a href=\"" + arrLocales[i][3] + "\" onclick=\"_page.changelocale('" + strLocale + "','" + arrLocales[i][3] + "');return false;\">" +  arrLocales[i][1] + (arrLocales[i][2] !== ""? " / " + arrLocales[i][2]: "") + "</a></li>";
			strLastCountry = strCurCountry;
		}
		strHTMLBody += "</ul></td></tr>\n";
		strHTMLBody += "</table>\n";
		strHTMLBody += "</div>\n";
		strHTML = "";
		elContainer = document.createElement("div");
		elContainer.id = "p-ls-container-" + this.arrIndex;
		elContainer.className = "p-ls-container-" + this.move;
		if (this.type === "1") {
			strHTMLHeader = "<div id=\"p-ls-header-" + this.arrIndex + "\" class=\"p-ls-header\"><table cellspacing=\"0\" class=\"p-ls-header-table\"><tr><td><span id=\"p-ls-header-text-" + this.arrIndex + "\">" + this.options.localeText + "</span></td></tr></table></div>\n";
			strHTML += strHTMLHeader + strHTMLBody;	// Header used which overlaps the topmenu
		} else if (this.type === "2") {
			strHTML += strHTMLBody;
		}
		if (_page.useIframe) {
			strHTML += "		<iframe frameborder=0 id=\"p-lsIF-" + this.arrIndex + "\" src=\"" + crsc + "/crsc/images/t.gif\" scroll=none style=\"FILTER:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);visibility:hidden;height:0;position:absolute;width:0px;top:0px;z-index:0;\"></iframe>";
		}
		elContainer.innerHTML = strHTML;
		elWrapper = gE(this.id);
		if (elWrapper) {
			elWrapper.appendChild(elContainer);
		}
		this.updated = true;
	},
	_resize: function () {
		if (this.resized) {
			return;
		}
		var intMaxRows, elListBody, arrRows, intHeight = 0, intVisibleRows = 0, elCellLeft, elCellRight, elList, elLS, elIframe, i;
		intMaxRows = this.rows;
		elListBody = gE(this.listBodyId + this.arrIndex);
		arrRows = elListBody.getElementsByTagName('tr');
		for (i = 0; i < arrRows.length; i += 1) {
			elCellLeft = arrRows[i].childNodes[0];
			elCellRight = arrRows[i].childNodes[1];
			if (i < intMaxRows) {	// Count visible height
				intHeight += elCellRight.offsetHeight;
				intVisibleRows += 1;
			}
			if (!arrRows[i + 1]) {	// Remove bottom border
				_page.dom.addClass(elCellLeft, "p-nobottomborder");
				_page.dom.addClass(elCellRight, "p-nobottomborder");
			}
		}
		intHeight = (intHeight === 0? this.options.listHeight: intHeight);  // Set failover height, if it can't be determined due to display:none in parent elements
		if (_page.browser.isSafari) {
			intHeight = intHeight + intVisibleRows; // Safari doesn't include the borders in the height
		}
		if (arrRows.length > intMaxRows) {
			if (!_page.browser.isIE5x) {
				intHeight -= 1;  // Decrease 1px for border, except for border box model applicable browsers
			}
			if (_page.browser.isSafari) {
				intHeight = intHeight - 2;
			}
		} else {
			if (!_page.browser.isSafari) {
				elList = elListBody.getElementsByTagName("table")[0];
				_page.dom.sW(elList, elListBody.offsetWidth - 2); // - 2  due to border
			}
			if (_page.browser.isIE5x) {
				intHeight += 1; // increase 1px for border only for border box model applicable browsers
			}
		}
		_page.dom.sH(elListBody, intHeight);
		if (_page.useIframe) {
			elList = gE(this.listId + this.arrIndex);
			elIframe = gE(this.listIframeId + this.arrIndex);
			_page.dom.sH(elIframe, (elList.offsetHeight));
			_page.dom.sW(elIframe, (elList.offsetWidth));
		}
		this.resized = true;
	},
	_setAutoMovement: function () {
		if (this.options.collapseDirection !== "auto") {
			return;
		}
		var scrollPosTop = _page.dom.getScrollPosTop(),  				// Positon top in scrolled browser window
			screenHeight = _page.dom.getScreenHeight(),				// Available height browser window
			scrollPosBottom = scrollPosTop + screenHeight,	// Positon bottom in scrolled browser window
			elHover = gE(this.hoverId + this.arrIndex),
			elList = gE(this.listId + this.arrIndex),
			bottomPosContainer = _page.dom.findPosY(elHover) + (elList? elList.offsetHeight: this.options.listHeight),
			topPosContainer = _page.dom.findPosY(elHover) - (elList? elList.offsetHeight: this.options.listHeight);
		this.move = (bottomPosContainer > scrollPosBottom && topPosContainer > scrollPosTop? "up": "down");
	},
	_position: function () {
		this._setAutoMovement();
		var elHover, elList, elHeader, elBody;
		elHover = gE(this.hoverId + this.arrIndex);
		elList = gE(this.listId + this.arrIndex);
		elHeader = gE(this.listHeaderId + this.arrIndex);
		elBody = gE(this.listBodyId + this.arrIndex);
		if (this.move === "up") {
			if (this.type === "1") {
				if (elHeader && elBody) {
					elHeader.parentNode.insertBefore(elBody, elHeader);
				}
			}
			_page.dom.addClass(elList, "p-ls-container-up");
		} else if (this.move === "down") {
			if (this.type === "1") {
				if (elHeader && elBody) {
					elHeader.parentNode.insertBefore(elHeader, elBody);
				}
				if (elHover && elList) {
					elHover.parentNode.insertBefore(elList, elHover);
				}
			}
			_page.dom.addClass(elList, "p-ls-container-down");
		}
	},
	_visible: function (visibility) {
		var elList = gE(this.listId + this.arrIndex);
		if (elList) {
			if (visibility) {
				_page.dom.hE(elList);
			}
			_page.dom.dE(elList);
		}
	},
	_hidden: function (visibility) {
		var elList = gE(this.listId + this.arrIndex);
		if (elList) {
			if (visibility) {
				_page.dom.sE(elList);
			}
			_page.dom.nE(elList);
		}
	}
};

_page.processLocales = function () {
	var arrLocales = [], i, anItem, strCountry, strLanguage, sortCol, sortOrder, lengthLocales, sortArray;
	if (_page.locales.others) {
		delete _page.locales.others;			// Delete current others var if exists, as it will be appended to the bottom
	}

	var getCountryNativeLangCode = function (countryCode) {
		var langCode,
			nativeLangCode = "en",
			objCountry = _page.countryInfo[countryCode];
		for (langCode in objCountry) {
			if (objCountry.hasOwnProperty(langCode) && langCode !== "en") {
				nativeLangCode = langCode;
				break;
			}
		}
		return nativeLangCode;
	};

	i = 0;
	for (locale in _page.locales) {
		if (locale !== "global") {
			localeCodes = locale.split("_");
			countryCode = localeCodes[0];
			langCode = localeCodes[1];
			languageName = _page.languages[langCode];
			objCountry = _page.countryInfo[countryCode];
			countryName = (objCountry[langCode] || objCountry.en).name; // Default to english if no native is available
			strSortOrderLangCode = getCountryNativeLangCode(countryCode);
			strSortOrder = objCountry[strSortOrderLangCode].sortKey || objCountry[strSortOrderLangCode].name;
			if (langCode === "en") {
				strSortOrder +=  "_bottom";
			}
			arrLocales[i] = [];
			arrLocales[i][0] = locale;									// Store locale code
			arrLocales[i][1] = countryName;								// Store country
			arrLocales[i][2] = languageName; 							// Store language
			arrLocales[i][3] = _page.locales[locale]; 					// Store link
			arrLocales[i][4] = strSortOrder; 							// Store sort order (Native country and native language)
			i += 1;
		}
	}
	if (i > 0) {

		sortArray = function (a, b) {
			if (a[sortCol] < b[sortCol]) {
				return (sortOrder === "asc"? -1: 1);
			}
			if (a[sortCol] > b[sortCol]) {
				return (sortOrder === "asc"? 1: -1);
			}
			return 0;
		};
		sortCol = 4;
		sortOrder = "asc";
		arrLocales.sort(sortArray);

		arrLocales.splice(0, 0, [
			"global",
			"Global",
			"English",
			_page.locales.global,
			"Global" + " / " + "English"
		]);

		if (_page.headerType === "internet") {
			_page.locales.others = "http://www.philips.com/countries";
			arrLocales[arrLocales.length] = [
				"others",
				"Others",
				"",
				_page.locales.others,
				"Others"
			];
		}
	}
	return arrLocales;
};

_page.localesProcessed = false;
_page.localesArray = [];
_page.getLocalesArray = function () {
	if (_page.localesProcessed === false) {
		_page.localesArray = _page.processLocales();
		if (_page.localesArray.length > 0) {
			_page.localesProcessed = true;
		}
	}
	return _page.localesArray;
};

_page.showSearchAsYouType = true;
_page.Sayt = function (queryId, suggestId, params) {
	this.options = params || {};
	this.id = suggestId;
	this.qid = queryId;
	this.options.minLetters = 		(typeof params.minLetters !== "undefined"? params.minLetters: 2);
	this.options.numberResults = 	(typeof params.numberResults !== "undefined"? params.numberResults: 10);
	this.options.locale = 			(typeof params.locale !== "undefined"? params.locale: _page.locale) || "";
	this.suggestAjaxRequestOngoing = false;
	this.suggestVisible = false;
	this.selectedSuggestionItem = -1;
	this.lastQuery = "";
	this.evtClick = null;
	if (this.options.onload) {
		_page.onContentReady(this.init.bindArgs(this));
	}
};
_page.Sayt.prototype = {
	init: function (id, params) {
		this.initEvents();
	},
	initEvents: function () {
		gE(this.qid).setAttribute("autocomplete", "off");
		gE(this.id).className = "p-suggest-wrapper";
		_page.events.add(gE(this.qid), 'keydown', this.suggestHandler.bindArgs(this));
		_page.events.add(gE(this.qid), 'keyup', this.suggestHandler.bindArgs(this));
		_page.events.add(gE(this.id), 'mouseover', this.suggestHandler.bindArgs(this));
		_page.events.add(gE(this.id), 'click', this.suggestHandler.bindArgs(this));
	},
	documentClick: function () {
		this.lastQuery = "";
		this.hideSuggestDiv();
		_page.events.removeSafe(this.evtClick);
	},
	suggestHandler: function (e) {
		var elTarget, elRow, activeId;
		switch (e.type) {
		case "mouseover":
			elTarget = _page.events.getTarget(e);
			if (elTarget.nodeName.toLowerCase() === "a") {
				elRow = elTarget.parentNode.parentNode;
				activeId = elRow.id.substring(elRow.id.lastIndexOf("-") + 1, elRow.id.length);
				this.setSuggestOver(activeId);
			}
			break;
		case "click":
			this.setSearch(this.selectedSuggestionItem);
			_page.events.cancel(e); // don't bubble up to document.click
			break;
		case "keyup":
			if (e.keyCode !== 40 &&  e.keyCode !== 38 && e.keyCode !== 13) {
				this.searchSuggest(this.options.section);
			}
			break;
		case "keydown":
			if (this.suggestVisible === true) {
				if (e.keyCode === 38) {
					this.setSuggestOver(parseInt(this.selectedSuggestionItem, 10) - 1);
					_page.events.cancel(e);
				} else if (e.keyCode === 40) {
					this.setSuggestOver(parseInt(this.selectedSuggestionItem, 10) + 1);
					_page.events.cancel(e);
				}
			}
			if (e.keyCode === 13) {
				this.setSearch(this.selectedSuggestionItem);
				_page.events.cancel(e); // dont' bubble up to default form enter / onsubmit
			}
		}
	},
	requestCompleted: function () {
		this.updateSuggestDiv();
		this.suggestAjaxRequestOngoing = false;
	},
	searchSuggest: function (section) {
		var userQuery, remoteUrl;
		if (!this.suggestAjaxRequestOngoing) {
			userQuery = gE(this.qid).value;
			if (userQuery.length >= this.options.minLetters && this.lastQuery !== userQuery) {
				this.lastQuery = userQuery;	// Save the last query so that we do not have to search again
				this.suggestAjaxRequestOngoing = true;
				this.selectedSuggestionItem = -1;
				remoteUrl = this.options.remoteUrl + "?query=" + this.lastQuery + "&locale=" + this.options.locale + "&section=" + this.options.section + "&numres=" + this.options.numberResults;
				if (!_page.headerSayT) {
					_page.headerSayT = {};
				}
				delete _page.headerSayT.results; // delete and only trigger oncomplete function when available for Safari
				_page.loadJSFile(remoteUrl, function () {
					return (_page.headerSayT.results);
				}, this.requestCompleted.bindArgs(this), "utf-8");
			}
		}
	},
	updateSuggestDiv: function () {
		var i, ss = gE(this.id), suggest = '', suggestions = _page.headerSayT.results || [];
		ss.innerHTML = '';
		this.hideSuggestDiv();
		if (suggestions.length > 0) {
			suggest += '<table id="' + this.id + '-table" class="p-suggest" cellspacing="0" >';
			for (i = 0; i < suggestions.length; i += 1) {
				suggest += '<tr id="' + this.id + '-row-' + i + '" class="p-suggest-link"><td class="p-suggest-value"><a id="' + this.id + '-value-' + i + '" href="javascript:void(0)">' + suggestions[i].query + '</a></td><td class="p-suggest-hits"><a id="' + this.id + '-info-' + i + '" href="javascript:void(0)">' + (suggestions[i].info || '&nbsp;') + '</a></td></tr>\n';
			}
			suggest += '</table>\n';
			ss.innerHTML = suggest;
			this.showSuggestDiv();
		}
	},
	hideSuggestDiv: function () {
		gE(this.id).style.display = 'none';
		this.suggestVisible = false;
	},
	showSuggestDiv: function () {
		this.evtClick = _page.events.add(document, 'click', this.documentClick.bindArgs(this));
		gE(this.id).style.display = 'block';
		this.suggestVisible = true;
	},
	setSuggestOut: function (v) {
		var elItem = gE(this.id + '-row-' + v);
		_page.dom.removeClass(elItem, 'p-suggest-link-over');
		_page.dom.addClass(elItem, 'p-suggest-link');
	},
	setSuggestOver: function (v) {
		if (this.selectedSuggestionItem !== v) {
			this.setSuggestOut(this.selectedSuggestionItem);
		}
		this.selectedSuggestionItem = v = (v <= -1 || v > this.options.numberResults - 1? (v <= -1? this.options.numberResults - 1: 0): v);
		var elItem = gE(this.id + '-row-' + v);
		_page.dom.removeClass(elItem, 'p-suggest-link');
		_page.dom.addClass(elItem, 'p-suggest-link-over');
	},
	setSearch: function (v) {
		var elValue = gE(this.id + '-value-' + v);
		if (elValue) {
			gE(this.qid).value = elValue.innerHTML;
		}
		this.hideSuggestDiv();
		this.doSubmit();
	},
	doSubmit: function () {
		this.options.doSubmit();
	}
};
_page.internet = {
	init: function (pageType) {
		pageType = pageType || "";
		var section = (pageType === "homepage"? "": pageType);
		_page.area = pageType;
		_page.onContentReady (function () {
			_page.headerNav = new _page.TopNav2("p-navigator", {
				type: _page.topNavType,
				locale: _page.locale,
				activeId: section
			});
			_page.headerNav.setSectionActiveId("consumer", _page.topNavConsumerActiveId);
			_page.headerNav.init();
			var headerLS = new _page.LS('2', {
				wrapperId: "p-header-localeselector",
				remoteUrl: _page.crsc_server + "/crsc/locales/homepages" + (section !== ""? "_" + section: "")
			});
			headerLS.init();
			var headerSearchValidation = _page.fieldValidation("p-searchquery", {
				warningText: _page.text.search_input,
				isValidFn: function (value, initial) {
					return ((value == null) || (value.length == 0) || new RegExp('^(\\s+|' + initial + ')$').test(value));
				}
			});
			_page.searchHandler = function (e) {
				var submit = headerSearchValidation.validate(e);
				if (submit) {
					var elInput = gE('p-searchsectionopen');
					if (!elInput) {
						var elFieldset = gE("searchform").getElementsByTagName("fieldset")[0];
						elInput = document.createElement("input");
						elInput.setAttribute("type", "hidden");
						elInput.setAttribute("name", "o");
						elInput.setAttribute("id", "p-searchsectionopen");
						elFieldset.appendChild(elInput);
					}
					elInput.setAttribute("value", (_page.headerNav.getOpenTabId() || ""));
				}
				return submit;
			};
			_page.events.add(gE("searchform"), "submit", _page.searchHandler);
			_page.events.add(gE("p-searchquery"), "focus", function (e) {
				var el = _page.events.getTarget(e);
				if (el.value === el.defaultValue) {
					el.value = '';
				}
			});
			_page.events.add(gE("p-searchquery"), "blur", function (e) {
				var el = _page.events.getTarget(e);
				if (el.value === '') {
					el.value = (el.defaultValue? el.defaultValue: '');
				}
			});
			_page.events.add(gE("p-link-register"), "click", function (e) {
				if (typeof s !== "undefined") {
					s.linkTrackVars = 'None';
					s.linkTrackEvents = 'None';
					s.tl(true, 'o', s.pageName + ':register_your_product');
				}
			});
			_page.events.add(gE("p-link-login"), "click", function (e) {
				if (typeof s !== "undefined") {
					s.linkTrackVars = 'None';
					s.linkTrackEvents = 'None';
					s.tl(true, 'o', s.pageName + ':log_in');
				}
			});
			if (_page.showSearchAsYouType) {
				var headerSayT = new _page.Sayt("p-searchquery", "p-search-sayt", {
					locale: _page.locale,
					section: "consumer",
					remoteUrl: "http://www.search.philips.com/search/jsp/var_suggest.jsp",
					doSubmit: function () {
						if (_page.searchHandler()) {
							gE("searchform").submit();
						}
					}
				});
				headerSayT.init();
			}
		});
	}
};
