/* >> jQuery $ recover */
	$ = jQuery.noConflict();
/* << */


/* >> jQuery extensions Version: rel-2-0-0 */
	(function ($) {
		$.fn.extend({
			allAttrs: function (withoutList) {
				var set = this;
				var attrsObjsList = [];
				withoutList = withoutList || [];
				set.each(
					function (n) {
						var obj = {};
						for (var i = 0; i < this.attributes.length; ++i) {
							var a = this.attributes[i];
							if ($.inArray(a.nodeName, withoutList) == -1) {
								obj[a.nodeName] = a.nodeValue;
							}
						}
						attrsObjsList.push(obj);
					}
				);
				return attrsObjsList;
			},
			// if value is a jquery object .html() will be used to handle value.
			// Otherwise a dom xhtml string representation will be produced.
			xhtml: function (value) {
				var i, j, node, nodeName, nodeType, attr, attrName, attrValue, str,
				singleTags = [
					'img', 'br', 'hr', 'area', 'base', 'basefont', 'col', 'frame',
					'input', 'isindex', 'link', 'meta', 'param'
				],
				encodeSpecialChars = function (s) {
					s = s.replace(/&/g, '&amp;');
					s = s.replace(/</g, '&lt;');
					s = s.replace(/>/g, '&gt;');
					//s = s.replace(/"/, '&quote;');
					return s;
				};
				if (value === undefined) {
					// wrap value into root.
					node = this.get(0);
					nodeName = node.nodeName.toLowerCase();
					nodeType = node.nodeType;
					if (nodeType === 1) { // element node
						str = '<' + nodeName;
						if (node.attributes.length) {
							for (j = 0; j < node.attributes.length; j += 1) {
								attr = node.attributes[j];
								attrName = attr.nodeName.toLowerCase();
								attrValue = attr.nodeValue;
								str += ' ' + attrName + '="' + encodeSpecialChars(attrValue) + '"';
							}
						}
						if (jQuery.inArray(nodeName, singleTags) > -1) {
							str += ' />';
						} else {
							str += '>';
							for (i = 0; i < node.childNodes.length; i += 1) {
								str += jQuery.fn.xhtml.call($(node.childNodes[i]));
							}
							str += '</' + nodeName + '>';
						}
						return str;
					} else if (nodeType === 3) {
						return encodeSpecialChars(node.nodeValue);
					} else if (nodeType === 8) {
						return '<!--' + encodeSpecialChars(node.nodeValue) + '-->';
					}
					return '';
				} else {
					jQuery.fn.html(value);
				}
			}
		});

		// get iso date and get iso time
		$.extend({
			// deprecated
			getISODate: function (gmtDateStr, lang) {
				var dateBox = {
					'de': {'month': ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], 'separator': '.'},
					'en': {'month': ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 'separator': '/'}
				}, date, sep, y, fy, m, d, md, mm, my;
				if (arguments.length === 0) {
					date = new Date();
					lang = 'en';
				} else if (arguments.length == 1) {
					var arg = arguments[0];
					if (typeof arg == 'string' && arg.length == 2) {
						lang = arg;
						date = new Date();
					} else {
						lang = 'en';
						date = new Date(gmtDateStr);
					}
				} else {
					date = new Date(gmtDateStr);
				}
				sep = dateBox[lang].separator;
				y = date.getYear() - 100;
				fy = date.getFullYear();
				m = date.getMonth();
				d = date.getDate();
				md = d < 10 ? '0' + d : d;
				mm = m + 1 < 10 ? '0' + (m + 1) : m + 1;
				my = y < 10 ? '0' + y : y;
				if (lang == 'de') {
					return {
						'short': d + sep + (m + 1) + sep + y,
						'_short': d + sep + (m + 1) + sep + y,
						'middle': md + sep + mm + sep + my,
						'_middle': md + sep + mm + sep + my,
						'long': md + sep + dateBox[lang].month[m] + sep + fy,
						'_long': md + sep + dateBox[lang].month[m] + sep + fy
					};
				}
				return {
					'short': (m + 1) + sep + d + sep + y,
					'_short': (m + 1) + sep + d + sep + y,
					'middle': mm + sep + md + sep + my,
					'_middle': mm + sep + md + sep + my,
					'long': dateBox[lang].month[m] + sep + md + sep + fy,
					'_long': dateBox[lang].month[m] + sep + md + sep + fy
				};
			},
			// deprecated
			getISOTime: function (gmtDateStr) {
				var date, h, m, s;
				if (gmtDateStr) {
					date = new Date(gmtDateStr);
				}
				date = new Date();
				h = date.getHours();
				if (h < 10) {
					h = '0' + h;
				}
				m = date.getMinutes();
				if (m < 10) {
					m = '0' + m;
				}
				s = date.getSeconds();
				if (s < 10) {
					s = '0' + s;
				}
				return h + ':' + m + ':' + s;
			},
			formatDate: function (gmtDateStr, lang) {
				var dateBox = {
					'de': {'month': ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], 'separator': '.'},
					'en': {'month': ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 'separator': '/'}
				}, date, sep, fy, m, d, y, md, mm, my;
				if (arguments.length === 0) {
					date = new Date();
					lang = 'en';
				} else if (arguments.length == 1) {
					arg = arguments[0];
					if (typeof arg == 'string' && arg.length == 2) {
						lang = arg;
						date = new Date();
					} else {
						lang = 'en';
						date = new Date(gmtDateStr);
					}
				} else {
					date = new Date(gmtDateStr);
				}
				sep = dateBox[lang].separator;
				y = date.getYear() - 100;
				fy = date.getFullYear();
				m = date.getMonth();
				d = date.getDate();
				y = y < 10 ? '0' + y : y;
				md = d < 10 ? '0' + d : d;
				mm = m + 1 < 10 ? '0' + (m + 1) : m + 1;
				my = fy;
				if (lang == 'de') {
					return {
						'_short': d + sep + (m + 1) + sep + y,
						'_middle': md + sep + mm + sep + my,
						'_long': [md + sep, dateBox[lang].month[m], fy].join('&nbsp;')
					};
				}
				return {
					'_short': (m + 1) + sep + d + sep + y,
					'_middle': mm + sep + md + sep + my,
					'_long': [dateBox[lang].month[m] + sep, md, fy].join('&nbsp;')
				};
			},
			formatTime: function (gmtDateStr) {
				var date = gmtDateStr ? new Date(gmtDateStr) : new Date(),
				h, m, s;
				h = date.getHours();
				if (h < 10) {
					h = '0' + h;
				}
				m = date.getMinutes();
				if (m < 10) {
					m = '0' + m;
				}
				s = date.getSeconds();
				if (s < 10) {
					s = '0' + s;
				}
				return {'time': h + ':' + m + ':' + s, 'timeWithoutSec': h + ':' + m};
			}
		});

		// setter and getter for language resources
		$.extend({
			lang: function (name, lang) {
				if (arguments.length > 1) {
					if (typeof lang === 'object') {
						if (! $.lang._res) {
							$.lang._res = {};
						}
						$.lang._res[name] = lang;
						return lang;
					} else {
						if ($.lang._res && $.lang._res[name] && $.lang._res[name][lang]) {
							return $.lang._res[name][lang];
						}
					}
					return '?-invalid-language-resource-?';
				} else if (arguments.length == 1) {
					if (typeof I18N_LANGUAGE !== 'undefined') {
						lang = I18N_LANGUAGE;
					} else {
						lang = $('html').attr('lang');
					}
					if (!lang) {
						lang = 'en';
					}
					if ($.lang._res) {
						return $.lang._res[name][lang];
					}
					return '?-invalid-language-resource-?';
				}
				if (typeof I18N_LANGUAGE !== 'undefined') {
					lang = I18N_LANGUAGE;
				} else {
					lang = $('html').attr('lang');
				}
				return lang;
			}
		});

		// scroll to plugin easing type elasout
		$.easing.elasout = function (x, t, b, c, d) {
			var s = 1.70158, p = 0, a = c;
			if (t === 0) {
				return b;
			}
			if ((t /= d) == 1) {
				return b + c;
			}
			if (!p) {
				p = d * 0.3;
			}
			if (a < Math.abs(c)) {
				a = c;
				s = p / 4;
			} else {
				s = p / (2 * Math.PI) * Math.asin(c / a);
			}
			return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
		};

		// serialize json data
		$.extend({
			toJson: function (o) {
				var type = typeof o, escapeable, meta, tempList, i, k;
				if (type == 'undefined') {
					return 'undefined';
				} else if (type == 'number' || type == 'boolean') {
					return o + "";
				} else if (o === null) {
					return 'null';
				} else if (type == 'string') {
					escapeable = /["\\\x00-\x1f\x7f-\x9f]/g;
					meta = {
						'\b': '\\b',
						'\t': '\\t',
						'\n': '\\n',
						'\f': '\\f',
						'\r': '\\r',
						'"' : '\\"',
						'\\': '\\\\'
					};
					if (escapeable.test(o)) {
						return '"' + o.replace(escapeable, function (a) {
							var c = meta[a];
							if (typeof c === 'string') {
								return c;
							}
							c = a.charCodeAt();
							return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16);
						}) + '"';
					}
					return '"' + o + '"';
				} else if (type == 'function') {
					return;
				} else if (type == 'object' && typeof o.toJson == 'function') {
					return o.toJson();
				} else if (type == 'object' && typeof o.length == 'number') {
					tempList = [];
					for (i = 0; i < o.length; i++) {
						tempList.push($.toJson(o[i]));
					}
					return '[' + tempList.join(',') + ']';
				}

				tempList = [];
				if (typeof o.toJsonAttrs == 'object' && typeof o.toJsonAttrs.length == 'number') {
					for (i = 0; i < o.toJsonAttrs.length; i++) {
						k = o.toJsonAttrs[i];
						if (typeof o[k] != 'function') {
							tempList.push($.toJson(k) + ':' + $.toJson(o[k]));
						}
					}
				} else {
					for (k in o) {
						if (typeof o[k] != 'function') {
							tempList.push($.toJson(k) + ':' + $.toJson(o[k]));
						}
					}
				}
				return '{' + tempList.join(',') + '}';
			}
		});

		// object clone
		$.extend({
			clone: function (o) {
				function F() {}
				F.prototype = o;
				var result = new F();
				result.__prototype__ = o;
				return result;
			}
		});
	})(jQuery);
/* << */

// >> FrontendEditor bridge Version: rel-1-0-0
// This object is the man in the middle between FeE and CMS-Scripting.
	FrontendEditorBridge = {
		records: [],
		record: function (initSeq) {
			var recObj = {}, attrs = null;
			if (Utils.isFunction(initSeq)) {
				recObj.recreate = initSeq;
				if (attributes.length > 1) {
					recObj.attributes = [];
					for (i = 1; i < attributes.length; i += 1) {
						recObj.attributes.push(attributes[i]);
					}
					attrs = recObj.attributes;
				}
				this.records.push(recObj);
				return initSeq.apply(window, attrs);
			}
		}
	};
// <<


/* >> AJAX URL Manager jQuery 1.2.6+ Version: rel-1-2-2 */
	/**
	 * Manages AJAX url handlers. You can add new handlers, Switch between live and developer mode to
	 * test with static prototypes of data objects that should simulate successful response.
	 * @version rel-1-2-2
	 * @example
	 * // Switch AjaxURLManager to global <code>live</code> mode.
	 * AjaxURLManager.setMode('live');
	 * // Register handler
	 * AjaxURLManager.registerKey('myhandler', {"foo": 1}, 'myTestData.txt', null);
	 *
	 * // Getting an URL from the AjaxURLManager.
	 * var Foo = {
	 *		send: function () {
	 *			var url = AjaxURLManager.getUrlWithKey('myhandler');
	 *			$.getJSON(url, function (data, textStatus) {
	 *				...
	 *			});
	 *		}
	 * };
	 * @namespace AjaxURLManager
	 * @author   <a href="mailto:peter@livinglogic.de">Peter Boeker</a>}
	 * @type {Object}
	 */
	AjaxURLManager = {
		mode: 'static',
		URL: {},
		sessionData: null,
		baseURL: '/backend/',
		baseURLStatic: '../static/',
		/**
		 * Set the base URL to new value. The default handler path is <code>/backend/</code>.
		 * If you have an other handler like the default you can adapt that with this method.
		 * For examble, you have a handler behind <code>/mypath-to-the-handler/...</code> and you want
		 * to tell AjaxURLManager to request with this path, then type the following code.
		 * @example
		 * AjaxURLManager.setBaseURL('/mypath-to-the-handler/');
		 * @public
		 * @param    {String} url Handler base URL.
		 * @return {void}
		 */
		setBaseURL: function (url) {
			this.baseURL = url;
		},
		/**
		 * Set the base development URL to new value. The default static handler path is
		 * <code>../static/</code>. Is your development path different from that, then you can
		 * adapt it to your development path with this code.
		 * @example
		 * AjaxURLManager.setBaseURLStatic('../my-static/');
		 * @public
		 * @param    {String} url Path to the static development data.
		 * @return {void}
		 */
		setBaseURLStatic: function (url) {
			this.baseURLStatic = url;
		},
		/**
		 * Switch the global mode to the given mode.
		 * There are two modes the AjaxURLManager supports.
		 * The global mode will request all registered handlers with this mode.
		 * Allowed attributes are <code>'static'</code> or <code>'live'</code>.
		 * If mode is set to <code>static</code>, then the static base URl is used to request.
		 * Otherwise the base URL is used to request.
		 * @privat
		 * @param    {String} mode Mode into the AjaxURLManager should switch.
		 * @return {void}
		 */
		setMode: function (mode) {
			this.mode = APP_MODE = mode;
		},
		/**
		 * Register a handler to the AjaxURLManager.
		 * @example
		 * AjaxURLManager.registerKey('foohandler', {"foo1": 1, "foo2": 2}, 'test-foo.txt', false, null);
		 * @public
		 * @param    {String} key Name of the handler.
		 * @param    {Object} attrs Object that holds the additional URL parameter.
		 * @param    {String} staticFile File name of the static data file.
		 * @param    {Boolean} allwaysStatic Flag to request with static (developer) or live modus.
		 * @param    {String} baseURL Use this parameter to set a different base URL with this handler.
		 *							 If is set to <code>null</code> the global base URL setting is used.
		 * @return {void}
		 */
		registerKey: function (key, attrs, staticFile, allwaysStatic, baseURL) {
			this.URL[key] = {
				attrs: attrs,
				staticFile: staticFile,
				allwaysStatic: allwaysStatic,
				baseURL: baseURL || null
			};
		},
		/**
		 * Returns the url with the given key and attributes.
		 * If the key does not exist it will return <code>null</code>.
		 * @public
		 * @param    {String} key The key of the registered handler.
		 * @param    {Object} [attrs] Additional URL parameter.
		 * @return   {String | null} URL-String.
		 */
		getUrlWithKey: function (key, attrs) {
			var data, realAttrs = {};
			if (this.URL[key]) {
				data = this.URL[key];
				if (data.attrs || attrs) {
					if (data.attrs) {
						attrs = $.extend(data.attrs, attrs);
					}
					for (var k in attrs) {
						if (attrs[k] !== null) {
							realAttrs[k] = attrs[k];
						}
					}
					if (this.sessionData) {
						realAttrs = $.extend(realAttrs, this.sessionData);
					}
					attrs = '?' + $.param(realAttrs);
				} else {
					if (this.sessionData) {
						attrs = $.extend(data.attrs, this.sessionData);
						attrs = '?' + $.param(this.sessionData);
					}
				}
				if (this.mode == 'static' && data.staticFile || data.allwaysStatic && data.staticFile) {
					return [this.baseURLStatic, data.staticFile, attrs].join('');
				}
				if (data.baseURL) {
					return [data.baseURL, key, attrs].join('');
				}
				return [this.baseURL, key, attrs].join('');
			}
			return null;
		}
	};
/* << */



