 /*!
  * Global library Philips Internet
  * Check www.crsc.philips.com/crsc/scripts/lib_global.js for latest 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.leftNav = [];  			// Store left menu values
_page.leftNavItem = "";			// Current Active left menu item
_page.leftNavOnload = true;		// Load leftnav onload of page
function _Item(text, link, options) {
	this.text = text;
	this.link = link;
	this.options = options;
	this.flyoutid = 0;
	this.flyoutopenid = 0;
	this.parentid = "";
	this.level = 0;				// Default level, incremented during item_update
	this.children = false;		// By default -> no children. Value is changed in _Item_update()
	this.showLink = true; 		// Show standard the links in the menu
	this.showCategory = false;	// Item is not category by default
	this.hideChilds = false;	// Always use flyout instead of childs in left-menu
	this.showAll = false;		// Show all childs or not
	this.hideLink = false;		// Hide current link from left menu
	this.hideFlyout = false;	// Force hidden flyout
};

/*
***********************************
****** Generate Left menu  ********
***********************************
*/
_page.nav = (function () {
	var options = {},
		activeId = activeId || _page.leftNavItem || "",
		items = _page.leftNav,	// Hashtable / object, holds the left nav items
		itemsSorted = [],		// Sorted array, used for sorted looping through leftnav items
		maxItemLevels = 7,		// Max number of levels in the left menu, excluding flyouts
		maxMenuLevels = 6,		// Max number of levels in the left menu, including flyouts, only applicable for hierarchy flyouts
		htmlNav = {},

		CloneObject = function (what) {
			for (var i in what) {
				if (typeof what[i] === 'object') {
					this[i] = new CloneObject(what[i]);
				} else {
					this[i] = what[i];
				}
			}
		},

		getItemLevel = function (itemId) {
			itemId = itemId || "";
			return itemId.split("_").length;
		},

		inheritsShowall = function (item) {
			if (item.level > 1 && items[item.parentid].showAll && items[item.parentid].active) {
				return true;
			} else if (item.level > 2 && (item.level < getItemLevel(activeId) + 1) && items[item.parentid].active) {
				return inheritsShowall(items[item.parentid]);
			} else {
				return false;
			}
		},

		isSibling = function (item) {
			if (activeId === "") {
				return false;
			} else {
				if (item.level > 1) {
					if (item.parentid === items[activeId].parentid) {
						return true;
					} else {
						return false;
					}
				} else {
					return false;
				}
			}
		},

		hasVisibleSiblings = function (item) {
			var i, tmpItem, isVisible = false;
			for (i = (itemsSorted.length - 1); i >= 0; i -= 1) {
				tmpItem = itemsSorted[i];
				if (tmpItem.level > 1 && tmpItem.parentid === item.parentid && tmpItem.id !== item.id && !tmpItem.hideLink && !tmpItem.showCategory) {
					isVisible = true;
					break;
				}
			}
			return isVisible;
		},

		itemUpdate = function () {
			var item, itemId, disableLink, hideChilds, showAll, hideLink, showCategory, hideFlyout, itemOptions = [], option = "", x, i,
				selId, activeItemLevel;
			selId = activeId;
			activeItemLevel = getItemLevel(activeId);
			for (i = 0; i < activeItemLevel; i += 1) {
				item = items[selId];
				if (item) {
					item.active = true;
				}
				selId = selId.substr(0, selId.lastIndexOf("_"));	// Remove last two characters from string (one level less)
			}
			for (x = 0; x < itemsSorted.length; x += 1) {
				item = itemsSorted[x];
				itemId = item.id;
				item.level = getItemLevel(itemId);
				item.active = (item.active? item.active: false);
				if (item.options !== "" && typeof item.options !== "undefined") {
					hideFlyout = false;
					disableLink = false;
					hideChilds = false;
					showAll = false;
					hideLink = false;
					showCategory = false;
					itemOptions = item.options.split(",");
					for (i = 0; i < itemOptions.length; i += 1) {
						option = itemOptions[i];
						if (option.indexOf("flyout=no") === 0) {
							hideFlyout = true;
						} else if (option.indexOf("link=no") === 0) {
							disableLink = true;
						} else if (option.indexOf("hidechilds=yes") === 0) {
							hideChilds = true;
						} else if (option.indexOf("showall=yes") === 0) {
							showAll = true;
						} else if (option.indexOf("hidelink=yes") === 0) {
							hideLink = true;
						} else if (option.indexOf("category=yes") === 0) {
							showCategory = true;
						}
						item.hideChilds = hideChilds;
						item.showAll = showAll;
						item.hideLink = hideLink;
						item.showCategory = showCategory;
						if (disableLink) {
							item.showLink = false;
						}
						item.hideFlyout = hideFlyout;
					}
				}
				if (item.level > 1) {
					item.parentid = itemId.substr(0, itemId.lastIndexOf("_"));
					if ((item.showCategory || item.hideLink) && !hasVisibleSiblings(item)) {
						items[item.parentid].children = false;
					} else {
						items[item.parentid].children = true;
					}
				}
				if (item.hideFlyout) {
					item.flyout = false;
				} else {
					if (item.level < maxMenuLevels) {
						item.flyout = true;
					} else {
						item.flyout = false;
					}
				}
				if (item.active) {
					if (!options.showHierarchyFlyouts && item.level < maxItemLevels) {
						item.flyout = false;
					}
					if (options.showHierarchyFlyouts && (item.level === items[activeId].level))  {
						item.flyout = false;
					}
				} else if (item.level > 1) {
					if (options.showHierarchyFlyouts) {
						if (item.parentid === activeId && !items[item.parentid].hideChilds) {
							item.flyout = false; 	// Don't show flyout when active item it's childs are shown
						}
					} else {
						if (items[item.parentid].flyout || item.parentid === activeId) {
							if (item.level > 2 && items[items[item.parentid].parentid].flyout) {
								item.flyout = false; 	// Grandparent already has flyout, flyout not allowed - Maximize flyout level to 2
							} else if (item.flyout) {
							}
						} else {
							item.flyout = false;
						}
					}
				} else if (item.level === 1) {
				} else {
					item.flyout = false;
				}
				if (activeId === itemId && item.active && item.hideChilds && !item.hideFlyout) {
					item.flyout = true;
				}
				if (inheritsShowall(item)) {
					item.flyout = false;
				}
				if (!item.showLink && !item.hideFlyout && !item.active) {
					item.flyout = true;
				}
				if (item.flyout) {
					item.flyoutLevel = -1;
				}
			}
		},

		createHierarchyFlyouts = function () {
			var itemId, i, curId, objNav, item,
				itemLength = itemsSorted.length,
				hierStartLevel = 1000,
				hierMainId = "",
				hierId = "",
				firstLevelId = activeId.split("_")[0],
				replaceFirstLevelNumber = function (source, number) {
					return (source || "").replace(/^(\d+)/, (number || ""));
				};

			if (activeId !== "" && items[activeId] && items[activeId].level > 1) {
				curId = items[activeId].parentid;
				while (items[curId]) {
					for (i = 0; i < itemLength; i += 1) {
						item = itemsSorted[i];
						itemId = item.id;
						if (itemId.indexOf(firstLevelId) === 0) {
							hierId = replaceFirstLevelNumber(itemId, hierStartLevel);
							objNav = new CloneObject(item);
							objNav.id = hierId;
							objNav.isHier = true;
							objNav.parentid = replaceFirstLevelNumber(objNav.parentid, hierStartLevel);
							if (item.level < maxMenuLevels && !item.hideFlyout) {
								objNav.flyout = true;
							}
							delete objNav.hierId;
							items[hierId] = objNav;
							itemsSorted[itemsSorted.length] = objNav;
						}
					}
					hierMainId = replaceFirstLevelNumber(curId, hierStartLevel);
					items[curId].hierId = hierMainId;		// set hier id
					items[hierMainId].wrapperId = curId; 	// set wrapper id
					curId = items[curId].parentid;
					hierStartLevel += 1;
				}
			}
		},

		itemSortLeftNav = function (arg1, arg2) {
			var arg1IDs = arg1.ids, arg2IDs = arg2.ids, minLength, i;
			minLength = (arg1IDs.length <= arg2IDs.length ? arg1IDs.length : arg2IDs.length);
			for (i = 0; i < minLength; i += 1) {
				if (parseInt(arg1IDs[i], 10) < parseInt(arg2IDs[i], 10)) {
					return -1;
				}
				if (parseInt(arg1IDs[i], 10) > parseInt(arg2IDs[i], 10)) {
					return 1;
				}
			}
			if (arg1IDs.length < arg2IDs.length) {
				return -1;
			}
			if (arg1IDs.length > arg2IDs.length) {
				return 1;
			}
			return 0;
		},

		itemSort = function () {
			var length = 0, i, id, item, itemSorted;
			itemsSorted = []; // Global array to sort left menu items
			for (id in items) {
				item = items[id];
				if (item.text) {
					item.id = id;
					item.ids = id.split("_");
					itemsSorted[length] = item;
					length += 1;
				}
			}
			itemsSorted.sort(itemSortLeftNav);
			items = [length];
			for (i = 0; i < length; i += 1) {
				itemSorted = itemsSorted[i];
				items[itemSorted.id] = itemSorted;
			}
		},

		flyoutHtml = function (navLevels) {
			navLevels = navLevels || 1;
			var elWrapper = gE("flyoutitems"), html = "", itemId;
			if (elWrapper) {
				for (itemId in htmlNav) {
					if (items[itemId].flyoutLevel !== -1 && items[itemId].flyoutLevel <= navLevels) {
						html += htmlNav[itemId];
					}
				}
				elWrapper.innerHTML = html;
			}
		},

		flyoutAppend = function (itemId) {
			var elContainer,
				elWrapper = gE("flyoutitems"),
				html = htmlNav[itemId] || "";
			if (html !== "") {
				elContainer = document.createElement("div");
				elContainer.innerHTML = html;
				elWrapper.appendChild(elContainer);
			}
		},

		flyoutCreateAll = function () {
			var item, curLevel, html, aHtml, nolinkClass, iframeHtml, itemGrandParent, itemId, parentItemId, itemParent, flyoutClass;
			for (itemId in items) {
				if (items[itemId].text) {
					item = items[itemId];
					curLevel = item.level;
					parentItemId = item.parentid;
					itemParent = items[parentItemId];
					if (itemParent && itemParent.flyout && itemParent.children) {
						itemGrandParent = items[itemParent.parentid];
						if (itemGrandParent && itemGrandParent.flyoutLevel > -1) {
							itemParent.flyoutLevel = itemGrandParent.flyoutLevel + 1;
							itemParent.menuId = itemGrandParent.menuId;
						}
					}
				}
			}
			for (itemId in items) {
				if (items[itemId].text) {
					item = items[itemId];
					curLevel = item.level;
					parentItemId = item.parentid;
					itemParent = items[parentItemId];
					if (curLevel > 1) {
						aHtml = [];
						if (itemParent && itemParent.flyout && itemParent.children && itemParent.flyoutLevel > -1) {
							if (!htmlNav[parentItemId]) {
								htmlNav[parentItemId] = "";
								flyoutClass = (itemParent.flyoutLevel === 1? "p-flyoutdiv": "p-flyoutdiv-2");
								aHtml[aHtml.length] = "<div class=\"" + flyoutClass + "\" id=\"flyout_" + parentItemId + "\" onmouseover=\"_page.flyout_hide_cancel('" + parentItemId + "');\" onmouseout=\"_page.flyout_hide('" + parentItemId + "');\">";
								aHtml[aHtml.length] = "<table id=\"flyout_table_" + parentItemId + "\" class=\"p-table_flyout\" cellspacing=\"0\">";
								aHtml[aHtml.length] = "<tr>";
								aHtml[aHtml.length] = "<td class=\"p-flyout-left-first\"><div id=\"right_arrow_" + parentItemId + "\" class=\"p-right_arrow\">&nbsp;</div></td>";
								aHtml[aHtml.length] = "<td class=\"p-flyout-right\">";
								aHtml[aHtml.length] = "<table cellspacing=\"1\" width=\"100%\">";
							}
							if (!item.showCategory && !item.hideLink) {
								aHtml[aHtml.length] = "<tr>";
								nolinkClass = (!item.showLink? " p-nolink": "");
								if (item.flyout && item.children) {
									aHtml[aHtml.length] = "<td	id='ln_itm_" + itemId + "' class=\"p-flyout-content-flyout" + nolinkClass + "\" onmouseover=\"_page.flyout('" + itemId + "');\" onmouseout=\"_page.flyout_hide('" + itemId + "')\">";
								} else {
									aHtml[aHtml.length] = "<td	id='ln_itm_" + itemId + "' class=\"p-flyout-content" + nolinkClass + "\">";
								}
								if (item.showLink) {
									aHtml[aHtml.length] = "<a class=\"p-flyout_link_" + itemParent.flyoutLevel + "\" id=\"left_level_link_" + itemId + "\" href=\"" + item.link + "\">" + item.text + "</a>"; // Let the text  break!!!
								} else {
									aHtml[aHtml.length] = "<span class=\"p-flyout_link_" + itemParent.flyoutLevel + "\">" + item.text + "</span>";	// Item without link
								}
								aHtml[aHtml.length] = "</td>";
								aHtml[aHtml.length] = "</tr>";
							}
							htmlNav[parentItemId] += aHtml.join('\n');
						}
					}
				}
			}
			html = "</table>\n</td>\n</tr>\n</table>\n</div>\n\n";
			for (itemId in htmlNav) {
				if (htmlNav.hasOwnProperty(itemId)) {
					iframeHtml = (_page.useIframe? "<IFRAME frameborder=0 id=\"flyout-" + itemId + "-IF\" src=\"javascript:false;\" 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>": "");
					htmlNav[itemId] += html + iframeHtml;
				}
			}
		},

		flyoutCancel = function (itemCurId) {
			clearTimeout(items[itemCurId].flyoutopenid);
			items[itemCurId].flyoutopenid = 0;
		},

		flyout = function (itemCurId, flyoutLevel) {
			var delay;
			_page.flyout_hide_cancel(itemCurId);
			if (items[itemCurId].flyoutopenid === 0) {
				delay = (_page.browser.isMac? 250: 100);
				items[itemCurId].flyoutopenid = setTimeout("_page.flyout2('" + itemCurId + "', " + flyoutLevel + ")", delay);
			}
		},

		flyout2 = function (itemCurId, flyoutLevel) {
			var dd, obj, arrow, moveRight, moveUp, xPos, yPos, scrollPosTop, screenHeight, flyoutWidth, flyoutHeight, flyoutPosTop, flyoutPosBottom, flyoutHeightAvailable, i, objTopPosBottom, position, fframe, itemId, item, scrollPosBottom, elTable, elCells, elCell, yPosPrev,
				prefixId = 'ln_itm_';
			flyoutLevel = flyoutLevel || items[itemCurId].flyoutLevel;
			dd = gE("flyout_" + itemCurId);
			if (!dd) {
				flyoutAppend(itemCurId);
				dd = gE("flyout_" + itemCurId);
			}
			for (itemId in items) {
				if (items[itemId].text) {
					item = items[itemId];
					if (item.flyout && item.children && itemCurId !== itemId && item.flyoutOpen) {
						if (itemCurId.indexOf(itemId) !== 0) {
							_page.flyout_hide2(itemId);
						}
					}
				}
			}
			obj = gE(prefixId + (items[itemCurId].wrapperId || itemCurId));
			arrow = gE("right_arrow_" + itemCurId);
			if (flyoutLevel === 1) {
				if (_page.direction === "rtl") {
					moveRight = -141;
				} else {
					moveRight = 170;
				}
				moveUp = 21; //21
			} else {
				if (_page.direction === "rtl") {
					moveRight = -141;
				} else {
					moveRight = 126;
				}
				moveUp = 21;
			}
			xPos = getLeftPos(obj) + moveRight;
			yPos = getTopPosBottom(obj) - moveUp;
			scrollPosTop = getScrollPosTop();  				 // Positon top in scrolled browser window
			screenHeight = getScreenHeight();				// Available height browser window
			scrollPosBottom = scrollPosTop + screenHeight;	// Positon bottom in scrolled browser window
			flyoutWidth = dd.offsetWidth;					// Flyout width
			flyoutHeight = dd.offsetHeight;					// Flyout height
			flyoutPosTop = findPosY(obj); 					// Top position of flyout
			flyoutPosBottom = flyoutPosTop + flyoutHeight; 	// Bottom position of flyout
			flyoutHeightAvailable = scrollPosBottom - flyoutPosBottom;
			if (flyoutHeightAvailable < 0) {
				elTable = gE("flyout_table_" + itemCurId);
				elCells = elTable.getElementsByTagName("td");
				i = 2; // Start at the third!
				elCell = elCells[i];
				objTopPosBottom = getTopPosBottom(obj);
				while (elCell) {
					flyoutPosBottom -= (elCell.offsetHeight + 1);
					yPos = flyoutPosBottom - flyoutHeight;
					if (flyoutPosBottom < objTopPosBottom) {
						yPos += (objTopPosBottom - flyoutPosBottom + 1);
						break;
					} else if (yPos < scrollPosTop) {
						yPos = yPosPrev;
						break;
					} else if (flyoutPosBottom < scrollPosBottom) {
						break;
					}
					yPosPrev = yPos;
					i += 1;
					elCell = elCells[i];
				}
			}
			moveUp = (flyoutLevel === 1? -1: -1);
			position = flyoutPosTop - yPos - moveUp;
			if (arrow) {
				sY(arrow, position);
			}
			if (_page.useIframe) {
				fframe = gE("flyout-" + itemCurId + "-IF");
				sH(fframe, flyoutHeight);
				sW(fframe, flyoutWidth);
				sX(fframe, xPos);
				sY(fframe, yPos);
				sE(fframe);
			}
			sX(dd, xPos);
			sY(dd, yPos);
			sE(dd);
			if (arrow) {
				sE(arrow);
			}
			items[itemCurId].flyoutOpen = true;
		},

		flyoutHideCancel = function (itemCurId) {
			var item = items[itemCurId], itemParent;
			if (item.flyoutLevel === 1) {
				itemMouseOver('ln_itm_'+item.menuId);
			}
			clearTimeout(item.flyoutid);
			item.flyoutid = 0;
			if (item.level > 1) {
				itemParent = items[item.parentid];
				while (itemParent && itemParent.flyout) {
					clearTimeout(itemParent.flyoutid);
					itemParent.flyoutid = 0;
					itemParent = items[itemParent.parentid];
				}
			}
		},

		flyoutHide = function (itemCurId) {
			var item = items[itemCurId], itemParent;
			_page.flyout_cancel(itemCurId);
			if (item.flyoutid === 0) {
				item.flyoutid = setTimeout("_page.flyout_hide2('" + itemCurId + "')", 100);
			}
			if (item.level > 1) {
				itemParent = items[item.parentid];
				while (itemParent && itemParent.flyout) {
					if (itemParent.flyoutid === 0) {
						itemParent.flyoutid = setTimeout("_page.flyout_hide2('" + itemParent.id + "')", 1000);
					}
					itemParent = items[itemParent.parentid];
				}
			}
		},

		flyoutHide2 = function (itemCurId) {
			var fframe,
				item = items[itemCurId],
				dd = gE("flyout_" + itemCurId);
			if (item.flyoutLevel === 1) {
				itemMouseOut('ln_itm_'+item.menuId);
			}
			if (dd) {
				hE(dd);
			}
			if (useIframe) {
				fframe = gE("flyout-" + itemCurId + "-IF");
				if (fframe) {
					hE(fframe);
				}
			}
			item.flyoutid = 0;
			item.flyoutOpen = false;
		},

		itemMouseOver = function (el) {
			var strCurStyle, strStyle, strNewStyle;
			el = el || "";
			if (typeof el === "string") {
				el = gE(el);
			}
			if (el) {
				if (!_page.dom.hasClass(el, "hier") && !_page.dom.hasClass(el, "category") && !_page.dom.hasClass(el, "p-left_hover")) {
					_page.dom.addClass(el, "p-left_hover");
				}
			}
		},

		itemMouseOut = function (el) {
			var strStyle, strNewStyle;
			el = el || "";
			if (typeof el === "string") {
				el = gE(el);
			}
			if (el) {
				if (_page.dom.hasClass(el, "p-left_hover")) {
					_page.dom.removeClass(el, "p-left_hover");
				}
			}
		},

		write2 = function (active, params) {
			activeId = active || _page.leftNavItem || activeId; // Set active item if given as function parameter
			options = params || options;
			options.showHierarchyFlyouts = options.showHierarchyFlyouts? options.showHierarchyFlyouts: false;
			var html, showTable, activeLevel, currentLevel, previousLevel, showItem, objLeftNav, z, item, itemId, cellClass, flyoutId, itemHier, 				showFlyout, isOpen, isActive, isOpenActive, isCategory;
			itemSort();
			itemUpdate();
			if (options.showHierarchyFlyouts) {
				createHierarchyFlyouts();
			}
			html = '';
			showTable = (itemsSorted.length > 0? true: false);
			if (showTable) {
				html +=  "<table id=\"p-table-left\" class=\"p-section-nav\" cellspacing=\"0\">\n";
				activeLevel = getItemLevel(activeId);
				currentLevel = 1;
				previousLevel = 0;
				for (z = 0; z < itemsSorted.length; z += 1) {
					item = itemsSorted[z];
					itemId = item.id;
					showItem = false;
					currentLevel = item.level;	// Get level of current item
					if (item.hideLink) {
						showItem = false;
					} else if (item.isHier) {
						showItem = false;
					} else if (currentLevel === 1) {
						showItem = true;	// First evel items are always visible
					} else if (currentLevel > 1 &&
									(item.active ||
									(activeId !== "" && items[item.parentid].id === activeId) ||
									inheritsShowall(item) ||
									(!options.showHierarchyFlyouts && isSibling(item)))) {
						if (items[item.parentid].hideChilds) {
							if (item.active) {
								showItem = true;
							} else {
								showItem = false;
							}
						} else if (currentLevel <= maxItemLevels) {
							showItem = true;
						}
					}

					if (showItem) {
						if (previousLevel !== 0 && previousLevel !== 1 && currentLevel === 1 ) {
							html +=  "<tr><td><div class=\"p-solidsep\"> </div></td></tr>\n";
						}
						html +=  "	<tr>\n";
						itemHier = items[item.hierId] || item; // Get hierarchy duplicated item for display flyout options, or keep the original item
						showFlyout = (itemHier.flyout && itemHier.flyout && itemHier.children? true: false);
						isOpen = (item.active && item.children && (currentLevel < maxItemLevels)? true: false);
						isActive = (item.active && activeId === itemId? true: false);
						isOpenActive = (isActive && isOpen? true: false);
						isCategory = (item.showCategory? true: false);
						if (isCategory) {
							cellClass = "p-left_level_" + currentLevel + "_category";		// Category item
						} else if (isActive && showFlyout) {
							cellClass = "p-left_level_" + currentLevel + "_fly_active";		// Special item for flyout on active item on 'max_item_level'
						} else if (isOpen && showFlyout) {
							cellClass = "p-left_level_" + currentLevel + "_open_fly";		// Special item for flyout on active item with forced flyout - hierarchy
							cellClass += (currentLevel > 0? " p-hier" + (activeLevel - currentLevel): "");
						} else if (isOpenActive) {
							cellClass = "p-left_level_" + currentLevel + "_open_active";
						} else if (isActive) {
							cellClass = "p-left_level_" + currentLevel + "_active";
						} else if (isOpen) {
							cellClass = "p-left_level_" + currentLevel + "_open";			// Active item
							cellClass += (currentLevel > 0? " p-hier" + (activeLevel - currentLevel): "");
						} else if (showFlyout) {
							cellClass = "p-left_level_" + currentLevel + "_fly";			// Fly out item
						} else {
							cellClass = "p-left_level_" + currentLevel + "_closed";			// Inactive item
						}
						if (!item.showLink) {
							cellClass += " p-nolink";
						}
						if (showFlyout) {
							flyoutId = itemHier.id;
							html += "		<td id='ln_itm_" + itemId + "' class=\"" + cellClass + "\" onmouseover=\"_page.flyout('" + flyoutId + "');_page.item_mouseover(this);\" onmouseout=\"_page.flyout_hide('" + flyoutId + "');_page.item_mouseout(this);\">";
							items[flyoutId].flyoutLevel = 1;
							items[flyoutId].menuId = itemId;
						} else {
							html += "		<td id='ln_itm_" + itemId + "' class=\"" + cellClass + "\" onmouseover=\"_page.item_mouseover(this);\" onmouseout=\"_page.item_mouseout(this);\">";
						}
						if (item.showLink && !item.showCategory) {
							html += "			<a class=\"p-left-level_link_" + currentLevel + "\" href=\"" + item.link + "\">";
							html += "			" + item.text + "</a>";
						} else {
							html += "			<span class=\"p-left-level_link_" + currentLevel + "\">" + item.text + "</span>";		// Item without link
						}
						html += "		</td>\n";
						html += "	</tr>\n";
						previousLevel = currentLevel; // used to check if solid seperator is needed
					}

				}
				if (_page.sectionMain[0] && _page.sectionMain[1] && _page.sectionSpecial[0]) {
					html += "	<tr>\n";
					html += "		<td class=\"p-left_specialsection\" onmouseover=\"_page.item_mouseover(this);\" onmouseout=\"_page.item_mouseout(this);\"><a class=\"p-left-level_link_1\" href=\"" + _page.sectionMain[1] + "\">" + _page.sectionMain[0] + "</a></td>\n";
					html += "	</tr>\n";
				}
				html += "	<tr>\n";
				html += "		<td class=\"p-left-bottom\">&nbsp;</td>\n";
				html += "	</tr>\n";
				html += "</table>\n";
				html += "<div id=\"flyoutitems\"></div>\n";

			} else {
				html += "&nbsp;\n";
			}

			if (_page.leftNavOnload) {
				objLeftNav = gE("p-leftnav-container");
				if (objLeftNav) {
					objLeftNav.innerHTML = ''; // MAC IE compat.
					objLeftNav.innerHTML = html;
				}
			} else {
				_page.write(html, false);
			}
			flyoutCreateAll();
			flyoutHtml();
		},

		write = function (active, params) {
			activeId = active || activeId;
			options = params || {};
			if (_page.leftNavOnload) {
				document.write('<div id=\"p-leftnav-container\">&nbsp;</div>');
				setTimeout("_page.writeLeftNav2()", 50);
			} else {
				write2(activeId);
			}
		};

	_page.item_mouseover = itemMouseOver;
	_page.item_mouseout = itemMouseOut;
	_page.flyout_cancel = flyoutCancel;
	_page.flyout = flyout;
	_page.flyout2 = flyout2;
	_page.flyout_hide2 = flyoutHide2;
	_page.flyout_hide = flyoutHide;
	_page.flyout_hide_cancel = flyoutHideCancel;
	_page.writeLeftNav = write;
	_page.writeLeftNav2 = write2;

	return function () {
	};
})();