/* >> utilities requires jQuery 1.2.6+ Version: rel-1-13-2 */
	/**
	 * Utils holds the most common used utilities to get a session or params from URl and
	 * many more. This library will be extended in short intervals.
	 * We try to keep the library so small as possible.
	 * @version  rel-1-13-2
	 * @author   <a href="mailto:peter@livinglogic.de">Peter Boeker</a>}
	 * @public
	 * @namespace Utils holds the most common used utilities to get a session or params from URl and many more.
	 * @property {string} pixelPath Standard path to the spacer pixel gif.
	 * @property {Object} [pingJob] The variable which holds the handler of a job which regularly requests the pong.do
	 *                              action of the CMS to keep the session alive. If for any reason the job has to be
	 *                              stopped this variable has to be used.
	 */
	Utils = {
		pixelPath: '/xist4c/px/spc.gif',
		pingJob: null,
		/**
		 * Anonymous function. Use it as a placeholder.
		 * @deprecated This method should be used no more.
		 * @public
		 */
		doNothing: function () {},
		/**
		 * Returns a jquery object with a spacer pixel image DOM element.
		 * @public
		 * @return   {jquery object}
		 */
		pixel: function () {
			return $('<img src="' + this.pixelPath + '" height="1" width="1" border="0" alt=""/>');
		},
		/**
		 * Same as method <b>pixel()</b> but it retruns only the pixel image XHTML-String.
		 * @public
		 * @return   {String}
		 */
		pixelAsString: function () {
			return '<img src="' + this.pixelPath + '" height="1" width="1" border="0" alt=""/>';
		},
		/**
		 * Recalculates an image with defined attributes in a given object.
		 * @public
		 * @param    {Object} args Image description object that holds information about
		 *							 the image, maximum width, maximum height and whether the image
		 *							 should be scaled proportional or not.
		 * @example
		 * var scaledImage = Utils.getRecalculatedImage({
		 *		"image": // jQuery selected image.
		 *		"maxWidth": 90 // Maximum width of the image.
		 *		"maxHeight": 110 // Maximum height of the image.
		 *		"proportional": true // Scale image proportional true / false.
		 * });
		 * @return   {jquery object} jQuery object of the scaled image.
		 */
		getRecalculatedImage: function (args) {
			var img = args.image, w, mw, mh, nw, nh, f;
			if ($.browser.msie) {
				w = img.width;
				h = img.height;
			} else {
				w = img.attr('width');
				h = img.attr('height');
			}
			mw = args.maxWidth;
			mh = args.maxHeight;
			f = 1;
			if (args.proportional) {
				f = mw / w;
				nw = mw;
				nh = h * f;
				if (nh > mh) {
					f = mh / nh;
					nh = mh;
					nw = nw * f;
				}
				if ($.browser.msie) {
					img.width = nw;
					img.height = nh;
				} else {
					img.attr('width', nw);
					img.attr('height', nh);
				}
				return img;
			}
			if ($.browser.msie) {
				img.width = mw;
				img.height = mh;
			} else {
				img.attr('width', mw);
				img.attr('height', mh);
			}
			return img;
		},
		/**
		 * Use this method to get quickly an object with all URL prameters.
		 * If there no URL parameters the method returns null.
		 * If multible URL parameters with the same name the resulted object
		 * hold them as an array of there values.
		 * @public
		 * @param    {String} url URL with parameters or only the parameter string like <code>?foo=a&foo2=b&foo3=c</code>.
		 *							 <b>Important</b>: If you pass only the parameter string you have to ensure that it starts
		 *							 with a question mark!
		 * @param    {Boolean} [dontDecode] In normal use, the method will decode all URL parameters.
		 *											You can prevent this behavior to pass this boolean parameter.
		 * @return   {Object} Object with keys as parameter names and values as parameter values.
		 */
		getUrlParamsAsJson: function (url, dontDecode) {
			var self = this, urlParams;
			if (!url) {
				url = window.location.href;
			}
			if (url.search(/\?/) > -1 && url.search(/\=/) > -1) {
				urlParams = url.substring(url.search(/\?/) + 1, url.length);
				urlParams = urlParams.split('&');
				jParams = {};
				$(urlParams).each(function () {
					var parVal = this.split('='), record, k = parVal[0], v, i;
					if (parVal.length > 2) {
						v = '';
						for (i = 1; i < parVal.length; i += 1) {
							v += parVal[i] + '=';
						}
						v = v.substring(0, v.lastIndexOf('='));
					} else {
						v = parVal[1];
					}
					if (!dontDecode) {
						k = decodeURIComponent(k);
						v = decodeURIComponent(v);
					}
					if (jParams[k] && typeof jParams[k] !== 'undefined') {
						if (self.isArray(jParams[k])) {
							jParams[k].push(v);
						} else {
							jParams[k] = [jParams[k]];
							jParams[k].push(v);
						}
					} else {
						jParams[k] = v;
					}
				});
				return jParams;
			}
			return null;
		},
		/**
		 * Use this method to quickly transform an object with key, value pairs into
		 * an URL parameter string.
		 * If a key holds an array of values the method returned string will look like this:
		 * <code>?foo=a&foo=b&foo=c</code>.
		 * @public
		 * @param    {Object} params Object with key, value pairs.
		 * @param    {Boolean} [noEmptyParams] In normal use, the method returns all given
		 *													object keys if empty or not. You can prevent this behavior
		 *													 of empty parameters to pass this boolean parameter.
		 * @return   {String} URL encoded parameter string with a leading question mark.
		 */
		getUrlParamsFromJson: function (params, noEmptyParams) {
			var paramStr = '?', i, self = this, k;
			if (params && typeof params === 'object') {
				for (k in params) {
					if (params[k] && self.isArray(params[k])) {
						for (i = 0; i < params[k].length; i += 1) {
							paramStr += [encodeURIComponent(k), '=', encodeURIComponent(params[k][i]), '&'].join('');
						}
					} else {
						if (noEmptyParams) {
							if (params[k]) {
								paramStr += [encodeURIComponent(k), '=', encodeURIComponent(params[k]), '&'].join('');
							}
						} else {
							paramStr += [encodeURIComponent(k), '=', encodeURIComponent(params[k]), '&'].join('');
						}
					}
				}
				return paramStr.substring(0, paramStr.length - 1);
			}
			return null;
		},
		/**
		 * Returns a string with stripped tags.
		 * @public
		 * @param    {String} str String to get tag stripped.
		 * @return   {String} Tag stripped string.
		 */
		stripTags: function (str) {
			if (typeof str == 'string') {
				return str.replace(/<\/?[^>]+>/gi, '');
			}
			return null;
		},
		/**
		 * Use this method if you have a long string that must be clipped to show as an
		 * teaser in a news list etc.
		 * <b>Important</b>: Dont use this method if you have a HTML-string. The method will
		 * not recognize it and can potentially clip between a link reference or other tags!
		 * @example
		 * var string = Utils.clipStringAfter(fooStr, 250, {
		 *		"endChar": "." // Character of the real clipping point after len has reached.
		 *		"decorator": "..." // String that is added to the clipped string.
		 * });
		 * @public
		 * @param    {String} str HTML free text.
		 * @param    {Integer} len String length before clipping. If the option <code>endChar</code>
		 *							  is set, the method tries to clip the string on the position of the <code>len</code>
		 *							  property. With the option <code>endChar</code> the method walk to <code>len</code>
		 *							  and then to the next occurence of the <code>endChar</code>.
		 * @param    {Object} opts Object that holds properties to control the behavior.
		 * @return   {String} Clipped string.
		 */
		clipStringAfter: function (str, len, opts) {
			var rStr = '', defaults = {
				endChar: null,
				decorator: null
			}, i;
			if (opts && this.isObject(opts)) {
				$.extend(defaults, opts);
			}
			if (str.length > len) {
				rStr = str.substring(0, len);
				if (typeof defaults.endChar === 'string') {
					if (str.substr(len, 1) != defaults.endChar) {
						for (i = 0; i < str.substr(len, str.length).length; i += 1) {
							if (str.substr(len + i, 1) == defaults.endChar) {
								rStr += str.substr(len, i);
								break;
							}
						}
					}
				}
				if (typeof defaults.decorator === 'string') {
					rStr += defaults.decorator;
				}
				return rStr;
			}
			return str;
		},
		/**
		 * Converts a given native float number into a simple german locale number.
		 * @public
		 * @param    {float} f Float number to convert.
		 * @return   {String}
		 */
		parseDeFloat: function (f) {
			f = f.replace(/\./g, '');
			f = f.replace(/\,/, '.');
			return f;
		},
		/**
		 * Returns the URL session id if any.
		 * @deprecated Use {@link Utils.getXist4cSessionId} instead.
		 */
		getUrlSession: function (keyString) {
			var sidKeyLength = 12, sidKeyRex = /;jsessionid=/, sid = null,
					loc = window.location.href, params = Utils.getUrlParamsAsJson(), paramStartRex = /\?/, endPos,
					ks = keyString || '';
			if (sidKeyRex.test(loc)) {
				if (params) {
					endPos = loc.search(paramStartRex);
				} else {
					endPos = loc.length;
				}
				return ks + loc.substring(loc.search(sidKeyRex) + sidKeyLength, endPos);
			}
			return '';
		},
		/**
		 * Tests if the given parameter is an object.
		 * @public
		 * @param    {Object} obj To test object.
		 * @return   {Boolean}
		 */
		isObject: function (obj) {
			return (
				obj &&
				(typeof(obj) === 'object') &&
				(typeof(obj.length) !== 'number')
			);
		},
		/**
		 * Tests if the given parameter is an array.
		 * @public
		 * @param    {Object} obj To test object.
		 * @return   {Boolean}
		 */
		isArray: function (obj) {
			return (
				obj &&
				(typeof(obj) !== 'string') &&
				(typeof(obj) === 'object') &&
				(typeof(obj.length) === 'number')
			);
		},
		/**
		 * Tests if the given parameter is a function.
		 * @public
		 * @param    {Object} obj To test object.
		 * @return   {Boolean}
		 */
		isFunction: function (obj) {
			return typeof(obj) === 'function';
		},
		/**
		 * Tests if the given parameter is a string.
		 * @public
		 * @param    {Object} obj To test object.
		 * @return   {Boolean}
		 */
		isString: function (obj) {
			return typeof(obj) === 'string';
		},
		/**
		 * Use this function if you need to test something in a loop and
		 * you want to do something if the test is true.
		 * For web developers, this is useful when you have to wait until a DOM
		 * element has rendered before doing things with it.
		 * @public
		 * @param    {Function} condition A Function that test somthing and return
		 *											 <code>true</code> if the test is true or
		 *											 <code>false</code> if not. The interval
		 *											 object will be passed to
		 *											 the function. The function context is Utils.
		 * @param    {Integer} interval The loop interval in milliseconds.
		 * @param    {Integer} maxloops Maximum loop count. The loop stops automatically
		 *										  if the condition is <code>true</code> or the maximum
		 *										  loop count has reached.
		 * @param    {Function} callback If the condition returns true this function will
		 *											be called. The interval object will be passed to
		 *											the function. The function context is Utils.
		 * @return   {void}
		 */
		busyWait: function (condition, interval, maxloops, callback) {
			var ivFunc, cnt = 0, self = this, stdInterval = 1000, intervalObj = null;
			if (parseInt(Number(interval), 10) !== 'NaN' && parseInt(Number(interval), 10) > 0) {
				stdInterval = parseInt(interval, 10);
			}
			if (Utils.isFunction(condition)) {
				if (!intervalObj) {
					ivFunc = function () {
						var ready = condition.call(self, intervalObj);
						if (ready) {
							clearInterval(intervalObj);
							intervalObj = null;
							if (Utils.isFunction(callback)) {
								callback.call(self, intervalObj);
							}
						}
						cnt += 1;
						if (cnt == maxloops) {
							clearInterval(intervalObj);
							intervalObj = null;
							return null;
						}
					};
					intervalObj = setInterval(ivFunc, stdInterval);
				}
			}
		},
		/**
		 * Returns the current used session id if any.
		 * First it checkes the URL for a session id. If no session found the method checkes
		 * the cookie with the name of the option <code>sessionCookieName</code>. At last
		 * instance the <code>XIST4C_Globals.sitemap[0]</code> is test for a session id.
		 * @public
		 * @param    {Object} opts Options to change standard behavior. See: {@link Utils.getXist4cSessionId-defaults}
		 * @return   {String | null}
		 */
		getXist4cSessionId: function (opts) {
			/**
			 * Options to change standard behavior
			 * @type {Object}
			 * @namespace Utils.getXist4cSessionId.defaults
			 * @property {String} appGatewayXist4cSessionParam Standard app gateway xist4c session parameter name ("xist4c_eagw_sId").
			 * @property {String} sessionPrefix Standard tomcat session prefix (";jsessionid").
			 * @property {String} sessionCookieName Standard session cookie name ("JSESSIONID").
			 * @property {Boolean} returnOnlyUrlSession If <code>true</code> the method checkes only the for URL session.
			 * @property {Boolean} returnWithPrefix Returns the found session with the sessionPrefix.
			 */
			var defaults = {
				appGatewayXist4cSessionParam: 'xist4c_eagw_sId',
				sessionPrefix: ';jsessionid',
				sessionCookieName: 'JSESSIONID',
				returnOnlyUrlSession: false,
				returnWithPrefix: false
			}, u = window.location.href, c, end, appGwSessParam = defaults.appGatewayXist4cSessionParam,
			sessionPrefix = defaults.sessionPrefix, node, params = this.getUrlParamsAsJson();
			if (opts && typeof opts === 'object') {
				$.extend(defaults, opts);
			}
			if (params && typeof params[appGwSessParam] !== 'undefined') {
				if (defaults.returnWithPrefix) {
					return sessionPrefix + '=' + params[appGwSessParam];
				}
				return params[appGwSessParam];
			}
			if (u.search(sessionPrefix) > -1 || (params && params[sessionPrefix.substring(1)])) { // Test url for session entry.
				if (u.search(sessionPrefix) == -1) {
					if (defaults.returnWithPrefix) {
						return sessionPrefix + '=' + params[sessionPrefix.substring(1)];
					}
					return params[sessionPrefix.substring(1)];
				} else {
					if (u.indexOf('?') === -1) {
						end = u.length;
					} else {
						end = u.indexOf('?');
					}
					if (defaults.returnWithPrefix) {
						return u.substring(u.search(sessionPrefix), end);
					}
					return u.substring(u.search(sessionPrefix) + (sessionPrefix.length + 1), end);
				}
			} else if (!defaults.returnOnlyUrlSession) {
				if (typeof $.cookie !== 'undefined' && typeof (c = $.cookie(defaults.sessionCookieName)) !== 'undefined') { // When a cookie holds the session.
					if (defaults.returnWithPrefix) {
						return [sessionPrefix, '=', c].join('');
					}
					return c;
				} else { // Last instance, test the XIST4C_GLOBALS for sessioned href's.
					if (XIST4C_GLOBALS && XIST4C_GLOBALS.sitemap.length) {
						node = XIST4C_GLOBALS.sitemap[0];
						if (node.href && node.href.search(sessionPrefix) > -1) {
							if (node.href.indexOf('?') === -1) {
								end = node.href.length;
							} else {
								end = node.href.indexOf('?');
							}
							if (defaults.returnWithPrefix) {
								return node.href.substring(node.href.search(sessionPrefix), end);
							}
							return node.href.substring(node.href.search(sessionPrefix) + (sessionPrefix.length + 1), end);
						}
					}
				}
			}
			return null;
		},
		/**
		 * Returns a default option with the passed name.
		 * Use this method with a lend context by calling it with <code>.call()</code>
		 * or <code>.apply()</code>.
		 * If the default with the <code>name</code> is not found <code>null</code> will return.
		 * If no <code>defaults</code> object found <code>null</code> will return.
		 * If no <code>name</code> attribute the <code>defaults</code> object returns if present.
		 * @example
		 * // A little object with defaults.
		 * var Foo = {
		 *		"defaults": {
		 *			"something": "bar"
		 *		};
		 * };
		 *
		 * var something = Utils.getDefault.call(Foo, "something");
		 * @public
		 * @param    {String} name Name of the <code>defaults</code> property.
		 * @return   {Mutable | null}
		 */
		getDefault: function (name) {
			var dv;
			if (typeof this.defaults === 'object') {
				if (typeof name === 'string') {
					dv = this.defaults[name];
					if (typeof dv === 'undefined') {
						return null;
					}
					return dv;
				}
				return this.defaults;
			}
			return null;
		},
		/**
		 * A simple method to receive a timestamp, which can be used for ajax caching problems.
		 * @public
		 * @return   {Long} Timestamp.
		 */
		timestamp: function () {
			return new Date().getTime();
		},
		/**
		 * A simple function which requests the pong.do action of the CMS
		 * @public
		 * @return {Void}
		 */
		ping: function () {
			var fullUrl;
			if (typeof(waf) !== "object") {
				fullUrl = "/xist4c/web/pong.do";
				if (!navigator.cookieEnabled) {
					fullUrl += Utils.getXist4cSessionId({returnWithPrefix: true});
				}
				$.post(fullUrl);
			}
		},
		/**
		 * A function which starts an endless loop requesting for pong.do.
		 * If there is already a job running it is stopped first.
		 * @param    {Integer} seconds The loop interval in seconds.
		 * @public
		 * @return {Void}
		 */
		startPinging: function (seconds) {
			if (this.pingJob !== null) {
				this.stopPinging();
			}
			this.pingJob = setInterval(Utils.ping, seconds * 1000);
		},
		/**
		 * Stopps a running ping job or does nothing if no such job is running.
		 * @public
		 * @return {Void}
		 */
		stopPinging: function () {
			if (this.pingJob !== null) {
				clearInterval(this.pingJob);
				this.pingJob = null;
			}
		}
	};
/* << */


/* >> livinglogic extended object with own prototype extension Version: rel-1-0-0 */
	/**
	 * @class Base class of all livinglogic objects.
	 * All classes must inherit from LLObject.
	 * @version rel-1-0-0
	 * @property {Object} __property__ The prototype object of the current object.
	 * @property {Object} defaults Object to hold params that can change standard behavior for
	 *                             create, init and runtime.
	 */
	LLObject = {
		__prototype__: null,
		defaults: {},
		/**
		 * Standard constructor.
		 * @public
		 * @param  {Object} [opts] Object with parameters which can change the object standard behavior.
		 * @return {Object} Base object.
		 */
		create: function (opts) {
			if (typeof opts === 'object') {
				$.extend(this.defaults, opts);
			}
			return $.clone(this);
		},
		/**
		 * Returns <code>true</code> if the passed class-type is equal to <code>type</code> in
		 *	the inheritance chain. Otherwise it will return <code>false</code>.
		 * @public
		 * @param  {Object} type Object to test if it is in the inheritance chain.
		 * @return {Boolean}
		 */
		instanceOf: function (type) {
			if (this == type) {
				return true;
			} else if (this.__prototype__ === null) {
				return false;
			} else {
				return this.__prototype__.instanceOf(type);
			}
		},
		/**
		 * Searches the <code>defaults</code> object first level, for the given <code>name</code>.
		 * If <code>name</code> undefined or <code>null</code> the <code>altVal</code> will return.
		 * If no <code>altVal</code> given and it has a <code>defaults</code> object, then returns the
		 * <code>defaults</code> object, otherwise <code>null</code>.
		 * @public
		 * @param  {String} name   Name of a defaults first level property.
		 * @param  {Misc} altVal The alternative return value if <code>name</code> not found or <code>null</code>.
		 * @return {defaults | altVal | null}
		 */
		getDef: function (name, altVal) {
			if (typeof this.defaults === 'object') {
				if (typeof name !== 'undefined' && this.defaults[name] !== null) {
					return this.defaults[name];
				} else if (typeof altVal !== 'undefined') {
					return altVal;
				}
				return this.defaults;
			} else {
				if (typeof altVal !== 'undefined') {
					return altVal;
				}
			}
			return null;
		}
	};
/* << */


/* >> XIST4C Globals */
	XIST4C_GLOBALS = {};
/* << */


/* >> LivingLogic DropDown Node (requires jQuery 1.2.6) Version: rel-1-0-0 */
	Node = function (Args) {
		for (var name in Args) {
			this[name] = Args[name];
		}
		this.children = [];
	};

	Node.prototype.childrenLayer = function (level) {
		var layerId = ['childrenLevelContainer_', this.level].join('');
		if (level) {
			layerId = ['childrenLevelContainer_', level].join('');
		}
		return $('<div></div>').css(
			{
				'position': 'absolute',
				'right': ['-', LL_DropDownNavi.layerWidth, 'px'].join(''),
				'top': 0,
				'z-index': this.level * 10,
				'width': [LL_DropDownNavi.layerWidth, 'px'].join('')
			}
		).attr({'id': layerId}).hide();
	};

	Node.prototype.nodeChildrenShell = function () {
		var cs = $('<div></div>').attr({'class': ['navCHS_', this.level + 1].join('')});
		var self = this;
		if (this.styName) {
			var sty = ['co_', this.styName].join('');
			var d = $('<div></div>').attr({'class': sty});
			if (this.children.length > 0) {
				$(this.children).each(function (i) {
					var Args = {};
					if (i === 0) {
						Args.first = true;
					}
					if (i == self.children.length - 1) {
						Args.last = true;
					}
					d.append(this.nodeShell(Args));
				});
			}
			cs.append(d);
			return cs;
		}
		if (this.children.length > 0) {
			$(this.children).each(function (i) {
				var Args = {};
				if (i === 0) {
					Args.first = true;
				}
				if (i == self.children.length - 1) {
					Args.last = true;
				}
				cs.append(this.nodeShell(Args));
			});
		}
		return cs;
	};

	Node.prototype.nodeFirstLevelShell = function () {
		var ns = $('<div></div>').attr({'class': ['navNS_', this.level].join(''), 'id': this.id}),
		node = this.node(), sty, d, cs;
		ns.append(this.childrenLayer(1));
		if (this.styName) {
			sty = ['co_', this.styName].join('');
			d = $('<div></div>').attr({'class': sty});
			d.append(node);
			if (this.children.length > 0) {
				cs = this.nodeChildrenShell();
				d.append(cs);
			}
			ns.append(d);
			return ns;
		}
		ns.append(node);
		if (this.children.length > 0) {
			cs = this.nodeChildrenShell();
			ns.append(cs);
		}
		return ns;
	};

	Node.prototype.nodeShell = function (Args) {
		var ns = $('<div></div>').attr({'class': ['navNS_', this.level].join(''), 'id': this.id}),
		csOffset = $('<div></div>').css({'position': 'relative'}).attr({'id': [this.id, '_layerOffset'].join('')}),
		node, origClassName, newClassName, sty, d;
		ns.append(csOffset);
		node = this.node();
		if (Args) {
			origClassName = node.attr('class');
			newClassName = '';
			if (Args.first) {
				newClassName += [' ', origClassName, '_first'].join('');
			}
			if (Args.last) {
				newClassName += [' ', origClassName, '_last'].join('');
			}
			node.attr('class', origClassName + ' ' + newClassName);
		}
		if (this.styName) {
			sty = ['co_', this.styName].join('');
			d = $('<div></div>').attr({'class': sty});
			d.append(node);
			ns.append(d);
			return ns;
		}
		ns.append(node);
		return ns;
	};

	Node.prototype.node = function () {
		var outer = $('<div></div>').attr({'class': ['navEl_', this.level, '_', this.type].join('')}),
		n = $('<div></div>').attr({'class': 'outer'}),
		text = $('<span></span>').attr({'class': 'inner'}).text(this.title),
		self = this, level;
		if (this.href) {
			if (this.type == 'here') {
				text = $('<div></div>').attr({'class': 'noLink'}).append(text).css('cursor', 'hand');
			} else if (this.type == 'inPath') {
				text = $('<a></a>').attr({'href': this.href}).append(text).css('cursor', 'hand');
			} else if (this.type == 'normal') {
				text = $('<a></a>').attr({'href': this.href}).append(text).css('cursor', 'hand');
			}
		}
		n.append(text);
		outer.append(n);
		outer.css('cursor', 'hand');
		if (this.children.length > 0 && this.level > 0) {
			outer.bind('mouseover', function (e) {
				var levelCont = ['#childrenLevelContainer_', self.level].join(''), layerOffset;
				if ($(levelCont).size() === 0) {
					$('body').append(self.childrenLayer());
				}
				layerOffset = ['#', self.id, '_layerOffset'].join('');
				$(levelCont).empty().append(self.nodeChildrenShell()).hide();
				$(layerOffset).append($(levelCont));
				$(levelCont).fadeIn(200);
			});
		} else {
			level = self.level === 0 ? self.level + 1 : self.level;
			outer.bind('mouseover', function (e) {
				 $('#childrenLevelContainer_' + level).fadeOut(200);
			});
		}
		return outer;
	};