document.write('<link rel="shortcut icon" href="' + _page.crsc_server + '/crsc/images/favicon.ico">\n');

try {document.execCommand("BackgroundImageCache", false, true);} catch(err) {}

_page.breadCrumbItem = "";		// Current Active breadcrumb item
_page.getstringlength = function(lbl){
	var i=0, l=lbl.length, count=0, cc;
	for (cc=0; cc<l; cc++) {
		if (lbl.slice(i,i+1)=='&') {
			if ((lbl.indexOf(';',i) > i) && ((lbl.indexOf('&',i+1)==-1) || (lbl.indexOf('&',i+1)>lbl.indexOf(';',i)))) {
				i=lbl.indexOf(';',i)+1;
			} else {
				i++;
			}
		} else {
				i++;
		}
		if(i<=l){
			count++;
		}
	}
	return count;
};
_page.writeBreadCrumb = function (active_item) {
	var strNavTrail='',max_length = 94, total_length = 0, spacing_length = 3, parent_ids, strSectionMainName, strSectionMainLink, strSectionSpecialName, strSectionSpecialLink, area_string, i, j;
	_page.breadCrumbItem = active_item;
	parent_ids = active_item.split("_");
	for (i=0; i<parent_ids.length; i++) {
		parent_ids[i]=(i>0?parent_ids[i-1]+"_"+parent_ids[i]:parent_ids[i]);
	}
	if(_page.locale.substring(3,5)=="zh" || _page.locale.substring(3,5)=="ja" || _page.locale.substring(3,5)=="ko"){
		max_length = max_length - 40; // Used to be 15
	}
	if(_page.locale.substring(3,5)=="th"){
		max_length = max_length - 10;
	}
	if(_page.locale.substring(3,5)=="ru"){
		max_length = max_length - 5;
	}
	youarehere_length = _page.getstringlength(_page.text["youarehere"]);
	home_length = _page.getstringlength(_page.text["home_breadcrumb"]);
	max_length = max_length - youarehere_length - home_length -2;
	strNavTrail+='<table class="p-breadcrumb-table" cellspacing="0">\n';
	strNavTrail+='	<tr>\n';
	strNavTrail+='		<td id="p-youarehere">'+_page.text["youarehere"]+':</td>\n';
	strNavTrail+='		<td id="p-home"><a href="'+_page.link["home"]+'">'+_page.text["home_breadcrumb"]+'</a></td>\n';
	strSectionMainName = (typeof _page.sectionMain[0]!="undefined"?_page.sectionMain[0]:'')
	strSectionMainLink = (typeof _page.sectionMain[1]!="undefined"?_page.sectionMain[1]:'')
	strSectionSpecialName = (typeof _page.sectionSpecial[0]!="undefined"?_page.sectionSpecial[0]:'')
	strSectionSpecialLink = (typeof _page.sectionSpecial[1]!="undefined"?_page.sectionSpecial[1]:'')
	area_string='';
	if(_page.area!="" && strSectionSpecialName==""){
		if(_page.headerType == "external_extranet") {
			firstElement = (typeof(_page.topNavXN[_page.area])!="undefined"?_page.topNavXN[_page.area][0][0]:"");
		} else{
			firstElement = (typeof(_page.topNav[_page.area])!="undefined"?_page.topNav[_page.area][0][0]:"");
		}
		if(active_item!="") {
			if(firstElement!="") {
				strNavTrail+='		<td class="p-microarrow"><a href="'+_page.locales[_page.locale]+'">'+firstElement+'</a></td>\n';
				area_string = firstElement;
			} else {
				strNavTrail+='		<td class="p-microarrow">'+_page.area+'</td>\n';
				area_string = _page.area;
			}
		} else {
			if(firstElement!=""){
				strNavTrail+='		<td class="p-microarrow">'+firstElement+'</td>\n';
				area_string = firstElement;
			}else{
				strNavTrail+='		<td class="p-microarrow">'+_page.area+'</td>\n';
				area_string = _page.area;
			}
		}
	} else if(strSectionSpecialName!="") {
		if(strSectionMainName!="")		strNavTrail+='		<td class="p-microarrow">'+(strSectionMainLink!=""?'<a href="'+strSectionMainLink+'">'+strSectionMainName+'</a>':strSectionMainName)+'</td>\n';
		if(strSectionSpecialName!="")	strNavTrail+='		<td class="p-microarrow">'+(strSectionSpecialLink!="" && active_item!=""?'<a href="'+strSectionSpecialLink+'">'+strSectionSpecialName+'</a>':strSectionSpecialName)+'</td>\n';
		area_string = strSectionMainName+strSectionSpecialName;
	}
	if(area_string!="") {
		max_length = max_length - _page.getstringlength(area_string);
	}
	if(active_item!=""){
		for (i=0; i<parent_ids.length; i++) {
			total_length += _page.leftNav[parent_ids[i]].text.length;
		}
		counter = 0;
		if(total_length>max_length){
			while(total_length>max_length){
				total_length = total_length - _page.leftNav[parent_ids[counter]].text.length - spacing_length;
				i = i - 1;
				counter += 1;
			}
		}
		start_item = parent_ids.length - i;
		if(start_item!=0){
			strNavTrail+='		<td class="p-microarrow">...</td>\n';
		}
		for (j=start_item; j<parent_ids.length; j++) {
			if(j!=(parent_ids.length-1)){
				strNavTrail+='<td class="p-microarrow"><a href="'+_page.leftNav[parent_ids[j]].link+'">'+_page.leftNav[parent_ids[j]].text+'</a></td>\n';
			}else{
				strNavTrail+='<td class="p-microarrow">'+_page.leftNav[parent_ids[j]].text+'</td>\n';
			}
		}
	}
	strNavTrail+='</tr>\n';
	strNavTrail+='</table>\n';
	document.write(strNavTrail);
};