/* << */


/* >> LivingLogic DropDown Navigation (requires jQuery 1.2.6) Version: rel-1-0-0 */
	LL_DropDownNavi = {
		path: [],
		layerWidth: 160,
		lay: {
			pixel: function () {
				return $('<img />').attr({'src': '/xist4c/px/spc.gif', 'width': 1, 'height': 1, 'alt': ''});
			},
			nodesOuterShell: function (content) {
				var nos = $(
					'<div class="navOuterShell">' +
						'<div class="noDes1">' +
							'<div class="noDes2">' +
								'<div class="topImg">' +
									'<div class="bottomImg">' +
									'</div>' +
								'</div>' +
							'</div>' +
						'</div>' +
					'</div>'
				);
				nos.find('div.topImg').append(LL_DropDownNavi.lay.pixel());
				nos.find('div.bottomImg').append(content);
				nos.find('div.bottomImg').append(LL_DropDownNavi.lay.pixel());
				nos.bind('mouseleave', function () {
					$('div[id^=childrenLevelContainer_]').fadeOut(500);
				});
				return nos;
			}
		},
		sitemap: null,
		init: function (Args) {
			this.sitemap = this.buildTreeFromArray(XIST4C_GLOBALS.sitemap);
			lay = LL_DropDownNavi.lay;
			var homeNode = this.sitemap[0].nodeFirstLevelShell();
			if (Args && Args.target) {
				var target = $(['#', Args.target].join(''));
				target.append(lay.nodesOuterShell(homeNode));
			} else {
				$('div.navOuterShell').find('div.navNS_0').remove().end().find('div.noDes2').append(homeNode).bind('mouseleave', function () {
					$('div[id^=childrenLevelContainer_]').fadeOut(500);
				});
			}
		},
		renderFirstLevel: function () {
			var lay = LL_DropDownNavi.lay;
			var nodes = [];
			$(this.sitemap[1]).each(function (i) {
				var node = this;
				if (typeof node == 'object' && typeof node.length != 'number') {
					node = lay.nodeShell(node, lay.node(node));
					nodes.push(node);
				}
			});
			return lay.nodeChildrenShell(this.sitemap[0], nodes);
		},
		getChildren: function (id, level) {
		},
		renderChildrenLayer: function (id, level) {
			for (var i = 0; i < this.sitemap[1].length; i++) {
				var node = this.sitemap[1][i];
				if (node.id == id) {
					//if (i)
				}
			}
		},
		buildTreeFromArray: function (arr) {
			var newArr = [];
			for (var i = 0; i < arr.length; i++) {
				var data = arr[i];
				if (typeof data == 'object' && typeof data.length != 'number') {
					newArr.push(new Node(data));
				} else {
					newArr[newArr.length - 1].children = this.buildTreeFromArray(data);
				}
			}
			return newArr;
		}
	};
/* << */


/* >> DEPRECATED */
	function hideInputBg(field)
	{
		ipField = document.getElementById(field);
		ipField.style.background = "#fff";
	}
/* << */


/* >> IE Refresh */
	function IE_Refresh() {
		if ($.browser.msie && $.browser.version && parseInt($.browser.version, 10) < 7) {
			location.reload();
		}
	}
	window.onresize = IE_Refresh;
/* << */


/* >> Standard Popup functions Version: rel-1-0-0 */
	function StandardPopup(Attrs) {
		// @params IE and Gecko-Browser compatible window parameter attributes.
		this.params = ['left', 'top', 'location', 'menubar', 'resizable', 'scrollbars', 'status', 'toolbar', 'height', 'width'];
		this.href = Attrs.href ? Attrs.href : 'http://www.google.de'; // url to the popup content
		this.name = Attrs.name ? Attrs.name : 'standardPopup'; // standard window name
		this.height = Attrs.height ? Attrs.height : '550'; // standard height opened window
		this.width = Attrs.width ? Attrs.width : '650'; // standard width opened window
		this.left = Attrs.left ? Attrs.left : null; // window left position from the upper left corner of the client screen
		this.top = Attrs.top ? Attrs.top : null; // window top position from the top of the client screen
		this.locationbar = Attrs.location ? Attrs.location : 'no'; // ['yes', 'no'] display the locationbar
		this.menubar = Attrs.menubar ? Attrs.menubar : 'no'; // ['yes', 'no'] display the menubar
		this.resizable = Attrs.resizable ? Attrs.resizable : 'yes'; // ['yes', 'no'] allows the user to change the window size
		this.scrollbars = Attrs.scrollbars ? Attrs.scrollbars : 'yes'; // ['yes', 'no'] show scrollbars if necessary
		this.status = Attrs.status ? Attrs.status : 'no'; // ['yes', 'no'] show statusbar
		this.toolbar = Attrs.toolbar ? Attrs.toolbar : 'no'; // ['yes', 'no'] show toolbar
		this.blank = Attrs.blank ? Attrs.blank : 'false'; // ['true', 'false'] show window as popup or blank window
		this.wRef = null; // window reference to make changes on the opened windowe
	}

	StandardPopup.prototype._formatParams = function ()
	{
		var str = '\'';
		var objParam;
		for (var i = 0; i < this.params.length; ++i) {
			objParam = this.params[i] == 'location' ? 'locationbar' : this.params[i];
			p = eval("this." + objParam);
			if (p) {
				str += this.params[i] + '=' + p + ',';
			}
		}
		str = str.substring(0, str.length - 1);
		str += '\'';
		return str;
	};

	StandardPopup.prototype.open = function () {
		if (this.blank) {
			this.wRef = window.open(this.href);
		} else {
			var paraStr = this._formatParams();
			this.wRef = window.open(this.href, this.name, paraStr);
		}
		if (this.wRef) {
			this.wRef.focus();
		}
		return false;
	};
/* << */


/* >> rss publisher, (requires jQuery 1.2.6) Version: rel-2-0-0 */
	RSSPublisher = {
		publishers: false,
		register: function (args) {
			this.append(args);
		},
		append: function (args) {
			var RSSObj = new RSS();
			RSSObj.target = args.target;
			RSSObj.source = args.source;
			RSSObj.tags = args.tags;
			RSSObj.descLength = args.descLength;
			RSSObj.descLengthEnding = args.descLengthEnding;
			RSSObj.pubDateFormat = args.pubDateFormat;
			RSSObj.refresh = args.refresh;
			RSSObj.itemsCount = args.itemsCount ? args.itemsCount : 5;
			RSSObj.staticTest = args.staticTest;
			if (args.acceptMimeTypes && typeof args.acceptMimeTypes == 'object') {
				RSSObj.acceptMimeTypesCgiStr = this.createMimeTypeCgiStr(args.acceptMimeTypes);
			}
			if (typeof this.publishers != 'boolean') {
				this.publishers.push(RSSObj);
			} else {
				this.publishers = [RSSObj];
			}
			RSSObj.getSource();
		},
		createMimeTypeCgiStr: function (mtList) {
			var str = '&mimetypes=';
			for (var i = 0; i < mtList.length; ++i) {
				str += encodeURIComponent(this.strTrim(mtList[i])) + ',';
			}
			return str.substring(0, str.length - 1);
		},
		strTrim: function (str) {
			var ccSpace = 32, ps = 0, pe = 0, psLock = false, peLock = false, i, string;
			for (i = 0; i < str.length; ++i) {
				if (str.charCodeAt(i) == ccSpace) {
					if (! psLock) {
						ps++;
					}
					if (str.charCodeAt(str.length - 1 - i) == ccSpace) {
						if (! peLock) {
							pe++;
						}
					} else {
						peLock = true;
					}
				} else {
					psLock = true;
					if (str.charCodeAt(str.length - 1 - i) == ccSpace) {
						if (! peLock) {
							pe++;
						}
					} else {
						peLock = true;
					}
				}
			}
			string = str.substring(ps, str.length);
			return string.substring(0, str.length - pe - ps);
		}
	};


	function RSS() {
		this.root = $('<div></div>');
		this.target = null;
		this.source = null;
		this.tags = ['title', 'description'];
		this.descLength = null;
		this.descLengthEnding = " ";
		this.pubDateFormat = 2;
		this.refresh = null;
		this.itemsCount = null;
		this.staticTest = false;
		this.acceptMimeTypesCgiStr = null;
		this.charCount = 0;
		this.stop = false;
	}

	RSS.prototype.getSource = function () {
		var url;
		this.charCount = 0;
		this.stop = false;
		this.root.empty();
		if (this.staticTest) {
			url = this.source;
		} else {
			url = '/urlfetcher/?url=' + encodeURIComponent(this.source);
		}
		//if (this.acceptMimeTypesCgiStr && ! this.staticTest) url += this.acceptMimeTypesCgiStr;
		if (! this.staticTest) {
			url += '&mimetypes=text%2Fxml'; //schoener machen!!!
		}
		var self = this;
		$.ajax({
			type: 'GET',
			//dataType: 'xml',
			url: url,
			success: function (data, msg) {self.handleSource(data, msg); },
			error: function (req, status, error) {self.handleSourceError(req, status, error); }
		});
		if (this.refresh) {
			setTimeout(function () {self.getSource(); }, this.refresh * 1000);
		}
	};

	RSS.prototype.handleSource = function (data, msg) {
		var xmlElements = data;
		var items = $('item', xmlElements);
		var count = items.size();
		if (this.itemsCount <= items.size()) {
			count = this.itemsCount;
		}
		var tags = this.tags;
		var self = this;
		for (var i = 0; i < count; ++i) {
			var href = self.getLink(items.get(i));
			self.appendElement(self.getItem(items.get(i), tags, href, i), self.root);
		}
		this.publish();
	};

	RSS.prototype.handleSourceError = function (def) {
		$('#' + this.target).html('<div>Service ist voruebergehend nicht verfuegbar.</div>');
	};

	RSS.prototype.appendElement = function (elm, root) {
		if (elm) {
			$(root).append(elm);
			return true;
		}
		return false;
	};

	RSS.prototype.cloneXML2DOM = function (src, tar, igRoot, len, correctHyphen) {
		var i, node, text, newNode, j, pos, t, c, subNode;
		for (i = 0; i < src.childNodes.length; i++) {
			node = src.childNodes[i];
			switch (node.nodeType) {
				case 1:
					if (! igRoot) {
						newNode = tar.appendChild(document.createElement(node.nodeName));
						for (j = 0; j < node.attributes.length; j++) {
							newNode.setAttribute(node.attributes[j].nodeName, node.attributes[j].nodeValue);
						}
						this.cloneXML2DOM(node, newNode, false, correctHyphen);
					} else {
						this.cloneXML2DOM(node, tar, false, correctHyphen);
					}
					break;
				case 3:
					if (len) {
						text = node.nodeValue;
						if (this.charCount + text.length < len) {
							this.charCount += text.length;
						} else {
							pos = 0;
							t = '';
							while (1) {
								t += text.substr(pos, 1);
								if (t.length + this.charCount >= len) {
									c = t.charAt(t.length -1);
									if (c == this.descLengthEnding || pos == t.length) {
										this.charCount += t.length;
										if (c == this.descLengthEnding) {
											t += c == " " ? '....' : ' ....';
											this.stop = true;
										} else {
											this.stop = false;
										}
										text = t;
										break;
									}
								} else if (text.length + this.charCount < len) {
									c = text.charAt(text.length - 1);
									this.charCount += text.length;
									text += c == " " ? '....' : ' ....';
									this.stop = true;
									break;
								}
								pos++;
							}
						}
					} else {
						text = node.nodeValue;
					}
					if (correctHyphen) {
						text = this.correctHyphenatedText(text);
					}
					subNode = document.createTextNode(text);
				tar.appendChild(subNode);
			}
			if (this.stop) {
				this.charCount = 0;
				break;
			}
		}
	};

	RSS.prototype.correctHyphenatedText = function (text) {
		return text.replace(/-/g, '- ');
	};

	RSS.prototype.cloneContent = function (src, len, correctHyphen) {
		var root = $('<div></div>').get(0);
		if (len) {
			this.charCount = 0;
			this.stop = false;
		}
		this.cloneXML2DOM(src, root, false, len, correctHyphen);
		return root.childNodes;
	};

	RSS.prototype.getFirstNodeMatch = function (nName, parent, type) {
		var n = parent.childNodes;
		nName = nName.toLowerCase();
		type = type ? type : 1;
		for (var i = 0; i < n.length; ++i) {
			if (n[i].nodeType == type && n[i].nodeName.toLowerCase() == nName) {
				return n[i];
			}
		}
		return false;
	};

	RSS.prototype.getLink = function (item) {
		return $('link', item).text();
	};

	RSS.prototype.getItem = function (item, tags, href, count) {
		var sty = count % 2 === 0 ? 'item' : 'item odd',
		itemShell = $('<div></div>').attr({'class': sty}).get(0);
		for (var j = 0; j < tags.length; ++j) {
			switch (tags[j]) {
				case 'title':
					this.appendElement(this.getTitle(item, href), itemShell);
					break;
				case 'description':
					this.appendElement(this.getDescription(item), itemShell);
					break;
				case 'pubDate':
					this.appendElement(this.getPubDate(item), itemShell);
					break;
			}
		}
		return itemShell;
	};

	RSS.prototype.getTitle = function (item, href) {
		var title = $('title', item).get(0);
		if (title && title.childNodes.length > 0) {
			return Layout.getTitle(this.cloneContent(title, false, true), href);
		}
		return false;
	};

	RSS.prototype.getDescription = function (item) {
		var description = $('description', item).get(0);
		if (description && description.childNodes.length > 0) {
			return Layout.getDescription(this.cloneContent(description, this.descLength, true));
		}
		return false;
	};

	RSS.prototype.getPubDate = function (item) {
		var pubDate = $('pubDate', item).get(0);
		if (pubDate && pubDate.childNodes.length > 0) {
			var dateGMT = pubDate.childNodes[0].nodeValue;
			pubDate.childNodes[0].nodeValue = this.formatDate(dateGMT);
			return Layout.getPubDate(this.cloneContent(pubDate, false, false));
		}
		return false;
	};

	RSS.prototype.formatDate = function (dateStr) {
		var lang = $('html').attr('lang');
		var date = $.getISODate(new Date(dateStr), lang);
		var time = $.getISOTime(new Date(dateStr));
		if (this.pubDateFormat == 1) {
			return date._short;
		} else if (this.pubDateFormat == 2) {
			return date._middle;
		} else if (this.pubDateFormat == 3) {
			return date._long;
		} else if (this.pubDateFormat == 4) {
			return date._long + ' ' + time;
		}
	};

	RSS.prototype.publish = function () {
		$('#' + this.target).empty().html($(this.root).html());
	};

	Layout = {
		getTitle: function (t, href) {
			if (href) {
				t = $('<a></a>').attr({'href': href, 'target': '_blank'}).append(t);
			}
			return $('<div></div>').attr({'class': 'rssElementTitle'}).append(
				$('<h3></h3>').append($('<span></span>').append(t))
			).get(0);
		},
		getDescription: function (desc) {
			return $('<div></div>').attr({'class': 'rssElementDesc'}).append(
				$('<div></div>').attr({'class': 'inner'}).append(desc)
			).get(0);
		},
		getPubDate: function (d) {
			return $('<div></div>').attr({'class': 'rssElementPubDate'}).append(
				$('<span></span>').append(d)
			).get(0);
		}
	};
/* << */