_page.showSearch = true;			// Only show stockquotes on country landing pages
_page.showSearchAsYouType = true;	// default show Search As You Type in the header search box
_page.disableBodyWrapperOutput = false;			// Allows to disable the bodywrapper html output
_page.disableReplaceSpecialCase = false;			// default load replace speciale case on page load
_page.writeHeader = function (area) {
	var crsc, homepages, header, strLocaleText, strLocaleFlag, headerLS, strButHeader, strSearchSection, linkRegister, linkLogin,
	f_createLink, htmlLinks, isHomepage, shopText, shopURL;
	_page.headerType = "internet";
	_page.siteLevel = _page.siteLevel || _page.getSiteLevelByLocale(_page.topNavLocale || _page.locale);
    _page.area = area;
    crsc = _page.crsc_server;
	_page.hideGlobalStyle = false;
	include_stylesheets();
	if (area === "about" || area === "consumer" || area === "lighting" || area === "medical"  || area === "support") {
		locales_redirect = "homepages_" + area;
	} else{
		locales_redirect = "homepages";
	}
	homepages = "	<script type=\"text/javascript\" src=\"" + crsc + "/crsc/locales/" + locales_redirect + "\"></script>\n"
	document.write(homepages);
	isHomepage = (_page.getMetaElementByName("PHILIPS.METRICS.PAGENAME").content === "landing"? true: false);
    header="";
	header+="			<div id=\"p-header\">\n";
	header+="				<div id=\"p-header-wrapper\">\n";
	header+="					<a href=\"" + _page.link["home"] + "\" onclick=\"return _page.switchHandler('" + _page.link["home"] + "', '')\"><img alt=\"Philips\" src=\"" + crsc + "/crsc/images/mainlogo_full_" + _page.locale + ".gif\"  id=\"p-mainlogo\" /></a>";
	strLocaleText = _page.locale === "global"? "Choose country / language" :""; 	// In case of global change text
	strLocaleText = _page.siteLevel === 1? "Others": strLocaleText; 				// In case of level 1 set others label and flag
	strLocaleFlag = _page.siteLevel === 1? "global": "";
	headerLS = new _page.LS('2', {localeText: strLocaleText, localeFlag: strLocaleFlag, removeLocaleList: (area === "support"? ["others"]: [])});
	header+= 						headerLS.html();
	header+="						<div id=\"p-header-features\"  >\n";
	if (_page.showSearch) {
		strButHeader = _page.direction === 'ltr'? "but_go.gif": "but_go_rtl.gif";
		strSearchSection = (area === "" || (area !== "consumer" && area !== "lighting" && area !== "medical" && area !== "about") ? "all" : area );
		header+="					<div id=\"p-header-search\">\n";
		header+="						<form id=\"searchform\" name=\"searchform\" accept-charset=\"utf-8\" action=\"http://www.search.philips.com/search/search\" method=\"get\">";
		header+="							<fieldset>\n";
		header+="								<label for=\"p-searchquery\">" + (_page.text["searchlabel"] || "Search") + "</label>\n";
		header+="								<input type=\"text\" size=\"15\" id=\"p-searchquery\" name=\"q\" class=\"p-searchfield\" value=\""+_page.text["searchlabel"]+"\" onfocus=\"this.value='';\" /><input type=\"image\" alt=\""+(_page.text["search_button"]  || "Search")+"\" class=\"p-searchsubmit\" src=\""+crsc+"/crsc/images/"+strButHeader+"\" />";
		header+="								<input type=\"hidden\" name=\"s\" value=\"" + strSearchSection + "\" />\n";
		header+="								<input type=\"hidden\" name=\"l\" value=\"" + _page.locale + "\" />\n";
		header+="								<input type=\"hidden\" name=\"h\" value=\"" + strSearchSection + "\" />\n";
		header+="							</fieldset>\n";
		header+="						</form>\n";
		header+="						<div id=\"p-search-sayt\"></div>\n";
		header+="					</div>\n";
		if ((strSearchSection === "consumer" || strSearchSection === "lighting" || strSearchSection === "all") && _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();
					}
				}
			});
		}
	}
	if (isHomepage || area === "consumer" || area === "support") {
		linkRegister = _page.link["consumer_register"] || "";
		linkLogin = _page.link["consumer_login"] || "";
		f_createLink = _page.html_helper.topnav.createLink;
		htmlLinks = _page.text["consumer_register"] || "";
		htmlLinks = htmlLinks.replace("{REGISTER_PRODUCT}", f_createLink({href: linkRegister, name: _page.text["register_product"], id: "p-link-register"}));
		htmlLinks = htmlLinks.replace("{LOGIN}", f_createLink({href: linkLogin, name: _page.text["login"], id: "p-link-login"}));
		header+="					<div id=\"p-header-myphilips\">" + htmlLinks + "</div>\n";
	}
	header+="					</div>\n";
	header+="				</div>\n";
	shopText = _page.text["ayft_tab_shop"] || "" ;
	shopURL = _page.link["ayft_tab_shop"] || "http://www.shop.philips.com";
	if (shopText !== "") {
		_page.topNav["shop"] = [[shopText, shopURL]]; // Optional shop
	}
	_page.headerNav = new _page.TopNav2("p-navigator", {
		type: _page.topNavType,
		activeId: area,
		locale: _page.topNavLocale,
		compatMode: _page.topNavCompatMode,
		onBeforeBodyOpen: _page.topNavOnBeforeBodyOpen,
		onBodyClose: _page.topNavOnBodyClose
	});
	_page.headerNav.setSectionActiveId("consumer", _page.topNavConsumerActiveId);
	if (_page.topNavType !== "inbody") {
		header+="			<div id=\"p-headernav\">\n";
		header+="				<div id=\"p-headernav-wrapper\">\n";
		header+="					<div id=\"p-headernav-innerwrapper\">\n";
		header+=						_page.headerNav.htmlTabs();
		header+="					</div>\n";
		header+="				</div>\n";
		header+="			</div>\n";
	} else {
		header+="				<div id=\"p-headernav-wrapper\">\n";
		header+="					<div id=\"p-headernav-innerwrapper\" >\n";
		header+= 						_page.headerNav.htmlTabs();
		header+="					</div>\n";
		header+="				</div>\n";
	}
	header+="			</div>\n";
	if (!_page.disableBodyWrapperOutput) {
		header+="			<div id=\"p-body\">\n";
		header+="				<div id=\"p-body-wrapper\">\n";
		header+="					<div id=\"p-body-innerwrapper\" class=\"p-clearfix\">\n";
		header+="						<div id=\"p-body-content\">\n";
	}
    _page.write(header, false);
	includeSIFR(); // Include SIFR
	if (_page.loadBrowserInfo) _page.setBrowserInfo();
	if (_page.activateActiveX) includeActiveXFix();
	if (!_page.disableReplaceSpecialCase) _page.onLoad(_page.checkSpecialCase);
	_page.onContentReady(function () {
		if (_page.showSearch) {
			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 (headerLS) {
			headerLS.init();
		}
		if (_page.headerNav) {
			_page.headerNav.init();
		}
		if (headerSayT) {
			headerSayT.init();
		}
		processTables();
	});
};

_page.ICPLicense = {
	getHtml: function () {
		var html = "<div id=\"p-icplicense\"><a href=\"" + (_page.link["icp_license"] || "") + "\" onclick=\"return _page.switchHandler('" + (_page.link["icp_license"] || "") + "','','" + _page.GlobalLanguageSwitch + "')\">" + (_page.text["icp_license"] || "ICP License") + "</a></div>";
		return (typeof _page.showICPLicense !== "undefined" && _page.showICPLicense)? html: "";
	}
};

_page.writeFooter = function () {
    var language_switch, privacy_footer, strSitemapLink, strSitemapText, footer, txtBP;
	language_switch = _page.GlobalLanguageSwitch;
	privacy_footer = _page.text["footer"];
	privacy_footer = privacy_footer.replace(/\{IMG\s*([^\}]+)\s*\}/ig, "<img $1></img>");
	privacy_footer = privacy_footer.replace("{BR}", "<br />");
	privacy_footer = privacy_footer.replace("{COPYRIGHT}", _page.text["copyright"]);
	privacy_footer = privacy_footer.replace("{CONTACT}", "<a href=\"" + _page.link["contact"] + "\" onclick=\"return _page.switchHandler('" + _page.link["contact"] + "','','" + language_switch + "')\">" + _page.text["contact_label"] + "</a>");
	privacy_footer = privacy_footer.replace("{PRIVACY}", "<a href=\"" + _page.link["privacy"] + "\" onclick=\"return _page.switchHandler('" + _page.link["privacy"] + "','','" + language_switch + "')\">" + _page.text["privacy"] + "</a>");
	privacy_footer = privacy_footer.replace("{OWNER}", "<a href=\"" + _page.link["owner"] + "\" onclick=\"return _page.switchHandler('" + _page.link["owner"] + "','','" + language_switch + "')\">" + _page.text["owner"] + "</a>");
	privacy_footer = privacy_footer.replace("{TERMS}", "<a href=\"" + _page.link["terms"] + "\" onclick=\"return _page.switchHandler('" + _page.link["terms"] + "','','" + language_switch + "')\">" + _page.text["terms"] + "</a>");
	strSitemapLink = _page.link["sitemap"];
	strSitemapText = _page.text["sitemap"];
	if (_page.link["sitemap_" + _page.area + "_navdata"]) {
		strSitemapLink = (_page.link["sitemap_" + _page.area + "_navdata"] !== "http://"?_page.link["sitemap_" + _page.area]: strSitemapLink);
	}
	privacy_footer = privacy_footer.replace("{SITEMAP}", "<a href=\"" + strSitemapLink + "\" onclick=\"return _page.switchHandler('" + strSitemapLink + "','','" + language_switch + "')\">" + strSitemapText + "</a>");
	privacy_footer = privacy_footer.replace("{CAREERS}","<a href=\"" + _page.link["careers"] + "\" onclick=\"return _page.switchHandler('" + _page.link["careers"] + "','','" + language_switch + "')\">" + _page.text["careers"] + "</a>");
	privacy_footer += _page.ICPLicense.getHtml();
	footer = '';
	if (!_page.disableBodyWrapperOutput) {
		footer+="						</div>\n";
		footer+="					</div>\n";
		footer+="					<div id=\"p-body-bottomwrapper\"></div>\n";
		footer+="				</div>\n";
		footer+="			</div>\n";
	}
	footer+="			<div id=\"p-footer\">\n";
	footer+="				<div id=\"p-footer-wrapper\">\n";
	footer+=" 					<div id=\"p-stockquotes\"></div>\n";
	footer+=" 					<div id=\"p-footertext\">" + privacy_footer + "</div>\n";
	txtBP = (_page.locale === "cn_zh" || _page.locale === "ca_fr" || _page.locale === "fr_fr" || _page.locale === "kr_ko"? (_page.text["brandpromise"] || ""): "");
	footer+=		(txtBP !== ""? "<div id=\"p-footer-brandpromise\">* " + txtBP + "</div>": "");  // nobr added due to IE 5
	footer+="				</div>\n";
	footer+="			</div>\n";
	_page.write(footer, false);
	_page.onContentReady(initSectionBanner);
	includeOmniture();
	if (_page.showStockQuotes) includeStockquotes();
	includeOnlineOpinion();
	_page.eSurvey.include();
};

_page.showLocales = true; 							// Boolean to show the Locale selector
_page.useGlobalStyle = false;						// Extra setting to allow global stylesheets in Microsite
_page.writeMicroHeader = function () {
	var header, arrow_name, headerLS, crsc;
	crsc = _page.crsc_server;
	_page.headerType = "microsite";
	if(_page.useGlobalStyle == true) {
		_page.hideGlobalStyle = false;
	} else {
		_page.hideGlobalStyle = true;
	}
	include_stylesheets();
	header="";
	header+="	   <table id=\"p-container\" cellspacing=\"0\" border=\"0\">\n";
	header+="			<tr>\n";
	header+="				<td id=\"p-topcontainertd\">\n";
	header+="					<table id=\"p-topcontainer\" cellspacing=\"0\" border=\"0\">\n";
	header+="						<tr>\n";
	header+="							<td id=\"p-mainlogo-micro\"><a href=\""+_page.link["home"]+"\" onclick=\"return _page.switchHandler('"+_page.link["home"]+"', '')\"><img alt=\"Philips\" src=\""+crsc+"/crsc/images/mainlogo.gif\" /></a></td>\n";
	header+="							<td id=\"p-topright\">\n";
	header+="								<table id=\"p-topright-container\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
	header+="									<tr>\n";
	/* Philips Home link */
	arrow_name = _page.direction=='ltr'?"arrow_header.gif":"arrow_header_rtl.gif";
	header+="										<td id=\"p-support-links\"><a href=\""+_page.link["home"]+"\" onclick=\"return _page.switchHandler('"+_page.link["home"]+"', '')\"><img alt=\"\" src=\""+crsc+"/crsc/images/"+arrow_name+"\" class=\"p-sectionarrow\" />\n";
	header+= _page.text["home_site"]+"</a></td>\n";
	/* Locale selector */
	if(_page.showLocales) {
		header+="									<td id=\"p-localeselect\">\n";
		headerLS = new _page.LS('1');
		header+= headerLS.html();
		header+="									</td>\n";
	}
	header+="									</tr>\n";
	header+="								</table>\n";
	header+="							</td>\n";
	header+="						</tr>\n";
	header+="					</table>\n";
	header+="				</td>\n";
	header+="			</tr>\n";
	header+="			<tr>\n";
	header+="				<td id=\"p-bodycontainer-td\">\n";
	header+="					<table id=\"p-bodycontainer-table\" cellspacing=\"0\">\n";
	header+="						<tr>\n";
	header+="							<td>\n";
	_page.write(header, false);
	if(_page.activateActiveX) includeActiveXFix();
	_page.onLoad(processTables);
	_page.onContentReady(function () {
		if (headerLS) {
			headerLS.init();
		}
	});
};

_page.writeMicroFooter = function() {
	var privacy_footer, footer;
   	privacy_footer = _page.text["footer"];
	privacy_footer = privacy_footer.replace(/\{IMG\s*([^\}]+)\s*\}/ig, "<img $1></img>");
	privacy_footer = privacy_footer.replace("{BR}", "<br />");
	privacy_footer = privacy_footer.replace("{COPYRIGHT}", _page.text["copyright"]);
	privacy_footer = privacy_footer.replace("{PRIVACY}", "<a href=\""+_page.link["privacy"]+"\" onclick=\"return _page.switchHandler('"+_page.link["privacy"]+"', '')\">"+_page.text["privacy"]+"</a>");
	privacy_footer = privacy_footer.replace("{OWNER}", "<a href=\""+_page.link["owner"]+"\" onclick=\"return _page.switchHandler('"+_page.link["owner"]+"', '')\">"+_page.text["owner"]+"</a>");
	privacy_footer = privacy_footer.replace("{TERMS}", "<a href=\""+_page.link["terms"]+"\" onclick=\"return _page.switchHandler('"+_page.link["terms"]+"', '')\">"+_page.text["terms"]+"</a>");
	privacy_footer = privacy_footer.replace("| {SITEMAP}","");
	privacy_footer = privacy_footer.replace("{CONTACT} | ","");
	privacy_footer = privacy_footer.replace("{CAREERS} | ","");
	privacy_footer += _page.ICPLicense.getHtml();
	footer="";
	footer+="							</td>\n";
	footer+="						</tr>\n";
	footer+="					</table>\n";
	footer+="				</td>\n";
	footer+="			</tr>\n";
	footer+="			<tr>\n";
	footer+="				<td id=\"p-footer\">\n";
	footer+="					<table id=\"p-footertable\">\n";
	footer+="						<tr>\n";
	footer+="							<td id=\"p-footerleft\">\n";
	footer+= (_page.showStockQuotes?"<div id=\"p-stockquotes\">&nbsp;</div>\n":"&nbsp;");
	footer+="							</td>\n";
	footer+="							<td id=\"p-footertext\">\n";
	footer+="		<!-- footer text -->\n";
	footer+=" 								"+privacy_footer+"\n";
	footer+="		<!-- end footer text -->\n";
	footer+="							</td>\n";
	footer+="							<td id=\"p-footerright\">\n";
	footer+="								&nbsp;\n";
	footer+="							</td>\n";
	footer+="						</tr>\n";
	footer+="					</table>\n";
	footer+="				</td>\n";
	footer+="			</tr>\n";
	footer+="		</table>\n";
	_page.write(footer, true);
	document.body.style.direction=_page.direction; 	// Set dynamically page direction
	initSectionBanner();
	includeOmniture();
};

_page.topNavType = "";								// External extranet navigation type
_page.pageWidth = "800";							// Default 800x600 in extranet
_page.topNavXN = [];								// Defined in extranet locale files
_page.supportLinks = []; 							// Multiple supportlinks in header
_page.customLogo = [];								// Custom logo attributes
_page.writeExtranetHeader = function () {
	var crsc, header;
	_page.hideGlobalStyle = false;
	_page.headerType = "extranet";
	include_stylesheets();
	crsc = _page.crsc_server;
    header="";
	header+="	   <table id=\"p-container\" cellspacing=\"0\">\n";
	header+="			<tr>\n";
	header+="				<td id=\"p-topcontainertd\">\n";
	header+="					<table id=\"p-topcontainer\">\n";
	header+="						<tr>\n";
	header+="							<td id=\"p-mainlogo-extra\"><a href=\""+_page.link["home"]+"\" onclick=\"return _page.switchHandler('"+_page.link["home"]+"', '')\"><img alt=\"Philips\" src=\""+crsc+"/crsc/images/mainlogo.gif\" /></a></td>\n";
	if(_page.showSearch){
		header+="							<td class=\"p-extranet-search\" align=\"right\">\n";
		header+="								<form id=\"searchform\" name=\"searchform\" action=\""+_page.searchaction+"\">\n";
		header+="									<table cellspacing=\"0\">";
		header+="										<tr>\n";
		header+="											<td>"+_page.text["searchlabel"]+"&nbsp;</td>\n";
		header+="											<td><input type=\"text\" size=\"20\" name=\"searchtext\" class=\"p-searchfield\" /></td>\n";
		header+="											<td>\n";
		if (_page.direction=='ltr'){
			header+="											<input class=\"p-locale-submit\" type=\"image\" alt=\"Submit\" src=\""+crsc+"/crsc/images/but_go.gif\" />\n";
		}
		else{
			header+="											<input class=\"p-locale-submit\" type=\"image\" alt=\"Submit\" src=\""+crsc+"/crsc/images/but_go_rtl.gif\" />\n";
		}
		header+="											</td>\n";
		header+="										</tr>\n";
		header+="									</table>\n";
		header+="								</form>\n";
		header+="							</td>\n";
	}
	header+="						</tr>\n";
	header+="					</table>\n";
	header+="				</td>\n";
	header+="			</tr>\n";
	header+="			<tr>\n";
	header+="				<td class=\"p-extranet-extraspace\">\n";
	header+="				</td>\n";
	header+="			</tr>\n";
	header+="			<tr>\n";
	header+="				<td id=\"p-bodycontainer-td\">\n";
	header+="					<table id=\"p-bodycontainer-table\" cellspacing=\"0\">\n";
	header+="						<tr>\n";
	header+="							<td class=\"p-extranet-topline\">\n";
	_page.write(header, false);
	if(_page.activateActiveX) includeActiveXFix();
	_page.onLoad(processTables);
};

_page.writeExtranetFooter = function() {
	var privacy_footer, footer;
   	privacy_footer = _page.text["footer"];
	privacy_footer = privacy_footer.replace(/\{IMG\s*([^\}]+)\s*\}/ig, "<img $1></img>");
	privacy_footer = privacy_footer.replace("{BR}", "<br />");
	privacy_footer = privacy_footer.replace("{COPYRIGHT}", _page.text["copyright"]);
	privacy_footer = privacy_footer.replace("{PRIVACY}", "<a href=\""+_page.link["privacy"]+"\" onclick=\"return _page.switchHandler('"+_page.link["privacy"]+"', '')\">"+_page.text["privacy"]+"</a>");
	privacy_footer = privacy_footer.replace("{OWNER}", "<a href=\""+_page.link["owner"]+"\" onclick=\"return _page.switchHandler('"+_page.link["owner"]+"', '')\">"+_page.text["owner"]+"</a>");
	privacy_footer = privacy_footer.replace("{TERMS}", "<a href=\""+_page.link["terms"]+"\" onclick=\"return _page.switchHandler('"+_page.link["terms"]+"', '')\">"+_page.text["terms"]+"</a>");
	privacy_footer = privacy_footer.replace("| {SITEMAP}", "");
	privacy_footer = privacy_footer.replace("{CONTACT} | ","");
	privacy_footer = privacy_footer.replace("{CAREERS} | ","");
	privacy_footer += _page.ICPLicense.getHtml();
 	footer = "";
	footer += "							</td>\n";
	footer += "						</tr>\n";
	footer += "					</table>\n";
	footer += "				</td>\n";
	footer += "			</tr>\n";
	footer += "			<tr>\n";
	footer += "				<td id=\"p-footer\">\n";
	footer += "					<table id=\"p-footertable\">\n";
	footer += "						<tr>\n";
	footer+="							<td id=\"p-footerleft\">\n";
	footer+= (_page.showStockQuotes?"<div id=\"p-stockquotes\">&nbsp;</div>\n":"&nbsp;");
	footer+="							</td>\n";
	footer += "							<td id=\"p-footertext\">\n";
	footer += "		<!-- footer text -->\n";
	footer += " 								"+privacy_footer+"\n";
	footer += "		<!-- end footer text -->\n";
	footer += "							</td>\n";
	footer += "							<td id=\"p-footerright\">\n";
	footer += "								&nbsp;\n";
	footer += "							</td>\n";
	footer += "						</tr>\n";
	footer += "					</table>\n";
	footer += "				</td>\n";
	footer += "			</tr>\n";
	footer += "		</table>\n";
	_page.write(footer,false)
	document.body.style.direction=_page.direction; 	// Set dynamically page direction
};

_page.writeExternalExtranetHeader = function (area) {
	var crsc, strWidth, arrow_name, searchHTML, authorHTML, supportLinksHTML, supportText, supportLink, header, customLogoSrc, customLogoHref, customLogoAlt, butImage, butImageAlt, butLink, butText, strID, counter, i, topNavID, id;
	_page.hideGlobalStyle = true;
	_page.headerType = "external_extranet";
	include_stylesheets();
	crsc = _page.crsc_server;
	strWidth = _page.pageWidth;
	arrow_name = _page.direction=='ltr'?"arrow_orange.gif":"arrow_orange_rtl.gif";
	searchHTML="";
	searchHTML+="										<table id=\"p-search-form\" cellspacing=\"0\" border=\"0\">";
	searchHTML+="											<tr>\n";
	searchHTML+="												<form id=\"searchform\" name=\"searchform\" action=\""+_page.searchaction+"\">\n";
	searchHTML+="													<td><nobr>"+_page.text["searchlabel"]+"&nbsp;</nobr></td>\n";
	searchHTML+="													<td><input type=\"text\" size=\"20\" name=\"searchtext\" class=\"p-searchfield\" /></td>\n";
	searchHTML+="													<td>\n";
	if (_page.direction=='ltr'){
		searchHTML+="												<input class=\"p-locale-submit\" type=\"image\" alt=\"Submit\" src=\""+crsc+"/crsc/images/but_go.gif\" />\n";
	} else{
		searchHTML+="												<input class=\"p-locale-submit\" type=\"image\" alt=\"Submit\" src=\""+crsc+"/crsc/images/but_go_rtl.gif\" />\n";
	}
	searchHTML+="													</td>\n";
	searchHTML+="												</form>\n";
	searchHTML+="											</tr>\n";
	searchHTML+="										</table>\n";
	authorHTML="";
	authorHTML+=" 										<table id=\"p-author-name\" cellspacing=\"0\" border=\"0\"><tr>\n";
	authorHTML+="											<td><nobr>"+_page.text["authorname"]+"</nobr></td>\n";
	authorHTML+="										</tr></table>\n";
	supportLinksHTML= "";
	if(_page.supportLinks.length != 0) {
		supportLinksHTML+= "						<table id=\"p-support-links\" cellspacing=\"0\" border=\"0\"><tr>\n";
		for(i=0;i<_page.supportLinks.length;i++) {
			supportText = _page.supportLinks[i][0];
			supportLink = _page.supportLinks[i][1];
			supportLinksHTML+=" 							<td><a href=\""+supportLink+"\" onclick=\"return _page.switchHandler('"+supportLink+"','')\"><img alt=\"\" src=\""+crsc+"/crsc/images/"+arrow_name+"\" class=\"p-sectionarrow\" />"+supportText+"</a></td>\n";
		}
		supportLinksHTML+="							</tr></table>\n";
	}
	header="";
	header+="	   <table id=\"p-container\" cellspacing=\"0\" border=\"0\">\n";
	header+="			<tr>\n";
	header+="				<td id=\"p-topcontainertd\">\n";
	header+="					<table id=\"p-topcontainer-"+strWidth+"\" cellspacing=\"0\">\n";
	header+="						<tr>\n";
	header+="							<td id=\"p-mainlogo-extra\"><a href=\""+_page.link["home"]+"\" onclick=\"return _page.switchHandler('"+_page.link["home"]+"', '')\"><img alt=\"Philips\" src=\""+crsc+"/crsc/images/mainlogo.gif\" /></a></td>\n";
	header+="							<td id=\"p-top-middle\">\n";
	header+="								<table id=\"p-top-options\" border=\"0\" cellspacing=\"0\"><tr>";
	if (_page.showAuthor && _page.authorPosition == "top") {
		header+="								<td>"+authorHTML+"</td>";
	}
	if (_page.showSearch && _page.searchPosition == "top") {
		header+="								<td>"+searchHTML+"</td>";
	}
	if(_page.showSupportLinks) {
		header+="								<td>"+supportLinksHTML+"</td>";
	}
	header+="								</tr></table>";
	header+="							</td>\n";
	if(_page.customLogo[0]) customLogoSrc = _page.customLogo[0] || "";
	if(_page.customLogo[1]) customLogoHref = _page.customLogo[1] || "";
	if(_page.customLogo[2]) customLogoAlt = _page.customLogo[2] || "";
	header+="							<td id=\"p-customlogo\"><a href=\""+customLogoHref+"\" onclick=\"return _page.switchHandler('"+customLogoHref+"', '')\"><img alt=\""+customLogoAlt+"\" src=\""+customLogoSrc+"\" /></a></td>\n";
	header+="						</tr>\n";
	header+="					</table>\n";
	header+="				</td>\n";
	header+="			</tr>\n";
	if(_page.topNavType != "hidden") {
		header+="		<tr>\n";
		header+="			<td id=\"p-headcontainer-td\">\n";
		header+="				<table id=\"p-headcontainer-table-"+strWidth+"\" cellspacing=\"0\" border=\"0\">\n";
		header+="					<tr>\n";
		header+="						<td>\n";
		header+="		<!-- main navigation bar -->\n";
		header+="							<table class=\"p-tight\" id=\"p-mainnavcontainer\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n";
		header+="								<tr>\n";
		if(_page.topNavType != "internet") {
			if (_page.direction=='ltr'){
				header+="								<td id=\"p-mainnav-leftcorner\" class=\"p-mainnav-leftcorner\"><img alt=\"\" src=\""+crsc+"/crsc/images/t.gif\" width=\"1\" /></td>\n";
			} else{
				header+="								<td id=\"p-mainnav-rightcorner\" class=\"p-mainnav-rightcorner\"><img alt=\"\" src=\""+crsc+"/crsc/images/t.gif\" width=\"1\" /></td>\n";
			}
		}
		header+="									<td id=\"p-mainnav-left\">\n";
		if(_page.topNavType == "internet") {
			header+="									<table cellspacing=\"0\" border=\"0\">\n";
			header+="										<tr>\n";
			header+="											<td id=\"p-mainnav-dropdowns\">\n";
			header+="												<table class=\"p-tight\"  id=\"p-mainnav\" cellspacing=\"0\" border=\"0\">\n";
			header+="													<tr>\n";
			menuArray = new Array();
			i=1;
			for(topNavID in _page.topNavXN) {
				menuArray[i]=topNavID;
				i++;
			}
			if(typeof(area)!="undefined") {
				_page.area = area;
	    		currSection = _page.area;
			}
			for(counter=1;counter< menuArray.length;counter++) {
				strID = menuArray[counter];
				header+="													<td class=\"navbutton\" id=\""+strID+"button\" onmouseover=\"sectionOn('"+strID+"', event)\" onmouseout=\"sectionOff('"+strID+"')\" onclick=\"Javascript:_page.switchHandler('"+_page.topNavXN[strID][0][1]+"', '')\"><div>"+_page.topNavXN[strID][0][0]+"</div></td>\n";
				header+="													<td id=\"p-mainnav-sep1\" class=\"mainnavsep\" onmouseover=\"hideAllMenus()\"><img alt=\"\" src=\""+crsc+"/crsc/images/navsep.gif\" /></td>\n";
			}
			header+="													</tr>\n";
			header+="												</table>\n";
			header+="											</td>\n";
			header+="										</tr>\n";
			header+="									</table>\n";
		} else if(_page.topNavType == "icons") {
			header+="									<table id=\"p-mainnav-icons\" cellspacing=\"0\" border=\"0\">\n";
			header+=" 										<tr>\n";
			for(id in _page.topNavXN) {
				butText = _page.topNavXN[id][0] || "";
				butLink = _page.topNavXN[id][1] || "";
				butImage = _page.topNavXN[id][2] || "";
				butImageAlt = _page.topNavXN[id][3] || "";
				header+="										<td class=\"p-iconbutton\" id=\"button"+"_"+id+"\" onclick=\"Javascript:_page.switchHandler('"+butLink+"', '')\"><a href=\""+butLink+"\">";
				if(typeof(butImage)!="undefined") {
					header+="									<img src=\""+butImage+"\" ";
					if(typeof(butImageAlt)!="undefined") {
						header+="								alt=\""+butImageAlt+"\" ";
					} else {
						header+="								alt=\"\" ";
					}
					header+="									/>";
				}
				header+="										"+butText+"</a></td>\n";
				header+="										<td class=\"p-iconbutton-sep\">&nbsp;</td>";
			}
			header+="										</tr>\n";
			header+="									</table>\n";
		} else {
			header+="									<table id=\"p-mainnav-custom\" cellspacing=\"0\" border=\"0\" >\n";
			header+="										<tr>\n";
			header+="											<td>"+_page.topNavHTML+"</td>\n";
			header+="										</tr>\n";
			header+="									</table>\n";
		}
		header+="									</td>\n";
		header+="									<td id=\"p-mainnav-right\">\n";
		if(_page.showSearch || _page.showAuthor) {
			if(_page.showSearch && _page.searchPosition == "menu") {
				header+= 								searchHTML;
			} else if (_page.showAuthor && _page.authorPosition == "menu") {
				header+= 								authorHTML;
			}
		}
		header+="									</td>\n";
		if (_page.direction=='ltr'){
			header+="								<td id=\"p-mainnav-rightcorner\" class=\"p-mainnav-rightcorner\"><img alt=\"\" src=\""+crsc+"/crsc/images/t.gif\" width=\"1\" /></td>\n";
		} else{
			header+="								<td id=\"p-mainnav-leftcorner\" class=\"p-mainnav-leftcorner\"><img alt=\"\" src=\""+crsc+"/crsc/images/t.gif\" width=\"1\" /></td>\n";
		}
		header+="								</tr>\n";
		header+="							</table>\n";
		header+="		<!-- end main navigation bar -->\n";
		header+="						</td>\n";
		header+="					</tr>\n";
		header+="				</table>\n";
		header+="			</td>\n";
		header+="		</tr>\n";
	}
	header+="			<tr>\n";
	header+="				<td id=\"p-bodycontainer-td\">\n";
	header+="					<table id=\"p-bodycontainer-table-"+strWidth+"\" cellspacing=\"0\" border=\"0\">\n";
	header+="						<tr>\n";
	header+="							<td>\n";
	_page.write(header, false);
	if(_page.activateActiveX) includeActiveXFix();
	_page.onLoad(processTables);
};