/* >> Generic Multimedia CMS tool, (requires jQuery 1.2.6) Version: rel-2-0-0 */
	function GenericMultimedia(args) {
		this.lang = this.getLang();
		this.altText = args.altText;
		this.altImg = args.altImg;
		this.data = args.data;
		this.htmlSrcDom = this.getHtmlSrcDom(args.htmlSrc);
		this.javaApplet = this.isJavaApplet();
		this.modifyAndWriteDocumentElements();
	}

	GenericMultimedia.prototype.getLang = function () {
		var htmlEl = $('html');
		if (htmlEl.attr('lang')) {
			return this.formatLang(htmlEl.attr('lang'));
		} else if (htmlEl.attr('xml:lang')) {
			return this.formatLang(htmlEl.attr('xml:lang'));
		}
		return 'en';
	};

	GenericMultimedia.prototype.formatLang = function (lang) {
		if (lang.search(/-/) > -1) {
			return lang.substring(0, lang.search(/-/));
		}
		return lang;
	};

	GenericMultimedia.prototype.getHtmlSrcDom = function (htmlSrc) {
		if (typeof htmlSrc == 'string' && htmlSrc.length > 0) {
			return $('<div>' + htmlSrc + '</div>').get(0);
		}
		return null;
	};

	GenericMultimedia.prototype.isJavaApplet = function () {
		var isJavaApp = false;
		$('xml > *', this.htmlSrcDom).each(
			function (n) {
				if (this.nodeType == 1 && this.nodeName.toLowerCase() == 'object') {
					if ($(this).attr('classid')) {
						isJavaApp = $(this).attr('classid').search('java:') > -1;
					}
				}
			}
		);
		return isJavaApp;
	};

	GenericMultimedia.prototype.modifyAndWriteDocumentElements = function () {
		var output = '';
		var onlyEmbed = false;
		var model;
		var self = this;
		$('> *', this.htmlSrcDom).each(
			function (n) {
				if (self.javaApplet || (! self.useEmbed() && ! self.javaApplet)) {
					if (this.nodeType == 1 && this.nodeName.toLowerCase() == 'object') {
						model = false;
						output += self.startElement('object', self.getNodeAttributes(this), model);
						$('param, embed', this).each(
							function (n) {
								if (this.nodeType == 1 && this.nodeName.toLowerCase() == 'param') {
									model = true;
									output += self.startElement('param', self.getNodeAttributes(this), model);
								}
								if (this.nodeType == 1 && this.nodeName.toLowerCase() == 'embed') {
									model = true;
									output += self.startElement('embed', self.getNodeAttributes(this), model);
								}
							}
						);
					}
				} else {
					onlyEmbed = true;
					$('param, embed', this).each(
						function (n) {
							if (this.nodeType == 1 && this.nodeName.toLowerCase() == 'embed') {
								model = true;
								output += self.startElement('embed', self.getNodeAttributes(this), model);
							}
						}
					);
				}
				if (self.altText || self.altImg) {
					var text = '';
					var img = '';
					if (self.altText) {
						text = '<p>' + self.altText + '</p>';
					}
					if (self.altImg) {
						img = '<img src="' + self.altImg + '" alt="" title="" />';
					}
					if (!$.browser.safari) { //Workarround for safari 3.2.1 which interpreted the standard wrong.
						if (self.useEmbed() && ! self.javaApplet) {
							output += '<noembed>' + text + img + '</noembed>';
						} else {
							output += text + img;
						}
					}
				}
				if (! onlyEmbed) {
					output += self.endElement('object');
				}
			}
		);
		document.write(output);
	};

	GenericMultimedia.prototype.useEmbed = function () {
		var agent = navigator.userAgent;
		if (agent.search(/MSIE | Safari/) > -1) {
			return false;
		}
		return true;
	};

	GenericMultimedia.prototype.getNodeAttributes = function (node) {
		var name = node.nodeName.toLowerCase();
		var codebase = false;
		if (node.attributes.length > 0) {
			var attrs = {};
			var attrValue = '';
			for (var i = 0; i < node.attributes.length; ++i) {
				var attrName = node.attributes[i].nodeName.toLowerCase();
				attrValue = node.attributes[i].nodeValue;
				if (name == 'object' && (attrName == 'classid' || attrName == 'movie' || attrName == 'data')) {
					if (attrValue && attrValue !== 'null') {
						if (attrName == 'classid') {
							attrs[attrName] = this.makeClassidAttribute(attrValue);
						} else if (this.javaApplet && attrName == 'codebase') {
							codebase = true;
							attrs[attrName] = this.makeJavaAppletCodebaseAttribute();
						} else {
							if (attrName == 'codebase') {
								codebase = true;
							}
							attrs[attrName] = this.data + this.copyCgiArgs(attrValue);
						}
					}
				} else if (name == 'embed' && attrName == 'src') {
					attrs[attrName] = this.data + this.copyCgiArgs(attrValue);
				} else {
					attrs[attrName] = attrValue || '';
				}
			}
			if (this.javaApplet && ! codebase) {
				codebase = true;
				attrs.codebase = this.makeJavaAppletCodebaseAttribute();
			}
			if (name == 'param') {
				attrNameValue = attrs.name.toLowerCase();
				attrValueValue = attrs.value;
				if (attrNameValue == 'filename' || attrNameValue == 'movie' || attrNameValue == 'src' || attrNameValue == 'url') {
					attrs.value = this.data + this.copyCgiArgs(attrValueValue);
				}
			}
			return attrs;
		}
		return null;
	};

	GenericMultimedia.prototype.copyCgiArgs = function (value) {
		if (value.lastIndexOf('?') > -1) {
			return value.substring(value.lastIndexOf('?'), value.length);
		}
		return '';
	};

	GenericMultimedia.prototype.startElement = function (name, attrs, single) {
		var element = '<' + name;
		for (var attrName in attrs) {
			element += ' ' + attrName + '="' + attrs[attrName] + '"';
		}
		if (single) {
			return (element += '/>');
		}
		return (element += '>');
	};

	GenericMultimedia.prototype.endElement = function (name) {
		return '</' + name + '>';
	};

	GenericMultimedia.prototype.makeClassidAttribute = function (value) {
		var data = this.data;
		if (value.search('java:') > -1) {
			return 'java:' + data.substring(data.lastIndexOf('/') + 1, data.length) + this.copyCgiArgs(value);
		}
		return value;
	};

	GenericMultimedia.prototype.makeJavaAppletCodebaseAttribute = function () {
		var data = this.data;
		return data.substring(0, data.lastIndexOf('/') + 1);
	};
/* << */