_page.writeExternalExtranetFooter = function() {
	var privacy_footer, footer, strID, counter;
   	privacy_footer = _page.text["footer"];
	privacy_footer = privacy_footer.replace(/\{IMG\s*([^\}]+)\s*\}/ig, "<img $1></img>");
	privacy_footer = privacy_footer.replace("{BR}", "<br />");
	privacy_footer = privacy_footer.replace("{COPYRIGHT}", _page.text["copyright"]);
	privacy_footer = privacy_footer.replace("{PRIVACY}", "<a href=\""+_page.link["privacy"]+"\" onclick=\"return _page.switchHandler('"+_page.link["privacy"]+"', '')\">"+_page.text["privacy"]+"</a>");
	privacy_footer = privacy_footer.replace("{OWNER}", "<a href=\""+_page.link["owner"]+"\" onclick=\"return _page.switchHandler('"+_page.link["owner"]+"', '')\">"+_page.text["owner"]+"</a>");
	privacy_footer = privacy_footer.replace("{TERMS}", "<a href=\""+_page.link["terms"]+"\" onclick=\"return _page.switchHandler('"+_page.link["terms"]+"', '')\">"+_page.text["terms"]+"</a>");
	privacy_footer = privacy_footer.replace("| {SITEMAP}", "");
	privacy_footer = privacy_footer.replace("{CONTACT} | ","");
	privacy_footer = privacy_footer.replace("{CAREERS} | ","");
	privacy_footer += _page.ICPLicense.getHtml();
	footer = '';
	footer +="							</td>\n";
	footer +="						</tr>\n";
	footer +="					</table>\n";
	footer +="				</td>\n";
	footer +="			</tr>\n";
	footer +="			<tr>\n";
	footer +="				<td id=\"p-footer\">\n";
	footer +="					<table id=\"p-footertable-"+_page.pageWidth+"\">\n";
	footer +="						<tr>\n";
	footer+="							<td id=\"p-footerleft\">\n";
	footer+= (_page.showStockQuotes?"<div id=\"p-stockquotes\">&nbsp;</div>\n":"&nbsp;");
	footer+="							</td>\n";
	footer +="							<td id=\"p-footertext\">\n";
	footer +="		<!-- footer text -->\n";
	footer +=" 								"+privacy_footer+"\n";
	footer +="		<!-- end footer text -->\n";
	footer +="							</td>\n";
	footer +="							<td id=\"p-footerright\">\n";
	footer +="								&nbsp;\n";
	footer +="							</td>\n";
	footer +="						</tr>\n";
	footer +="					</table>\n";
	footer +="				</td>\n";
	footer +="			</tr>\n";
	footer +="		</table>\n";
	if(	_page.topNavType == "internet") {
		for(counter=1;counter< menuArray.length;counter++) {
			strID = menuArray[counter];
			footer += createTopNavMenu(strID);
		}
		if(_page.area!="") sectionButtonOn(_page.area);
		document.onmouseover = hideAllMenus;
	}
	_page.write(footer,false);
	document.body.style.direction=_page.direction; 	// Set dynamically page direction
};

/* Third party scripts */
_page.externalUrlPrefix = {
	"metrixLab": "http://invitation.opinionbar.com",
	"stockQuotes": "http://www.stockquotes.philips.com"
}

_page.loadESurvey = true;
_page.eSurvey = {
	include:function() {
		if (document.addEventListener) {
			document.addEventListener("DOMContentLoaded",_page.eSurvey.load, false); // DomContentLoaded used inorder to prevent looping loading requests in the statusbar FF
		} else {
			_page.onLoad(_page.eSurvey.load);
		};
	},
	load:function() {
		var objBody, objScript;
		if (window.location.protocol != "https:" && !_page.isMacIE && _page.loadESurvey == true) {
			objBody = document.getElementsByTagName('body').item(0);
			objScript = document.createElement('script');
			objScript.src = _page.externalUrlPrefix.metrixLab + "/popups/p07086_demo/overlay.js";
			objScript.type = 'text/javascript';
			objBody.appendChild(objScript);
		};
	}
}

function includeStockquotes(){
	if (window.location.protocol === "http:") {
		objBody = document.getElementsByTagName('body').item(0);
		objScript = document.createElement('script');
		objScript.src =  _page.externalUrlPrefix.stockQuotes + "/asp/ir/philips_java.aspx";
		objScript.type = 'text/javascript';
		objBody.appendChild(objScript);
	}
};

_page.loadOmniture = true;
function includeOmniture() {
	var protocol, omniture;
	if(_page.loadOmniture == true) {
		protocol = (window.location.protocol=="https:" || window.location.protocol=="http:"?window.location.protocol:"http:"); // only allow http and https
		omniture = "<scri"+"pt type='text/javascript' src='"+protocol+"//www.crsc.philips.com/crsc/scripts/s_code_philipsglobal.js'></scr"+"ipt>";
		document.write(omniture);
	}
};

_page.loadOnlineOpinion = false;
function includeOnlineOpinion() {
	var protocol, onlineOpinion;
	if (_page.loadOnlineOpinion === true && (_page.locale === "de_de" || _page.locale === "gb_en" || _page.locale === "us_en" || _page.locale === "fr_fr" || _page.locale === "nl_nl" || _page.locale === "br_pt" || _page.locale === "ru_ru" || _page.locale === "cn_zh")) {
		onlineOpinion = "<scri" + "pt type='text/javascript' charset='windows-1252' src='" + _page.crsc_server + "/crsc/scripts/oo_engine.js'></scr" + "ipt>";
		onlineOpinion += "<scri" + "pt type='text/javascript' charset='windows-1252' src='" + _page.crsc_server + "/crsc/scripts/oo_conf_" + _page.locale + ".js'></scr" + "ipt>";
		document.write(onlineOpinion);
	}
};

/* sIFR*/
_page.loadSIFR = true;								// false, allows siteowner to disable GMM SIFR (script + config)
_page.loadSIFRScript = false; 						// true, allows siteowner to load the base SIFR script file for all locales without any respects to the locales
_page.loadSIFRConfig = true;						// false, allow siteowner to disable GMM SIFR config loading
function includeSIFR() {
	/* Available options
	default (no options set) 			// SIFR script and config is loaded only for the locales which are not in the _page.disabledLocalesSIFR array
	_page.loadSIFR = false;			// Doesn't load SIFR script and config files at all
	_page.loadSIFRScript = true; 		// Loads the base SIFR script file for all locales without any respects to the locales
	_page.loadSIFRConfig = false;		// Doesn't load the SIFR config file (for GMM header replacement)
	*/
	var html, lang, replaceHeader, loadscript, loadconfig;
	html = "";
	lang = _page.locale.split("_")[1] || "en";
	replaceHeader = _page.sIFR.getSWFByFont({language: lang});
	loadscript = false;
	loadconfig = false;
	loadscript = (_page.loadSIFR == false? false: replaceHeader);
	if(loadscript || _page.loadSIFRScript) {
		html += "<scri"+"pt language='JavaScript' type='text/javascript' src='" + _page.sIFR.js.core.src + "'></scr"+"ipt>";
	}
	loadconfig = (loadscript && replaceHeader? true: false);
	if(loadconfig && _page.loadSIFRConfig) {
		html += "<scri"+"pt language='JavaScript' type='text/javascript' src='" + _page.sIFR.js.config.src + "'></scr"+"ipt>";
	}
	document.write(html);
};

/*
*************************************
***** Include stylesheets 		*****
*************************************
*/
function include_stylesheets () {
	var crsc = _page.crsc_server, stylesheet = '', rtl;
	if (!_page.hideGlobalStyle) {
		stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/global.css\" />\n";
	}
	if(_page.headerType === "internet") {
		stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/internet.css\" />\n";
	}
	stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/components.css\" />\n";
	switch (_page.headerType) {
	case "external_extranet":
		stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/external_extranet.css\" />\n";
		break;
	case "microsite":
		stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/microsite.css\" />\n";
		break;
	case "popup":
		stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/popup.css\" />\n";
		break;
	}
	if (!_page.hideGlobalStyle) {
		stylesheet += "<link media=\"print\" rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/printbrowser.css\" />\n";
	}
	if (_page.direction === "rtl") {
		stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/rtl.css\" />\n";
	}
	if (_page.browser.isMac) {
		stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/mac.css\" />\n";
	}
	if (_page.browser.isNS6x) {
		stylesheet += "<style>td.dd-inactiveItem{font-size:80%;}td.dd-activeItem{font-size:80%;}.p-table_flyout{font-family:Verdana, Arial, Helvetica, sans-serif;font-size:70%;}</style>";
	}
	if (_page.browser.isNS6x || _page.browser.isNS7x) {
		stylesheet += "<style>.p-content-grid{border-collapse:inherit;}</style>";
	}
	if (_page.browser.isNS7x) {
		stylesheet += "<style>table.p-dropdown table td{border-width:0px;}</style>";
	}
	if (_page.browser.isOpera && _page.browser.isWin) {
		stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/opera.css\" />\n";
	}
	stylesheet += "<!--[if lte IE 6]>\n";
	stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/ie_transparency.css\" />\n";
	if (_page.direction === "rtl") {
		stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/ie_transparency_rtl.css\" />\n";
	}
	stylesheet += "<![endif]-->\n";
	if (_page.locale) {
		if (_page.locale.substring(3,5) === "zh") {
			stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/zh.css\" />\n";
		} else if (_page.locale.substring(3,5) === "ko") {
			stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/ko.css\" />\n";
		} else if(_page.locale.substring(3,5) === "ja") {
			stylesheet += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/ja.css\" />\n";
		}
	}
	if (stylesheet !== "") document.write(stylesheet);
};

m_iRotatorIndex = 1,								// Stockquotes rotator index
_page.values = {									// Stock quote values
		aex:"",
		nyse:""
	};
_page.showStockQuotes = false;						// Don't show stockquotes by default
_page.updateStockQuote = function() {
	var stockQuotes, sStockValue, sStockPrice, sStockExchange, current_language, new_language;
	if(_page.values["aex"]!=""){
		if( m_iRotatorIndex == 1 ){
			m_sStockQuoteTargetURL = "http://www.stockquotes.philips.com/asp/ir/philips_newdesign.aspx?market=0";
			sStockValue = "EUR";
			sStockPrice = _page.values["aex"];
			sStockExchange = "AEX";
		}
		else if( m_iRotatorIndex == 2 ){
			m_sStockQuoteTargetURL = "http://www.stockquotes.philips.com/asp/ir/philips_newdesign.aspx?market=1";
			sStockValue = "US$";
			sStockPrice = _page.values["nyse"];
			sStockExchange = "NYSE";
		}
		current_language = _page.locale.substring(3,5);
		if(current_language!="en" && _page.locale!="global"){
			new_language=_page.text["lang_en"];
		} else{
			new_language = "";
		}
		if(!(_page.browser.isMac && _page.browser.isIE5x)){
			stockQuotes = gE("p-stockquotes");
			if(stockQuotes) {
				stockQuotes.innerHTML = "<nobr><b>" + sStockExchange + "</b>&nbsp;|&nbsp;<a href=\""+m_sStockQuoteTargetURL+"\" onclick=\"return _page.switchHandler('"+m_sStockQuoteTargetURL+"', '', '"+new_language+"')\">" + sStockValue +"</a>&nbsp;"+sStockPrice+"</nobr>";
			}
		}
		m_iRotatorIndex++;
		if(m_iRotatorIndex > 2){
			m_iRotatorIndex = 1;
		}
		setTimeout("_page.updateStockQuote()",6000);
	}
};

_page.popupHideHeader = false; 					// Allow disabled popup header
_page.popupHideFooter = false;					// Allow disabled popup footer
_page.popupAutoFitWindowToContent = true;
_page.popupHeight = 1;
_page.popupWidth = 1;
_page.showPopup = function(url) {
	var wHeight = _page.popupHeight, wWidth=_page.popupWidth, w;
	w = window.open(url,'_blank','height='+wHeight+',width='+wWidth+',toolbar=no,scrollbars=yes,resizable=yes')
	return false;
};

resizePopup = function() {
	var w, oD, oW, oH, myW, myH;
	w = window;
	oD = w.document.getElementById('p-inner-containertd'); if( !oD ) { return false; }
	oW = goW(oD);
	oH = goH(oD); if( !oH ) { return false; }
	if(!_page.popupAutoFitWindowToContent)	{
		oW = _page.popupWidth;
		oH = _page.popupHeight;
		w.resizeTo(oW, oH);
	}
	else if(_page.popupAutoFitWindowToContent) {
		w.resizeTo( oW + 200, oH + 200 );
		myW = 0, myH = 0;
		myW = getScreenWidth()
		myH = getScreenHeight();
		if(window.opera && !document.childNodes) { myW -= 16; }
		w.resizeTo( oW + ( ( oW + 200 ) - myW), oH + ( (oH + 200 ) - myH) );
	}
	w.moveTo(Math.round((gsW()-oW)/2),Math.round((gsH()-oH)/2));
	if( w.focus ) { w.focus(); }
};

_page.writePopupHeader = function() {
	_page.headerType = "popup";
	var strHTML = "", crsc = _page.crsc_server;
	strHTML+='<link href="'+crsc+ '/crsc/styles/popup.css" type="text/css" rel="stylesheet" />\n';
	strHTML+='	<table cellspacing="0" cellpadding="0" id="p-container">\n';
	strHTML+='		<tr>\n';
	strHTML+='			<td id="p-containertd">\n';
	strHTML+='				<table  cellspacing="0" cellpadding="0" id="p-inner-container">\n';
	strHTML+='					<tr>\n';
	strHTML+='						<td id="p-inner-containertd">\n';
	strHTML+='							<table cellspacing="0" cellpadding="0" id="p-popup-container">\n';
	if(!_page.popupHideHeader) {
		strHTML+='							<tr>\n';
		strHTML+='								<td id="p-popup-header">\n';
		strHTML+='									<img alt="Philips" src="'+crsc+ '/crsc/images/mainlogo.gif" />\n';
		strHTML+='								</td>\n';
		strHTML+='							</tr>\n';
	}
	strHTML+='								<tr>\n';
	strHTML+='									<td id="p-popup-body">\n';
	_page.write(strHTML,false);
	if(_page.activateActiveX) includeActiveXFix();
};

_page.writePopupFooter = function() {
	var privacy_footer, strHTML;
	privacy_footer = _page.text["footer"];
	privacy_footer = privacy_footer.replace("{OWNER} | {PRIVACY} | {TERMS} | {SITEMAP}{BR}", "");
	privacy_footer = privacy_footer.replace("{COPYRIGHT}", _page.text["copyright"]);
	privacy_footer = privacy_footer.replace("{CONTACT} | ","");
	privacy_footer = privacy_footer.replace("{CAREERS} | ","");
	strHTML = "";
	strHTML+='									</td>';
	strHTML+='								</tr>';
	if(!_page.popupHideFooter) {
		strHTML+='							<tr>\n';
		strHTML+='								<td id="p-popup-footer">\n';
		strHTML+=									privacy_footer+'\n';
		strHTML+='								</td>\n';
		strHTML+='							</tr>\n';
	}
	strHTML+='							</td>';
	strHTML+='						</tr>';
	strHTML+='					</table>';
	strHTML+='				</table>';
	strHTML+='			</td>';
	strHTML+='		</tr>';
	strHTML+='	</table>';
	_page.write(strHTML,false);
	_page.onLoad(resizePopup);	// Fit window to content
};

_page.activeXCSS = null;
_page.activateActiveX = false;
function activateActiveX() {
	var _nodes, _tag, _objects, _params, x, i,j,_object,_child;
	if(_page.browser.isIE && !_page.browser.isMac) {
		_nodes = ["embed","object"];
		for (x = 0; x < _nodes.length; x++) {
			_tag = _nodes[x];
			_objects = document.getElementsByTagName(_tag);
			for (i = 0; i < _objects.length; i++) {
				_object = _objects[i];
				_params = '';
				for (j = 0; j<_object.childNodes.length; j++) {
					_child = _object.childNodes[j];
					if (_child.tagName == "PARAM") _params += _child.outerHTML;
				}
				_object.outerHTML = _object.outerHTML.split(">")[0] + '>' + _params + _object.innerHTML +'</'+_tag.toUpperCase()+'>';
			}
		}
		_page.activeXCSS.remove() // Show all objects
	}
}

function includeActiveXFix() {
	if(_page.browser.isIE && !_page.browser.isMac) {					// Only IE and not Mac
		_page.activeXCSS = new _page.stylesheet();
		_page.activeXCSS.add('object,embed{display:none};') // Hide all objects
		_page.onLoad(activateActiveX)
	}
}

/* Add Stylesheet injection to your site */
_page.stylesheetArray = [];	// Private array
_page.stylesheet = function(css) {
	this.id = "p-style-injection-"+_page.stylesheetArray.length;
	this.css = css;
	this.index = _page.stylesheetArray.length;
	_page.stylesheetArray[_page.stylesheetArray.length] = this;
}
_page.stylesheet.prototype = {
	add:function(css) {
		if(css) this.css = css;
		if(document.createStyleSheet){
			if(!this.ref) this.ref = document.createStyleSheet();
			this.ref.cssText = this.css;
			this.ref.title = this.id;
		} else {
			this.ref = document.createElement('link');
			this.ref.id = this.id;
			this.ref.rel = "stylesheet";
			this.ref.type = "text/css";
			this.ref.title = this.id;
			this.ref.href = "data:text/css,"+escape(this.css);
			document.getElementsByTagName("head")[0].appendChild(this.ref);
			this.ref.disabled = false; // Make sure the browser enables the stylesheet
		}
	},
	update:function(css) {
		if(document.createStyleSheet){
			this.remove();
			this.add(css);
		} else {
			this.ref.id = this.ref.id+"_remove";
			this.add(css);
			setTimeout("new function(){_page.stylesheetArray["+this.index+"].remove('"+this.id+"_remove')}",1000);
		}
	},
	remove:function(id) {
		var intSSRules, obj;
		if(document.createStyleSheet){
			intSSRules = this.ref.rules.length;
			while(intSSRules--)
				this.ref.removeRule(intSSRules);
		} else {
			obj = (id?gE(id):this.ref);
			_page.dom.discardElement(obj);
		}
	}
};

/* Helper functions */
_page.write = function (str, last_item) {
	document.write(str);
};
/* end helper functions */

/* Helper function for locale switching pages */

	function set_localeselector(){
		if(!document.changelanguage) return;
		var optionName, optionName2;
		optionName = new Option(_page.text["localeselector"], "");
		document.changelanguage.locale.options[0] = optionName;
		optionName2 = new Option("Global / English", "global");
		document.changelanguage.locale.options[1] = optionName2;
	};

	function redirect_item(locale){
		if(!document.changelanguage) return;
		if(document.changelanguage.locale.value!=""){
			if(document.changelanguage.remember.checked){
				_page.setlocale(locale);
			} else{
				window.open(_page.locales[document.changelanguage.locale.value], "_self");
			}
		} else{
			alert(_page.text["alert2"]);
		}
	};
 /* End helper function*/

updateLocales = function (area){
	if (!document.changelanguage) {
		return;
	}
	var optionName, allLocales, label, locale, i;
	set_localeselector();
	var allLocales = _page.processLocales();
	for (i = 0;i < allLocales.length; i += 1) {
		locale = allLocales[i];
		if (locale !== "global") {
			language = locale[2] || "";
			label = locale[1] + (language !== ""? " / ": "") + language;
			optionName = new Option(label, locale[0]);
			document.changelanguage.locale.options[i + 1] = optionName;
		}
	}
	strSelectedlocale = (_page.selectedLocale != ""? _page.selectedLocale: _page.locale);
	setSelectListLocale(strSelectedlocale);
};

/*
**********************************
******* Top menu functions *******
**********************************
*/
var menuArray = ['about','consumer','medical','lighting'],
	topmenu_dd_spacer = 6,		// Vertical space between the topmenu buttons and the corresponding dropdowns
	currSection = "", 			// The section which is currently active (clicked)
	menuDown = "",				// The section which is currently highlighted (mouseover)
	dropDown = 0,
	hideMenu = 0,
	buttonOff = 0,
	section = '',
	menu_hide_delay = 600, 		// Delay of hiding all drop-down menus on a mouseout of the top-menu
	dropdown_show_delay = 200;	// Delay of showing the drop-down menu on a mouseover

function sectionOn(sect, event){
	event.cancelBubble = true;
	hideOtherMenus(sect);
	if(menuDown != sect){
		clearTimeout(dropDown);
		_page.topNavType == "internet"?sectionButtonOn(sect):sectionButtonHover(sect);
		menuDown = sect;
		section = sect;
		positionDropDown(sect);
		dropDown = setTimeout('dropdownMenu("' + sect + '")', dropdown_show_delay);
	}
};

function sectionOff(sect){
	if(sect != section){
		sectionButtonOff(sect);
	}
};

function sectionButtonHover(sect){
	var td = document.getElementById(sect + "button");
	if(td){
		if(sect != currSection){
			applyStyle(td, "sectionhover");
		}
	}
}

function sectionButtonOn(sect){
	var td, sepLeft, sepRight;
	td = document.getElementById(sect + "button");
	if(td){
		if(_page.topNavType == "internet") {
			applyStyle(td, "sectionon");
		} else {
			applyStyle(td, "sectionon");
			sepLeft = td.previousSibling;
			if(sepLeft.nodeType == 3) sepLeft = sepLeft.previousSibling;
			if(sepLeft) applyStyle(sepLeft, "mainnavsep-left");
			sepRight = td.nextSibling;
			if(sepRight.nodeType == 3) sepRight = sepRight.nextSibling;
			if(sepRight) applyStyle(sepRight, "mainnavsep-right");
		}
	}
};

function sectionButtonOff(sect){
	var td = document.getElementById(sect + "button");
	if(td){
		if(sect != currSection){
			if (td.getAttribute("className") != "navbutton") {
				applyStyle(td, "navbutton");
			}
		}
	}
};

function dropdownMenu(sect){
	showDD(sect);
};

function hideAllMenus() {
	clearTimeout(dropDown);
	hideMenu = setTimeout('hideIt()', menu_hide_delay);
	menuDown = "";
}

function hideOtherMenus(skipSect) {
	var counter, sect;
	for(counter=1;counter<menuArray.length;counter++) {
		if(menuArray[counter] != skipSect){
			sect = menuArray[counter];
			sectionButtonOff(sect);
			hideDD(sect);
		};
	};
};

function hideIt(){
	var counter, sect;
	for(counter=1;counter<menuArray.length;counter++) {
		if(menuArray[counter] != menuDown){
			sect = menuArray[counter];
			sectionButtonOff(sect);
			hideDD(sect);
		};
	};
};

function showDD(sect) {
	var objDD, ddframe;
	objDD = gE('p-' + sect + 'DD');
	if(objDD){
		objDD.style.zIndex=1;
		sE(objDD);
		if (_page.useIframe) {
			ddframe = gE('p-' + sect + 'IF');
			if(ddframe) sE(ddframe);
		};
	};
};

function hideDD(sect) {
	var odd, ddframe;
	odd = gE('p-' + sect + 'DD');
	if(odd) {
		hE(odd);		// Hide element
		if (useIframe) {
			ddframe = gE('p-' + sect + 'IF');
			if(ddframe) hE(ddframe);
		};
	};
};

function activeDDItem(td, extra_class){
	applyStyle(td, "dd-activeItem"+extra_class);
};

function inactiveDDItem(td, extra_class){
	applyStyle(td, "dd-inactiveItem"+extra_class);
};

function getLeftPos(objElement) {
	var offsetLeft = findPosX(objElement);
	return offsetLeft - 2;
};

function getTopPosBottom(objElement) {
	var adjust = 0;
	if(objElement != null){
		if(objElement.offsetHeight!=33){
			if(objElement.offsetHeight==34){
				adjust = objElement.offsetHeight - 18;
			}else{
				adjust = objElement.offsetHeight - 20;
			}
		}
		return findPosY(objElement) + objElement.offsetHeight - adjust;
	}
	return 0;
};

function positionDropDown(section){
	var objButton, dd, ddframe, extra_left;
	objButton = gE(section + 'button');
	dd = gE('p-' + section + 'DD');
	if(dd) {
		extra_left = 1;
		if(_page.direction=="rtl"){
			extra_left = objButton.offsetWidth - dd.offsetWidth + 3;
		}
		sX(dd, getLeftPos(objButton)+extra_left);
		sY(dd, getTopPosBottom(objButton));
		if (_page.useIframe) {
			ddframe = gE('p-' + section + 'IF');
			sH(ddframe, (dd.offsetHeight));
			sW(ddframe, (dd.offsetWidth));
			sX(ddframe, getLeftPos(objButton)+extra_left);
			sY(ddframe, getTopPosBottom(objButton));
		}
	}
};

function initDropDowns(){
	for(var counter=1;counter< menuArray.length;counter++) {
		positionDropDown(menuArray[counter]);
	}
}

function createTopNavMenu(m) {
	var tm, dropdown, show_class, extra_class, language_switch, i;
	tm = _page.headerType == "external_extranet"?_page.topNavXN[m]:_page.topNav[m];
	dropdown = '';
	dropdown+="		<!-- "+m+" section dropdown-->\n";
	if(_page.useIframe) {
		dropdown+="		<IFRAME frameborder=0 id=\"p-"+m+"IF\" src=\"javascript:false;\" 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>";
	}
	dropdown+="			<div id=\"p-"+m+"DD\" class=\"p-mainnavDD\" onmouseover=\"event.cancelBubble=true\">\n";
	if (tm.length>1) {
		if(_page.headerType == "external_extranet") {
			dropdown+="			<div class=\"p-mainnavDD-spacer\" style=\"height:"+topmenu_dd_spacer+"px\">&nbsp;</div>\n";
		}
		dropdown+="			<table class=\"p-dropdown\" cellspacing=\"0\" onmouseover=\"sectionOn('"+m+"', event)\">\n";
		for (i=1;i<tm.length;i++) {
			dropdown+="							<tr>\n";
			show_class  = "dd-inactiveItem";
			extra_class = "";
			language_switch = "";
			if(typeof(tm[i][2])!="undefined"){
				if(tm[i][2].indexOf("bold=yes")!=-1){
					show_class="dd-inactiveItem p-bold";
					extra_class = " p-bold";
				}
			}
			language_switch = '';
			if(tm[i][2]) language_switch = getLanguageSwitch(tm[i][2]);
			dropdown+="								<td class=\""+show_class+"\" onmouseover=\"activeDDItem(this, '"+extra_class+"')\" onmouseout=\"inactiveDDItem(this, '"+extra_class+"')\"\n";
			dropdown+="									onclick=\"Javascript:_page.switchHandler('"+tm[i][1]+"', '_self', '"+language_switch+"')\">\n";
			dropdown+="									"+tm[i][0]+"\n";
			dropdown+="								</td>\n";
			dropdown+="							</tr>\n";
		}
		dropdown+="						</table>\n";
	}
	dropdown+="		</div>\n";
	dropdown+="		<!-- end "+m+" section dropdown -->\n";
	return dropdown;
};

_page.email = function(posturl) {
	if (s) {
		s.linkTrackVars="events,eVar3";
		s.linkTrackEvents="event14,event15";
		s.events="event14,event15";
		s.eVar3=s.pageName;
		s.tl(true, "o", s.pageName + ":tell_a_friend");
		s.linkTrackVars="None";
		s.linkTrackEvents="None";
	}
	window.setTimeout(function () {
		var strURL = "", strTitle = "";
		try {strURL = encodeURICompent(document.location);} catch (e) {strURL = escape(document.location)}
		try {strTitle = encodeURIComponent(document.title);} catch (e) {strTitle = escape(document.title)}
		window.location = 'mailto:?subject=' + strTitle + '&body=Please see ' + strURL;
	}, 1000);
};

_page.printVersion = function(print_type) {
	var printarea, printHTML = '', crsc, privacy_footer, print_body = '', stylesheet_externalextranet, wHeight, wWidth, w, sWidth, sHeight,
		getStylesheetHTMLByName = function (ssFilter) {
			var ss = document.getElementsByTagName("link");
			for (var i = 0; i < ss.length; i += 1){
				var s = ss[i];
				if (s.href.indexOf(ssFilter) > 0) {
					return '<link href="' + s.href + '" type="text/css" rel="stylesheet" />\n';
				}
			}
			return "";
		};
	printarea = document.getElementById("p-printarea");
	if (printarea == null) {
		alert("no print area defined");
		return;
	} else {
		printHTML += printarea.innerHTML.replace(/document.write\(.+\);?/gi,""); // Remove document.write instances in the HTML;
	}
	if (s) {
		s.linkTrackVars="None";
		s.linkTrackEvents="None";
		s.tl(true, "o", s.pageName + ":print");
	}
	crsc = _page.crsc_server;
	privacy_footer = _page.text["footer"];
	privacy_footer = privacy_footer.replace("{BR}", "<br />");
	privacy_footer = privacy_footer.replace("{COPYRIGHT}", _page.text["copyright"]);
	privacy_footer = privacy_footer.replace("{PRIVACY}", "<a href=\""+_page.link["privacy"]+"\">"+_page.text["privacy"]+"</a>");
	privacy_footer = privacy_footer.replace("{OWNER}", "<a href=\""+_page.link["owner"]+"\">"+_page.text["owner"]+"</a>");
	privacy_footer = privacy_footer.replace("{TERMS}", "<a href=\""+_page.link["terms"]+"\">"+_page.text["terms"]+"</a>");
	privacy_footer = privacy_footer.replace("| {SITEMAP}", "");
	privacy_footer = privacy_footer.replace("{CAREERS} | ","");
	print_body += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n';
	print_body += '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n';
	print_body += '<html xmlns="http://www.w3.org/1999/xhtml">\n';
	print_body += '<head>\n';
	print_body += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n';
	if (_page.headerType == "external_extranet") {
		stylesheet_externalextranet = "	<link rel=\"stylesheet\" type=\"text/css\" href=\""+crsc+"/crsc/styles/external_extranet.css\" />\n";
		print_body += stylesheet_externalextranet;
	} else {
		print_body += '  <link href="'+crsc + '/crsc/styles/global.css" type="text/css" rel="stylesheet" />\n';
	}
	print_body += '  <link href="'+crsc + '/crsc/styles/components.css" type="text/css" rel="stylesheet" />\n';
	print_body += getStylesheetHTMLByName("searchcatalog.css");
	print_body += '  <link href="'+crsc + '/crsc/styles/print.css" type="text/css" rel="stylesheet" />\n';
	if(_page.direction=="rtl"){
		print_body += '  <link href="'+crsc + '/crsc/styles/rtl.css" type="text/css" rel="stylesheet" />\n';
	}
	print_body += '  <link media="print" href="'+crsc + '/crsc/styles/printbrowser.css" type="text/css" rel="stylesheet" />\n';
	if (_page.locale) {
		if (_page.locale.substring(3,5) === "zh") {
			print_body += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/zh.css\" />\n";
		} else if (_page.locale.substring(3,5) === "ko") {
			print_body += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/ko.css\" />\n";
		} else if(_page.locale.substring(3,5) === "ja") {
			print_body += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + crsc + "/crsc/styles/ja.css\" />\n";
		}
	}
	print_body += '	<title>'+document.title+'</title>';
	print_body += '</head>\n';
	print_body += '<body style="direction:'+_page.direction+'" onload="setTimeout(\'window.print()\', 1000);setTimeout(\'window.close()\', 5000);">\n';
	print_body += '	<div class="p-printcontainer">\n';
	print_body += '  	<div class="p-print-logo"><img alt="Philips" src="'+crsc + '/crsc/images/mainlogo.gif" /></div>\n';
	if(print_type=='press'){
		print_body += '  	<div class="p-print-press"><img alt="Press information" src="'+crsc + '/crsc/images/pressrelease_header.gif" /></div>\n';
	} else {
		print_body += '  	<div class="p-line"><img alt="" src="'+crsc + '/crsc/images/solidline.gif" /></div>\n';
	}
	print_body += '  	<div id="p-grid-c">'+printHTML+'</div>\n';
	print_body += '  	<div class="p-line"><img alt="" src="'+crsc + '/crsc/images/solidline.gif" /></div>\n';
	print_body += '  	<div class="p-print-footer">\n';
	print_body += '  	  ' + privacy_footer +'\n';
	print_body += '		</div>\n';
	print_body += '	</div>\n';
	print_body += '</body></html>\n';
	wHeight=500;
	wWidth=700;
	w = window.open('','','height='+wHeight+',width='+wWidth+',toolbar=yes,scrollbars=yes')
	sWidth = parseInt(gsW());
	sHeight = parseInt(gsH());
	if( sWidth>0&&sHeight>0 ){w.moveTo(Math.round((sWidth-wWidth)/2),Math.round((sHeight-wHeight)/2))};
	if( w.focus ) { w.focus(); }
	w.document.open();
	w.document.write(print_body);
	w.document.close();
};