/* >> bookmarking tool (requires jQuery 1.2.6 and ll StandardPopup) Version: rel-2-0-0 */
	function BookmarkStoreAt(args) {
		this.targetName = null;
		this.container = null;
		this.titleHTML = null;
		this.textHTML = null;
		this.descSliceStandard = ' ...';
		this.imgPath = '/xist4c/web/img/standard/bookmarkTool';
		this.bmItems = ['delicious', 'mrwong', 'blinklist', 'yahoo', 'yigg', 'furl', 'oneview', 'folkd', 'linkarena', 'google', 'webnews'];
		this.bmURL = null;
		this.bmTitle = null;
		this.bmTargets = {};
		this.init(args);
	}

	BookmarkStoreAt.prototype.init = function (args) {
		this.targetName = args.targetName;
		if ($('#' + args.targetName).size() > 0) {
			this.container = $('#' + args.targetName).get(0);
		}
		if (args.bmItems) {
			this.bmItems = args.bmItems;
		}
		if (args.imgPath) {
			this.imgPath = args.imgPath;
		}
		this.titleHTML = args.titleHTML;
		this.textHTML = args.textHTML;
		this.bmURL = encodeURIComponent(location.href);
		this.bmTitle = encodeURIComponent(document.title);
		this.bmTargets.delicious = {'title': 'del.icio.us', 'desc': 'del.icio.us', 'url': 'http://del.icio.us/post?url=' + this.bmURL + '&title=' + this.bmTitle};
		this.bmTargets.mrwong = {'title': 'Mister Wong', 'desc': 'Mister Wong', 'url': 'http://www.mister-wong.de/index.php?action=addurl&bm_url=' + this.bmURL + '&bm_description=' + this.bmTitle};
		this.bmTargets.blinklist = {'title': 'BlinkList', 'desc': 'BlinkList', 'url': 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Url=' + this.bmURL + '&Title=' + this.bmTitle};
		this.bmTargets.yahoo = {'title': 'Yahoo MyWeb', 'desc': 'Yahoo MyWeb', 'url': 'http://myweb2.search.yahoo.com/myresults/bookmarklet?u=' + this.bmURL + '&t=' + this.bmTitle};
		this.bmTargets.yigg = {'title': 'YiGG', 'desc': 'YiGG', 'url': 'http://yigg.de/neu?exturl=' + this.bmURL + '&exttitle=' + this.bmTitle};
		this.bmTargets.furl = {'title': 'Furl', 'desc': 'Furl', 'url': 'http://www.furl.net/storeIt.jsp?u=' + this.bmURL + '&t=' + this.bmTitle};
		this.bmTargets.oneview = {'title': 'OneView', 'desc': 'OneView', 'url': 'http://beta.oneview.de:80/quickadd/neu/addBookmark.jsf?URL=' + this.bmURL + '&title=' + this.bmTitle};
		this.bmTargets.folkd = {'title': 'Folkd', 'desc': 'Folkd', 'url': 'http://www.folkd.com/submit/page/' + this.bmURL};
		this.bmTargets.linkarena = {'title': 'Linkarena', 'desc': 'Linkarena', 'url': 'http://linkarena.com/bookmarks/addlink/?url=' + this.bmURL + '&title=' + this.bmTitle + '&desc=&tags='};
		this.bmTargets.google = {'title': 'Google', 'desc': 'Google', 'url': 'http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk=' + this.bmURL + '&title=' + this.bmTitle};
		this.bmTargets.webnews = {'title': 'Webnews', 'desc': 'Webnews', 'url': 'http://www.webnews.de/einstellen?url=' + this.bmURL + '&title=' + this.bmTitle};
		this._createLayout();
	};

	BookmarkStoreAt.prototype.store = function (target) {
		this.open(this.bmTargets[target].url);
	};

	BookmarkStoreAt.prototype.open = function (url) {
		if (typeof StandardPopup == 'function') {
			var p = new StandardPopup({'href': url, 'blank': true});
			p.open();
		} else {
			window.open(url);
		}
	};

	BookmarkStoreAt.prototype.changeDescSlice = function (key) {
		var el = '#bmDescSlice_' + this.targetName;
		var slice = this.descSliceStandard;
		if (key) {
			slice = '<span>' + this.bmTargets[key].desc + '</span>';
		}
		$(el).html(slice);
	};

	BookmarkStoreAt.prototype._getTitle = function () {
		return $('<div class="bookmarkTitleOuter"><h3>' + this.titleHTML + '</h3></div>').get(0);
	};

	BookmarkStoreAt.prototype._getText = function () {
		return $(
			'<div class="bookmarkTextOuter"><p>' +
			this.textHTML + '<span id="bmDescSlice_' +
			this.targetName + '" class="bmDescSlice">' +
			this.descSliceStandard + '</span></p></div>'
		).get(0);
	};

	BookmarkStoreAt.prototype._getImageItems = function () {
		var bmi = this.bmItems, imgOuter = $('<div class="imgOuter"></div>'), img, self = this,
		x = function (bmImgId) {
			img = $('<img/>').attr({
					'src': self.imgPath + '/' + bmImgId + '.gif',
					'alt': self.bmTargets[bmImgId].title,
					'title': self.bmTargets[bmImgId].title
			}).click(
				function (e) {self.store(bmImgId); }
			);
			if (self.textHTML.length > 0) {
				img.mouseover(
					function (e) {self.changeDescSlice(bmImgId); }
				).mouseout(
					function (e) {self.changeDescSlice(false); }
				);
			}
			return img;
		};
		for (var i = 0; i < bmi.length; ++i) {
			imgOuter.append(x(bmi[i]));
		}
		return imgOuter.get(0);
	};

	BookmarkStoreAt.prototype._createLayout = function () {
		var outer = $('<div id="bookmarksOuter"></div>').get(0);
		if (this.titleHTML.length > 0) {
			outer.appendChild(this._getTitle());
		}
		if (this.textHTML.length > 0) {
			outer.appendChild(this._getText());
		}
		outer.appendChild(this._getImageItems());
		this.container.appendChild(outer);
	};
/* << */


/* >> login teaser (requires jQuery 1.2.6) Version: rel-2-0-0 */
	function handleFieldPrompt(fieldList) {
		$(function () {
			var x = function (f) {
				var elm = $('#' + f);
				if (elm.length === 0) {
					elm = $(f);
				}
				elm.focus(
					function (e) {hidePrompt($(this), e); }
				).blur(
					function (e) {
						if ($(this).val() === '') {
							showPrompt($(this), e);
						}
					}
				);
				if (elm.val() !== '') {
					hidePrompt(elm);
				}
			};
			for (var i = 0; i < fieldList.length; ++i) {
				x(fieldList[i]);
			}
		});
	}

	function hidePrompt(field, e) {
		field.css({'background-image': 'none'});
	}

	function showPrompt(field, e) {
		field.removeAttr('style');
	}
/* << */


/* >> client current date (requires jQuery 1.2.6) Version: rel-2-0-0 */
	function getCurrentDate(id) {
		$(function () {
			//getElement(id).innerHTML = '';
			var week = ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'];
			var month = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'];
			var date = new Date();
			var d = week[date.getDay()];
			var dom = date.getDate();
			var m = month[date.getMonth()];
			var y = date.getFullYear();
			var std = date.getHours();
			var min = date.getMinutes();
			var sec = date.getSeconds();
			if (dom < 10) {
				dom = '0' + dom;
			}
			if (min < 10) {
				min = '0' + min;
			}
			if (sec < 10) {
				sec = '0' + sec;
			}
			var timeSection = $('<span class="timeSection"><span class="inner"></span></span>');
			var timeSectionInner = timeSection.find('.inner');
			timeSectionInner.append('<span class="sepYT">,</span>')
				.append('<span class="hour">' + std + '</span>')
				.append('<span class="sepHM">:</span>')
				.append('<span class="min">' + min + '</span>')
				.append('<span class="sepHM">:</span>')
				.append('<span class="sec">' + sec + '</span>')
				.append('<span class="clock">Uhr</span>');
			$('#' + id).empty().append(
				$('<div></div>')
					.append('<span class="weekday">' + d + '</span>')
					.append('<span class="sepWD">,</span>')
					.append('<span class="text">den </span>')
					.append('<span class="day">' + dom + '.</span>')
					.append('<span class="month">' + m + '</span>')
					.append('<span class="year">' + y + '</span>')
					.append(timeSection)
			);
			setTimeout(function () {getCurrentDate(id); }, 1000);
		});
	}
/* << */


/* >> LL_TableColumnEnhancer (require jQuery 1.2.6) Version: rel-2-1-0 */
	LL_TableColumnEnhancer = function () {
		this.table = null;
		this.colConfig = [0, 1, 2, -3, -2, -1];
		this.tableFullWidth = 0;
		this.tableFullHeight = 0;
		this.tableCurrentWidth = 0;
		this.tableCurrentHeight = 0;
		this.variantsWidth = 0;
		this.variantsHeight = 0;
		this.moved = false;
		this.columns = []; // holds to hide columns with there cells
		this.idOuter = null;
		$('#variants').hide();
	};

	LL_TableColumnEnhancer.prototype.setColumnConfig = function () {
		if (arguments.length > 0) {
			var conf = [];
			for (var i = 0; i < arguments.length; ++i) {
				if (! isNaN(parseInt(arguments[i], 10))) {
					conf.push(arguments[i]);
				}
			}
			if (conf.length > 0) {
				this.colConfig = conf;
			}
			return this.colConfig;
		}
		return null;
	};

	LL_TableColumnEnhancer.prototype.init = function (id, idOuter, display) {
		var t = $('#' + id).get(0);
		this.idOuter = idOuter;
		var columnsIndex = [];
		var self = this, visibleTdCount = 0;
		$(t).find('tr:nth-child(2) td').each(function (i) {
			if ($(this).css('display') != 'none') {
				visibleTdCount++;
			}
		});
		if (t.nodeName.toLowerCase() == 'table') {
			if (visibleTdCount > this.colConfig.length) {
				this.table = t;
				this.tableFullWidth = t.offsetWidth;
				this.tableFullHeight = t.offsetHeight;
				var tbody = this.getElementChildNodeWithName(t, 'tbody', null);
				for (var i = 0; i < this.getElementChildNodesCount(tbody, 1); ++i) {
					var row = this.getElementChildNodeWithName(tbody, 'tr', i);
					for (var j = 0; j < this.getElementChildNodesCount(row, 1); ++j) {
						columnsIndex = this.getColumnsIndex(this.getElementChildNodesCount(row, 1), this.colConfig);
						var cell = this.getElementChildNodeWithName(row, 'td', j);
						if (! this._inArray(j, columnsIndex)) {
							if (this.columns[j] instanceof DefaultTableColumn) {
								this.columns[j].addCell(cell);
							} else {
								this.columns[j] = new DefaultTableColumn(j);
								this.columns[j].addCell(cell);
							}
						}
					}
				}
				$('#variantsButtons').show();
				this.updateDisplay(display);
				$('#variantsViewAllButton').click(function (e) {self.openInlinePopup(); });
				$('#variantsViewLessButton').click(function (e) {self.closeInlinePopup(); });
				$('#variants').show();
				this.tableCurrentWidth = this.getContentAreaDimensions().w;
				this.tableCurrentHeight = t.offsetHeight;
				this.variantsWidth = $('#' + this.idOuter).width();
				this.variantsHeight = $('#' + this.idOuter).height();
			} else {
				$('#variants').show();
			}
		}
	};

	LL_TableColumnEnhancer.prototype.getContentAreaDimensions = function () {
		var ca, dims;
		ca = $('td.contentColumn');
		return {'w': ca.width(), 'h': ca.height()};
	};

	LL_TableColumnEnhancer.prototype.openInlinePopup = function () {
		var contOrig = $('#variantsOuterShell');
		var cont = $('#variantsPopupContainer');
		var elm = $('#' + this.idOuter);
		if (elm) {
			cont.empty().append(elm);
			contOrig.empty().append(
				$('<img/>').attr({
					'src': '/xist4c/px/spc.gif',
					'height': this.variantsHeight + 32,
					'width': 1,
					'class': 'variantsDvShellDummy'
				})
			);
			this.updateDisplay(true);
			$('#variantsInlinePopupOuter').show();
			this.tableFullWidth = this.table.offsetWidth;
			if (this.tableFullWidth <= this.tableCurrentWidth) {
				this.tableFullWidth = this.tableCurrentWidth;
				setNodeAttribute(this.table, 'style', {'width': this.tableCurrentWidth + 'px'});
			}
			var distance = ((this.tableFullWidth - this.tableCurrentWidth) / 2) + 12;
			$('#variantsPopupShell').css('left', '-' + distance + 'px');
			this.moved = true;
			var self = this;
			$('#variantsViewLessButton').click(function (e) {self.closeInlinePopup(); });
		}
	};

	LL_TableColumnEnhancer.prototype.closeInlinePopup = function () {
		var cont = $('#variantsOuterShell').get(0);
		$('#variantsInlinePopupOuter').hide();
		var elm = $('#' + this.idOuter);
		if (elm.size() > 0) {
			this.updateDisplay(false);
			cont.replaceChild(elm.get(0), this.getElementChildNodeWithName(cont, 'img', null));
		}
		var self = this;
		$('#variantsViewAllButton').click(function (e) {self.openInlinePopup(); });
	};

	LL_TableColumnEnhancer.prototype.updateDisplay = function (display, e) {
		if (e) {
			e.stop();
		}
		this.hidden = true;
		if (display) {
			this.hidden = false;
		}
		for (var i = 0; i < this.columns.length; ++i) {
			var col = this.columns[i];
			if (col instanceof DefaultTableColumn) {
				col.setDisplay(display);
			}
		}
		if (this.hidden) {
			$('#variantsViewAllButton').css({'display': 'inline'});
			$('#variantsViewLessButton').css({'display': 'none'});
		} else {
			$('#variantsViewAllButton').css({'display': 'none'});
			$('#variantsViewLessButton').css({'display': 'inline'});
		}
	};

	LL_TableColumnEnhancer.prototype._inArray = function (needle, arr) {
		for (var i = 0; i < arr.length; ++i) {
			if (needle == arr[i]) {
				return true;
			}
		}
		return false;
	};

	LL_TableColumnEnhancer.prototype.getElementChildNodeWithName = function (parent, name, pos) {
		pos = pos ? pos : 0;
		var count = 0;
		var childs = parent.childNodes;
		if (childs) {
			for (var i = 0; i < childs.length; ++i) {
				var c = childs[i];
				if (c.nodeType == 1) {
					var nname = c.nodeName.toLowerCase();
					var n = name.toLowerCase();
					if (count == pos) {
						return c;
					}
					++count;
				}
			}
		}
		return null;
	};

	LL_TableColumnEnhancer.prototype.getElementChildNodesCount = function (parent, type) {
		var childs = parent.childNodes;
		var count = 0;
		if (childs) {
			for (var i = 0; i < childs.length; ++i) {
				var c = childs[i];
				if (c.nodeType == type) {
					++count;
				}
			}
		}
		return count;
	};

	LL_TableColumnEnhancer.prototype.getColumnsIndex = function (colCount, permCols) {
		for (var i = 0; i < permCols.length; ++i) {
			if (permCols[i] < 0) {
				permCols[i] += colCount;
			}
		}
		return permCols;
	};


	DefaultTableColumn = function (cid) {
		this.cid = cid;
		this.cells = [];
		this.hidden = false;
	};

	DefaultTableColumn.prototype.addCell = function (Cell) {
		if (Cell.nodeName.toLowerCase() == 'td' || Cell.nodeName.toLowerCase() == 'th') {
			this.cells.push(new DefaultTableCell(Cell));
		}
	};

	DefaultTableColumn.prototype.setDisplay = function (display) {
		this.hidden = true;
		if (display) {
			this.hidden = false;
		}
		for (var i = 0; i < this.cells.length; ++i) {
			this.cells[i].setDisplay(display);
		}
	};


	DefaultTableCell = function (domel) {
		this.domel = domel;
		this.hidden = false;
		this.attrs = {};
		this.children = null;
		this.content = null;
		this._backupAttrsAndChildren();
		this._backupContent();
	};

	DefaultTableCell.prototype._backupAttrsAndChildren = function () {
		var elm = this.domel;
		this.children = elm.childNodes;
		for (var i = 0; i < elm.attributes.length; ++i) {
			var attr = elm.attributes[i];
			var name = attr.nodeName;
			var value = attr.nodeValue;
			this.attrs[name] = value;
		}
	};

	DefaultTableCell.prototype._backupContent = function () {
		var node = this.domel;
		while (node.nodeType == 1) {
			node = node.childNodes[0];
			if (node && node.nodeType == 3) {
				this.content = node.nodeValue;
				break;
			} else {
				if (! node) {
					break;
				}
			}
		}
	};

	DefaultTableCell.prototype.setDisplay = function (display) {
		if (display) {
			this.hidden = false;
			$(this.domel).css({'display': ''});
			return true;
		}
		this.hidden = true;
		$(this.domel).css({'display': 'none'});
		return true;
	};
/* << */


/* >> LL_CookieTool (require jQuery 1.2.6+) Version: rel-1-1-0  **-Deprecated-** use jquery cookie plugin instead */
	LL_CookieTool = {
		isCookieEnabled: function () {
			if (navigator.cookieEnabled === true) {
				return true;
			}
			return false;
		},
		setCookies: function (cObjs) {
			for (var i = 0; i < arguments.length; ++i) {
				var c = arguments[i];
				c.setCookie();
			}
		},
		getCookie: function (name) {
			var cstr = document.cookie;
			if (cstr.length > 0) {
				cookies = cstr.split('; ');
				for (var i = 0; i < cookies.length; ++i) {
					var cook = cookies[i];
					if (cook.substring(0, cook.lastIndexOf('=')) == name) {
						return cook.substring(cook.lastIndexOf('=') + 1, cook.length);
					}
				}
			}
			return null;
		},
		eraseCookie: function (name, domain, path) {
			var c = new CookieData(name, null, domain, path, null, null);
			c.eraseCookie();
		}
	};

	CookieData = function (name, value, domain, path, expires, secure) {
		this.name = name;
		this.value = value;
		this.domain = domain;
		this.path = path;
		this.expires = expires;
		this.secure = secure;
	};

	CookieData.prototype.setCookie = function () {
		var cook = this.name + '=' + unescape(this.value);
		cook += this.domain ? '; domain=' + this.domain : '';
		cook += this.expires ? '; expires=' + this.expires : '';
		cook += this.path ? '; path=' + this.path : '/';
		cook += this.secure ? '; secure' : '';
		document.cookie = cook;
	};

	CookieData.prototype.eraseCookie = function () {
		var cook = this.name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT';
		cook += this.domain ? '; domain=' + this.domain : '';
		cook += this.path ? '; path=' + this.path : '/';
		document.cookie = cook;
	};
/* << */


/* >> LL_FontSizeAdjust (require jQuery 1.2.6, plugins: cookie 1.0) Version: rel-2-0-1 */
	LL_FontSizeAdjust = {
		symbols: [],
		currentFS: 0,
		domain: location.hostname,
		customerPath: 'standard/xx/',
		coId: -1,
		init: function (path, coId) {
			// path: Specifies the image and css path
			// coId: The content object id of a special startpage with different css rules.
			if (coId) {
				this.coId = coId;
			}
			this.connectAndGetSymbols();
			this.setCustomerPath(path);
			this.handleFontSize(this.getFontSize());
		},
		connectAndGetSymbols: function () {
			var self = this;
			$('div[id*=font_adjust_symbol_]').each(
				function (n) {
					self.symbols.push(this);
					$(this).click(function () {self.handleFontSize(n); });
				}
			);
		},
		setCustomerPath: function (path) {
			var p = path ? path : this.customerPath;
			this.customerPath = p;
		},
		getFontSize: function () {
			var size = $.cookie('FontSizeAdjust');
			if (size) {
				return size;
			}
			return this.currentFS;
		},
		setFontSize: function (size) {
			$.cookie('FontSizeAdjust', size, {path: '/', expires: 100});
			return size;
		},
		isStartpage: function () {
			if (XIST4C_GLOBALS && XIST4C_GLOBALS.meta && this.coId == XIST4C_GLOBALS.meta.coID) {
				return true;
			}
			return false;
		},
		handleFontSize: function (size, e) {
			if (navigator.cookieEnabled) {
				this.currentFS = this.setFontSize(size);
				var head = $('head').get(0);
				$('#fontSizeAdjustCssLink').remove();
				$('#fontSizeAdjustCssLink_startpage').remove();
				var l1 = document.createElement('link');
				l1.href = this.customerPath + 'layout_fontSize' + this.currentFS + '.css';
				l1.type = 'text/css';
				l1.rel = 'stylesheet';
				l1.id = 'fontSizeAdjustCssLink';
				head.appendChild(l1);
				if (this.isStartpage()) {
					var l2 = document.createElement('link');
					l2.href = this.customerPath + 'layout_fontSizeStartpage' + this.currentFS + '.css';
					l2.type = 'text/css';
					l2.rel = 'stylesheet';
					l2.id = 'fontSizeAdjustCssLink_startpage';
					head.appendChild(l2);
				}
			}
			this.switchStyleSheet(this.currentFS);
		},
		switchStyleSheet: function (size) {
			// change the stylesheet element at the head element.
			if (this.symbols.length > 0) {
				for (var i = 0; i < this.symbols.length; ++i) {
					var s = this.symbols[i];
					if (i == size) {
						this.updateSymbol(s, 'act');
					} else {
						this.updateSymbol(s, 'pass');
					}
				}
			}
		},
		updateSymbol: function (sym, status) {
			var className = sym.className;
			var pref = className.substring(0, className.lastIndexOf('_') + 1);
			var suff = className.substring(className.lastIndexOf('_') + 1, className.length).toLowerCase();
			if (status) {
				sym.className = pref + status;
				return sym;
			} else {
				if (suff == 'pass') {
					sym.className = pref + 'act';
					return sym;
				}
				sym.className = pref + 'pass';
				return sym;
			}
			return null;
		},
		handleSymbolStyle: function () {
			// switch the symbol css rules to get an active or passive symbol.
		}
	};
/* << */


/* >> LL_RelationshipManager (require jQuery 1.2.6+) Version: rel-2-1-0 */
	LL_RelationshipManager = function () {
		this.relHandler = [];
	};

	LL_RelationshipManager.prototype.addRelHandler = function (Handler) {
		if (Handler instanceof DefaultRelationHandler) {
			this.relHandler.push(Handler);
			if (Handler.elms.length > 0 && Handler.autoAction) {
				Handler.action();
			}
		}
	};

	// abstract relation handler
	DefaultRelationHandler = function () {
		this.name = 'testDefaultHandler';
		this.links = document.links;
		this.autoAction = false;
		this.filter(this.name);
		this.elms = []; // holds the elements and the rel attrs as a json object
	};

	// filter links wih rels with a given name and allocates the attributes.
	DefaultRelationHandler.prototype.filter = function (name) {
		var links = this.links;
		for (var i = 0; i < links.length; ++i) {
			this.addElementAndGetRelAttrs(links[i]);
		}
	};

	DefaultRelationHandler.prototype.addElementAndGetRelAttrs = function (elm) {
		var attr = $(elm).attr('rel'), relAttrs = null, obj;
		if (attr) {
			if (attr.toLowerCase() == this.name.toLowerCase() || attr.substring(0, attr.indexOf('[')).toLowerCase() == this.name.toLowerCase()) {
				if (attr.search(/\[/) > -1 && attr.search(/\]/) > -1) {
					relAttrs = attr.substring(attr.indexOf('[') + 1, attr.lastIndexOf(']'));
					relAttrs = relAttrs.split(',');
				}
				obj = {'elm': elm, 'relAttrs': relAttrs};
				this.elms.push(obj);
				return obj;
			}
		}
		return null;
	};

	DefaultRelationHandler.prototype.action = function () {}; // do something with the rels


	// Use the xpopup functionality to display detail information
	XPopupHandler = function () {
		this.name = 'xpopup';
		this.autoAction = true;
		this.filter(this.name);
	};
	XPopupHandler.prototype = new DefaultRelationHandler();

	XPopupHandler.prototype.action = function () {
		var self = this;
		setTimeout(
			function () {
				var TAttrs = null, TAttrsArr = [], elm, eAttrs, TAttrsStr, i, j, tAttrRaw, key, value,
				openObj = 0;
				for (i = 0; i < self.elms.length; ++i) {
					elm = self.elms[i].elm;
					eAttrs = self.elms[i].relAttrs;
					if (eAttrs && eAttrs.length == 6) {
						TAttrs.url = elm.href;
						TAttrs.height = 'auto';
						TAttrs.width = 'auto';
					} else {
						TAttrsStr = eAttrs.slice(6).join(',');
						eval('TAttrs = {' + TAttrsStr + '}');
						if (! TAttrs.url) {
							TAttrs.url = elm.href;
						}
					}
					LL_XPopup.registerPopup(
						elm,
						eAttrs[0],
						eAttrs[1],
						eAttrs[2],
						eAttrs[3],
						eAttrs[4],
						eAttrs[5],
						TAttrs
					);
				}
			},
			10
		);
	};

	// use the xpopup to display lightbox photogalleries
	LightboxHandler = function () {
		this.name = 'lightbox';
		this.autoAction = true;
		this.filter(this.name);
	};
	LightboxHandler.prototype = new DefaultRelationHandler();

	LightboxHandler.prototype.action = function () {
		var self = this;
		setTimeout(
			function () {
				for (var i = 0; i < self.elms.length; ++i) {
					var TAttrs = {};
					var TAttrsArr = [];
					var elm = self.elms[i].elm;
					var eAttrs = self.elms[i].relAttrs;
					if (eAttrs && eAttrs.length == 1) {
						TAttrs.group = eAttrs[0];
					}
					TAttrs.url = elm.href;
					TAttrs.background = 'true';
					TAttrs.fixedPosition = 'true';

					LL_XPopup.registerPopup(
						elm,
						'click',
						'IMAGE',
						'p_c',
						'c',
						0,
						0,
						TAttrs
					);
				}
			},
			10
		);
	};

	// Use the xpopup functionality to display detail information (avoid doubles)
	XPopupTriggerHandler = function () {
		this.name = 'xpopupTrigger';
		this.autoAction = true;
		this.filter(this.name);
	};

	XPopupTriggerHandler.prototype = new DefaultRelationHandler();

	XPopupTriggerHandler.prototype.action = function () {
		var self = this;
		setTimeout(
			function () {
				var i, elm, relAttrs,
				cb = function (e) {
					e.preventDefault();
					e.stopPropagation();
					if (relAttrs.length > 1 && $('#' + relAttrs[1]).length > 0) {
						$('#' + relAttrs[1]).trigger(relAttrs[0]);
					}
				};
				for (i = 0; i < self.elms.length; ++i) {
					elm = self.elms[i].elm;
					relAttrs = self.elms[i].relAttrs;
					$(elm).bind(relAttrs[0], cb);
				}
			},
			10
		);
	};
/* << */


/* >> LL_XPopup (require jQuery 1.2.6 and LL_RelationshipManager with XPopupHandler) Version: rel-2-1-3 */
	/*
		Possible positions for the source and popup element:
		nw, w, sw, n, c, s, ne, e, se, p_nw, p_w, p_sw, p_n, p_c, p_s, p_ne, p_e, p_se, cursor (only for the source element)

		possible types: IMAGE, WEBPAGE, AJAX, CONTENT
			IMAGE: Display images in a special gallery mode.
			WEBPAGE: Display a web page in an iframe.
			AJAX: Load ajax-content into a div container with a given url.
			HTMLSRC: Display simple html

		Example for rel-Attributes: xpopup[onmouseenter,WEBPAGE,ne,nw,10,10,height:300,width:200]
			identfier[event, type, source position, popup position, popup margin width, popup margin height,--mode attributes--]
			--mode attributes--:
				A commata separated list with key:value items.
				Note: Each mode can have different attributes.
	*/
	LL_XPopup = {
		xpopups: [],
		popup: null,
		initScrollPos: 0,
		preparedGallery: [],
		currentGalleryIdx: -1,
		galleryOverall: -1,
		slideshowBusy: 0,
		slideshowInterval: null,
		nextConnect: null,
		previousConnect: null,
		closeConnect: null,
		registerPopup: function (elm, event, type, spos, ppos, margin_w, margin_h, TypeAttrs, callback) {
			//type = 'AJAX';
			var self = this, cb = callback || null;
			setTimeout(function () {self.makePopup(); }, 1);
			switch (type) {
				case 'IMAGE':
					this.xpopups.push(new ImageXPopup(elm, event, spos, ppos, margin_w, margin_h, TypeAttrs, cb));
					break;
				case 'WEBPAGE':
					this.xpopups.push(new WebpageXPopup(elm, event, spos, ppos, margin_w, margin_h, TypeAttrs, cb));
					break;
				case 'AJAX':
					this.xpopups.push(new AjaxXPopup(elm, event, spos, ppos, margin_w, margin_h, TypeAttrs, cb));
					break;
				case 'HTMLSRC':
					this.xpopups.push(new HtmlSrcXPopup(elm, event, spos, ppos, margin_w, margin_h, TypeAttrs, cb));
					break;
			}
		},
		makePopup: function () {
			if (! this.popup) {
				this.popup = $('<div></div>').append(
						this.makeCloseButton()
					).append(
						$('<div>').attr(
							{'id': 'xpopupContent'}
						)
					).append(
						$('<div>').attr(
							{'id': 'xpopupAddOns'}
						)
					).attr(
						{'id': 'xpopup', 'class': 'xpopup'}
					).css(
						{'display': 'none'}
					).get(0);
				$('body').append(this.popup);
			}
			return this.popup;
		},
		makeCloseButton: function () {
			var self = this;
			$(document).keydown(function (e) {self.destruct(e); });
			return $('<div>').append(
				$('<div>').append(
					$('<img>').attr(
						{'src': '/xist4c/px/spc.gif', 'alt': '', 'id': 'xpopupCloseGfx'}
					).click(
						function (e) {self.destruct(e); }
					)
				).attr(
					{'class': 'inner'}
				)
			).attr(
				{'id': 'xpopupCloseButton'}
			).get(0);
		},
		showBodyScrollbars: function () {
			$('body').css('overflow', 'auto');
		},
		cleanUp: function (pupData) {
			var self = this;
			var bg = $('#xpopup_background');
			if (bg.size() > 0) {
				bg.fadeOut(
					function () {
						bg.remove();
						if (pupData && pupData.Attrs && !pupData.Attrs.preventOverflowHidden) {
							self.showBodyScrollbars();
						}
					}
				);
			} else {
				if (pupData && pupData.Attrs && !pupData.Attrs.preventOverflowHidden) {
					this.showBodyScrollbars();
				}
			}
			$('#xpopupGalleryOverview').remove();
			$('#xpopup').unbind('.specials');
			$('#xpopupContent').empty();
			this.initScrollPos = 0;
			this.preparedGallery = [];
			this.currentGalleryIdx = -1;
			this.galleryOverall = -1;
			this.slideshowBusy = 0;
			if (this.slideshowInterval) {
				clearTimeout(this.slideshowInterval);
			}
		},
		destruct: function (e) {
			var self = this, pupData = $(this.popup).find('#xpopupContent').data('xpopupContent');
			if (this.popup) {
				if (e) {
					if (e.type == 'keydown') {
						if (e.keyCode == 27) {
							if (Utils.isObject(pupData) && Utils.isFunction(pupData.callback)) {
								pupData.callback.call(pupData, 'close');
							}
							$(this.popup).fadeOut(function () {
								self.cleanUp(pupData);
							});
						}
					} else if (e.type == 'click' || e.type == 'mouseleave' || e.type == 'mouseout') {
						if (e.type == 'click') {
							if (Utils.isObject(pupData) && Utils.isFunction(pupData.callback)) {
								pupData.callback.call(pupData, 'close');
							}
							$(this.popup).fadeOut(function () {
								self.cleanUp(pupData);
							});
						} else {
							if (Utils.isObject(pupData) && Utils.isFunction(pupData.callback)) {
								pupData.callback.call(pupData, 'close');
							}
							$(this.popup).hide();
							this.cleanUp(pupData);
						}
					}
				} else {
					if (Utils.isObject(pupData) && Utils.isFunction(pupData.callback)) {
						pupData.callback.call(pupData, 'close');
					}
					$(this.popup).fadeOut(function () {
						self.cleanUp(pupData);
					});
				}
			}
		}
	};

	DefaultXPopup = function (src, event, spos, ppos, margin_w, margin_h, TypeAttrs, callback) {
		this.src = src;
		this.event = event;
		this.spos = spos; // layer position on the connected source element
		this.ppos = ppos; // position of the popup layer relative to the layer position of the source element
		this.mw = margin_w; // margin width of the popup from the connected source element (negative integer values allowed)
		this.mh = margin_h; // margin height of the popup from the connected source element (negative integer values allowed)
		this.Attrs = TypeAttrs;
		this.srcDeferred = null;
		this.srcOutDeferred = null;
		this.callback = callback || null;
		if (arguments.length >= 6) {
			this.connectSrcElement();
		}
	};

	DefaultXPopup.prototype.connectSrcElement = function () {
		var self = this;
		$(this.src).bind(this.event, function (e) {self.show(e); });
	};

	DefaultXPopup.prototype.pushContentIntoPopup = function () {
		$('#xpopupContent').empty().append(this.getContent())
			.data('xpopupContent', this);
		if (Utils.isFunction(this.callback)) {
			this.callback.call(this, 'load');
		}
	};

	DefaultXPopup.prototype.getContent = function () {
		return $('<span>Test Content of the default xpopup!</span>').get(0);
	};

	DefaultXPopup.prototype.getAttr = function (name) {
		if (this.Attrs) {
			for (var k in this.Attrs) {
				if (k.toLowerCase() == name.toLowerCase()) {
					return this.Attrs[name];
				}
			}
		}
		return null;
	};

	DefaultXPopup.prototype.setPopupPosition = function (src, mousePos) {
		var self = this,
		p        = LL_XPopup.popup,
		srcDims  = {'w': $(src).outerWidth(), 'h': $(src).outerHeight()},
		srcPos   = {'x': $(src).offset().left, 'y': $(src).offset().top},
		mCords   = mousePos,
		pDims    = {'w': $(p).width(), 'h': $(p).height()},
		vpDims   = {'w': $(window).width(), 'h': $(window).height()},
		vpPos    = {'x': $(document).scrollLeft(), 'y': $(document).scrollTop()},
		pWidth   = pDims.w,
		pHeight  = pDims.h,
		buffer   = 0,
		xPos, yPos, x, y;

		LL_XPopup.initScrollPos = vpPos;
		if (this.spos.substring(0, 2) == 'p_') {
			srcDims = vpDims;
			if (! this.isIE()) {
				if (this.isFixedPosition()) {
					vpPos = {'x': 0, 'y': 0};
				}
			}
			srcPos = vpPos;
		} else {
			if (! this.isIE()) {
				if (this.isFixedPosition()) {
					srcPos.x = srcPos.x - vpPos.x;
					srcPos.y = srcPos.y - vpPos.y;
					vpPos = {'x': 0, 'y': 0};
				}
			}
		}
		if (this.spos == 'nw' || this.spos == 'w' || this.spos == 'sw' || this.spos == 'p_nw' || this.spos == 'p_w' || this.spos == 'p_sw') {
			x = srcPos.x;
		} else if (this.spos == 'n' || this.spos == 'c' || this.spos == 's' || this.spos == 'p_n' || this.spos == 'p_c' || this.spos == 'p_s') {
			x = srcPos.x + (srcDims.w / 2);
		} else if (this.spos == 'ne' || this.spos == 'e' || this.spos == 'se' || this.spos == 'p_ne' || this.spos == 'p_e' || this.spos == 'p_se') {
			x = srcPos.x + srcDims.w;
		} else if (this.spos == 'cursor') {
			x = mCords.x;
		} else {
			x = 0;
		}

		if (this.spos == 'nw' || this.spos == 'n' || this.spos == 'ne' || this.spos == 'p_nw' || this.spos == 'p_n' || this.spos == 'p_ne') {
			y = srcPos.y;
		} else if (this.spos == 'w' || this.spos == 'c' || this.spos == 'e' || this.spos == 'p_w' || this.spos == 'p_c' || this.spos == 'p_e') {
			y = srcPos.y + (srcDims.h / 2);
		} else if (this.spos == 'sw' || this.spos == 's' || this.spos == 'se' || this.spos == 'p_sw' || this.spos == 'p_s' || this.spos == 'p_se') {
			y = srcPos.y + srcDims.h;
		} else if (this.spos == 'cursor') {
			y = mCords.y;
		} else {
			y = 0;
		}

		relPopPos = this.getRelativePopupPosition(x, y, srcDims, pDims, this.ppos);
		xPos = relPopPos.x;
		yPos = relPopPos.y;
		if (xPos + pWidth > vpDims.w + vpPos.x) {
			xPos = vpDims.w + vpPos.x - (pWidth + buffer);
		}
		if (yPos + pHeight > vpDims.h + vpPos.y) {
			yPos = vpDims.h + vpPos.y - (pHeight + buffer);
		}
		if (xPos <= vpPos.x) {
			xPos = vpPos.x + buffer;
		}
		if (yPos <= vpPos.y) {
			yPos = vpPos.y + buffer;
		}
		$(LL_XPopup.popup).animate({'left': xPos, 'top': yPos}, 'fast', 'swing', function () {
				self.handlePopupPositionMode();
		});
	};

	DefaultXPopup.prototype.setPopupWidth = function () {
		$('#xpopup, #xpopupContent').css({'width': null});
	};

	DefaultXPopup.prototype.isIE = function () {
		if (window.clientInformation) {
			if (window.clientInformation.appName == 'Microsoft Internet Explorer') {
				return true;
			}
		}
		return false;
	};

	DefaultXPopup.prototype.isFixedPosition = function () {
		var fp = this.getAttr('fixedPosition');
		if (fp) {
			if (typeof fp === 'string' || typeof fp === 'number') {
				if (fp || fp == 1) {
					return true;
				}
			} else {
				return fp;
			}
		}
		return false;
	};

	DefaultXPopup.prototype.handlePopupPositionMode = function (e) {
		if (! this.isIE()) {
			if (this.isFixedPosition()) {
				return $(LL_XPopup.popup).attr('class', 'xpopup_fixed');
			}
		}
		return $(LL_XPopup.popup).attr('class', 'xpopup');
	};

	DefaultXPopup.prototype.getRelativePopupPosition = function (xPos, yPos, srcDims, pDims, ppos) {
		if (!ppos || ppos == 'nw') {
			xPos += this.mw / 1;
			yPos += this.mh / 1;
			return {'x': xPos, 'y': yPos};
		} else if (ppos == 'w') {
			xPos += this.mw / 1;
			return {'x': xPos, 'y': yPos - (pDims.h / 2)};
		} else if (ppos == 'sw') {
			xPos += this.mw / 1;
			yPos -= this.mh / 1;
			return {'x': xPos, 'y': yPos - pDims.h};
		} else if (ppos == 'n') {
			yPos += this.mh / 1;
			return {'x': xPos - (pDims.w / 2), 'y': yPos};
		} else if (ppos == 'c') {
			return {'x': xPos - (pDims.w / 2), 'y': yPos - (pDims.h / 2)};
		} else if (ppos == 's') {
			yPos -= this.mh / 1;
			return {'x': xPos - (pDims.w / 2), 'y': yPos - pDims.h};
		} else if (ppos == 'ne') {
			xPos -= this.mw / 1;
			yPos += this.mh / 1;
			return {'x': xPos - pDims.w, 'y': yPos};
		} else if (ppos == 'e') {
			xPos -= this.mw / 1;
			return {'x': xPos - pDims.w, 'y': yPos - (pDims.h / 2)};
		} else if (ppos == 'se') {
			xPos -= this.mw / 1;
			yPos -= this.mh / 1;
			return {'x': xPos - pDims.w, 'y': yPos - pDims.h};
		}
	};

	DefaultXPopup.prototype.handleSrcAndPopupConnect = function () {
		if (this.event != 'click' && this.spos != this.ppos) {
			$(this.src).bind('mouseleave', function (e) {LL_XPopup.destruct(e); });
		} else if (this.event != 'click' && this.spos == this.ppos) {
			$(LL_XPopup.popup).bind('mouseleave', function (e) {LL_XPopup.destruct(e); });
		}
	};

	DefaultXPopup.prototype.makeAddOns = function (e) {
		$('#xpopupAddOns').empty();
	};

	DefaultXPopup.prototype.makeBackground = function (r,g,b, opacity) {
		var red, green, blue, op = opacity || 0.9;
		rv = r ? r : 0;
		gv = g ? g : 0;
		bv = b ? b : 0;
		var bg = $('<div> </div>').attr(
			'id', 'xpopup_background'
		).css(
			{
				'display': 'none',
				'position': 'absolute',
				'z-index': 500000,
				'left': 0,
				'top': 0,
				'background-color': 'rgb(' + rv + ',' + gv + ',' + bv + ')',
				'width': $(document).width(),
				'height': $(document).height()
			}
		);
		if ($('#xpopup_background').size() === 0) {
			bg.click(function (e) {LL_XPopup.destruct(e); });
			$('body').append(bg);
			bg.css({'display': 'block', 'opacity': 0}).fadeTo('fast', op);
		}
	};

	DefaultXPopup.prototype.hideBodyScrollbars = function () {
		$('body').css({'overflow': 'hidden'});
	};

	DefaultXPopup.prototype.show = function (e) {
		var mousePos = {'x': 0, 'y': 0};
		if (e) {
			e.preventDefault();
			mousePos = {'x': e.pageX, 'y': e.pageY};
		}
		var aos = $('#xpopupAddOns');
		aos.hide();
		src = this.src;
		if (this.Attrs && !this.Attrs.preventOverflowHidden) {
			this.hideBodyScrollbars();
		}
		this.pushContentIntoPopup();
		this.handleSrcAndPopupConnect();
		this.makeAddOns();
		aos.show();
		var self = this;
		setTimeout(
			function () {
				var pupData = $(LL_XPopup.popup).find('#xpopupContent').data('xpopupContent');
				self.setPopupPosition(src, mousePos);
				$(LL_XPopup.popup).fadeIn();
				if (Utils.isObject(pupData) && Utils.isFunction(pupData.callback)) {
					pupData.callback.call(pupData, 'show');
				}
			},
			1
		);
	};

	// Image xpopup
	ImageXPopup = function (src, event, spos, ppos, margin_w, margin_h, TypeAttrs, callback) {
		/* TypeAttrs: url, href, jsFunc, height, width, background
		 * url: Source of the image to display.
		 * group: An identifier for group related images.
		 * href: Link reference for the image.
		 * jsFunc: Mochikit bind or partial functions.
		 * height: Popup height.
		 * width: Popup width.
		 * background: The popup stay on a dark background
		 * fixedPosition: The popup is position fixed and has no response on scroll events.
		 */
		this.constructor(src, event, spos, ppos, margin_w, margin_h, TypeAttrs, callback);
		this.image = this.makeImage(this.getAttr('url'), {'border': 0, 'alt': '', 'title': ''});
		this.appearingHud = null;
		this.activeHud = false;
	};
	ImageXPopup.prototype = new DefaultXPopup();

	ImageXPopup.prototype.setPopupWidth = function (w) {
		var p = $('#xpopup');
		var pc = $('#xpopupContent');
		var imgWidth = w.substring(0, w.length - 2) / 1;
		var pl = pc.css('padding-left');
		pl = pl.substring(0, pl.length - 2) / 1;
		var pr = pc.css('padding-right');
		pr = pr.substring(0, pr.length - 2) / 1;
		p.css({'width': (imgWidth + pl + pr) + 'px'});
	};

	ImageXPopup.prototype.getSrcImage = function () {
		nodes = $('img', this.src);
		if (nodes.size() > 0) {
			return nodes.get(0);
		}
		return null;
	};

	ImageXPopup.prototype.getSrcImageTitle = function () {
		var elm = this.getSrcImage();
		if (elm && elm.title && elm.title !== '') {
			return elm.title;
		}
		return null;
	};

	ImageXPopup.prototype.prepareGalleryByGroup = function () {
		LL_XPopup.preparedGallery = [];
		LL_XPopup.currentGalleryIdx = -1;
		LL_XPopup.galleryOverall = -1;
		var grp = this.getAttr('group');
		if (grp) {
			var xpopups = LL_XPopup.xpopups;
			var idx = -1;
			for (var i = 0; i < xpopups.length; ++i) {
				var xp = xpopups[i];
				if (xp instanceof ImageXPopup) {
					if (xp.getAttr('group') == grp) {
						idx++;
						if (xp === this) {
							LL_XPopup.currentGalleryIdx = idx;
						}
						LL_XPopup.preparedGallery.push(xp);
					}
				}
			}
			if(LL_XPopup.preparedGallery.length > 0) {
				LL_XPopup.galleryOverall = LL_XPopup.preparedGallery.length;
			}
		}
	};

	ImageXPopup.prototype.makeImage = function (src, attrs) {
		var img = new Image();
		img.src = src;
		for (var k in attrs) {
			if (k == 'class') {
				img.className = attrs[k];
			} else {
				img[k] = attrs[k];
			}
		}
		return img;
	};

	ImageXPopup.prototype.resizeImgOnOverflow = function (img, maxHeight, maxWidth) {
		var h = img.height;
		var w = img.width;
		var ah = maxHeight;
		var aw = maxWidth;
		if (ah && aw) {
			if (h > ah) {
				w = Math.floor(w * ah / h);
				h = ah;
			}
			if (w > aw) {
				h = Math.floor(h * aw / w);
				w = aw;
			}
			img.height = h;
			img.width = w;
		}
		return img;
	};

	ImageXPopup.prototype.makeImageTitleIfAny = function () {
		var t = this.getSrcImageTitle();
		if (t) {
			return $('<div>').append(
				$('<span>' + t + '</span>')
			).attr(
				{'id': 'xpopupImgTitle', 'class': 'xpopupImgTitle'}
			).get(0);
		}
		return null;
	};

	ImageXPopup.prototype.activateHud = function (e) {
		if (! this.appearingHud && ! this.activeHud) {
			this.appearingHud = 1;
			this.activeHud = true;
			var self = this;
			$('#xpopupHoverMenuOuter').fadeIn('fast');
			self.appearingHud = null;
		}
		this.activeHud = true;
	};

	ImageXPopup.prototype.deactivateHud = function (e) {
		if (this.activeHud) {
			$('#xpopupHoverMenuOuter').hide();
		}
		this.activeHud = false;
	};

	ImageXPopup.prototype.makeHudAndPrepareGallery = function () {
		var self = this;
		$(LL_XPopup.popup).unbind('mousemove.special');
		$(LL_XPopup.popup).bind('mousemove.special', function (e) {
			e.preventDefault();
			e.stopPropagation();
			self.activateHud(e);
		});
		$('#xpopup_background').bind('mouseover.special', function (e) {
			e.preventDefault();
			e.stopPropagation();
			self.deactivateHud(e);
		});
		this.prepareGalleryByGroup();
		var hm = $('<div>').append(
			$('<div>').append(
				$('<div>').append(
					this.getPlayPauseButton(),
					this.getPreviousButton(),
					this.getNextButton(),
					this.getThumbsButton(),
					this.getCloseButton()
				).attr(
					{'id': 'xpopupHoverMenu'}
				)
			).attr(
				{'id': 'xpopupHoverMenuPos'}
			)
		).attr(
			{'id': 'xpopupHoverMenuOuter'}
		).get(0);
		return hm;
	};

	ImageXPopup.prototype.buttonsStateController = function () {
		var buttons = [
			'xpopupHoverMenuPlayPauseButton',
			'xpopupHoverMenuPreviousButton',
			'xpopupHoverMenuNextButton',
			'xpopupHoverMenuThumbsButton',
			'xpopupHoverMenuCloseButton'
		];

		if (LL_XPopup.galleryOverall > 1) {
			this.updateButton(buttons[0], 'act');
			if (LL_XPopup.slideshowBusy) {
				this.updateButton(buttons[0], 'act', 'pauseButton');
			}
			this.updateButton(buttons[3], 'act'); // Thumb not connected now.
		} else {
			this.updateButton(buttons[0], 'pass');
			this.updateButton(buttons[3], 'pass');
		}

		if (LL_XPopup.galleryOverall > 1 && LL_XPopup.currentGalleryIdx > 0) {
			this.updateButton(buttons[1], 'act');
		} else {
			this.updateButton(buttons[1], 'pass');
		}

		if (LL_XPopup.galleryOverall > 1 && LL_XPopup.currentGalleryIdx < LL_XPopup.preparedGallery.length - 1) {
			this.updateButton(buttons[2], 'act');
		} else {
			this.updateButton(buttons[2], 'pass');
		}
		this.updateButton(buttons[4], 'act');
	};

	ImageXPopup.prototype.getPlayPauseButton = function () {
		var self = this;
		return $('<div>').attr(
			{'class': 'playButton_pass', 'id': 'xpopupHoverMenuPlayPauseButton'}
		).click(
			function (e) {
				self.handleSlideshow(e);
				self.activeHud = false;
			}
		).get(0);
	};

	ImageXPopup.prototype.getPreviousButton = function () {
		var self = this;
		return $('<div>').attr(
			{'class': 'previousButton_pass', 'id': 'xpopupHoverMenuPreviousButton'}
		).click(
			function (e) {
				self.changeImage(-1, 'pager', e);
				self.activeHud = false;
			}
		).get(0);
	};

	ImageXPopup.prototype.getNextButton = function () {
		var self = this;
		return $('<div>').attr(
			{'class': 'nextButton_pass', 'id': 'xpopupHoverMenuNextButton'}
		).click(
			function (e) {
				self.changeImage(1, 'pager', e);
				self.activeHud = false;
			}
		).get(0);
	};

	ImageXPopup.prototype.getThumbsButton = function () {
		var self = this;
		return $('<div>').attr(
			{'class': 'thumbsButton_pass', 'id': 'xpopupHoverMenuThumbsButton'}
		).click(
			function (e) {
				self.handleGalleryOverview(e);
				self.activeHud = false;
			}
		).get(0);
	};

	ImageXPopup.prototype.getCloseButton = function () {
		var self = this, lay = $('<div>').attr(
			{'class': 'closeButton_pass', 'id': 'xpopupHoverMenuCloseButton'}
		).click(
			function (e) {
				if (Utils.isFunction(self.callback)) {
					self.callback.call(self, 'close');
				}
				LL_XPopup.destruct(e);
				self.activeHud = false;
			}
		).get(0);
		return lay;
	};

	ImageXPopup.prototype.updateButton = function (id, state, cnPrefix) {
		var button = $('#' + id);
		if (arguments.length < 3) {
			var cn = button.attr('class');
			cnPrefix = cn.substring(0, cn.lastIndexOf('_'));
		}
		button.attr({'class': cnPrefix + '_' + state});
	};

	ImageXPopup.prototype.isButtonActive = function (e, className) {
		var cn = e.target.className;
		if (className) {
			cn = className;
		}
		var state = cn.substring(cn.lastIndexOf('_') + 1, cn.length).toLowerCase();
		if (state == 'act') {
			return true;
		}
		return false;
	};

	ImageXPopup.prototype.makeAddOns = function (e) {
		var aos = $('#xpopupAddOns');
		aos.empty();
		aos.append(this.makeHudAndPrepareGallery());
		$('#xpopupHoverMenu').css({'left': (this.image.width / 2 - 132) + 'px'});
		var title = this.makeImageTitleIfAny();
		aos.append(title);
		this.buttonsStateController();
	};

	ImageXPopup.prototype.changeImage = function (idx, modeStr, e) {
		var xpopup, self = this;
		if (LL_XPopup.slideshowBusy > 0) {
			if (e && this.isButtonActive(e) && modeStr == 'pager') {
				idx = LL_XPopup.currentGalleryIdx += idx;
				xpopup = LL_XPopup.preparedGallery[idx];
				xpopup.show();
			} else if (modeStr == 'slideshow') {
				idx = LL_XPopup.currentGalleryIdx += idx;
				if (idx == LL_XPopup.preparedGallery.length) {
					idx = LL_XPopup.currentGalleryIdx = 0;
				}
				xpopup = LL_XPopup.preparedGallery[idx];
				$('#xpopup').fadeOut(
					'fast',
					function () {
						xpopup.pushContentIntoPopup();
						xpopup.makeAddOns();
						setTimeout(
							function () {
								var mousePos = {'x': 0, 'y': 0};
								xpopup.setPopupPosition(xpopup.src, mousePos);
								$('#xpopup').fadeIn();
							},
							500
						);
					}
				);
			}
			if (LL_XPopup.slideshowInterval) {
				clearTimeout(LL_XPopup.slideshowInterval);
			}
			LL_XPopup.slideshowInterval = setTimeout(function () {self.changeImage(1, 'slideshow'); }, 7000);
		} else {
			if (e && this.isButtonActive(e) && modeStr == 'pager') {
				idx = LL_XPopup.currentGalleryIdx += idx;
				xpopup = LL_XPopup.preparedGallery[idx];
				xpopup.show();
			} else if (modeStr == 'gallery') {
				idx = LL_XPopup.currentGalleryIdx = idx;
				xpopup = LL_XPopup.preparedGallery[idx];
				xpopup.show();
			}
		}
	};

	ImageXPopup.prototype.getContent = function () {
		var img = null;
		var href, jsFunc;
		if (this.Attrs) {
			var Attrs = this.Attrs;
			img = this.resizeImgOnOverflow(this.image, this.getAttr('height'), this.getAttr('width'));
			height = Attrs.height ? Attrs.height + 'px' : img.height + 'px';
			width = Attrs.width ? Attrs.width + 'px' : img.width + 'px';
			if (Attrs.href && ! Attrs.jsFunc) {
				href = Attrs.href;
				img = $('<a>').append(img).attr({'href': Attrs.href}, img);
			}
			if (Attrs.jsFunc) {
				$(img).css({'cursor': 'pointer'}).click(Attrs.jsFunc);
			}
			if (this.Attrs.background) {
				if (
					this.Attrs.background ||
					this.Attrs.background == 1 ||
					Utils.isObject(this.Attrs.background)
				) {
					if (Utils.isObject(this.Attrs.background)) {
						this.makeBackground(
							this.Attrs.background.r,
							this.Attrs.background.g,
							this.Attrs.background.b,
							this.Attrs.background.opacity
						);
					} else {
						this.makeBackground();
					}
				}
			}
		}
		this.setPopupWidth(width);
		return $('<div>').append(img).css({'height': height, 'width': width, 'overflow': 'auto', 'text-align': 'center'});
	};

	ImageXPopup.prototype.changeSlideshowPopupCSS = function () {
		var xPopupClass, xPopupTitleClass;
		if (LL_XPopup.slideshowBusy) {
			xPopupClass = 'xpopup_slideshow';
			xPopupTitleClass = 'xpopupImgTitle_slideshow';
			if (! this.isIE() && this.isFixedPosition()) {
				xPopupClass = 'xpopup_slideshow_fixed';
			}
		} else {
			xPopupClass = 'xpopup';
			xPopupTitleClass = 'xpopupImgTitle';
			if (! this.isIE() && this.isFixedPosition()) {
				xPopupClass = 'xpopup_fixed';
			}
		}
		$('#xpopup').attr({'class': xPopupClass});
		if ($('#xpopupImgTitle').size() > 0) {
			$('#xpopupImgTitle').attr({'class': xPopupTitleClass});
		}
	};

	ImageXPopup.prototype.handleSlideshow = function (e) {
		var buttonClass, self = this;
		if (this.isButtonActive(e)) {
			if (LL_XPopup.slideshowBusy) {
				buttonClass = 'playButton';
				LL_XPopup.slideshowBusy = 0;
				clearTimeout(LL_XPopup.slideshowInterval);
			} else {
				buttonClass = 'pauseButton';
				LL_XPopup.slideshowBusy = 1;
				LL_XPopup.slideshowInterval = setTimeout(function () {self.changeImage(1, 'slideshow'); }, 7000);
			}
			this.updateButton('xpopupHoverMenuPlayPauseButton', 'act', buttonClass);
		}
	};

	ImageXPopup.prototype.handleGalleryImgClick = function (idx, e) {
		e.preventDefault();
		e.stopPropagation();
		var self = this;
		$('#xpopupGalleryOverview').fadeOut('fast', function () {$('#xpopupGalleryOverview').remove(); });
		this.changeImage(idx, 'gallery');
	};

	ImageXPopup.prototype.handleGalleryOverview = function (e) {
		if (LL_XPopup.slideshowBusy) {
			this.handleSlideshow({'target': $('#xpopupHoverMenuPlayPauseButton').get(0)});
		}
		$('#xpopup').hide();
		var images = this.getOverviewImagesWithDeco();
		var vpDims = {'w': $(window).width(), 'h': $(window).height()};
		var vpPos = {'x': $(document).scrollLeft(), 'y': $(document).scrollTop()};
		var px = null;
		var py = null;
		var h = vpDims.h;
		var w = vpDims.w;
		var position = 'fixed';
		if (this.isIE()) {
			px = vpPos.x;
			py = vpPos.y;
			position = 'absolute';
		}
		var container = $('<div>').attr(
			{'id': 'xpopupGalleryOverview', 'class': 'xpopupGalleryOverview'}
		).css(
		{'height': '100%', 'width': '100%', 'position': position, 'left': px, 'top': py}
		).click(
			function (e) {LL_XPopup.destruct(e); }
		);
		for (var i = 0; i < images.length; ++i) {
			container.append(images[i]);
		}
		$('body').append(container);
		$('#xpopupGalleryOverview').fadeIn('fast');
	};

	ImageXPopup.prototype.getOverviewImagesWithDeco = function () {
		var pg = LL_XPopup.preparedGallery, images = [], mw = 135, mh = 90,
		x = function (self, idx) {
			var srcImg = pg[idx].getSrcImage();
			var paddingTop = '0';
			if (srcImg.height < mh) {
				paddingTop = parseInt((mh - srcImg.height) / 2, 10) + 'px';
			}
			var img = self.makeImage(srcImg.src, {'width': srcImg.width, 'height': srcImg.height, 'border': 0, 'alt': srcImg.alt, 'title': srcImg.title});
			img = self.resizeImgOnOverflow(img, mh, mw);
			var imgWrapped = $('<span></span>').append(img).css({'padding-top': paddingTop});
			images.push(
				$('<div>').append(
					$('<a></a>').append(
						$('<span></span>').append(imgWrapped).attr({'class': 'image'})
					).attr({'class': 'inner1', 'href': '#'})
				).attr({'class': 'xpopupGalleryImageDeco'}).click(
					function (e) {self.handleGalleryImgClick(idx, e); }
				).get(0)
			);
			return images;
		};
		for (var i = 0; i < pg.length; ++i) {
			images = x(this, i);
		}
		return images;
	};


	// Webpage xpopup
	WebpageXPopup = function (src, event, spos, ppos, margin_w, margin_h, TypeAttrs, callback) {
		/* TypeAttrs: url, href, jsFunc, height, width, background
		 * url: Source of the image to display.
		 * height: Popup height.
		 * width: Popup width.
		 * background: The xpopup stay on a dark background
		 * fixedPosition: The popup is position fixed and has no response on scroll events.
		 */
		this.constructor(src, event, spos, ppos, margin_w, margin_h, TypeAttrs, callback);
	};
	WebpageXPopup.prototype = new DefaultXPopup();

	WebpageXPopup.prototype.getContent = function () {
		this.setPopupWidth();
		var height = parseInt($(window).height() / 1.5, 10);
		var width = parseInt($(window).width() / 1.5, 10);
		var url = 'http://www.example.com';
		if (this.Attrs) {
			height = this.Attrs.height == 'auto' ? height : this.Attrs.height;
			width = this.Attrs.width == 'auto' ? width : this.Attrs.width;
			url = this.Attrs.url ? this.Attrs.url : url;
			if (this.Attrs.background) {
				if (
					this.Attrs.background == 'true' ||
					this.Attrs.background == 1 ||
					Utils.isObject(this.Attrs.background)
				) {
					if (Utils.isObject(this.Attrs.background)) {
						this.makeBackground(
							this.Attrs.background.r,
							this.Attrs.background.g,
							this.Attrs.background.b,
							this.Attrs.background.opacity
						);
					} else {
						this.makeBackground();
					}
				}
			}
		}
		return $('<iframe>').attr({'src': url, 'frameborder': 0, 'height': height, 'width': width}).get(0);
	};

	// Ajax xpopup
	AjaxXPopup = function (src, event, spos, ppos, margin_w, margin_h, TypeAttrs, callback) {
		/* TypeAttrs: url, href, jsFunc, height, width, background
		 * url: Source of the image to display.
		 * height: Popup height.
		 * width: Popup width.
		 * background: The popup stay on a dark background
		 * fixedPosition: The popup is position fixed and has no response on scroll events.
		 */
		this.constructor(src, event, spos, ppos, margin_w, margin_h, TypeAttrs, callback);
		this.def = null;
	};
	AjaxXPopup.prototype = new DefaultXPopup();

	AjaxXPopup.prototype.getContent = function () {
		this.setPopupWidth();
		var height = parseInt($(window).height() / 3, 10),
		width = parseInt($(window).width() / 2, 10),
		url = '/', container;
		if (this.Attrs) {
			height = this.Attrs.height == 'auto' ? height : this.Attrs.height + 'px';
			width = this.Attrs.width == 'auto' ? width : this.Attrs.width + 'px';
			url = this.Attrs.url ? this.Attrs.url : url;
			if (this.Attrs.background) {
				if (
					this.Attrs.background == 'true' ||
					this.Attrs.background == 1 ||
					Utils.isObject(this.Attrs.background)
				) {
					if (Utils.isObject(this.Attrs.background)) {
						this.makeBackground(
							this.Attrs.background.r,
							this.Attrs.background.g,
							this.Attrs.background.b,
							this.Attrs.background.opacity
						);
					} else {
						this.makeBackground();
					}
				}
			}
		}
		if (Utils.isObject(url) && url.type === 'xpopupJsonContainer') {
			var text = url.data[url.useProperty];
			container = $('<div>').css({ 'height': height, 'width': width, 'overflow': 'auto'}).html(text);
		} else {
			container = $('<div>').css({ 'height': height, 'width': width, 'overflow': 'auto'}).load(url);
		}
		return container.get(0);
	};

	AjaxXPopup.prototype.loadContent = function (container, def) {
		var pupData = $(LL_XPopup.popup).find('#xpopupContent').data('xpopupContent');
		if (Utils.isObject(pupData) && Utils.isFunction(pupData.callback)) {
			pupData.callback.call(pupData, 'load');
		}
		container.innerHTML = def.responseText;
	};

	AjaxXPopup.prototype.loadContentError = function (def) {
		var pupData = $(LL_XPopup.popup).find('#xpopupContent').data('xpopupContent');
		if (Utils.isObject(pupData) && Utils.isFunction(pupData.callback)) {
			pupData.callback.call(pupData, 'loadError');
		}
		/* LOGGING >> */
		if (window.console) {
			console.log('Fehler beim Abruf von AJAX content:', def.message);
		}
		/* << LOGGING */
	};

	// simple HTML source xpopup
	HtmlSrcXPopup = function (src, event, spos, ppos, margin_w, margin_h, TypeAttrs, callback) {
		/* TypeAttrs: url, href, jsFunc, height, width, background
		 * url: Source of the image to display.
		 * height: Popup height.
		 * width: Popup width.
		 * background: The popup stay on a dark background
		 * fixedPosition: The popup is position fixed and has no response on scroll events.
		 */
		this.constructor(src, event, spos, ppos, margin_w, margin_h, TypeAttrs, callback);
		this.def = null;
	};
	HtmlSrcXPopup.prototype = new DefaultXPopup();

	HtmlSrcXPopup.prototype.getContent = function () {
		this.setPopupWidth();
		var height = parseInt($(window).height() / 3, 10);
		var width = parseInt($(window).width() / 2, 10);
		var cont = '<div></div>';
		if (this.Attrs) {
			height = this.Attrs.height == 'auto' ? height : this.Attrs.height + 'px';
			width = this.Attrs.width == 'auto' ? width : this.Attrs.width + 'px';
			cont = this.Attrs.cont ? this.Attrs.cont : cont;
			if (this.Attrs.background) {
				if (
					this.Attrs.background == 'true' ||
					this.Attrs.background == 1 ||
					Utils.isObject(this.Attrs.background)
				) {
					if (Utils.isObject(this.Attrs.background)) {
						this.makeBackground(
							this.Attrs.background.r,
							this.Attrs.background.g,
							this.Attrs.background.b,
							this.Attrs.background.opacity
						);
					} else {
						this.makeBackground();
					}
				}
			}
		}
		var container = $('<div>').css({ 'height': height, 'width': width, 'overflow': 'auto'}).append(cont);
		return container.get(0);
	};
/* << */


/* >> tabbed elements (requires jQuery 1.2.6) Version: rel-1-0-0 */
	TabbedElements = {
		tabGroups: [],
		tabsCont: null,
		tabsOuter: null,
		register: function (tabEl, activeId) {
			this.tabsCont = $('#' + tabEl).get(0);
			var tOut = this.tabsOuter = this.tabsCont.parentNode;
			tOutChilds = this._getTabContainerChildNodes('div', tOut);
			var titlesOuter = this._getTabContainerElementsTitleShells(tOutChilds);
			var grp = {'id': tabEl, 'tabs': [], 'elements': [], 'hereId': -1};
			for (var i = 1; i < tOutChilds.length - 1; ++i) {
				grp.tabs.push(this._getTab(this._getTabTitleAndDeleteShell(titlesOuter[i - 1]), this.tabGroups.length, i - 1));
				grp.elements.push(tOutChilds[i]);
			}
			this.tabGroups.push(grp);
			var actGrpId = this.tabGroups.length - 1;
			this._fillTabsElement(actGrpId);
			this._prepareParagraphShells(actGrpId);
			this.show(actGrpId, activeId);
		},
		_getTabGroupId: function (id) {
			if (! isNaN(id)) {
				return id;
			} else {
				for (var i = 0; i < this.tabGroups.length; ++i) {
					var strId = this.tabGroups[i].id.substring(this.tabGroups[i].id.indexOf('_') + 1, this.tabGroups[i].id.length).toLowerCase();
					if (strId == id.toLowerCase()) {
						return i;
					}
				}
			}
			return false;
		},
		_getTabTitleAndDeleteShell: function (titleEl) {
			t = titleEl.getElementsByTagName('h3')[0];
			$(titleEl).remove();
			return t.innerHTML;
		},
		_getTabContainerChildNodes: function (elmName, parent) {
			var nList = [];
			for (var i = 0; i < parent.childNodes.length; ++i) {
				var n = parent.childNodes[i];
				if (n.nodeType == 1 && n.nodeName.toLowerCase == elmName.toLowerCase) {
					nList.push(n);
				}
			}
			return nList;
		},
		_getFirstMatchChildNode: function (node, tag, nodeType) {
			if (! nodeType) {
				nodeType = 1;
			}
			for (var i = 0; i < node.childNodes.length; ++i) {
				if (node.childNodes[i].nodeType == nodeType) {
					if (tag && node.childNodes[i].nodeName.toLowerCase == tag.toLowerCase) {
						return node.childNodes[i];
					}
					if (! tag) {
						return node.childNodes[i];
					}
				}
			}
			return false;
		},
		_getTabContainerElementsTitleShells: function (contentElms) {
			var tList = [];
			var prevNode;
			for (var i = 1; i < contentElms.length - 1; ++i) {
				var node = contentElms[i];
				while (this._getFirstMatchChildNode(node, 'div', 1)) {
					prevNode = node;
					node = this._getFirstMatchChildNode(node, 'div', 1);
				}
				tList.push(prevNode);
			}
			return tList;
		},
		_getTab: function (title, grpId, tabId) {
			var id = 'tab_' + grpId + '_' + tabId;
			var tab = $(
				'<div id="' + id + '" class="tab_passive">' +
					'<div class="inner1">' +
						'<div class="inner2">' +
							'<span>' + title + '</span>' +
						'</div>' +
					'</div>' +
				'</div>'
			).get(0);
			var self = this;
			$(tab.childNodes[0].childNodes[0].childNodes[0]).bind('click', function (e) {self.show(grpId, tabId, e); });
			return tab;
		},
		_fillTabsElement: function (grpId) {
			var tabs = this.tabGroups[grpId].tabs;
			var outer = $('<div class="outer1"></div>');
			for (var i = 0; i < tabs.length; ++i) {
				outer.append($(tabs[i]));
			}

			outer.append($('<div></div>').css({'clear': 'both', 'min-height': '1px', 'margin-bottom': '-1px'}));
			$(this.tabsCont).css({'display': 'block'});
			$(this.tabsCont).append(outer);
		},
		_prepareParagraphShells: function (grpId) {
			var paras = this.tabGroups[grpId].elements;
			for (var i = 0; i < paras.length; ++i) {
				var id = 'tabContent_' + grpId + '_' + i;
				$(paras[i]).css({'display': 'none'});
			}

		},
		show: function (grpId, tabId, e) {
			grpId = this._getTabGroupId(grpId);
			tabId = isNaN(parseInt(tabId, 10)) ? 0 : tabId;
			if (tabId > this.tabGroups[grpId].tabs.length - 1 || tabId < 0) {
				tabId = 0;
			}
			var tabs = this.tabGroups[grpId].tabs;
			var elements = this.tabGroups[grpId].elements;
			var hereId = this.tabGroups[grpId].hereId;
			if (hereId > -1) {
				$(tabs[hereId]).attr('class', 'tab_passive');
				$(elements[hereId]).css({'display': 'none'});
			}
			$(tabs[tabId]).attr('class', 'tab_active');
			$(elements[tabId]).css({'display': 'block'});
			this.tabGroups[grpId].hereId = tabId;
		}
	};
/* << */


/* >> Calendar control (requires jQuery 1.2.6+ and scrollTo plugin). Version: rel-1-0-0 */
	// The script supports horizontal and vertical scrolling in the future!
	function CalendarControl(mode) {
		this.months = [];
		this.scrollToDef = null;
		this.mode = this.getMode(mode); // horizontal or vertical
		this.currScrollPos = 0;
		this.scrollPane = $('#calendarHorizontalScrollPane');
		this.mBoxName = 'calendarMonthContainer_'; // month container id snippet
		this.ctrlBoxName = '#horizontalScrollControls'; // holds the calendar controlls (left and right arrow)
		// @controls:
		// 'key': [element, event, binding, attributes, connection id]
		this.controlsHorz = {
			'l': [$('#scrollLeft'), 'click', 'scroll', -1],
			'r': [$('#scrollRight'), 'click', 'scroll', 1]
		};
		this.scrollStep = 2; // how many months to scroll with one click
	}

	CalendarControl.prototype.init = function (args) {
		this.handleLayout();
		this.detectMonths();
		if (args.current > 0) {
			if (args.current % this.scrollStep > 0) {
				this.currScrollPos = Math.floor(args.current / this.scrollStep) * this.scrollStep;
			} else {
				this.currScrollPos = args.current - this.scrollStep;
			}
			var mode = this.mode > 1 ? 'y': 'x';
			this.scrollPane.scrollTo(this.months[this.currScrollPos].monthElement, 600, {'axis': mode, 'offset': {'left': -35, 'top': 0}});
		}
		this.handleControls();
	};

	CalendarControl.prototype.handleControls = function () {
		var c = this.controlsHorz, self = this,
		status = {
			'l': this.currScrollPos > 0 ? 1 : null,
			'r': this.currScrollPos + this.scrollStep < this.months.length ? 1 : null
		},
		x = function (self, ctrl) {
			ctrl[0].bind(ctrl[1], function (e) {
				e.preventDefault();
				self[ctrl[2]](ctrl[3]);
			});
		};
		for (var i in c) {
			var ctrl = c[i];
			ctrl[0].unbind().removeClass('act').addClass('pass');
			if (status[i]) {
				x(self, ctrl);
				ctrl[0].removeClass('pass').addClass('act');
			}
		}
	};

	CalendarControl.prototype.handleLayout = function () {
		$(this.ctrlBoxName).show();
		this.scrollPane.css({'overflow': 'hidden'});
	};

	CalendarControl.prototype.detectMonths = function () {
		for (var count = 0;;) {
			var month = $('#' + this.mBoxName + count++);
			if (month.size() === 0) {
				break;
			}
			this.months.push(new CalendarMonth(month));
		}
	};

	CalendarControl.prototype.scroll = function (direction) {
		var nextPos = this.currScrollPos + direction * this.scrollStep;
		if (nextPos >= 0 && nextPos <= this.months.length) {
			var mode = this.mode > 1 ? 'y': 'x';
			this.scrollPane.scrollTo(this.months[nextPos].monthElement, 600, {'axis': mode, 'offset': {'left': -35, 'top': 0}});
			this.currScrollPos = nextPos;
		}
		this.handleControls();
	};

	CalendarControl.prototype.getMonthDims = function () {
		return {'w': this.months[0].monthElement.width(), 'h': this.months[0].monthElement.height()};
	};

	CalendarControl.prototype.getMode = function (mode) {
		mode = (String(mode)).toLowerCase;
		if (mode == 'h') {
			return 1;
		} else if (mode == 'v') {
			return 2;
		}
		return 1;
	};


	function CalendarMonth(monthElement) {
		this.monthElement = monthElement;
		this.name = this.getName();
		this.here = null;
	}

	CalendarMonth.prototype.getName = function () {
		return null;
	};
/* << */


/* >> LL_ImageWidthTest (requires jQuery) Version: rel-1-0-0 */
	LL_ImageWidthTest = {
		images:  null, //Bildbereiche Absatz
		teaserImages: null, //Bildbereiche Teaser
		contentTableWidth: null, //Breiten der Bereiche fuer abschliessenden Test
		contentWidth: null, //Breiten der Bereiche content-Spalte fuer Panels
		twoColWidth: null, //Breiten der Bereiche zweispaltiger Bereich
		multiColWidth: null, //Breiten der Bereiche mehrspaltiger Bereich
		leftColWidth: null, //Breiten der Bereiche Teaser links
		rightColWidth: null, //Breiten der Bereiche Teaser rechts
		fixTextWidth: 110, //Breiten für Texte bei "links/rechts feste Breite" Absätze
		fixTeaserTextWidth: 80, //Breiten für Texte bei "links/rechts feste Breite" Teaser
		summary: [
			['Teaser links', 'teaserL'],
			['Teaser rechts', 'teaserR'],
			['Absätze einzeln', 'paras'],
			['Absätze 2spaltig', 'paras2C'],
			['Absätze 3spaltig', 'paras3C']
		],
		init: function () {
			$('img.imgWidthPx').css('background-color', 'blue');
			this.images = $('div.paraImgInner img');
			this.teaserImages = $('div.teaserImgInner img');
			this.contentTableWidth = $('table.contentMainTable').width();
			this.contentWidth = $('div.contSpcShellStd').width();
			this.twoColWidth = $('table.twoColElShell').width();
			this.multiColWidth = $('div.multipleColumnShellOuter').width();
			this.leftColWidth = $('td.leftBorderCol div.lElCont').width();
			this.rightColWidth = $('td.rightBorderCol div.rElCont').width();
			this.newImageWidth();
		},
		getSummary: function () {
			$('div.contSpcShellStd').prepend('<div id="testSummary"></div>');
			$('#testSummary').append(
				'<div style="margin-bottom: 5px;">(Mindestbreite für Texte bei &quot;link/rechts fest&quot;: ' +
					'<span>Teaser:&nbsp;</span><span>' + this.fixTeaserTextWidth + 'px, &nbsp;</span>' +
					'<span>Text:&nbsp;</span><span>' + this.fixTextWidth + 'px</span>' +
				')</div>' +
				'<h2>Ermittelte max. Breiten:</h2>'
			);
			for (var i = 0; i < this.summary.length; ++i) {
				$('#testSummary').append(
					'<div id="' + this.summary[i][1] + '"><h3>' + this.summary[i][0] + '</h3></div>'
				);
			}
		},
		printSize: function (shell, title, imageWidthNew) {
			$('#' + shell).append('<div><span class="title">' + title + ':</span>&nbsp;&nbsp;<span class="width">' + imageWidthNew + 'px</span></div>');
			$('#' + shell).css({'-moz-border-radius': '15px', '-webkit-border-radius': '15px', 'border': '1px solid #666', 'padding': '10px', 'margin-bottom': '10px'});
		},
		filterOffset: function (offset) {
			offset = parseInt(offset, 10);
			if (isNaN(offset)) {
				offset = 0;
			}
			return offset;
		},
		getOffsets: function (image, target, dist) {
			var parent = image.parent();
			var title = "";
			while (parent.parent(target).length === 0) {
				dist = dist +
					this.filterOffset(parent.css("padding-left")) +
					this.filterOffset(parent.css("padding-right")) +
					this.filterOffset(parent.css("margin-left")) +
					this.filterOffset(parent.css("margin-right")) +
					this.filterOffset(parent.css("border-left-width")) +
					this.filterOffset(parent.css("border-right-width"));
				if (parent.parent().prev('h3').size() > 0) {
					title = parent.parent().prev('h3').text();
				}
				else if (parent.parent('div.paraCeTopImgOuter').next('h3').size() > 0) {
					title = parent.parent('div.paraCeTopImgOuter').next('h3').text();
				}
				else if (parent.siblings("div[class$='Title']").find('h3').size() > 0) {
					title = parent.siblings("div[class$='Title']").find('h3').text();
				}
				else if (parent.siblings("div[class^='title']").find('h3').size() > 0) {
					title = parent.siblings("div[class^='title']").find('h3').text();
				}

				parent = parent.parent();
			}
			return [dist, title];
		},
		newImageWidth: function () {
			this.getSummary();
			var self = this;
			this.images.each(function (i) {
				var image = $(this);
				var dist = 0;
				var title = '';
				var imageWidthNew = parseInt(image.attr('width'), 10);
				var result = [];
				var shell = null;

				// paragraphs, panels, desPanels normal
				if ((image.parents('table.twoColElShell').length === 0) && (image.parents('div.multipleColumnShellOuter').length === 0)) {
					result = self.getOffsets(image, 'td.contentColumn', dist);
					dist = result[0];
					title = result[1];
					imageWidthNew = (self.contentWidth - dist);
					shell = self.summary[2][1];
				}
				// paragraphs, panels, desPanels 2spaltig
				else if (image.parents('table.twoColElShell').length > 0) {
					result = self.getOffsets(image, 'table.twoColElShell', dist);
					dist = result[0];
					title = result[1];
					var twoColSpc = parseInt(image.parents('table.twoColElShell').find('td.middleSpc img').css('width'), 10);
					imageWidthNew = (Math.floor((self.twoColWidth / 2)) - twoColSpc - dist);
					shell = self.summary[3][1];
				}
				// paragraphs, panels, desPanels 3spaltig
				else if (image.parents('div.multipleColumnShellOuter').length > 0) {
					result = self.getOffsets(image, 'div.multipleColumnShellOuter', dist);
					dist = result[0];
					title = result[1];
					var multiColSpc = parseInt(image.parents('div.multipleColumnShellOuter').find('td.colSpacer img').css('width'), 10);
					imageWidthNew = (Math.floor((self.multiColWidth / 3)) - (2 * multiColSpc) - dist);
					shell = self.summary[4][1];
				}
				// links/rechts feste Breite
				if (image.parents('div.paraFxImgOuter').length > 0) {
					imageWidthNew = imageWidthNew - self.fixTextWidth;
					image.parents('div.paraFxImgOuter').siblings('div.paraContOuterL').css('margin-left', ("" + imageWidthNew));
					image.parents('div.paraFxImgOuter').siblings('div.paraContOuterR').css('margin-right', ("" + imageWidthNew));
				}
				// umgebendes div vergroessern und neue Bildbreite setzen
				image.parents('div.paraImgInner').css('width', imageWidthNew);
				image.attr('width', imageWidthNew);
				self.printSize(shell, title, imageWidthNew);
			});

			this.teaserImages.each(function (i) {
				var image = $(this);
				var dist = 0;
				var title = '';
				var imageWidthNew = parseInt(image.attr('width'), 10);
				var result = [];
				var shell = null;

				if (image.parents('div.lElCont').length > 0) {
					result = self.getOffsets(image, 'div.lElCont', dist);
					dist = result[0];
					title = result[1];
					imageWidthNew = (self.leftColWidth - dist);
					shell = self.summary[0][1];
				} else {
					result = self.getOffsets(image, 'div.rElCont', dist);
					dist = result[0];
					title = result[1];
					imageWidthNew = (self.rightColWidth - dist);
					shell = self.summary[1][1];
				}
				// links/rechts feste Breite
				if (image.parents('div.teaserFxImgOuter').length > 0) {
					imageWidthNew = imageWidthNew - self.fixTeaserTextWidth;
					image.parents('div.teaserFxImgOuter').siblings('div.teaserContOuterL').css('margin-left', ("" + imageWidthNew));
					image.parents('divteaserFxImgOuter').siblings('div.teaserContOuterR').css('margin-right', ("" + imageWidthNew));
				}
				// umgebendes div vergroessern und neue Bildbreite setzen
				image.parents('div.teaserImgInner').css('width', imageWidthNew);
				image.attr('width', imageWidthNew);
				self.printSize(shell, title, imageWidthNew);
			});

			if ($.browser.safari) {
				$('#testSummary').prepend('<div class="alert">SAFARI: Keine korrekten Werte f&uuml;r zentrierte Bilder!</div>');
				$('#testSummary div.alert').css({'color': 'red', 'font-size': '13px', 'font-weight': 'bold', 'padding-bottom': '10px'});
				$('#testSummary span:contains("center")').css({'color': 'red', 'text-decoration': 'line-through'});
				$('#testSummary span:contains("center")').next('span').css({'color': 'red', 'text-decoration': 'line-through'});
			}

			if ((this.contentTableWidth - $('table.contentMainTable').width()) < 0) {
				alert("" + this.contentTableWidth - $('table.contentMainTable').width() + "px zu breit");
			}
		}
	};
/* << */


/* >> LivingLogic jsPager (requires jQuery 1.2.6 +) */
	JsPager = $.extend(
		$.clone(LLObject),
		{
			create: function (options) {
				var o = LLObject.create.call(this);
				o.items = [];
				o.groupCnt = -1;
				o.pos = 0;
				o.data = null;
				o.countPerLine = 1;
				o.slideInterval = 0;
				o.interval = null;
				o.defaults = {
					target: null
				};
				if (options) {
					$.extend(o.defaults, options);
				}
				for (var k in o.defaults) {
					o[k] = o.defaults[k];
				}
				o.prepareContentArea();
				return o;
			},
			slide: function (pos) {
				this.pos += pos;
				if (this.pos < 0) {
					this.pos = 0;
				} else if (this.pos > this.groupCnt) {
					if (this.interval) {
						this.pos = 0;
					} else {
						this.pos = this.groupCnt;
					}
				}
				$(this.target).find('div.jsArea').scrollTo(this.props.width * this.pos, this.props.duration, {'axis': 'x'});
				this.handlePager();
			},
			handlePager: function () {
				var buttonL = $(this.target.find('td.button_l div.jsPagerButtons'));
				var buttonR = $(this.target.find('td.button_r div.jsPagerButtons'));

				if (this.pos === 0) {
					buttonL.addClass('jspb_disabled').removeClass('jspb_enabled');
					buttonR.addClass('jspb_enabled').removeClass('jspb_disabled');
				} else if (this.pos == this.groupCnt) {
					buttonL.addClass('jspb_enabled').removeClass('jspb_disabled');
					buttonR.addClass('jspb_disabled').removeClass('jspb_enabled');
				} else {
					buttonL.addClass('jspb_enabled').removeClass('jspb_disabled');
					buttonR.addClass('jspb_enabled').removeClass('jspb_disabled');
				}
			},
			prepareContentArea: function () {
				var t = this.target;
				t.css({'overflow': 'auto'});
				var w = this.props.width;
				var h = this.props.height;
				var content = t.find('div.jsArea');
				content.css({
					'width': w,
					'height': h,
					'overflow': 'hidden'
				});
			},
			makeContentAreaItems: function () {
				var self = this;
				var t = self.target;
				var prefix = t.attr('id');
				var d = this.target.find('div.jsPagerItem');
				var grpShell = null;
				var slideInterval;

				if (d && typeof d.length == 'number') {
					var groups = 1;
					if (d.length / self.countPerLine >= 1) {
						groups = d.length / self.countPerLine;
						if (groups % 1 > 0) {
							groups++;
						}
					}
					var scrollPaneWidth = self.props.width * groups;
					var scrollPane = $('<div class="ms_scrollPane ms_scrollPane_' + prefix + '"></div>');
					scrollPane.css({'width': scrollPaneWidth, 'height': self.props.height});
					if (groups > 1) {
						if (this.props.slideInterval && this.props.slideInterval > 0) {
							slideInterval = this.props.slideInterval;
						} else {
							slideInterval = 0;
						}
						if (slideInterval === 0) {
							t.find('.prev').bind('click', function (e) {self.slide(-1); }).css({'cursor': 'pointer'}).end()
								.find('.next').css({'cursor': 'pointer'}).bind('click', function (e) {self.slide(1); });
							t.find('div.jsPagerButtons').hover(
								function () {$(this).addClass('jspb_hover'); },
								function () {$(this).removeClass('jspb_hover'); }
							);
						} else {
							var iterval = slideInterval;
							t.find('table.jsPagerOuterTable td.button').hide();
							this.interval = setInterval(function () {self.slide(1); }, slideInterval);
						}
					}
					$(d).each(function (i) {
						if (i % self.countPerLine === 0) {
							self.groupCnt++;
							var hwAttrs = {'width': self.props.width, 'height': self.props.height};
							grpShell = $('<div id="ms_grpShell_' + prefix + '_' + self.groupCnt + '" class="ms_grpShell"></div>');
							grpShell.css(hwAttrs);
							var table = $('<table class="jsPagerContentTable" cellpadding="0" cellspacing="0" border="0"><tr></tr></table>');
							table.css(hwAttrs);
							grpShell.append(table);
						}
						var item = JsPagerItem.create(i, this, self);
						self.items.push(item);
						item = item.make();
						grpShell.find('table tr').append(item);
						scrollPane.append(grpShell);
					});
					t.find('.jsArea').append(scrollPane);
				}
				t.find('div.jsPagerItem').empty();
				this.handlePager();
			}
		}
	);

	JsPagerItem = $.extend(
		$.clone(LLObject),
		{
			create: function (id, data, JsPager) {
				var o = LLObject.create.call(this);
				o.slider = JsPager || null;
				o.id = id;
				o.data = data || null;
				o.itemWidth = JsPager.defaults.props.itemWidth || null;
				return o;
			},
			make: function () {
				var sliderId = this.slider.target.attr('id');
				var item = $(
					'<td>' + $(this.data).html() + '</td>'
				);
				item.css({'vertical-align': 'top', 'text-align': 'center'});
				return item;
			}
		}
	);
/* << */


/* >> Media player element (requires jQuery 1.2.6 +) Version: rel-1-0-0 */
	//options: mode, target, width, height, filePath, filePath2, filePath3, youTubeUrl,
	//previewFilePath, previewWidth, previewHeight, autostart, windowMode, duration, expertData
	MediaPlayerSystem = $.extend(
		$.clone(LLObject),
		{
			create: function (options) {
				var k;
				var o = LLObject.create.call(this);
				o.urlPrefix = '/xist4c/';
				o.players = [];
				o.defaults = {
					target: null,
					popupPrefix: 'popup_'
				};
				if (options) {$.extend(o.defaults, options); }
				for (k in o.defaults) {o[k] = o.defaults[k]; }
				return o;
			},
			make: function () {
				//static test case or DevPack
				if (window.location.href.search('/xist4c/xist4c') !== -1 || window.location.href.search('DevPack_') > 0) {
					this.urlPrefix = '../';
				}
				if (this.windowMode) {
					this.createPrevIcon();
				}
				if (this.mode === "swf") {
					this.modeSWF();
				} else if (this.mode === "wmv") {
					this.modeWMV();
				} else {
					this.modeJWP();
				}
			},
			processSWF: function (target) {
				var expressInstall, flashvars, params, attributes;
				expressInstall = this.urlPrefix + 'web/swfobject/expressInstall.swf';
				flashvars = {};
				params = {
					wmode: 'transparent',
					play: this.autostart
				};
				attributes = {
					align: 'left',
					styleclass: 'mediaPlayerSWF'
				};
				eval(this.expertData);
				swfobject.embedSWF(
					this.filePath,
					target,
					this.width,
					this.height,
					'9.0.0',
					expressInstall,
					flashvars,
					params,
					attributes
				);
			},
			modeSWF: function () {
				if (swfobject) {
					if (this.windowMode) {
						this.modePopup(this.processSWF, this.popupPrefix + this.target);
					} else {
						this.processSWF(this.target);
					}
				}
			},
			processWMV: function (target) {
				var el, playerSrc, attributes;
				el = document.getElementById(target);
				playerSrc = this.urlPrefix + 'web/wmvplayer/wmvplayer.xaml';
				attributes = {
					width: this.width,
					height: this.height,
					file: this.filePath,
					image: this.previewFilePath,
					autostart: this.autostart
				};
				if (this.duration) {
					attributes.duration = this.duration;
				}
				eval(this.expertData);
				this.players.push(new jeroenwijering.Player(el, playerSrc, attributes));
			},
			modeWMV: function () {
				if (this.windowMode) {
					this.modePopup(this.processWMV, this.popupPrefix + this.target);
				} else {
					this.processWMV(this.target);
				}
			},
			processJWP: function (target) {
				var playerSrc, fileList, attributes;
				playerSrc = this.urlPrefix + 'web/mediaplayer/player.swf';
				fileList = [{file: this.filePath}];
				if (this.filePath2) {
					fileList.push({file: this.filePath2});
				}
				if (this.filePath3) {
					fileList.push({file: this.filePath3});
				}
				attributes = {
					id: 'player_' + this.target,
					flashplayer: playerSrc,
					width: this.width,
					height: this.height,
					image: this.previewFilePath,
					provider: this.mode,
					autostart: this.autostart,
					levels: fileList,
					controlbar: 'bottom'
				};
				if (this.mode !== "youtube") {
					attributes.modes = [
						{type: 'html5'},
						{type: 'flash', src: playerSrc},
						{type: 'download'}
					];
				}
				if (this.duration) {
					attributes.duration = this.duration;
				}
				eval(this.expertData);
				jwplayer(target).setup(attributes);
			},
			modeJWP: function () {
				if (this.windowMode) {
					this.modePopup(this.processJWP, this.popupPrefix + this.target);
				} else {
					this.processJWP(this.target);
				}
			},
			createPrevIcon: function () {
				var self = this, prevImgShell, prevLink, prevImg, icon, prevImgHeight, prevImgWidth, iconWidth, iconHeight;
				$(function () {
					prevImgShell = $('#' + self.target).find('.preview');
					prevImg = prevImgShell.find('img');
					prevLink = prevImgShell.find('a');
					prevLink.prepend('<span class="icon"></span>');
					icon = prevImgShell.find('.icon');
					prevImgHeight = self.getDimensions(prevImg, 'height');
					prevImgWidth = self.getDimensions(prevImg, 'width');
					iconHeight = self.getDimensions(icon, 'height');
					iconWidth = self.getDimensions(icon, 'width');
					icon.css(
						{
							top: ((prevImgHeight - iconHeight) / 2) + 'px',
							left: ((prevImgWidth - iconWidth) / 2) + 'px'
						}
					);
				});
			},
			getDimensions: function (image, dim) {
				// get width and height even if elements are hidden
				if (dim === 'width') {
					if (image.width() > 0) {
						return image.width();
					} else if (image.css('width').length > 0) {
						return parseInt(image.css('width').split('px')[0], 10);
					}
					return image.attr('width');
				} else if (dim === 'height') {
					if (image.height() > 0) {
						return image.height();
					} else if (image.css('height').length > 0) {
						return parseInt(image.css('height').split('px')[0], 10);
					}
					return image.attr('height');
				}
				return null;
			},
			modePopup: function (func, target) {
				var self = this, prevImg, content;
				prevImg = $('#' + this.target).find('.preview a');
				content = '<div class="multimediaPopupOuter"><div id="' + this.popupPrefix + this.target + '"></div></div>';
				LL_XPopup.registerPopup(
					prevImg,
					'click',
					'HTMLSRC',
					'p_c',
					'c',
					0,
					0,
					{
						cont: content,
						height: self.height,
						width: self.width,
						background: 'false',
						preventOverflowHidden: 'true'
					},
					// function context 'this' is the xpopup content object instance.
					// 'action' is a string of the current xpopup action: 'close' | 'show' | 'load' | 'loadError'.
					function (action) {
						if (action === 'show') {
							func.call(self, target);
						}
					}
				);
			}
		}
	);
/* << */