function createCookie(name,value,days) {
	var date, expires;
	if (days) {
		date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		expires = "; expires="+date.toGMTString();
	} else {
		expires = "";
	}
	document.cookie = name+"="+value+expires+"; path=/";
};

function readCookie(name)	{
	var nameEQ, ca, c, i;
	nameEQ = name + "=";
	ca = document.cookie.split(';');
	for(i=0;i < ca.length;i++)	{
		c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length); // Remove spaces in front of cookie name
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
};

function eraseCookie(name)	{
	createCookie(name,"",-1);
}

_page.showSBFlashSectionBanner = "";				// default, don't show specialized business flash section banner
_page.hideFlashSectionBanner = false;				// default show flash section banner
function replaceSectionBanner(useFlash,tmpSection){
	var crsc, showImage, objSection, flashFileName, flashPre, flashExt, curLocale, flashDynamic, tmpTargetVal, tmpReplaceVal, flashHTML;
	crsc = _page.crsc_server;
	showImage = true;
	objSection = document.getElementById("p-sectionbanner");
	if(objSection) {
		if(useFlash) {
			if(typeof(_page.browser.flashInstalled)=="undefined") {
				_page.setFlashInfo();
			}
			if(_page.browser.flashInstalled == 2 && (parseInt(_page.browser.flashVersion) >= 6)) {
				flashFileName = "";
				flashPre = "section_banner";
				flashExt = ".swf";
				curLocale = _page.locale;
				flashDynamic = true;
				bannerDynamic = new Array();
				bannerDynamic["consumer_us_en"] = "section_banner_consumer_us";
				bannerDynamic["consumer_de_de"] = "section_banner_consumer_de_nl_uk";
				bannerDynamic["consumer_nl_nl"] = "section_banner_consumer_de_nl_uk";
				bannerDynamic["consumer_uk_en"] = "section_banner_consumer_de_nl_uk";
				bannerDynamic["medical_it_it"] = "section_banner_medical_it";
				bannerDynamic[tmpSection+"_ua_ru"] = "section_banner_"+tmpSection+"_ru_ru";
				bannerDynamic["about_cn_en"] = "section_banner_about_asia";
				bannerDynamic["about_hk_en"] = "section_banner_about_asia";
				bannerDynamic["about_in_en"] = "section_banner_about_asia";
				bannerDynamic["about_my_en"] = "section_banner_about_asia";
				bannerDynamic["about_ph_en"] = "section_banner_about_asia";
				bannerDynamic["about_pk_en"] = "section_banner_about_asia";
				bannerDynamic["about_sg_en"] = "section_banner_about_asia";
				bannerDynamic["fifa_"+curLocale] = "section_banner_fifa_"+curLocale;
				bannerStatic = new Array("pl_pl","cz_cs","ro_ro","sk_sk","tr_tr","cn_zh","hk_zh","tw_zh","gr_el","ru_ru","kr_ko","th_th","jp_ja","il_he","bg_bg","hu_hu");
					function chkBannerStatic(curLocale) {
						var flashFileName = "", i;
						for(i=0;i<bannerStatic.length;i++) {
							if(bannerStatic[i] == curLocale) {
								flashFileName = flashPre + "_" + tmpSection + "_" + curLocale + flashExt;
								return "true";
							}
						}
						return "false";
					}
				if(bannerDynamic[tmpSection+"_"+curLocale]){
					flashFileName = bannerDynamic[tmpSection+"_"+curLocale] + flashExt;
					flashDynamic = true;
				}else{
					if(tmpSection == "streamium_consumer"  || tmpSection == "cineos_consumer" || tmpSection == "modea_consumer") {
						flashFileName = flashPre + "_" + tmpSection + flashExt;
						flashDynamic = false;
					}
					else if(chkBannerStatic(curLocale) == "true"){
						flashFileName = flashPre + "_" + tmpSection + "_" + curLocale + flashExt;
						flashDynamic = false;
					}else{
						flashFileName = flashPre + "_" + tmpSection + flashExt;
						flashDynamic = true;
					}
				}
				tmpTargetVal = "sectionText1";
				tmpReplaceVal = _page.text['sectionbanner_'+tmpSection];
				try{tmpReplaceVal=encodeURI(tmpReplaceVal);}catch(e){tmpReplaceVal=escape(tmpReplaceVal)}
				if(flashDynamic) flashFileName += "?"+tmpTargetVal+"="+tmpReplaceVal;
				flashHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+(window.location.protocol=="https:"?"https":"http:")+'//fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="770" height="47" align="middle" id="flashSectionBanner">'; // CHECK
				flashHTML += '<param name="allowScriptAccess" value="sameDomain" />';
				flashHTML += '<param name="movie" value="'+crsc+'/crsc/images/'+flashFileName+'" />';
				flashHTML += '<param name="quality" value="high" />';
				flashHTML += '<param name="scale" value="noscale" />';
				flashHTML += '<param name="salign" value="lt" />';
				flashHTML += '<param name="bgcolor" value="#ffffff" />';
				flashHTML += '<param name="wmode" value="opaque" />';
				flashHTML += '<embed swliveconnect="true" name="flashSectionBanner" src="'+crsc+'/crsc/images/'+flashFileName+'" quality="high" bgcolor="#ffffff" width="770" height="47" align="middle"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="opaque" />';
				flashHTML += '</object>';
				objSection.innerHTML = "";
				objSection.innerHTML = flashHTML;
			}
		}
		if(showImage) {
			_page.dom.sE(objSection);
		}
	}
};

function initSectionBanner() {
	var shFlashBanner, cookieName, tmpSection, otherSection, urlLocation, tmpLocale, cookieVal, subCookieExists, cookieArray, subArray, subSection, subLocale, url, i;
	shFlashBanner = false;
	cookieName = "flashbanner";
	tmpSection = _page.area.toLowerCase();	// Define tmp section
	if(_page.hideFlashSectionBanner == false) {
		if ((tmpSection == "about" || tmpSection == "consumer" || tmpSection == "medical"  || tmpSection == "lighting"  || tmpSection == "fifa" || _page.showSBFlashSectionBanner!="")
		&& (_page.locale!="cn_en" && _page.locale!="cn_zh")		// disabled for china
		&& (!_page.browser.isOpera)){									// disabled for opera browsers e.g. 8.0 causes error; object error detection not possible
			if(_page.showSBFlashSectionBanner!="") tmpSection = _page.showSBFlashSectionBanner;
			otherSection = new Array();
			urlLocation = "";
			try {
				urlLocation = escape(window.location);
			} catch(e) {
			}
			otherSection["www.search.philips.com"] = "search";
			otherSection["www.consumer.philips.com/consumer/search"] = "search";
			for (url in otherSection) {
				if(urlLocation.indexOf(url) != -1) {
					tmpSection = "search";
					break;
				}
			}
			tmpLocale = _page.locale;
			cookieVal = readCookie(cookieName) || "";
			if(cookieVal) {
				subCookieExists = false;
				cookieArray = cookieVal.split("--");
				for(i=0;i<cookieArray.length;i++) {
					subArray = cookieArray[i].split("||");
					subSection = (typeof(subArray[0])!="undefined"?subArray[0]:"");
					subLocale = (typeof(subArray[1])!="undefined"?subArray[1]:"");
					if(subSection.indexOf(tmpSection) != -1 && subLocale.indexOf(tmpLocale) != -1) {
						subCookieExists = true;
					}
				}
				if(subCookieExists == false) {
					createCookie(cookieName,cookieVal+="--"+tmpSection+"||"+tmpLocale)
					shFlashBanner = true;
				}
			} else {
				createCookie(cookieName,tmpSection+"||"+tmpLocale)
				shFlashBanner = true;
			}
		}
	}
	replaceSectionBanner(shFlashBanner,tmpSection);
};

_page.arrCaseMapping = [];							// Casemapping execeptions
_page.arrLCase = [];								// Lowercase execeptions
_page.arrUCase = [];								// Uppercase execeptions
_page.checkSpecialCase = function() {
	var strMapping, strSep1, strSep2, position, arrObjReplace, arrTmpClass, strAction, i;
	strMapping = _page.text["case_mapping"];
	if(strMapping != " " && strMapping != "") {
		strSep1 = "&amp;&amp;";
		strSep2 = ",";
		_page.arrCaseMapping = strMapping.split(strSep1);
		for(i=0;i<_page.arrCaseMapping.length;i++) {
			position = _page.arrCaseMapping[i].indexOf(strSep2);
			_page.arrLCase[i] = _page.arrCaseMapping[i].substring(0,position);
			_page.arrUCase[i] = _page.arrCaseMapping[i].substring(position+1,_page.arrCaseMapping[i].length);
		}
		arrParentClass = new Array();
		arrParentClass["H4"] = new Array();
		arrParentClass["H4"]["p-header"] = new Array();
		arrParentClass["H4"]["p-header"]["p-form"] = "ucase";
		arrParentClass["H4"]["p-header"]["p-payment"] = "ucase";
		arrParentClass["H4"]["p-header"]["p-approval"] = "ucase";
		arrParentClass["H4"]["p-header"]["p-approval-support"] = "ucase";
		arrParentClass["H4"]["p-header"]["p-comparison"] = "ucase";
		arrParentClass["H4"]["p-header"]["p-product-related"] = "ucase";
		arrParentClass["H4"]["p-header"]["p-table"] = "ucase";
		arrParentClass["H4"]["p-header"]["p-404"] = "ucase";
		arrParentClass["H4"]["p-header"]["p-contact-category"] = "ucase";
		for(strClassName in arrParentClass) {
			arrObjReplace = document.getElementsByTagName(strClassName);
			for(i=0;i < arrObjReplace.length;i++){
				arrTmpClass = arrParentClass[strClassName];
				strAction = getSpecialCaseAction(arrObjReplace[i],arrTmpClass);
				if(strAction!="") {
					replaceSpecialCase(arrObjReplace[i],strAction,"innerHTML");
				}
			}
		}
	}
}

getSpecialCaseAction = function(objCompare, arrTmpClass) {
	var strStyleCur, strAction;
	strStyleCur = "";
	strAction = (typeof arrTmpClass == "string"?arrTmpClass:"");
	while (objCompare.offsetParent && strAction=="") {
		objCompare = objCompare.offsetParent;
		strStyleCur = getStyle(objCompare);
		if(arrTmpClass[strStyleCur]) {
			if(typeof arrTmpClass[strStyleCur] == "string") {
				strAction = arrTmpClass[strStyleCur];
			} else {
				arrTmpClass = arrTmpClass[strStyleCur];
			}
		}
	}
	return strAction;
}

replaceSpecialCase = function(sObject, sMethod, sAttribute) {
	var strTmpValue, bContinue, strTarget, strSource, i;
	if(sObject) {
		strTmpValue = sObject[sAttribute];
		bContinue = true;
		try { encodeURI(""); } catch(e) { bContinue = false; };
		if(bContinue) {
			strTmpValue = encodeURI(strTmpValue);
			for(i=0;i<_page.arrLCase.length;i++) {
				switch(sMethod){
				case "ucase":
					strTarget = _page.arrLCase[i];
					strSource = _page.arrUCase[i];
					break;
				case "lcase":
					strTarget = _page.arrUCase[i];
					strSource = _page.arrLCase[i];
					break;
				}
				strTmpValue = strTmpValue.replace(strTarget,strSource,"g");
			}
			strTmpValue = decodeURI(strTmpValue);
		}
		switch(sMethod){
		case "ucase":
			strTmpValue = strTmpValue.toUpperCase();
			break;
		case "lcase":
			strTmpValue = strTmpValue.toLowerCase();
			break;
		}
		sObject[sAttribute] = strTmpValue;
	}
};

var tabTables = [];				// Tabbed table array
_page.showTab = function (intTable,intRow){
	var tmpTableTop, tmpTableMain, tmpTableContent, rowsLength, tmpRowTop, tmpRowContent, tmpCellContentNew, tmpCellContentDup, tmpRow, i;
	tmpTableTop = gE("table_top"+intTable);
	tmpTableContent = gE("table_content"+intTable);
	rowsLength = gE("table_content"+intTable).rows.length;
	for(i=0;i<rowsLength;i=i+2){
		tmpTableMain = gE("headermain"+intTable+"_"+i);
		if(i==intRow){
			_page.dom.removeClass(tmpTableMain,"p-tab-inactive");
			_page.dom.addClass(tmpTableMain,"p-tab-active");
			tmpRowTop = tmpTableTop.rows[1];
			tmpRowContent = gE("body"+intTable+"_"+(intRow+1));
			tmpCellContentNew = tmpRowContent.firstChild;
			tmpCellContentDup = tmpCellContentNew.cloneNode(true);
			_page.dom.addClass(tmpCellContentDup,"p-content");
			tmpTableTop.rows[1].appendChild(tmpCellContentDup);
			tmpTableTop.rows[1].deleteCell(0);
			tmpRow = tmpRowTop.cloneNode(true);
			tmpRowTop.parentNode.insertBefore(tmpRow,tmpRowTop);
			tmpTableTop.deleteRow(1);
		}else{
			_page.dom.removeClass(tmpTableMain,"p-tab-active");
			_page.dom.addClass(tmpTableMain,"p-tab-inactive");
		}
	}
};

_page.createTabs = function(intTableCount , tmpTableObj){
	var maxHeight, strTableType, tmpTable, tmpBody, tmpRow, tmpCell, tmpDiv, tmpText, curHeight, tmpRowBody, tmpCellBody, tmpRowBottom, tmpCellBottom, tmpTableFooter, tmpBodyFooter, tmpRowFooter, tmpCellFooter, i, z;
	maxHeight = 0;
	strTableType = tmpTableObj.type;
	tmpTableObj.cellSpacing = 0;
	tmpTableObj.cellPadding = 0;
	_page.dom.addClass(tmpTableObj,(strTableType == "p-tab-double"?"p-tabbedtable-hidden":"p-tabbedtable-nodisplay"));
	tmpTable = document.createElement("table");
	tmpBody = document.createElement("tbody");
	tmpRow = document.createElement("tr");
	tmpCell = document.createElement("td");
	tmpTable.id = "table_top"+intTableCount;
	_page.dom.addClass(tmpTable,(strTableType == "p-tab-double"?"p-extrainfo-double":"p-extrainfo-multiple"));
	tmpTable.cellSpacing = 0;
	tmpTable.cellPadding = 0;
	tmpCell.className = "p-top";
	tmpTableObj.parentNode.insertBefore(tmpTable,tmpTableObj);
	tmpTable.appendChild(tmpBody);
	tmpBody.appendChild(tmpRow);
	tmpRow.appendChild(tmpCell);
	maxRows = tmpTableObj.rows.length;
	intRow = 0;
	for(i=0;i<maxRows;i++) {
		curRow = tmpTableObj.rows[i];
		if(curRow.parentNode.parentNode.id == tmpTableObj.id) {
		curRow.id = "body"+intTableCount+"_"+intRow;
			if(Math.round(intRow/2)==intRow/2){
				tmpDiv = document.createElement("div");
				_page.dom.addClass(tmpDiv,"p-tab-border-left");
				tmpDiv.id="headerleft"+intTableCount+"_"+intRow;
				tmpCell.appendChild(tmpDiv);
				tmpDiv = document.createElement("div");
				_page.dom.addClass(tmpDiv,"p-tab-inactive");
				tmpDiv.id="headermain"+intTableCount+"_"+intRow;
				tmpDiv.onclick = _page.showTab.bindArgs(tmpDiv,[intTableCount,intRow]);
				tmpCell.appendChild(tmpDiv);
				tmpText = document.createTextNode(ReplaceTags(curRow.firstChild.innerHTML));
				tmpDiv.appendChild(tmpText);
				tmpDiv = document.createElement("div");
				_page.dom.addClass(tmpDiv,"p-tab-border-right");
				tmpDiv.id="headerright"+intTableCount+"_"+intRow;
				tmpCell.appendChild(tmpDiv);
				if(tmpTableObj.rows[i+2]!=null) {
					tmpDiv = document.createElement("div");
					_page.dom.addClass(tmpDiv,"p-tab-spacer");
					tmpCell.appendChild(tmpDiv);
				}
			} else {
				if(strTableType=="p-tab-double") {
					curHeight = curRow.firstChild.offsetHeight;
					maxHeight = (curHeight>maxHeight?curHeight:maxHeight);
				}
			}
			intRow++;
		} else {
			maxRows++;
		}
	}
	tmpRowBody = document.createElement("tr");
	tmpCellBody = document.createElement("td");
	tmpBody.appendChild(tmpRowBody);
	tmpRowBody.appendChild(tmpCellBody);
	if(strTableType=="p-tab-double") {
		tmpRowBottom = document.createElement("tr");
		tmpCellBottom = document.createElement("td");
		_page.dom.addClass(tmpCellBottom,"p-bottom");
		tmpBody.appendChild(tmpRowBottom);
		tmpRowBottom.appendChild(tmpCellBottom);
		tmpTableFooter = document.createElement("table");
		tmpBodyFooter = document.createElement("tbody");
		tmpRowFooter = document.createElement("tr");
		tmpTableFooter.cellSpacing = "0";
		tmpTableFooter.cellPadding = "0";
		tmpCellBottom.appendChild(tmpTableFooter);
		tmpTableFooter.appendChild(tmpBodyFooter);
		tmpBodyFooter.appendChild(tmpRowFooter);
		tmpCellFooter = document.createElement("td");
		_page.dom.addClass(tmpCellFooter,"p-bottom-left");
		tmpRowFooter.appendChild(tmpCellFooter);
		tmpCellFooter = document.createElement("td");
		_page.dom.addClass(tmpCellFooter,"p-bottom-right");
		tmpRowFooter.appendChild(tmpCellFooter);
		intRow = 0;
		for(z=0;z<tmpTableObj.rows.length;z++) {
			curRow = tmpTableObj.rows[z];
			_page.dom.sH(curRow.firstChild,maxHeight+6);
		}
		_page.dom.addClass(tmpTableObj,"p-tabbedtable-nodisplay");
	}
};

function processTables(){
	var allTables, intTableCount = 0, tmpTableObj, maxRows, intRow, bActivated, curRow, k, j, i;
	allTables = document.getElementsByTagName("table");
	for(k=0;k<allTables.length;k++){
		if(_page.dom.hasClass(allTables[k], "p-tab-multiple") || _page.dom.hasClass(allTables[k], "p-tab-double")) {
			allTables[k].type = allTables[k].className;
			allTables[k].id= "table_content"+(intTableCount+1);
			tabTables[intTableCount] = allTables[k];
			intTableCount += 1;
		}
	}
	intTableCount = 0;
	for(j=0;j<tabTables.length;j++){
		tmpTableObj=tabTables[j];
		intTableCount++;
		_page.createTabs(intTableCount, tmpTableObj);
		maxRows = tmpTableObj.rows.length;
		intRow = 0;
		bActivated = false;
		for(i=0;i<maxRows;i++) {
			curRow = tmpTableObj.rows[i];
			if(curRow.parentNode.parentNode.id == tmpTableObj.id) {
				if (_page.dom.hasClass(curRow, "active")) {
					_page.showTab(intTableCount,intRow);
					bActivated = true;
				}
				intRow++;
			} else {
				maxRows++;
			}
		}
		if(bActivated == false) _page.showTab(intTableCount,0);
	}

};

_page.articleCSSFontsizeDefault = "100";
_page.articleCSSFontsizeCurrent = '';
_page.articleCSS = null;
_page.get_fontsize = function() {
	var strCookie = readCookie("Philips-Fontsize");
	if(strCookie!=null) {
		_page.articleCSSFontsizeCurrent = strCookie.substr(strCookie.indexOf("fontsize=")+9,strCookie.length);
		_page.font_resize();
	}
}
_page.font_resize = function(intFontsizeMultiplier) {
	var intFontsize, strCSSText, intListItemTop;
	intFontsize = (_page.articleCSSFontsizeCurrent!=""?_page.articleCSSFontsizeCurrent:_page.articleCSSFontsizeDefault);
	if(intFontsizeMultiplier) {
		if(intFontsizeMultiplier > 1){
			intFontsize = Math.round(parseInt(intFontsize) * intFontsizeMultiplier)
		} else {
			intFontsize = Math.round(parseInt(intFontsize) / (1+(1-intFontsizeMultiplier)))
		}
	}
	intListItemTop = Math.round((intFontsize / 100 * 0.2)*10)/10 // List item positioning
	strCSSText =".p-article{font-size:"+intFontsize+"%!important;line-height:160%!important;}.p-article ul li{background-position:0 "+intListItemTop+"em;}";
	_page.articleCSSFontsizeCurrent = intFontsize;
	if(_page.articleCSS == null) {
		_page.articleCSS = new _page.stylesheet();
		_page.articleCSS.add(strCSSText);
	} else {
		_page.articleCSS.update(strCSSText);
	}
}

_page.loadBrowserInfo = false; 					// Tmp added
_page.browserInfo = [];							// Tmp added
_page.setBrowserInfo = function () {
	var intBrowserSupported, fltMinBrowserVersion, intBreak, intBrowser, strBrowserPlatform, strBrowserName, fltBrowserVersion, id;
	if(typeof(browser_flashInstalled) == "undefined") _page.setFlashInfo();
	_page.browserInfo["browser_flash_installed"] = _page.browser.flashInstalled;
	_page.browserInfo["browser_flash_version"] = _page.browser.flashVersion;
	_page.browserInfo["browser_name"] =_page.browser.name;
	_page.browserInfo["browser_version"] = _page.browser.versionMinor;
	_page.browserInfo["browser_platform"] = _page.browser.platform;
	_page.browserInfo["browser_dhtml"] = _page.browser.isDHTML;
	_page.browserInfo["browser_dom"] = _page.browser.isDOM;
	_page.browserSupport = new Array();
	_page.browserSupport["1"] = [// Philips Supported browsers  / == if equal
									["win32","Internet Explorer",5.5],
									["win32","Internet Explorer",6],
									["win32","Netscape",6.2],
									["win32","Netscape",7],
									["win32","FireFox",1.0],
									["mac","Internet Explorer",5.23],
									["mac","Netscape",6.2],
									["mac","Netscape",7],
									["mac","Netscape",7.1]
								];
	_page.browserSupport["2"] = [// Philips best-practise browsers  / => if equal or higher
									["win32","Internet Explorer",5],
									["win32","Mozilla",1.6],
									["win32","Opera",7.54],
									["win32","Firefox",0.9],
									["mac","Internet Explorer",5],
									["mac","OmniWeb",563],
									["mac","Firefox",0.9],
									["mac","Safari",1.2],
									["mac","Opera",7.54]
								];
	intBrowserSupported = 3; // Default not supported (1/2/3)
	fltMinBrowserVersion = parseFloat(_page.browser.versionMinor);
	intBreak = false;
	for(id in _page.browserSupport) {
		if(intBreak == false) {
			for(intBrowser=0;intBrowser<=(_page.browserSupport[id].length-1);intBrowser++) {
				strBrowserPlatform = _page.browserSupport[id][intBrowser][0];
				strBrowserName = _page.browserSupport[id][intBrowser][1];
				fltBrowserVersion = parseFloat(_page.browserSupport[id][intBrowser][2]);
				if((strBrowserName.toLowerCase() == _page.browser.name.toLowerCase()) && (strBrowserPlatform == _page.browser.platform)) {
					switch (id){
					case "1":
						if( fltMinBrowserVersion == fltBrowserVersion) {intBrowserSupported = id; intBreak = true};
						break;
					case "2":
						if( fltMinBrowserVersion >= fltBrowserVersion) {intBrowserSupported = id; intBreak = true};
						break;
					}
				}
			}
		}
	}
	_page.browserInfo["browser_supported"] = intBrowserSupported;
};

_page.printBrowserInfo = function() {
	var tableHTML = '', id;
	tableHTML += "<table class=\"p-table\" cellspacing=\"0\">\n";
	tableHTML += "	<tr>\n";
	tableHTML += "		<td class=\"p-header\"><H4>Browser info</H4></td>\n";
	tableHTML += "	</tr>\n";
	tableHTML += "	<tr>\n";
	tableHTML += "		<td class=\"p-content\">\n";
	tableHTML += "			<table cellspacing=\"0\">\n";
	tableHTML += "				<tr class=\"p-bold\">\n";
	tableHTML += "					<td>Id</td>\n";
	tableHTML += "					<td class=\"p-hl\">Value</td>\n";
	tableHTML += "				</tr>\n";
	if(_page.loadBrowserInfo == false) {
			tableHTML += "				<tr><td colspan=\"2\"><i>To retrieve browser info, make sure <b>_page.loadBrowserInfo = true;</b> has been set in the HTML header. </i></td></tr>\n";
	} else {
		for(id in _page.browserInfo) {
			tableHTML += "				<tr>\n";
			tableHTML += "					<td>"+id+"</td>\n";
			tableHTML += "					<td class=\"p-hl\">"+_page.browserInfo[id]+"</td>\n";
			tableHTML += "				</tr>\n";
		}
	}
	tableHTML += "			</table>\n";
	tableHTML += "		</td>\n";
	tableHTML += "	</tr>\n";
	tableHTML += "</table>\n";
	document.write(tableHTML);
};

/*
*****************************
****** Helper functions *****
*****************************
*/
function goW(e){return(e.clip?e.clip.width:e.offsetWidth)};
function goH(e){return(e.clip?e.clip.height:e.offsetHeight)};
function gsW(){return(screen.availWidth?screen.availWidth:screen.width)};
function gsH(){return(screen.availHeight?screen.availHeight:screen.height)};

function FlashDetect() {
	var flashInstalled, flashVersion, MSDetect, flash, i, x, y;
	flashInstalled = 0;				// 0 = not installed, 1 = unknown, 2 = installed
	flashVersion = 0;				// Flash version, default 0
	MSDetect = "false";				// MS IE detection, default false
	if (navigator.plugins && navigator.plugins.length)	{
		x = navigator.plugins["Shockwave Flash"];
		if (x)	{
			flashInstalled = 2;
			if (x.description)	{
				y = x.description;
				flashVersion = y.charAt(y.indexOf('.')-1);
			}
		} else {
			flashInstalled = 1;
		}
		if (navigator.plugins["Shockwave Flash 2.0"])	{
			flashInstalled = 2;
			flashVersion = 2;
		}
	} else if (navigator.mimeTypes && navigator.mimeTypes.length)	{
		x = navigator.mimeTypes['application/x-shockwave-flash'];
		if (x && x.enabledPlugin) {
			flashInstalled = 2;
		} else {
			flashInstalled = 1;
		}
	} else {
		MSDetect = "true";
	}
	if(MSDetect == "true") {
		for(i=12; i>0; i--){
			flashVersion = 0;
			try{
				flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
				flashVersion = i;
				flashInstalled = 2;
				break;
			}
			catch(e){
			}
		}
	}
	return [flashInstalled, flashVersion];
};

/* Get flash info: installed and version */
_page.setFlashInfo = function() {
	var flashInfo = FlashDetect();
	if(_page.browser) {
		_page.browser.flashInstalled = flashInfo[0];
		_page.browser.flashVersion = flashInfo[1];
	}
}

function ReplaceTags(xStr){
	var regExp = /<\/?[^>]+>/gi;
	return xStr.replace(regExp,"");
};

function getLanguageSwitch(obj) {
	var language_switch = '', start_pos, last_pos;
	if(obj){
		if(obj.indexOf("language=")!=-1){
			start_pos = obj.indexOf("language=");
			last_pos = obj.indexOf(",", start_pos);
			if(last_pos==-1){
				last_pos = obj.length;
			}
			language_switch = obj.substr(start_pos+9, last_pos-start_pos-9);
		}
	}
	return language_switch;
}

function SortSelectList(e){
	var n = e.length, i, j, sz;
	if(!(_page.browser.isMac && _page.browser.isIE5x)){
		for (i=2; i < n; i++){ //Skip first and second item (Choose country/language and Global)
			for (j=i+1; j < n; j++){
				if (e.options[j].text < e.options[i].text){
					if (_page.browser.isIE){
						e.options[i].swapNode(e.options[j]);
					}else{
						sz = e.options[i].text;
						e.options[i].text = e.options[j].text;
						e.options[j].text = sz;
						sz = e.options[i].value;
						e.options[i].value = e.options[j].value;
						e.options[j].value = sz;
					}
			   }
			}
		}
	}
};

function setSelectListLocale(locale) {
	for(var i=2;i<document.changelanguage.locale.length;i++) {
		if(document.changelanguage.locale.options[i].value == locale) document.changelanguage.locale.selectedIndex = i;
	}
};

var currSection = ""; 						// The section which is currently active (clicked)
_page.sectionMain = [];
_page.sectionSpecial = [];
_page.isMacIE = (_page.browser.isIE && _page.browser.isMac? true: false);
_page.GlobalLanguageSwitch ="";				// allow for internet header/footer links a global language switch
_page.hideGlobalStyle = false;				// Show or hide global stylesheet
_page.statsCollector = {
	Locale: "",								// Default value can be overruled
	PageName: ""							// Default value can be overruled0
};

function applyStyle (element, className) {
	if (element) {
		element.className = className;
	}
};

function getStyle (element) {
	return (element ? element.className : "");
};

_page.backwardsCompatibility = function() {
	var w = window;
	for (var id in _page.dom) {
		if (typeof _page.dom[id] === "function") {
			w[id] = _page.dom[id];
		}
	}
	w.useIframe = _page.useIframe;
	w.browser = _page.browser;
	w.get_crsc_server = _page.getCRSCServer;
	w.get_crsc_nav_server = _page.getCRSCNavServer;
}
_page.backwardsCompatibility();
