window.onerror = function () { return true; };
/************************************
 * JPure JavaScript Framework		*
 ************************************
 * Copyright: Robert Engelhardt		*
 * Email: engelhardt@more-style.de	*
 * Version: 1.2				*
 ************************************/


var JPure = {

	Version : '1.2',

	Load : function () {

		/********************************
		 * Load Moduls					*
		 ********************************/

		var offset = null;
		var script = document.getElementsByTagName('script');

		for (var x = 0; x < script.length; ++x) {

			if ((offset = script[x].src.indexOf('JPure.js?')) > -1) {

				var path   = script[x].src.substr(0, offset);
				var moduls = script[x].src.split('?')[1].split(',')

				for (var y = 0; y < moduls.length; ++y) {

					var head  = document.getElementsByTagName('head')[0];
					var modul = document.createElement('script');

					with (modul) {

						src  = path + moduls[y] + '/' + moduls[y] + '.js';
						type = 'text/javascript';

					} head.appendChild(modul);
				
				} break;
			}
		}


		/********************************
		 * Core Function Class			*
		 ********************************/

		window.Class = function(name, properties) {

			if (this[name] == null) {

				if (properties[name] != null && properties[name] instanceof Function) {
				
					this[name] = properties[name];
				
				} else this[name] = function() {};
				
				this[name].prototype = {

					Set : function (property, value) {

						if (!(this[property] instanceof Function)) {

							this[property] = value;
						}

						return this[property];
					},

					Get : function (property) {

						return this[property];
					},

					Unset : function () {

						for (var x = 0; x < arguments.length; ++x) {

							
							if ((this[arguments[x]] instanceof Function) && !this.MethodExists(x)) {

								delete this[arguments[x]];
								
							} else delete this[arguments[x]];
						}
					},
					
					MethodExists : function (method) {
						
						for (var x = 0; x < this.Methods.length; ++x) {
						
							if (this.Methods[x] == method) {
							
								return true;	
							}	
							
						} return false;
					}
					
				}; this[name].prototype.Methods = ['Set', 'Get', 'Unset', 'MethodExists'];

				if (properties instanceof Object) {

					for (var x in properties) {

						if (this[name].prototype[x] == null) {

							if (name != x) {

								this[name].prototype[x] = properties[x];
							}
							
							if ((properties[x] instanceof Function)) {
							
								this[name].prototype.Methods[this[name].prototype.Methods.length] = x;
							}
						}
					}

				} return true;

			} else {

				window.Extends(this[name].prototype, {

					Set : function (property, value) {

						if (!(this[property] instanceof Function)) {

							this[property] = value;
						}

						return this[property];
					},

					Get : function (property) {

						return this[property];
					},

					Unset : function () {

						for (var x = 0; x < arguments.length; ++x) {

							if ((this[arguments[x]] instanceof Function) && !this.MethodExists(x)) {

								delete this[arguments[x]];
								
							} else delete this[arguments[x]];
						}
					},
					
					MethodExists : function (method) {
						
						for (var x = 0; x < this.Methods.length; ++x) {
						
							if (this.Methods[x] == method) {
							
								return true;	
							}	
							
						} return false;
					}

				}); this[name].prototype.Methods = ['Set', 'Get', 'Unset', 'MethodExists'];
				
				return window.Extends(this[name].prototype, properties);
			}
		};



		/********************************
		 * Core Function Objects		*
		 ********************************/

		window.Objects = function(name, properties) {

			if (this[name] == null) {

				this[name] = {
					
					Set : function (property, value) {

						if (!(this[property] instanceof Function)) {

							this[property] = value;
						}

						return this[property];
					},

					Get : function (property) {

						return this[property];
					},

					Unset : function () {

						for (var x = 0; x < arguments.length; ++x) {

							if ((this[arguments[x]] instanceof Function) && !this.MethodExists(x)) {

								delete this[arguments[x]];
								
							} else delete this[arguments[x]];
						}
					},
					
					MethodExists : function (method) {
						
						for (var x = 0; x < this.Methods.length; ++x) {
						
							if (this.Methods[x] == method) {
							
								return true;	
							}	
							
						} return false;
					}
					
				}; this[name]['Methods'] = ['Set', 'Get', 'Unset', 'MethodExists'];

				if (properties instanceof Object) {

					for (var x in properties) {

						if (this[name][x] == null) {

							if (this[name][x] instanceof Function) {
							
								this[name]['Methods'][this[name]['Methods'].length] = x;
								
							} this[name][x] = properties[x];
						}
					}

				} return true;

			} else {

				window.Extends(eval(name), {

					Set : function (property, value) {

						if (!(this[property] instanceof Function)) {

							this[property] = value;
						}

						return this[property];
					},

					Get : function (property) {

						return this[property];
					},

					Unset : function () {

						for (var x = 0; x < arguments.length; ++x) {

							if ((this[arguments[x]] instanceof Function) && !this.MethodExists(x)) {

								delete this[arguments[x]];
								
							} else delete this[arguments[x]];
						}
					},
					
					MethodExists : function (method) {
						
						for (var x = 0; x < this.Methods.length; ++x) {
						
							if (this.Methods[x] == method) {
							
								return true;	
							}	
							
						} return false;
					}

				});  this[name]['Methods'] = ['Set', 'Get', 'Unset', 'MethodExists'];
				
				return window.Extends(eval(name), properties);
			}
		};



		/********************************
		 * Core Function Extends		*
		 ********************************/

		window.Extends = function (object, properties, restriction) {

			if (object != null) {

				for (var x in properties) {

					if (restriction instanceof Array) {

						for (var y = 0; y < restriction.length; ++y) {

							if (x == restriction[y] && object[x] == null) {

								if (object['Methods'] != null && (properties[x] instanceof Function)) {
								
									object['Methods'][object['Methods'].length] = x;
										
								} object[x] = properties[x];
							}
						}

					} else {

						if (object['Methods'] != null && (properties[x] instanceof Function)) {
								
							object['Methods'][object['Methods'].length] = x;
										
						} object[x] = properties[x];
					}

				} return true;

			} return false;
		};
	}

}; JPure.Load();

Extends (window, {

	Typeof : function (object) {

		if (object == null)
			return 'null';

		if (typeof object == 'undefined')
			return 'undefined';

		if (object.nodeName && object.nodeType == 1)
			return 'element';

		if (object.nodeName && object.nodeType == 3 && (!/\S/).test(object.nodeValue))
			return 'textnode';

		if (object instanceof Function)
			return 'function';

		if (object instanceof Array)
			return 'array';

		if (typeof object == 'object')
			return 'object';

		if (typeof object == 'number' && isFinite(obj))
			return 'number';

		if (typeof object == 'string')
			return 'string';

		if (typeof object == 'boolean')
			return 'boolean';
	},

	Empty : function (value) {

		return (value == '' || value == null || value == false || value == '0' || value == 0) ? true : false;
	},

	Isset : function (variable) {

		return (this[variable] == null) ? false : true;
	},
	
	Time : function () {
		
		return new Date().getTime();
	},

	SetEvent : function (event, eventFunction, before) {

		switch ((event = event.toLowerCase())) {

			case 'onload' :
			case 'onunload' :
			case 'onbeforeunload' :
			case 'onbeforeprint':
			case 'onafterprint' :
			case 'ondragdrop':
			case 'onclose':
			case 'onabort' :
			case 'onerror' :
			case 'onresize' :
			case 'onblur' :
			case 'onscroll' :
			case 'onfocus' :

				var store = window[event];

				if (!Empty(store)) {

					window[event] = function () {

						if (before == null) {
							store();
							eventFunction();
						} else {
							eventFunction();
							store();
						}
					};

				} else window[event] = eventFunction;

				return true;

			break;

			default :

				if (Typeof(document[event]) != 'undefined') {

					var store = document[event];

					if (!Empty(store)) {

						document[event] = function () {

							if (before == null) {
								store();
								eventFunction();
							} else {
								eventFunction();
								store();
							}
						};

					} else document[event] = eventFunction;

				} return true;

			break;

		} return false;
	},

	EnabledFlash : function () {

		if (navigator.mimeTypes.length > 0) {

			return navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin != null;

		} else if (window.ActiveXObject) {

			try {

				return Typeof(new ActiveXObject('ShockwaveFlash.ShockwaveFlash')) == 'object';

			} catch (e) { return false; }

		} return false;
	},

	Body : function () {

		return (document.compatMode && document.compatMode != 'BackCompat') ? document.documentElement : ((document.body) ? document.body : null);
	},
	
	Display : function (Value, Top, Left) {

		if (document.getElementById('JPure_Window_Display')) {

			window.document.body.removeChild(document.getElementById('JPure_Window_Display'));
		}

		if (Value != '') {

			var Box = document.createElement('Div');

			with (Box) {

				style.cursor 		= 'pointer';
				style.border 		= '1px solid #666';
				style.backgroundColor 	= '#FFF';
				style.padding		= '6px';
				style.zIndex		= '999999';
				style.position		= 'absolute';
				style.left  		= (Left || '0') + 'px';
				style.top   		= (Top || '0') + 'px';

				id 			= 'JPure_Window_Display';
				innerHTML 		= Value;
			}
			
			Box.ondblclick = function () {

				window.document.body.removeChild(document.getElementById(this.id));
			
			}; document.body.appendChild(Box);

			with (document.getElementById('JPure_Window_Display')) {

				style.width = (offsetWidth > 800) ? '800px' : 'auto';
			}
		}
	}
});

Extends (Array.prototype, {

	Search : function (needle) {

		var x = -1;

		while (x < this.length - 1) {

			if (this[++x] == needle) {

				return x;
			}

		} return false;
	},

	Indexof : function (needle) {

		var x = 0;

		while (this.length > x) {

			if (this[++x].indexOf(needle) > -1) {

				return x;
			}

		} return false;
	},

	Push : function () {

		for (var x = 0; x < arguments.length; ++x) {

			if (this.push instanceof Function) {

				this.push(arguments[x]);

			} else this[this.length] = arguments[x];

		} return this;
	},

	MultiConact : function () {

		var array = this;

		for (var x = 0; x < arguments.length; ++x) {

			if (arguments[x] instanceof Array) {

				array = array.concat(arguments[x]);
			}

		} return array;
	},
	
	Unique : function () {
		
		var Temp = Output = [];
		
		for (var x = 0; x < this.length; ++x) {
		
			Temp[this[x] + '___unique'] = this[x];
		}
		
		for (var x in Temp) {
		
			if (x.match(/___unique/)) {
			
				Output[Output.length] = Temp[x];
			}
			
		} return Output;
	}
});

Objects ('Mouse', {

	X : function (e) {

		var body = (document.compatMode && document.compatMode != 'BackCompat') ? document.documentElement : ((document.body) ? document.body : null);

		if(typeof body.scrollLeft == 'number' || window.opera != null) {

			if (window.event) {

				if (!event.x) {

					return event.clientX;

				} else {

					if(event.clientY > event.screenY) {

						return body.scrollLeft + event.screenX;

					} else return body.scrollLeft + event.clientX;
				}

			} else return body.scrollLeft + e.clientX;

		} else return window.pageXOffset + e.clientX;

	},

	Y : function (e) {

		var body = (document.compatMode && document.compatMode != 'BackCompat') ? document.documentElement : ((document.body) ? document.body : null);

		if(typeof body.scrollTop == 'number' || window.opera != null) {

			if (window.event) {

				if (!event.y) {

					return event.clientY;

				} else {

					if(event.clientY > event.screenY) {

						return body.scrollTop + event.screenY;

					} else return body.scrollTop + event.clientY;
				}

			} else return body.scrollTop + e.clientY;

		} else return window.pageYOffset + e.clientY;
	}
});

Objects ('Element', {

	IsElement : function (element) {

		return (element != null && element.tagName != null && element.nodeType == 1) ? true : false;
	},

	Nodes : function (element, asArray) {

		if (asArray) {

			asArray = [];
			element = Element.Find(element);

			for (var x = 0; x < element.childNodes.length; ++x) {

				if (element.childNodes[x].tagName != null) {

					asArray[asArray.length] = element.childNodes[x];
				}

			} return asArray;

		} return Element.Find(element).childNodes.length;
	},

	Chain : function (element) {

		if ((element = Element.Find(element)) != null) {

			var chain = [];

			while (element.tagName != null) {

				chain[chain.length] = element.tagName.toLowerCase() + ((element.id != '') ? '[' + element.id + ']' : '');

				element = element.parentNode;

			} return chain.reverse().join('.');

		} return false;
	},

	Find : function () {

		if (arguments.length > 1) {

			var elements = [];

			for (var x = 0; x < arguments.length; ++x) {

				if (typeof arguments[x] == 'string') {

					elements[elements.length] = document.getElementById(arguments[x]);

				} else if (arguments[x] != null && Element.IsElement(arguments[x])) {

					elements[elements.length] = arguments[x];
				}

			} return elements;

		} else if(arguments.length == 1) {

			if (typeof arguments[0] == 'string') {

				return document.getElementById(arguments[0]);

			} else if (arguments[0] != null && Element.IsElement(arguments[0])) {

				return arguments[0];
			}

		} return null;
	},
	
	FindLike : function (likeElement, target) {
		
		var target = (target == null) ? document.body : Element.Find(target);
		
		//dev
	},

	FindByTagName : function (tag, target) {
		
		if ((tag = (target ? Element.Find(target) : document).getElementsByTagName(tag)) != null) {

			var elements = [];

			for (var x = 0; x < tag.length; ++x) {

				elements[elements.length] = tag[x];

			} return elements;

		} return [];
	},

	FindByAttribut : function (attribut, value, target){

		if (attribut == null) {

			return false;
		}

		if (Element.$$ == null) {

			if (Element.$ == null) {

				Element.$ = [];
			}

			Element.$$ = function (attribut, value, node) {

				for (var x = 0; x < node.childNodes.length; ++x) {

					if(value == null && node.childNodes[x][attribut] != null
					|| value != null && node.childNodes[x][attribut] == value) {

						Element.$[Element.$.length] = node.childNodes[x];
					}

					if (node.childNodes[x].childNodes.length > 0) {

						Element.$$(attribut, value, node.childNodes[x]);
					}
				}

			}; Element.$$(attribut, value, (target ? Element.Find(target) : document.getElementsByTagName('html')[0]));

			var elements = Element.$;

		} Element.Unset('$', '$$');

		return elements;
	},

	SetSelfOffsetWidth : function (element) {

		if (typeof element == 'string') {

			Element.SetCssProperties(Element.Find(element), {

				width : Element.Find(element).offsetWidth + 'px'

			}); return true;

		} else if (element instanceof Array) {

			for (var x = 0; x < element.length; ++x) {

				Element.SetCssProperties(Element.Find(element[x]), {

					width : Element.Find(element[x]).offsetWidth + 'px'
				});

			} return true;

		} else if (Element.IsElement(element)) {

			Element.SetCssProperties(element, {

				width : element.offsetWidth + 'px'

			}); return true;

		} return false;
	},

	SetCssProperty : function (element, properties) {

		if (typeof element == 'string') {

			for (var x in properties) {

				Element.Find(element).style[x] = properties[x];

			} return true;

		} else if (element instanceof Array) {

			for (var x = 0; x < element.length; ++x) {

				for (var y in properties) {

					Element.Find(element[x]).style[y] = properties[y];
				}

			} return true;

		} else if (Element.IsElement(element)) {

			for (var x in properties) {

				element.style[x] = properties[x];

			} return true;

		} return false;
	},

	GetCssProperty : function (element, property) {

		if ((element = Element.Find(element)) != null) {

			if (window.getComputedStyle) {

				return window.getComputedStyle(element, null).getPropertyValue(property);

			} else if (element.currentStyle) {

				property = property.split('-');

				for (var x = 1; x < property.length; ++x) {

					property[x] = property[x].substr(0, 1).toUpperCase() + property[x].substr(1);

				} return element.currentStyle[property.join('')];
			}

		} return false;
	},

	SetCssClass : function (element, className) {

		if (typeof element == 'string') {

			if ((element = Element.Find(element)) != null) {

				if (element.setAttribute instanceof Function) {

					element.setAttribute('class', className);

				} else element.className = className;

				return true;
			}

		} else if (element instanceof Array) {

			for (var x = 0; x < element.length; ++x) {

				if ((element[x] = Element.Find(element[x])) != null) {

					if (element[x].setAttribute instanceof Function) {

						element[x].setAttribute('class', className);

					} else element[x].className = className;

					return true;
				}
			}

		} else if (Element.IsElement(element)) {

			if (element.setAttribute instanceof Function) {

				element.setAttribute('class', className);

			} else element.className = className;

			return true;

		} return false;
	},

	SetEvent : function (element, event, eventFunction, before) {

		if ((element = Element.Find(element)) != null) {

			switch ((event = event.toLowerCase())) {

				case 'onblur' :
				case 'onfocus' :
				case 'onmouseover' :
				case 'onmouseout' :
				case 'onmousedown' :
				case 'onkeypress' :
				case 'onkeydown' :
				case 'onkeyup' :
				case 'onchange' :
				case 'onsubmit' :
				case 'onclick' :
				case 'onselect' :
				case 'ondblclick' :
				case 'onreset' :

					var store = element[event];

					if (store != null) {

						element[event] = function () {

							if (before == null) {
								store();
								eventFunction();
							} else {
								eventFunction();
								store();
							}
						};

					} else element[event] = eventFunction;

					return true;

				break;
			}

		} return false;
	},

	Fade : function (ElementID, Property, From, To, Steps) {
	
		if (!(ElementID instanceof Array)) {
		
			ElementID = [ElementID];
		}
	
		for (var x = 0; x < ElementID.length; ++x) {
	
			if ((ElementID[x] = Element.Find(ElementID[x]))) {
			
				To   = To.replace(/#/g, '');
				From = From.replace(/#/g, '');
	
				window.clearInterval(ElementID[x].FadeInterval);
				
				ElementID[x].Fade = {
					
					Count	 : 0,
					Steps	 : Steps,
					Element	 : ElementID[x],
					Property : Property,
					StartR	 : parseInt(From.substr(0, 2), 16),
					StartG	 : parseInt(From.substr(2, 2), 16),
					StartB	 : parseInt(From.substr(4, 2), 16),
					EndR	 : parseInt(To.substr(0, 2), 16),
					EndG	 : parseInt(To.substr(2, 2), 16),
					EndB	 : parseInt(To.substr(4, 2), 16),
					StepR	 : Math.abs(parseInt(From.substr(0, 2), 16) - parseInt(To.substr(0, 2), 16)) / Steps,
					StepG	 : Math.abs(parseInt(From.substr(2, 2), 16) - parseInt(To.substr(2, 2), 16)) / Steps,
					StepB	 : Math.abs(parseInt(From.substr(4, 2), 16) - parseInt(To.substr(4, 2), 16)) / Steps,
					EndColor : To,
					Interval : function () {
	
						if (this.Count < this.Steps) {
							
							if (this.StartR > this.EndR) {
								var R = Math.floor(this.StartR - (this.StepR * this.Count));
							} else var R = Math.floor(this.StartR + (this.StepR * this.Count));

							if (this.StartG > this.EndG) {
								var G = Math.floor(this.StartG - (this.StepG * this.Count));
							} else var G = Math.floor(this.StartG + (this.StepG * this.Count));
							
							if (this.StartB > this.EndB) {
								var B = Math.floor(this.StartB - (this.StepB * this.Count));
							} else var B = Math.floor(this.StartB + (this.StepB * this.Count));
							
							if (R.toString(16).length == 1) {
								R = R.toString(16) + R.toString(16);
							}
							
							if (G.toString(16).length == 1) {
								G = G.toString(16) + G.toString(16);
							}
							
							if (B.toString(16).length == 1) {
								B = B.toString(16) + B.toString(16);
							}

							this.Element.style[this.Property] = '#' + R.toString(16) + G.toString(16) + B.toString(16);
							this.Count++;
							
						} else {
						
							this.Element.style[this.Property] = '#' + this.EndColor;
							clearInterval(this.Element.FadeInterval);
						}
					}
					
				}; ElementID[x].FadeInterval = window.setInterval('Element.Find("' + ElementID[x].id + '").Fade.Interval()', Steps);
			}
		}
	}
});

Objects ('Formular', {

	Type : function (element, form) {

		return Formular.Find(element, form) ? Formular.Find(element, form).type : 'undefined';
	},

	Length : function () {

		return document.forms.length;
	},

	ElementsLength : function (form) {

		if (document.forms[form] != null) {

			return document.forms[form].elements.length;

		} return null;
	},

	Name : function (number) {

		if (document.forms[number] != null) {

			return document.forms[number].name;

		} return null;
	},

	Elements : function (form) {

		if (document.forms[form] != null) {

			return document.forms[form].elements;

		} return null;
	},

	Reset : function (element, form) {

		if (element instanceof Array) {

			for (var x = 0; x < element.length; ++x) {

				if ((element[x] = Formular.Find(element[x], form)) != null) {

					switch (element[x].type) {

						case 'text' 		:
						case 'hidden' 		: element[x].value = ''; break;
						case 'select-one' 	: Formular.Select.Index(element[x], 0); break;
						case 'checkbox'		:
						case 'radio'		: element[x].checked = false; break;
					}
				}

			} return true;

		} else if (typeof element == 'string') {

			if ((element = Formular.Find(element, form)) != null) {

				switch (element.type) {

					case 'text' 		:
					case 'hidden' 		:
					case 'file' 		: element.value = ''; break;
					case 'select-one' 	: Formular.Select.Index(element, 0); break;
					case 'checkbox'		:
					case 'radio'		: element.checked = false; break;

				} return true;
			}
		}
	},
	
	Submit : function (formular) {
	
		if (typeof formular == 'string') {
		
			document.forms[formular].submit();
		
		} else formular.form.submit();
	},
	
	Disabled : function (element, status) {

		if (element instanceof Array) {

			for (var x = 0; x < element.length; ++x) {

				if ((element[x] = Formular.Find(element[x])) != null) {

					element[x].disabled = status;
				}
			}

		} else if (typeof element == 'string') {

			if ((element = Formular.Find(element)) != null) {

				element.disabled = status;
			}
		}
	},

	Find : function (element, form) {

		if (typeof element == 'string') {

			if (typeof form == 'string' || typeof form == 'number') {

				return (Formular.Elements(form) != null) ? Formular.Elements(form)[element] : null;

			} else {

				for (var x = 0; x < Formular.Length(); ++x) {

					for (var y = 0; y < Formular.ElementsLength(x); ++y) {

						if (Formular.Elements(x)[y].name == element) {

							return Formular.Elements(x)[y];
						}
					}
				}

			} return null;

		} else if (element.tagName != null && element.nodeType == 1) {

			return element;

		} return false;
	},
	
	FindLike : function (needle, form) {
	
		if (typeof needle == 'string') {
		
			var elements = [];
		
			for (var x = 0; x < Formular.Length(); ++x) {

				for (var y = 0; y < Formular.ElementsLength(x); ++y) {

					if (Formular.Elements(x)[y].name.toLowerCase().substring(0, needle.length) == needle.toLowerCase()) {

						elements[elements.length] = Formular.Elements(x)[y];
					}
				}
		
			} return elements;
		}
	},

	FindByAttribut : function (attribut, value, form) {

		var elements = [];

		if (typeof form == 'string' || typeof form == 'number') {

			for (var x = 0, fields = Formular.Elements(form); x < fields.length; ++x) {

				if (value == null && fields[x][attribut] != null
				|| value != null && fields[x][attribut] == value) {

					elements[elements.length] = fields[x];
				}
			}

		} else {

			for (var x = 0; x < Formular.Length(); ++x) {

				for (var y = 0, fields = Formular.Elements(x); y < fields.length; ++y) {

					if (value == null && fields[x][attribut] != null
					|| value != null && fields[x][attribut] == value) {

						elements[elements.length] = fields[x];
					}
				}
			}

		} return elements;
	},

	Value : function (element, form) {

		if ((element = Formular.Find(element, form))) {

			if (element.type.indexOf('select') > -1) {

				return (element.selectedIndex > -1) ? element.options[element.selectedIndex].value : null;

			} else return element.value;

		} return null;
	},

	SetEvent : function (element, event, eventFunction) {

		if ((element = Formular.Find(element)) != null) {

			switch ((event = event.toLowerCase())) {

				case 'onblur' :
				case 'onfocus' :
				case 'onmouseover' :
				case 'onmouseout' :
				case 'onmousedown' :
				case 'onkeypress' :
				case 'onkeydown' :
				case 'onkeyup' :
				case 'onchange' :
				case 'onsubmit' :
				case 'onclick' :
				case 'onselect' :
				case 'ondblclick' :
				case 'onreset' :

					var store = element[event];

					if (store != null) {

						element[event] = function () {

							store();
							eventFunction();
						};

					} else element[event] = eventFunction;

					return true;

				break;
			}

		} return false;
	},

	Restrict : function (element, restrict) {

		if (typeof element == 'string') {

			element = [Formular.Find(element)];

		} else if (element instanceof Array) {

			element = element;

		} else if (element.tagName != null && element.nodeType == 1) {

			var element = [element];
		}

		for (var x = 0; x < element.length; ++x) {

			if (typeof element[x] == 'string') {

				element[x] = Formular.Find(element[x]);
			}

			if (window.opera) {

				element[x].restrict = restrict;

				Formular.SetEvent(element[x], 'onkeydown', function (e) {

					if (this.restrict.indexOf(String.fromCharCode((e.charCode) ? e.charCode : e.which)) == -1) {

						return false;
					}

				}); return true;

			} else {

				element[x].restrict = restrict;

				Formular.SetEvent(element[x], 'onkeypress', function () {

					if (this.eventKeyP != null) {

							this.eventKeyP();
					}

					if (this.restrict.indexOf(String.fromCharCode(event.keyCode)) == -1) {

						this.value = eval("this.value.replace(/" + ((String('/()?[]+*\\').indexOf(String.fromCharCode(event.keyCode)) > -1) ? "\\" : "") + String.fromCharCode(event.keyCode) + "/, '')");

						return false;
					}
				});

				Formular.SetEvent(element[x], 'onkeyup', function () {

					for (var x = 0, char = this.value.split(''); x < this.value.length; ++x) {

						if (this.restrict.indexOf(char[x]) == -1) {

							this.value = eval("this.value.replace(/" + char[x] + "/, '')");
						}
					}

				}); return true;
			}
		}
	},

	WidthToSize : function (element, width) {

		if ((element = Formular.Find(element)) != null) {

			if (element.style.width != 'auto') {

				element.style.width = 'auto';
			}

			while (element.offsetWidth < width) {

				element.size += 1;

			} element.size -= 1;

		} return false;
	}

});

Extends (Formular.Select = {}, {

	Length : function (element, form) {

		return Formular.Find(element, form) ? Formular.Find(element, form).options.length : null;
	},

	Current : function (element, form) {

		return Formular.Find(element, form) ? Formular.Find(element, form).selectedIndex : null;
	},

	Value : function (element, form, position) {

		return Formular.Find(element, form) ? Formular.Find(element, form).options[position || Formular.Select.Current(element, form)].value : null;
	},

	Add : function (element, text, value, position) {

		var options = null;

		if ((options = Formular.Select.ToArray(element)) != null) {

			if (position != null) {

				if (position < 0) position = 0;
				if (position > options.length) position = options.length;

			} else position = options.length;

			element = Formular.Select.Options(element);
			options = options.slice(0, position).concat([{text : text, value : value}]).concat(options.slice(position, options.length));

			for (var x = 0; x < options.length; ++x) {

				if (element[x] != null) {

					element[x].text  = options[x]['text'];
					element[x].value = options[x]['value'];

				} else {

					element[x] = new Option(options[x]['text'], options[x]['value']);
				}

			} return true;
		}
	},

	Remove : function (element, position) {

		var options = null;

		if ((options = Formular.Select.ToArray(element)) != null) {

			if (position < 0) position = 0;

			options = options.slice(0, position).concat(

				options.slice(position + 1, options.length)

			); Formular.Select.Clear(element);

			for (var x = 0; x < options.length; ++x) {

				Formular.Select.Add(element, options[x]['text'], options[x]['value']);

			} return true;

		} return false;
	},

	Options : function (element, form) {

		if ((element = Formular.Find(element, form)) != null) {

			return element.options;

		} return null;
	},

	ToArray : function (element, form) {

		var options = [];

		if ((element = Formular.Select.Options(element, form)) != null) {

			for (var x = 0; x < element.length; ++x) {

				options[options.length] = {

					text  : element[x].text,
					value : element[x].value
				};

			} return options;

		} return false;
	},

	Selected : function (element, position) {

		if ((element = Formular.Select.Options(element)) != null) {

			if (typeof position == 'number') {

				return element[position].selected = true;

			} else if (position instanceof Array) {

				for (var x = 0; x < position.length; ++x) {

					element[position[x]].selected = true;

				} return true;
				
			} else if (typeof position == 'string') {

				for (var x = 0; x < element.length; ++x) {

					if (element[x].value == position) {
					
						element[x].selected = true;
					}

				} return true;
			}

		} return false;
	},

	Index : function (element, offset) {

		if (element instanceof Array) {

			for (var x = 0; x < element.length; ++x) {

				if ((element[x] = Formular.Find(element[x])) != null) {

					element[x].selectedIndex = offset;
				}

			} return true;

		} else {

			if ((element = Formular.Find(element)) != null) {

				return element.selectedIndex = offset;
			}
		}
	},

	Search : function (element, needle) {

		if ((element = Formular.Select.Options(element)) != null) {

			for (var x = 0; x < element.length; ++x) {

				if (element[x].value == needle) {

					return x;
				}

			} return false;

		} return null;
	},

	Clear : function (element, form) {

		if (!(element instanceof Array)) {
			
			element = [element];
		}

		for (var x = 0; x < element.length; ++x) {

			if ((element[x] = Formular.Select.Options(element[x], form)) != null) {
	
				for (var y = element[x].length; y >= 0; --y) {
	
					element[x][y] = null;
				}
			}
			
		} return true;
	}
});

Extends (String.prototype, {

	Search : function (needle) {

		if (needle == '') {

			return false;

		} return (this.toLowerCase().indexOf(needle.toLowerCase()) < 0) ? false : true;
	},

	LeftFill : function (value, length) {

		var current = this;

		while (current.length < length) {

			current = value + current;

		} return current;
	},

	RightFill : function (value, length) {

		var current = this;

		while (current.length < length) {

			current += value;

		} return current;
	},

	BothFill : function (value, length) {

		var current = this;

		while (current.length < length) {

			if (Math.ceil(length / 2) < current.length) {

				current = value + current;

			} else current += value;

		} return current;
	},

	CharCount : function () {

		return this.replace(/\W+/, '').length;
	},

	WordCount : function () {

		return this.replace(/\W/, '').split(' ').length;
	},

	UpperCaseFirst : function () {

		return this.substr(0, 1).toUpperCase() + this.substr(1, this.length);
	},
	
	StripTags : function () {
	
		var string = this;
		
		if (arguments.length > 0) {
	
			for (var x = 0; x < arguments.length; ++x) {

				string = eval("string.replace(/< ?" + arguments[x] + "([^>]+)>/gi, '')");
				string = eval("string.replace(/<" + arguments[x] + ">/gi, '')");
				string = eval("string.replace(/<\\/" + arguments[x] + ">/gi, '')");
				string = string.replace(/\s\s+/gi, ' ');
				
			} return string;
			
		} else return string.replace(/<(.*?)>/gi, '');
	}
});

Extends (Number.prototype, {

	Dec2Hex : function () {

		return (this.toString(16).length == 1) ? '0' +  this.toString(16) : this.toString(16);
	}
});

Extends (Math, {

	EaseOutQuart : function (t, b, c, d) {
		/*
		 * Easing Equations v1.5
		 * easeOutQuart
		 * (c) Robert Penner. 
		 */
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	
	Round : function (Int, Digits) {
	
		return (Math.round(Int * Math.pow(10, Digits)) / Math.pow(10, Digits));
	}
});

Objects ('Browser', {

	Name : function () {

		if (window.opera && navigator.userAgent.indexOf('Opera') > -1)
			return 'Opera';

		else if (navigator.userAgent.indexOf('MSIE') > -1)
			return 'Internet Explorer';

		else if (navigator.userAgent.indexOf('Firefox') > -1)
			return 'Firefox';

		else if (navigator.userAgent.indexOf('Netscape') > -1)
			return 'Netscape';

		else if (navigator.userAgent.indexOf('Gecko') > -1)
			return 'Mozilla';

		else if (navigator.userAgent.indexOf('OmniWeb') > -1)
			return 'OmniWeb';

		else if (navigator.vendor.indexOf('Apple') > -1)
			return 'Safari';

		else if (navigator.vendor.indexOf('iCab') > -1)
			return 'iCab';

		else if (navigator.vendor.indexOf('KDE') > -1)
			return 'Konqueror';

		else if (navigator.vendor.indexOf('Camino') > -1)
			return 'Camino';
	},

	Version : function () {

		if (Browser.Name() == 'Opera') {

			var agent = navigator.userAgent.split(' ');

			return (isNaN(agent[agent.length - 1])) ? agent[agent.length - 3] : agent[agent.length - 1];

		} else if (Browser.Name() == 'Internet Explorer') {

			return navigator.userAgent.split('; ')[1].split(' ')[1];

		} else if (Browser.Name() == 'Firefox') {

			var agent = navigator.userAgent.split(' ');

			return agent[agent.length - 1].split('/')[1];

		} else if (Browser.Name() == 'Netscape') {

			var agent = navigator.userAgent.split('/');

			return (agent[agent.length - 1].indexOf(' ') > -1) ? agent[agent.length - 1].split(' ')[0] : agent[agent.length - 1];

		} else if (Browser.Name() == 'Mozilla') {

			var agent = navigator.userAgent.split(' ')[7];

			return agent.substring(0, String(agent).length - 1).split(':')[1];

		} else if (Browser.Name() == 'OmniWeb') {

			var agent = navigator.userAgent.split(' ');

			return agent[agent.length - 1].split('/')[1];
		}
	}
});

Class ('Ajax', {

	Ajax : function () {

		this.Data 		= null;
		this.AjaxFrameName 	= 'ajaxFrame';
		this.ProxyUrl 		= 'scripts/JPure/Ajax/Proxy.php?';
	},
	
	Send : function (url, method, type, proxy) {

		this.Set('Data', null);

		var self   	= this;
		var request 	= false;

		if (type != 'text' && type != 'xml') {

			type = 'text';
		}

		if (proxy) {

			url = this.Get('ProxyUrl') + ((type == 'text') ? 'text:' : 'xml:') + escape(url);
		}

		if (window.XMLHttpRequest) {

			request = new XMLHttpRequest();

		} else if (window.ActiveXObject) {

			try  {

				request = new ActiveXObject("Msxml2.XMLHTTP");

			} catch (e) {

				try {

					request = new ActiveXObject("Microsoft.XMLHTTP");

				} catch(e) { }
			}

		}

		if (typeof request == 'object') {
			
			request.onreadystatechange = function () {

				if (request.readyState == 4) {

					if (request.status < 400) {

						if (type == 'xml') {

							self.XMLParse(request.responseXML);

						} else if (type == 'text') {

							self.Data = {text : request.responseText};
						}

					} else return false;
				}
			};

			if(method.toLowerCase() == "post") {

				request.open("POST", url, true);
				request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
				request.send(null);

			} else {

				request.open("GET", url, true);
				request.send(null);
			}

		} else if (document.createElement instanceof Function) {

			if (document.getElementById(this.ajaxFrameName)) {

				window.document.body.removeChild(document.getElementById(this.ajaxFrameName));
			}

			var iFrame = document.createElement('IFRAME');

			with (iFrame) {

				style.width 		= '1px';
				style.height 		= '1px';
				style.border 		= 'none';
				style.position		= 'absolute';
				style.left		= '0px';
				style.top		= '0px';
				style.visibility	= 'hidden';

				src			= url;
				id			= this.AjaxFrameName;
				name			= this.AjaxFrameName;
				frameborder		= '0';
			}

			document.body.appendChild(iFrame);

			window.clearInterval(this.ajaxFrameTimeout);
			window.onFrameLoad = {

				count 			: 0,
				tries 			: 100,
				self 			: this,
				type 			: type,
				ajaxFrameName 		: this.AjaxFrameName,

				status : function () {

					if (window.parent[this.ajaxFrameName]) {

						if (window.parent[this.ajaxFrameName].document.childNodes.length != null) {

							if (this.type == 'xml') {

								this.self.XMLParse(window.parent[this.ajaxFrameName].document.firstChild.parentNode);

							} else if (this.type == 'text') {

								this.self.Data = {text : window.parent[this.ajaxFrameName].document.innerHTML};
							}

							this.count = this.tries;
						}
					}

					if ((++this.count) > this.tries) {

						with (window) {

							clearInterval(this.self.ajaxFrameTimeout);
							document.body.removeChild(document.getElementById(this.ajaxFrameName));
							onFrameLoad = null;

						} this.self.Unset('ajaxFrameTimeout');
					}
				}
			}

			this.ajaxFrameTimeout = window.setInterval('window.onFrameLoad.status()', 500);
		}

	},

	XMLParse : function (node, xmlObject) {

		if (xmlObject == null) {

			xmlObject = this.Data = {};
		}

		for (var x = 0; x < node.childNodes.length; ++x) {

			if (node.childNodes[x].tagName != null) {

				if (xmlObject[node.childNodes[x].tagName] != null && !(xmlObject[node.childNodes[x].tagName] instanceof Array)) {

					xmlObject[node.childNodes[x].tagName] = [xmlObject[node.childNodes[x].tagName]];
				}

				var nodeValue = (node.childNodes[x].firstChild == null || node.childNodes[x].firstChild.nodeValue == null) ? '' : node.childNodes[x].firstChild.nodeValue;
				    nodeValue = nodeValue.replace(/\s\s+|\r|\n|\t/g, ' ');
				    nodeValue = (nodeValue == ' ') ? '' : nodeValue;

				if (nodeValue != '') {

					if (xmlObject[node.childNodes[x].tagName] instanceof Array) {

						xmlObject[node.childNodes[x].tagName][xmlObject[node.childNodes[x].tagName].length] = nodeValue;

					} else xmlObject[node.childNodes[x].tagName] = nodeValue;

				} else {

					if (xmlObject[node.childNodes[x].tagName] instanceof Array) {

						xmlObject[node.childNodes[x].tagName][xmlObject[node.childNodes[x].tagName].length] = (node.childNodes[x].childNodes.length) ? {} : '';

					} else xmlObject[node.childNodes[x].tagName] = (node.childNodes[x].childNodes.length) ? {} : '';
				}
			}

			if (node.childNodes[x].childNodes.length > 0)
			{

				if (xmlObject[node.childNodes[x].tagName] instanceof Array) {

					this.XMLParse(node.childNodes[x], xmlObject[node.childNodes[x].tagName][xmlObject[node.childNodes[x].tagName].length - 1]);

				} else {
					//alert(node.childNodes[x].tagName + ' - - ' + xmlObject[node.childNodes[x].tagName])
					this.XMLParse(node.childNodes[x], xmlObject[node.childNodes[x].tagName]);
				}
			}
		}
	},

	Call : function(callback) {

		window.clearInterval(this.timeout);
		window.controll = {

			count 		: 0,
			tries 		: 100,
			self 		: this,
			callback 	: callback,
			arguments 	: arguments,

			interval : function () {

				if (this.self.Data != null) {

					for (var x in this.self.Data) {

						if (x != null) {

							window.clearInterval(this.self.timeout);

							if (Function.apply instanceof Function && this.arguments.length > 1) {

								for (var parameter = [], y = 0; y < this.arguments.length; ++y) {

									parameter[parameter.length] = this.arguments[y];
								}

								eval(this.callback).apply(this.callback, parameter.slice(1));

							} else {

								eval(this.callback)();

							} break;

							this.count = this.tries;
						}
					}

					if ((++this.count) > this.tries) {

						with (window) {

							clearInterval(this.self.timeout);
							controll = null;

						} this.self.Unset('timeout');
					}
				}
			}
		};

		this.timeout = window.setInterval("window.controll.interval()", 500);
	}
});

Objects ('File', {

	Info : function (file) {

		return {

			URL 		: document.URL || null,
			Domain 		: document.domain || null,
			Protocol	: document.URL.split('://')[0].toUpperCase() || null,
			MimeType	: document.mimeType || document.contentType || null,
			Charset		: document.charset || document.characterSet || null,
			LastModified	: new Date(document.lastModified).getTime() || null,
			CreatedDate	: new Date(document.fileCreatedDate).getTime() || null,
			FileSize	: document.fileSize || null
		};

	},

	BaseFile : function (url) {

		var parse = ((url != null) ? url.split('/') : document.URL).split('/');

		return parse.slice(-1);
	},

	BaseDir : function (url) {

		var parse = ((url != null) ? url.split('/') : document.URL).split('/');

		return parse.slice(0, -1).join('/') + '/';
	},

	ParseQueryString : function (URL) {
		
		var URI   	= URL || window.location.search;
		var Query 	= URI.split('?')[1] || URI;
		var QueryString = [];
		
		if (Query != '') {
			
			if (Query = Query.split('&')) {
			
				for (var x = 0; x < Query.length; ++x) {
					
					QueryString[Query[x].split('=')[0]] = Query[x].split('=')[1] || null;
				}
			}
			
		} return QueryString;
	}
});

Objects ('Images', {

	Length : function () {

		return document.images.length;
	},

	Find : function (image) {


		if (typeof image == 'string') {

			return eval('document.' + image);

		} else if (image instanceof Array) {

			var images = [];

			for (var x = 0; x < image.length; ++x) {

				if (eval('document.' + image).name == image[x]) {

					images[images.length] = eval('document.' + image);
				}

			} return images.length > 0 ? images : null;

		} else if (image.tagName != null && image.nodeType == 1) {

			return image;

		} return null;
	},

	FindByAttribut : function (attribut, value) {

		if (document.images) {

			var images = [];

			for (var x = 0; x < document.images.length; ++x) {

				if (value == null) {

					if (document.images[x][attribut] != null) {

						images[images.length] = document.images[x];
					}

				} else {

					if (document.images[x][attribut] == value) {

						images[images.length] = document.images[x];
					}
				}

			} return images.length > 0 ? images : null;

		} return false;
	},

	Properties : function (image) {

		if ((image = Images.Find(image)) != null) {

			var img 	= new Image();
				img.src = Images.Find(image).src;

			return {

				src					: img.src,
				width				: img.width,
				height				: img.height,
				fileSize			: img.fileSize || null,
				mimeType			: img.mimeType || null,
				fileCreatedDate		: new Date(img.fileCreatedDate).getTime() || null,
				fileModifiedDate	: new Date(img.fileModifiedDate).getTime() || null
			};
		}
	}

});

window.HTML = function (Element, Index) {
	return new $HTML().Find(Element, Index);
};

window.Class('$HTML', {	

	Length : 0,

	Each : function (Do, Arguments) {

		if (!Function.prototype.apply || !Function.prototype.call) {
		
			switch (true) {
				
				case Arguments && !Function.prototype.apply : 
					var CallFunction = 'apply';
				break;
				case !Arguments && !Function.prototype.call :
					var CallFunction = 'call';
				break;
			}
			
			if (!Function.prototype[CallFunction]) {
			
				Function.prototype[CallFunction] = function (Object, Arguments) {
					
					var A = arguments;
					
					if (Object[this.toString()] = this) {
					
						if (Arguments = A.length == 2 && (typeof A[1] == 'object') && A[1].length ? A[1] : A) {
			
							for (var x = ((typeof A[1] == 'object') && A[1].length ? 0 : 1), Args = []; x < Arguments.length; ++x) {
								
								Args[Args.length] = typeof Arguments[x] == 'string' ? "'" + Arguments[x] + "'" : Arguments[x];
								
							} eval('Object[this.toString()](' + Args.join(',') + ')');
						}
					}
				};
			}
		}
		
		for (var x = 0; x < this.Length; ++x) {

			if (Arguments) {
			
				Do.apply(this[x], Arguments);
				
			} else Do.call(this[x]);
			
		} return this;
	},
	
	Only : function (Index, Element) {

		if (!isNaN(Index) && (Index = parseInt(Index)) < this.Length) {
		
			return Element === true ? this[Index] : new $HTML().Find(this[Index]);
		
		} else return this;
	},

	Find : function (Selector, Target) {

		if (Selector.nodeType == 1 || Selector.style) {

			this[this.Length++] = Selector;
			
		} else {

			var Match = '';

			switch (!!(Target = (Target || document))) {
				
				case !!(Match = /^(\w+)$/.exec(Selector)) : 

					if (Match = Target.getElementsByTagName(Match[1])) {

						for (var x  = 0; x < Match.length; ++x) {

							this[this.Length++] = Match[x];
						}
					}
					
				break; 
				
				case !!(Match = /^#(.*)$/.exec(Selector)) : 

					if (Match = Target.getElementById(Match[1])) {
					
						this[this.Length++] = Match;
					}
					
				break;
				
				case !!(Match = /^\/#(.*)\/$/.exec(Selector)) : 

					Match[0] = Target.all || Target.getElementsByTagName('*');

					for (var x  = 0; x < Match[0].length; ++x) {

						if (eval('/^' + Match[1] + '/').exec(Match[0][x].id)) {
						
							this[this.Length++] = Match[0][x];
						}
					}
					
				break; 
				
				case !!(Match = /^([^\.]+)?\.(\w+)$/.exec(Selector)) : 

					Match[1] = !Match[1] ? (Target.all || Target.getElementsByTagName('*')) : Target.getElementsByTagName(Match[1]);

					if (Match[1]) {
						
						for (var x  = 0; x < Match[1].length; ++x) {
							
							if (Match[1][x].className.indexOf(Match[2]) > -1) {
								
								this[this.Length++] = Match[1][x];
							}
						}
					}
					
				break;
				
				case !!(Match = /^([^\[]+)\[([^=?]+)=?([^\]]+)?\]$/.exec(Selector)) : 
					
					if (Match[1] = (Match[1] == '*' ? (Target.all || Target.getElementsByTagName('*')) : Target.getElementsByTagName(Match[1]))) {

						Match[3] = Match[3] == '' || Match[3] == null ? [] : Match[3].split('|');

						for (var x  = 0; x < Match[1].length; ++x) {
							
							if (Match[3].length > 0) {
								
								for (var y = 0; y < Match[3].length; ++y) {
	
									if (Match[1][x][Match[2]] == Match[3][y]) {
								
										this[this.Length++] = Match[1][x];
									}
								}
								
							} else if (Match[1][x][Match[2]] != '') {

								this[this.Length++] = Match[1][x];
							}
							
						}
						
					}	
				
				break; 
				
				case !!(Match = /^\*$/.exec(Selector)) : 

					if (Match = Target.all || Target.getElementsByTagName('*')) {

						for (var x  = 0; x < Match.length; ++x) {

							this[this.Length++] = Match[x];
						}
					}
					
				break;
				
				case !!(Match = /^([\w+\s\.]+)$/.exec(Selector)) : 
					
					/* DEV
					Match = Match[1].split(' ');
					
					for (var x  = 0; x < Match.length; ++x) { 
						
						HTML(Match[x]);
					}

					if (Match[1] = Target.all || Target.getElementsByTagName('*')) {

						for (var x  = 0; x < Match[1].length; ++x) {

							this[this.Length++] = Match[1][x];
						}
					}
					*/
					
				break;
			}
			
		} return this;
	},
	
	Property : function (Property, Value) {
		
		if (typeof Property == 'string' && typeof Value == 'string') {

			Properties 		= new Object();
			Properties[Property] 	= Value;
			
		} else Properties = Property;

		if (Properties instanceof Object) {
			
			this.Each(function () {

				for (var Name in Properties) {

					this[Name] = Properties[Name];
				}
				
			}); return this;
			
		} else return this[0] ? this[0][Properties] : this;
	},
	
	PropertyToggle : function (Property, From, To) {
	
		this.Each(function () {
		
			if (this.$HTMLPropertyToggleStatus == null) {
				
				this.$HTMLPropertyToggleStatus = true;
				
			} this[Property] = ((this.$HTMLPropertyToggleStatus = !this.$HTMLPropertyToggleStatus) ? From : To);

		}); return this;	
	},
	
	Attribut : function (Property, Value) {
		
		if (typeof Property == 'string' && typeof Value == 'string') {

			Properties 		= new Object();
			Properties[Property] 	= Value;
			
		} else Properties = Property;

		if (Properties instanceof Object) {
			
			this.Each(function () {

				for (var Name in Properties) {

					if (typeof this.setAttribute == 'function' && typeof Properties[Name] == 'string') {
						
						this.setAttribute(Name, Properties[Name]);
						
					} else this[Name] = Properties[Name];
				}
				
			}); return this;
			
		} else return this[0] ? (typeof this[0].getAttribute == 'function' ? this[0].getAttribute(Properties) : this[0][Properties]) : this;
	},
	
	Css : function (Property, Value) {
		
		if (typeof Property == 'string' && !Value) {
			
			if (this[0] == null) return this;
			
			if (window.getComputedStyle) {

				return window.getComputedStyle(this[0], null).getPropertyValue(Property);

			} else if (this[0].currentStyle) {

				Property = Property.split('-');

				for (var x = 1; x < Property.length; ++x) {

					Property[x] = Property[x].substr(0, 1).toUpperCase() + Property[x].substr(1);

				} return this[0].currentStyle[Property.join('')];
			}
			
		} else if (Property instanceof Object) {

			this.Each(function () {
				for (var Name in Property) {
					this.style[Name] = Property[Name];
				}
			});
			
		} else if (typeof Property == 'string' && typeof Value == 'string') {
			
			if (this[0] == null) return this;
				
			this[0].style[Property] = Value;
			
		} return this;
	},
	
	CssClass : function (Class, Add) {

		this.Each(function () {
		
			this.className = (!Add ? Class : this.className + Class);

		}); return this;	
	},
	
	CSSToggle : function (Property, From, To) {
	
		this.Each(function () {
		
			if (this.$HTMLCSSToggleStatus == null) {
				
				this.$HTMLCSSToggleStatus = true;
				
			} this.style[Property] = ((this.$HTMLCSSToggleStatus = !this.$HTMLCSSToggleStatus) ? From : To);

		}); return this;	
	},
	
	IfEvent : function (Event, Do, Overwrite) {

		this.Each(function () {
			
			Event = Event.split('|');
			
			for (var x = 0; x < Event.length; ++x) {
			
				if (!Overwrite) {
					var Current = this['on' + Event[x]];
				}
				
				if (Current != null) {
				
					this['on' + Event[x]] = function () {
						Current(); Do();
					};
					
				} else this['on' + Event[x]] = Do;
			}
			
		}); return this;
	},
	
	GetEvent : function (Event) {
		
		if (!this[0]) return this;
		
		return this[0]['on' + Event];
	},
	
	DisabledEvent : function (Event, Status) {
	
		this.Each(function () {
			
			if (Status) {

				if (typeof this['on' + Event] == 'function') {
				
					if (this['Current_Event_' + Event] == null) {
					
						this['Current_Event_' + Event] = this['on' + Event];
						
					} this['on' + Event]    = null;
				}
				
			} else {

				if (typeof this['Current_Event_' + Event] == 'function') {
				
					this['on' + Event] = function () { 
					
						this['Current_Event_' + Event]();
					};
				}
			}
			
		}); return this;
	},
	
	Html : function (Value, Add) {
	
		if (Value != null) {
		
			this.Each(function () {

				this.innerHTML = (!Add ? Value : this.innerHTML + Value);
				
			}); return this;
			
		} else return this[0] ? this[0].innerHTML : this;
	},
	
	Text : function (Value, Add) {
	
		if (Value != null) {

			this.Each(function () {
			
				if (!Add) {
				
					while (this.firstChild) {
				
						this.removeChild(this.firstChild);
					
					} this.appendChild(document.createTextNode(Value));
					
				} else this.appendChild(document.createTextNode(Value));
				
			}); return this;
			
		} else return this[0] ? this[0].firstChild.nodeValue : this;
	},
	
	Option : function (Text, Value, DefaultSelected, Selected) {
	
		this.Each(function () {
			
			this.options[this.options.length] = new Option(Text, Value, DefaultSelected, Selected);
		
		}); return this;
	},
	
	Options : function () {
		
		var Options = {'Text' : [], 'Value' : []};

		if (this[0].type.indexOf('select') > -1) {
			
			for (var x = 0; x < this[0].options.length; ++x) {

				Options['Text'][Options['Text'].length]   = this[0].options[x].text;
				Options['Value'][Options['Value'].length] = this[0].options[x].value;
			
			} return Options;
			
		} else return this;
	},
	
	SelectedOption : function () {
		
		return this[0] ? this[0].options[this[0].selectedIndex] : this;
	},
	
	SelectAllOptions : function (Status) {
	
		this.Each(function () {
			
			for (var x = 0; x < this.options.length; ++x) {
			
				this.options[x].selected = Status;
			}
		
		}); return this;
	},
	
	DropOption : function (Index) {
		
		if (this[0].type.indexOf('select') > -1) {
		
			this[0].options[Index] = null;
			
		} return this;
	},
	
	Width : function () {

		return this[0] ? parseInt(this[0].offsetWidth) : this;
	},
	
	Height : function () {

		return this[0] ? parseInt(this[0].offsetHeight) : this;
	},
	
	Left : function (CurrentNode) {
		
		if (!this[0]) return this;
		
		if (!CurrentNode) {

			var Current = this[0];
	  		var Value   = Current.offsetLeft;
	  		
	  		while((Current = Current.offsetParent) != null) {
	  		
				Value += Current.offsetLeft;
				
			} return Value;
			
		} else return this[0].offsetLeft;
	},
	
	Top : function (CurrentNode) {
		
		if (!this[0]) return this;
		
		if (!CurrentNode) {
		
			var Current = this[0];
	  		var Value   = Current.offsetTop;
	  		
	  		while((Current = Current.offsetParent) != null) {
	  		
				Value += Current.offsetTop;
				
			} return Value;
			
		} else return this[0].offsetTop;
	},
	
	ParentOffsets : function () {
	
		if (!this[0]) return this;
		
		var Current = this[0].offsetParent;
  		var Values   = {
		  	'x' : Current.offsetLeft,
		  	'y' : Current.offsetTop
		};
  		
  		while((Current = Current.offsetParent) != null) {
  		
			Values['x'] += Current.offsetLeft;
			Values['y'] += Current.offsetTop;
			
		} return Values;
	},
	
	ParentNode : function () {
		
		if (!this[0]) return this;
		
		return new $HTML().Find(this[0].parentNode);
	},
	
	TagName : function () {
		
		if (!this[0]) return this;
		
		return this[0].tagName || null;
	},
	
	Select : function (Value) {
	
		this.Each(function () {
	
			if (this.type.indexOf('select') > -1) {
				
				for (var x = 0; x < this.options.length; ++x) {
				
					if (this.options[x].value == Value) {
					
						this.options[x].selected = true; break;
					}
				}
				
			} else this.select();
			
		}); return this;	
	},
	
	Value : function (Value, Add) {

		if (Value != null) {
		
			this.Each(function () {

				if (typeof(this.value) == 'string') {
					
					Add ? (this.value += Value) : (this.value = Value);
				}
				
			}); return this;
			
		} else {
			
			if (!this[0]) return this;
			
			if (this[0].type.indexOf('select') > -1) {
			
				return this[0].options[this[0].selectedIndex].value;
				
			} else return this[0].value;
		}
	},
	
	Checked : function (Status) {

		if (Status != null) {
		
			this.Each(function () {

				this.checked = Status;
				
			}); return this;
			
		} else return this[0] ? this[0].checked : this;	
	},
	
	Disabled : function (Status) {

		if (Status != null) {
		
			this.Each(function () {

				this.disabled = Status;
				
			}); return this;
			
		} else return this[0] ? this[0].disabled : this;	
	},
	
	Clear : function () {
	
		this.Each(function () {
			
			if (typeof this.type == 'string') {
			
				if (this.type == 'text') {
				
					this.value = '';
					
				} else if (this.type.indexOf('select') > -1) {
	
					for (var x = this.options.length; x >= 0; --x) {
						
						this.options[x] = null;
					}
					
				}
				
			} else if (this.type == null && this.nodeType == 1) {

				this.innerHTML = '';
			}

		}); return this;
	},
	
	Create : function (Tag, Properties, Css) {
		
		if (!this[0]) return this;
		
		if (Tag instanceof Array) {
			
			for (var x = 0; x < Tag.length; ++x) {
			
				var Element = document.createElement(Tag[x]);
		
				HTML(Element).Attribut((Properties && Properties[x] ? Properties[x] : Properties) || {});
				HTML(Element).Css((Css && Css[x] ? Css[x] : Css) || {});
				
				this[0].appendChild(Element);
				
			} return this;
			
		} else {
		
			var Element = document.createElement(Tag);
	
			HTML(Element).Attribut(Properties || {});
			HTML(Element).Css(Css || {});
			
			return new $HTML().Find(this[0].appendChild(Element));
		}
	},
	
	Remove : function (Selector) {
	
		this.Each(function () {

			if (Selector) {
			
				var Elements = new $HTML().Find(Selector);
				
				for (var x = 0; x < Elements.Length; ++x) {
					
					this.removeChild(Elements[x]);
				}

			} else document.body.removeChild(this);

		}); return this;
	},
	
	Drag : function (Area) {
		
		if (!this[0]) return this;
		
		Area		= Area || {};
		document.XMouse = document.XMouse || 0;
		document.YMouse = document.YMouse || 0;

		this.Css({
			position : 'absolute',
			left 	 : this.Left() + 'px',
			top  	 : this.Top() + 'px'
		});

		if (document.onmousemove == null) {

			if (document.captureEvents != null) {
				document.captureEvents(Event.MOUSEMOVE || Event.MOUSEUP);
			}

			document.onmousemove = function (Event) {
				
				this.XMouse = document.all ? window.event.clientX : Event.pageX;
				this.YMouse = document.all ? window.event.clientY : Event.pageY;

				if (this.DragElement != null) {

					if ((Area['Left'] && (this.XMouse - this.DragElement['x'] - this.DragElement['DiffX']) >= Area['Left'] || !Area['Left']) 
					&& (Area['Right'] && (this.XMouse - this.DragElement['x'] - this.DragElement['DiffX'] + this.DragElement['Width']) <= Area['Right'] || !Area['Right'])) {
						
						this.DragElement['Element'].style.left = ((this.XMouse - this.DragElement['Offsets']['x']) - this.DragElement['x']) + 'px';
					}
					
					if ((Area['Top'] && (this.YMouse - this.DragElement['y'] - this.DragElement['DiffY']) >= Area['Top'] || !Area['Top']) 
					&& (Area['Bottom'] && (this.YMouse - this.DragElement['y'] - this.DragElement['DiffY'] + this.DragElement['Height']) <= Area['Bottom'] || !Area['Bottom'])) {

						this.DragElement['Element'].style.top  = ((this.YMouse - this.DragElement['Offsets']['y']) - this.DragElement['y']) + 'px';
					}
				}
			};
		}

		if (document.onmouseup == null) {
			
			document.onmouseup = function () {
				if (this.DragElement != null) {
					new $HTML().Find(this.DragElement['Element']).Css({MozUserSelect : '', KhtmlUserSelect : '', userSelect : ''});
					new $HTML().Find(this.DragElement['Element']).Attribut('unselectable', 'off');
					return !(document.DragElement = null);
				}
			}
		}

		this.IfEvent('mousedown', function (Event) {

			new $HTML().Find(this).Css({MozUserSelect : 'none', KhtmlUserSelect : 'none', UserSelect : 'none'});
			new $HTML().Find(this).Attribut('unselectable', 'on');
			document.DragElement = {
				Element : this,
				x	: document.XMouse - new $HTML().Find(this).Left(),
				y	: document.YMouse - new $HTML().Find(this).Top(),
				Width	: new $HTML().Find(this).Width(),
				Height	: new $HTML().Find(this).Height(),
				DiffX	: new $HTML().Find(this).Left(),
				DiffY	: new $HTML().Find(this).Top(),
				Offsets : new $HTML().Find(this).ParentOffsets()
			};
		});

		this.IfEvent('selectstart', function () {
			return false;
		});
	},
	
	Move_Slide : function (x, y, Durantion, MoveFunction, CallBack) {

		if (!this[0]) return this;
		
		var Parent   = HTML(this[0].offsetParent);
		var CurrentX = this[0].offsetLeft + (isNaN(parseInt(Parent.Css('border-left-width'))) ? 0 : parseInt(Parent.Css('border-left-width')));
		var CurrentY = this[0].offsetTop + (isNaN(parseInt(Parent.Css('border-right-width'))) ? 0 : parseInt(Parent.Css('border-right-width')));

		if (CurrentX != x || CurrentY != y) {
		
			this.Css({
				position : 'absolute',
				left 	 : CurrentX + 'px',
				top  	 : CurrentY + 'px'
			});
			
			window.clearInterval(this[0].Interval);
			
			this[0].Move_Slide = {
				
				'Element' 	: this[0],
				'Current_X'	: CurrentX,
				'Current_Y'	: CurrentY,
				'Difference_X' 	: x - CurrentX,
				'Difference_Y' 	: y - CurrentY,
				'MoveFunction'	: MoveFunction || function (t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; },
				'CallBack'	: CallBack,
				'Durantion'  	: Durantion || 20,
				'Count'	   	: 0,
				
				Interval : function () {
	
					if (this.Count < this.Durantion) {
	
						this.Element.style.left = this.MoveFunction(this.Count, this.Current_X, this.Difference_X, this.Durantion) + 'px';
						this.Element.style.top  = this.MoveFunction(this.Count, this.Current_Y, this.Difference_Y, this.Durantion) + 'px';
						
						this.Count++;
						
					} else {
					
						this.Element.style.left = x + 'px';
						this.Element.style.top  = y + 'px';
						
						if (typeof this.CallBack == 'function') {
							
							this.CallBack();
							
						} window.clearInterval(this.Element.Interval);
					}
				}
				
			}; this[0].Interval = window.setInterval('HTML("#' + this[0].id + '")[0].Move_Slide.Interval()', 10);
		}
	},
	
	Opacity : function (Value) {
		
		if (Value == null || Value < 0 || Value > 100) {
			Value = 100;
		}

		this.Each(function () {

			HTML(this).Css({
				'filter' 	: 'alpha(opacity=' + Value + ')',
				'mozOpacity'	: (Value / 100),
				'opacity'	: (Value / 100)
			});
			
		}); return this;
	},
	
	RightClick : function (Element) {

		if (document.captureEvents != null) {
			document.captureEvents(Event.MOUSEDOWN);
		} Element = Element.substr(0, 1) != '#' ? '#' + Element : Element;
		
		this.Each(function () {

			var RightClick = function (Event) {

				var E = (!Event) ? window.event : Event;

				if ((E.type && E.type == 'contextmenu') 
				|| (E.button && E.button == 2) 
				|| (E.which && E.which == 3)) {
				
					var Body = (document.compatMode && document.compatMode != 'BackCompat') ? document.documentElement : ((document.body) ? document.body : null);

					if(typeof Body.scrollLeft == 'number' && typeof Body.scrollTop == 'number' || window.opera != null) {
						if (window.event) {
							if (!event.x && !event.y) {
								var XMouse = event.clientX;
								var YMouse = event.clientY;
							} else {
								if(event.clientY > event.screenY) {
									var XMouse = Body.scrollLeft + event.screenX;
									var YMouse = Body.scrollTop + event.screenY;
								} else {
									var XMouse = Body.scrollLeft + event.clientX;
									var YMouse = Body.scrollTop + event.clientY;
								}
							}
						} else {
							var XMouse = Body.scrollLeft + Event.clientX;
							var YMouse = Body.scrollTop + Event.clientY;
						}
					} else {
						var XMouse = window.pageXOffset + Event.clientX;
						var YMouse = window.pageYOffset + Event.clientY;
					}

					HTML(Element).Css({
					
						'position'	: 'absolute',
						'top' 		: YMouse + 'px',
						'left' 		: (XMouse + 10) + 'px',
						'visibility' 	: 'visible'

					}).Property({'RightClickField' : this.id}); 
					
					return false;
					
				} else HTML(Element).Css({'visibility' : 'hidden'});
				
				HTML(Element).IfEvent('mousedown|contextmenu', function (Event) {
				
					if (!Event) Event = window.event;
					
					if ((Event.type && Event.type == 'contextmenu') 
					|| (Event.button && Event.button == 2) 
					|| (Event.which && Event.which == 3)) {
						return false;
					}	
				
				}).Each(function () {
				
					HTML('A', this).Each(function () {
						HTML(this).IfEvent('click', function () {
							HTML(Element).Css({'visibility' : 'hidden'});	
						});
					});
				
					HTML('option', this).Each(function () {
						if (String(this.label).toLowerCase() == HTML(Element).Property('id').toLowerCase()) {
							HTML(this).IfEvent('click', function () {
								HTML(Element).Css({'visibility' : 'hidden'});	
							});
						}
					});
				});
			};

			HTML(this).IfEvent('mousedown|contextmenu', RightClick);
		});
	}
});

Objects ('Cookie', {

	SetCookie : function (name, value, expires) {

		if (value instanceof Array) {

			value = 'a:' + value.join('¦');

		} else if (typeof value == 'object') {

			var data = [];

			for (var x in value) {

				data[data.length] = x + '¤' + value[x];

			} value = 'o:' + data.join('¦');

		} else value = 's:' + value;

		return document.cookie = name + '=' + escape(value) + '; expires=' + new Date(new Date().getTime() + expires).toLocaleString();
	},

	GetCookie : function (name) {

		var cookies = document.cookie.split(';');

		for (var x = 0; x < cookies.length; ++x) {

			var current = cookies[x].split('=');

			if (current[0] == name) {

				var type = String(unescape(current[1]));

				if (type.substr(0,2) == 'a:') {

					return type.substr(2).split('¦');

				} else if (type.substr(0,2) == 'o:') {

					var data = type.substr(2).split('¦');

					for (var object = {}, y = 0; y < data.length; ++y) {

						var value = data[y].split('¤');

						object[value[0]] = value[1];

					} return object;

				} else return type.substr(2);
			}

		} return false;
	},

	Delete : function (name) {

		this.SetCookie(name, '', -99999999);
	}
});

Objects ('Configurator', {
	
	XMLHTTPRequest 	: new Ajax(),
	DebugMode 	: false,
	ResultFadeSteps : 15,
	ResultFadeColor : {From : 'FFFFFF', To : 'FF4E00'},
	RequestTo 	: '',
		
	RequestURL : function (URL) {

		Configurator.RequestTo = URL;
	},
	
	SearchButtonDisabled : function (Status) {

		HTML('#ConfiguratorButton').DisabledEvent('click', Status);
	},
	
	LoadingWheel : function (Status) {
		
		HTML('#ConfiguratorFormular').Css({
		
			'background'	: ((Status) ? 'transparent url(http://media.notebookinfo.de/loading-wheel/732c70917cb44827e0de7dca2500ccf3) 97% 0px no-repeat' : 'none')
		});
	},
	
	BuildQueryString : function (First) {
		
		var QueryString = [];

		HTML('*[type=select-one|checkbox]', HTML('#ConfiguratorLoading')[0]).Each(function () {
			
			var QueryControll = false;
			
			if (this.type == 'select-one') {
			
				if (!Empty(HTML(this).Value())) {
					
					QueryString.Push(this.name + '=' + encodeURIComponent(HTML(this).Value()));
				}
				
			} else if (this.type == 'checkbox') {
				
				if (HTML('#' + this.id).Checked()) {
					
					this.name = /^([^\[?]+)(\[([^\]]+)?\])?$/.exec(this.name)[1];
					
					for (var x = 0; x < QueryString.length; ++x) {
						
						if (QueryString[x].indexOf(this.name + '=') > -1) {
							
							QueryString[x] = QueryString[x] + ',' + HTML('#' + this.id).Value();
							QueryControll  = true;
							break;
						}
					}
					
					if (QueryControll === false) {
					
						QueryString.Push(this.name + '=' + encodeURIComponent(HTML('#' + this.id).Value()));
					}
				}
				
				
			}
			
		}); return (First === true ? '?' : '&') + QueryString.join('&');
	},
	
	Result : function (Output, Result) {
	
		if (!(Output instanceof Array)) {
			Output = [Output];
		}

		HTML('/#(' + Output.join('|') + ')$/').Each(function () {
			
			window.clearInterval(this.Interval);
			
			HTML(this).Property({
				
				'Output' 	: this,
				'Result' 	: Result,
				'Begin'		: parseInt(HTML(this).Html()),
				'Difference'	: Result - parseInt(HTML(this).Html()),
				'Durantion'	: 20,
				'Count'		: 0,
				'Interval'	: 0,
				'IntervalCall'	: function () {

					if (this.Count < this.Durantion) {
					
						this.Output.innerHTML = Math.floor(Math.EaseOutQuart(this.Count, this.Begin, this.Difference, this.Durantion));
						this.Count++;
						
					} else {
					
						this.Output.innerHTML = this.Result;
						window.clearInterval(this.Interval);
					}	
				}
			
			}); this.Interval = window.setInterval('HTML("#' + this.id + '")[0].IntervalCall()', 10);
		});
	},
	
	DefaultNotebooks : function () {
	
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('/#(manufacturer|resolution|technologie|processor_speed|processor_type|graphic_card_memory|graphic_card_processor)$/').Clear();
		HTML('/#(manufacturer|technologie)$/').Option('Wird geladen ...', '');
		HTML('/#(resolution|processor_speed|processor_type|graphic_card_memory|graphic_card_processor)$/').Option('- -', '').Disabled(true);
		
		if (Empty(Configurator.DefaultCallback)) {
		
			Configurator.DefaultCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				/* Manufacturer */
				
				if (HTML('#manufacturer').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['manufacturer']['item'];
					
					if (!Empty(Result)) {
						
						HTML('#manufacturer').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#manufacturer').Option(Result[x]['text'], Result[x]['value']);
						}
						
					} else HTML('#manufacturer').Option('Keine vorhanden', '');
				}
				
				
				/* Technologie */
				
				if (HTML('#technologie').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['technologie'];

					if (!Empty(Result['amd']) || !Empty(Result['intel']) || !Empty(Result['other'])) {
						
						HTML('#technologie').Option('alle anzeigen', '').Option('- -', '');

						if (!Empty(Result['amd'])) {
						
							if (!(Result['amd']['item'] instanceof Array)) {
								
								Result['amd']['item'] = [Result['amd']['item']];
								
							} HTML('#technologie').Option('AMD', '1');
							
							for (var x = 0; x < Result['amd']['item'].length; ++x) {
								
								HTML('#technologie').Option(':: ' + Result['amd']['item'][x]['text'], Result['amd']['item'][x]['value']);	
							}
							
							if (!Empty(Result['intel']) || !Empty(Result['other'])) {
								
								HTML('#technologie').Option('- -', '');
							}
						}

						if (!Empty(Result['intel'])) {
						
							if (!(Result['intel']['item'] instanceof Array)) {
								
								Result['intel']['item'] = [Result['intel']['item']];
								
							} HTML('#technologie').Option('Intel', '2');
							
							for (var x = 0; x < Result['intel']['item'].length; ++x) {
								
								HTML('#technologie').Option(':: ' + Result['intel']['item'][x]['text'], Result['intel']['item'][x]['value']);
							}
							
							if (!Empty(Result['other'])) {
							
								HTML('#technologie').Option('- -', '');
							}
						}

						if (!Empty(Result['other'])) {
						
							if (!(Result['other']['item'] instanceof Array)) {
								
								Result['other']['item'] = [Result['other']['item']];
								
							} HTML('#technologie').Option('Sonstige', '3');
							
							for (var x = 0; x < Result['other']['item'].length; ++x) {
	
								HTML('#technologie').Option(':: ' + Result['other']['item'][x]['text'], Result['other']['item'][x]['value']);
							}
						}
						
					} else HTML('#technologie').Option('Keine vorhanden', '');
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('DefaultCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
			};
		}
		
		with (Configurator.XMLHTTPRequest) {

			Send(Configurator.RequestTo + '?type=1&r=' + Time(), 'GET', 'xml');
			Call('Configurator.DefaultCallback');
		}
	},
	
	DefaultHandys : function () {

		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('#manufacturer').Clear().Option('Wird geladen ...', '').Disabled(true);
		
		if (Empty(Configurator.DefaultCallback)) {
		
			Configurator.DefaultCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				/* Manufacturer */
				
				if (HTML('#manufacturer').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['manufacturer']['item'];
					
					if (!Empty(Result)) {
						
						HTML('#manufacturer').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#manufacturer').Option(Result[x]['text'], Result[x]['value']);
						
						} HTML('#manufacturer').Disabled(false);
						
					} else HTML('#manufacturer').Option('Keine vorhanden', '').Disabled(false);
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('DefaultCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
			};
		}
		
		with (Configurator.XMLHTTPRequest) {

			Send(Configurator.RequestTo + '?type=1&r=' + Time(), 'GET', 'xml');
			Call('Configurator.DefaultCallback');
		}
	},
	
	DefaultGPS : function () {
	
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('#manufacturer').Clear().Option('Wird geladen ...', '').Disabled(true);
		
		if (Empty(Configurator.DefaultCallback)) {
		
			Configurator.DefaultCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				/* Manufacturer */
				
				if (HTML('#manufacturer').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['manufacturer']['item'];
					
					if (!Empty(Result)) {
						
						HTML('#manufacturer').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#manufacturer').Option(Result[x]['text'], Result[x]['value']);
						
						} HTML('#manufacturer').Disabled(false);
						
					} else HTML('#manufacturer').Option('Keine vorhanden', '').Disabled(false);
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('DefaultCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
			};
		}
		
		with (Configurator.XMLHTTPRequest) {

			Send(Configurator.RequestTo + '?type=1&r=' + Time(), 'GET', 'xml');
			Call('Configurator.DefaultCallback');
		}
	},
	
	DefaultMultimediaplayer : function () {
	
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('#manufacturer').Clear().Option('Wird geladen ...', '').Disabled(true);
		HTML('#storage_size').Clear().Option('- -', '').Disabled(true);
		
		if (Empty(Configurator.DefaultCallback)) {
		
			Configurator.DefaultCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				/* Manufacturer */
				
				if (HTML('#manufacturer').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['manufacturer']['item'];
					
					if (!Empty(Result)) {
						
						HTML('#manufacturer').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#manufacturer').Option(Result[x]['text'], Result[x]['value']);
						
						} HTML('#manufacturer').Disabled(false);
						
					} else HTML('#manufacturer').Option('Keine vorhanden', '').Disabled(false);
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('DefaultCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
			};
		}
		
		with (Configurator.XMLHTTPRequest) {

			Send(Configurator.RequestTo + '?type=1&r=' + Time(), 'GET', 'xml');
			Call('Configurator.DefaultCallback');
		}
	},
	
	DefaultPDAs : function () {
	
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('#manufacturer').Clear().Option('Wird geladen ...', '').Disabled(true);
		
		if (Empty(Configurator.DefaultCallback)) {
		
			Configurator.DefaultCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				/* Manufacturer */
				
				if (HTML('#manufacturer').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['manufacturer']['item'];
					
					if (!Empty(Result)) {
						
						HTML('#manufacturer').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#manufacturer').Option(Result[x]['text'], Result[x]['value']);
						
						} HTML('#manufacturer').Disabled(false);
						
					} else HTML('#manufacturer').Option('Keine vorhanden', '').Disabled(false);
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('DefaultCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
			};
		}
		
		with (Configurator.XMLHTTPRequest) {

			Send(Configurator.RequestTo + '?type=1&r=' + Time(), 'GET', 'xml');
			Call('Configurator.DefaultCallback');
		}
	},
	
	LoadNotebooks : function (QueryString) {
		
		var Query = File.ParseQueryString(QueryString);
	
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('#price').Select(Query['price']);
		HTML('#display').Select(Query['display']);
		HTML('#disc').Select(Query['disc']);
		HTML('#battery').Select(Query['battery']);
		HTML('#memory').Select(Query['memory']);
		HTML('#drive').Select(Query['drive']);
		HTML('#weight').Select(Query['weight']);
		HTML('#graphic_card').Select(Query['graphic_card']);
		
		HTML('#manufacturer').Clear().Option('Wird geladen ...', '').Disabled(true);
	
		if (Query['display']) {
			
			HTML('#resolution').Clear().Option('Wird geladen ...', '').Disabled(true);	
		}
		
		if (Query['technologie']) {
			
			HTML('/#(technologie|processor_speed|processor_type)$/').Clear().Option('Wird geladen ...', '').Disabled(true);
			
		} else HTML('#technologie').Clear().Option('Wird geladen ...', '').Disabled(true);

		if (Query['graphic_card']) {
		
			HTML('/#(graphic_card_memory|graphic_card_processor)$/').Clear().Option('Wird geladen ...', '').Disabled(true);
		}
		
		if (Empty(Configurator.LoadCallback)) {
		
			Configurator.LoadCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				
				/* Manufacturer */
				
				if (HTML('#manufacturer').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['manufacturer']['item'];
					
					if (!Empty(Result)) {
						
						HTML('#manufacturer').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#manufacturer').Option(Result[x]['text'], Result[x]['value']);	
						
						} HTML('#manufacturer').Select(Query['manufacturer']).Disabled(false);
						
					} else HTML('#manufacturer').Option('Keine vorhanden', '');
				}


				if (Query['display']) {
				
					/* Display resolution */
				
					if (HTML('#resolution').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['resolution']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#resolution').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
							
								HTML('#resolution').Option(Result[x]['text'], Result[x]['value']);	
							
							} HTML('#resolution').Select(Query['resolution']).Disabled(false);
							
						} else HTML('#resolution').Option('Keine vorhanden', '');
					}
				}
				

				/* Technologie */
				
				if (HTML('#technologie').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['technologie'];

					if (!Empty(Result['amd']) || !Empty(Result['intel']) || !Empty(Result['other'])) {
						
						HTML('#technologie').Option('alle anzeigen', '').Option('- -', '');

						if (!Empty(Result['amd'])) {
						
							if (!(Result['amd']['item'] instanceof Array)) {
								
								Result['amd']['item'] = [Result['amd']['item']];
								
							} HTML('#technologie').Option('AMD', '1');
							
							for (var x = 0; x < Result['amd']['item'].length; ++x) {
								
								HTML('#technologie').Option(':: ' + Result['amd']['item'][x]['text'], Result['amd']['item'][x]['value']);	
							}
							
							if (!Empty(Result['intel']) || !Empty(Result['other'])) {
								
								HTML('#technologie').Option('- -', '');
							}
						}

						if (!Empty(Result['intel'])) {
						
							if (!(Result['intel']['item'] instanceof Array)) {
								
								Result['intel']['item'] = [Result['intel']['item']];
								
							} HTML('#technologie').Option('Intel', '2');
							
							for (var x = 0; x < Result['intel']['item'].length; ++x) {
								
								HTML('#technologie').Option(':: ' + Result['intel']['item'][x]['text'], Result['intel']['item'][x]['value']);
							}
							
							if (!Empty(Result['other'])) {
							
								HTML('#technologie').Option('- -', '');
							}
						}

						if (!Empty(Result['other'])) {
						
							if (!(Result['other']['item'] instanceof Array)) {
								
								Result['other']['item'] = [Result['other']['item']];
								
							} HTML('#technologie').Option('Sonstige', '3');
							
							for (var x = 0; x < Result['other']['item'].length; ++x) {
	
								HTML('#technologie').Option(':: ' + Result['other']['item'][x]['text'], Result['other']['item'][x]['value']);
							}
						
						} HTML('#technologie').Select(Query['technologie']).Disabled(false);
						
					} else HTML('#technologie').Option('Keine vorhanden', '');
				}
				
				if (Query['technologie']) {
				
					/* Processor speed */
					
					if (HTML('#processor_speed').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['processor_speed']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#processor_speed').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
								
								HTML('#processor_speed').Option(Result[x]['text'], Result[x]['value']);
							
							} HTML('#processor_speed').Select(Query['processor_speed']).Disabled(false);
							
							HTML('td', HTML('#TechnologieMainOption')[0]).Css('paddingBottom', '14px');
							ElementSizer.AddElement('TechnologieOptions', 'height');
							ElementSizer.SetSize('TechnologieOptions', HTML('table', HTML('#TechnologieOptions')[0]).Height(), 20);
							
						} else HTML('#processor_speed').Option('Keine vorhanden', '');
					}
					
					/* Processor type */
					
					if (HTML('#processor_type').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['processor_type']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#processor_type').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
								
								HTML('#processor_type').Option(Result[x]['text'], Result[x]['value']);
							
							} HTML('#processor_type').Select(Query['processor_type']).Disabled(false);
							
						} else HTML('#processor_type').Option('Keine vorhanden', '');
					}
				}
				
				if (Query['graphic_card']) {
				
					/* Graphic card memory */
					
					if (HTML('#graphic_card_memory').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['graphic_card_memory']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#graphic_card_memory').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
								
								HTML('#graphic_card_memory').Option(Result[x]['text'], Result[x]['value']);	
							
							} HTML('#graphic_card_memory').Select(Query['graphic_card_memory']).Disabled(false);
							
							ElementSizer.AddElement('GraphicOptions', 'height');
							ElementSizer.SetSize('GraphicOptions', HTML('table', HTML('#GraphicOptions')[0]).Height(), 20);

						} else HTML('#graphic_card_memory').Option('Keine vorhanden', '');
					}
					
					/* Graphic card processor */
					
					if (HTML('#graphic_card_processor').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['graphic_card_processor']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#graphic_card_processor').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
								
								HTML('#graphic_card_processor').Option(Result[x]['text'], Result[x]['value']);
							
							}  HTML('#graphic_card_processor').Select(Query['graphic_card_processor']).Disabled(false);
							
						} else HTML('#graphic_card_processor').Option('Keine vorhanden', '');
					}
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('LoadCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
			};
		}
		
		with (Configurator.XMLHTTPRequest) {
	
			QueryString = QueryString.split('?')[0] || QueryString;
			QueryString = QueryString.split('&').slice(1, -1).join('&');
			QueryString = QueryString != '' ? '&' + QueryString : QueryString;

			Send(Configurator.RequestTo + '?type=7' + QueryString + '&r=' + Time(), 'GET', 'xml');
			Call('Configurator.LoadCallback');
		}
	},
	
	LoadGPS : function (QueryString) {
	
		var Query = File.ParseQueryString(QueryString);
	
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('#price').Select(Query['price']);
		HTML('#application_area').Select(Query['application_area']);
		HTML('#storage_medium').Select(Query['storage_medium']);
		
		if (!Empty(Query['map_material'])) {
			HTML('/#map_material_[0-9]/').Each(function () {
				if (Query['map_material'].indexOf(HTML(this).Value()) > -1) {
					HTML(this).Checked(true);
				}
			});
		}
		
		if (!Empty(Query['special_functions'])) {
			HTML('/#special_functions_[0-9]/').Each(function () {
				if (Query['special_functions'].indexOf(HTML(this).Value()) > -1) {
					HTML(this).Checked(true);
				}
			});
		}
		
		if (!Empty(Query['special_features'])) {
			HTML('/#special_features_[0-9]/').Each(function () {
				if (Query['special_features'].indexOf(HTML(this).Value()) > -1) {
					HTML(this).Checked(true);
				}
			});
		}
		
		HTML('#manufacturer').Clear().Option('Wird geladen ...', '').Disabled(true);
		
		if (Empty(Configurator.LoadCallback)) {
		
			Configurator.LoadCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				
				/* Manufacturer */
				
				if (HTML('#manufacturer').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['manufacturer']['item'];
					
					if (!Empty(Result)) {
						
						HTML('#manufacturer').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#manufacturer').Option(Result[x]['text'], Result[x]['value']);	
						
						} HTML('#manufacturer').Select(Query['manufacturer']).Disabled(false);
						
					} else HTML('#manufacturer').Option('Keine vorhanden', '');
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('LoadCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
			};
		}
		
		with (Configurator.XMLHTTPRequest) {
	
			QueryString = QueryString.split('?')[0] || QueryString;
			QueryString = QueryString.split('&').slice(1, -1).join('&');
			QueryString = QueryString != '' ? '&' + QueryString : QueryString;

			Send(Configurator.RequestTo + '?type=1' + QueryString + '&r=' + Time(), 'GET', 'xml');
			Call('Configurator.LoadCallback');
		}
	},

	LoadHandys : function (QueryString) {

		var Query = File.ParseQueryString(QueryString);
	
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('#price').Select(Query['price']);
		HTML('#memory').Select(Query['memory']);
		HTML('#standby_time').Select(Query['standby_time']);
		HTML('#talk_time').Select(Query['talk_time']);
		HTML('#weight').Select(Query['weight']);
		HTML('#os').Select(Query['os']);
		
		if (!Empty(Query['storage_medium'])) {
			HTML('/#storage_medium_[0-9]/').Each(function () {
				if (Query['storage_medium'].indexOf(HTML(this).Value()) > -1) {
					HTML(this).Checked(true);
				}
			});
		}
		
		if (!Empty(Query['connectivity'])) {
			HTML('/#connectivity_[0-9]/').Each(function () {
				if (Query['connectivity'].indexOf(HTML(this).Value()) > -1) {
					HTML(this).Checked(true);
				}
			});
		}
		
		if (!Empty(Query['special_features'])) {
			HTML('/#special_features_[0-9]/').Each(function () {
				if (Query['special_features'].indexOf(HTML(this).Value()) > -1) {
					HTML(this).Checked(true);
				}
			});
		}
		
		HTML('#manufacturer').Clear().Option('Wird geladen ...', '').Disabled(true);

		if (Empty(Configurator.LoadCallback)) {
		
			Configurator.LoadCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				
				/* Manufacturer */
				
				if (HTML('#manufacturer').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['manufacturer']['item'];
					
					if (!Empty(Result)) {
						
						HTML('#manufacturer').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#manufacturer').Option(Result[x]['text'], Result[x]['value']);	
						
						} HTML('#manufacturer').Select(Query['manufacturer']).Disabled(false);
						
					} else HTML('#manufacturer').Option('Keine vorhanden', '');
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('LoadCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
			};
		}
		
		with (Configurator.XMLHTTPRequest) {
	
			QueryString = QueryString.split('?')[0] || QueryString;
			QueryString = QueryString.split('&').slice(1, -1).join('&');
			QueryString = QueryString != '' ? '&' + QueryString : QueryString;

			Send(Configurator.RequestTo + '?type=1' + QueryString + '&r=' + Time(), 'GET', 'xml');
			Call('Configurator.LoadCallback');
		}
	},
	
	LoadMultimediaplayer : function (QueryString) {

		var Query = File.ParseQueryString(QueryString);
	
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('#price').Select(Query['price']);
		HTML('#player_type').Select(Query['player_type']);
		HTML('#storage_medium_type').Select(Query['storage_medium_type']);
		HTML('#weight').Select(Query['weight']);
		
		if (!Empty(Query['storage_medium_type'])) {
			HTML('#storage_size').Clear().Option('Wird geladen ...', '').Disabled(true);
		} else HTML('#storage_size').Clear().Option('- -', '').Disabled(true);

		if (!Empty(Query['special_features'])) {
			HTML('/#special_features_[0-9]/').Each(function () {
				if (Query['special_features'].indexOf(HTML(this).Value()) > -1) {
					HTML(this).Checked(true);
				}
			});
		}
		
		HTML('#manufacturer').Clear().Option('Wird geladen ...', '').Disabled(true);

		if (Empty(Configurator.LoadCallback)) {
		
			Configurator.LoadCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				
				/* Manufacturer */
				
				if (HTML('#manufacturer').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['manufacturer']['item'];
					
					if (!Empty(Result)) {
						
						HTML('#manufacturer').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#manufacturer').Option(Result[x]['text'], Result[x]['value']);	
						
						} HTML('#manufacturer').Select(Query['manufacturer']).Disabled(false);
						
					} else HTML('#manufacturer').Option('Keine vorhanden', '');
				}
				
				/* Storage Size */
				
				if (!Empty(Query['storage_size'])) {
				
					if (HTML('#storage_size').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['storage_size']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#storage_size').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
								
								HTML('#storage_size').Option(Result[x]['text'], Result[x]['value']);	
							
							} HTML('#storage_size').Select(Query['storage_size']).Disabled(false);
							
						} else HTML('#storage_size').Option('Keine vorhanden', '');
					}
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('LoadCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
			};
		}
		
		with (Configurator.XMLHTTPRequest) {
	
			QueryString = QueryString.split('?')[0] || QueryString;
			QueryString = QueryString.split('&').slice(1, -1).join('&');
			QueryString = QueryString != '' ? '&' + QueryString : QueryString;

			Send(Configurator.RequestTo + '?type=3' + QueryString + '&r=' + Time(), 'GET', 'xml');
			Call('Configurator.LoadCallback');
		}
	},

	LoadPDAs : function (QueryString) {

		var Query = File.ParseQueryString(QueryString);
	
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('#price').Select(Query['price']);
		HTML('#memory').Select(Query['memory']);
		HTML('#processor').Select(Query['processor']);
		HTML('#display').Select(Query['display']);
		HTML('#weight').Select(Query['weight']);
		HTML('#os').Select(Query['os']);
		
		if (!Empty(Query['storage_medium'])) {
			HTML('/#storage_medium_[0-9]/').Each(function () {
				if (Query['storage_medium'].indexOf(HTML(this).Value()) > -1) {
					HTML(this).Checked(true);
				}
			});
		}
		
		if (!Empty(Query['connectivity'])) {
			HTML('/#connectivity_[0-9]/').Each(function () {
				if (Query['connectivity'].indexOf(HTML(this).Value()) > -1) {
					HTML(this).Checked(true);
				}
			});
		}
		
		if (!Empty(Query['special_features'])) {
			HTML('/#special_features_[0-9]/').Each(function () {
				if (Query['special_features'].indexOf(HTML(this).Value()) > -1) {
					HTML(this).Checked(true);
				}
			});
		}
		
		HTML('#manufacturer').Clear().Option('Wird geladen ...', '').Disabled(true);

		if (Empty(Configurator.LoadCallback)) {
		
			Configurator.LoadCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				
				/* Manufacturer */
				
				if (HTML('#manufacturer').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['manufacturer']['item'];
					
					if (!Empty(Result)) {
						
						HTML('#manufacturer').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#manufacturer').Option(Result[x]['text'], Result[x]['value']);	
						
						} HTML('#manufacturer').Select(Query['manufacturer']).Disabled(false);
						
					} else HTML('#manufacturer').Option('Keine vorhanden', '');
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('LoadCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
			};
		}
		
		with (Configurator.XMLHTTPRequest) {
	
			QueryString = QueryString.split('?')[0] || QueryString;
			QueryString = QueryString.split('&').slice(1, -1).join('&');
			QueryString = QueryString != '' ? '&' + QueryString : QueryString;

			Send(Configurator.RequestTo + '?type=1' + QueryString + '&r=' + Time(), 'GET', 'xml');
			Call('Configurator.LoadCallback');
		}
	},

	Update : function () {
		
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
	
		if (Empty(Configurator.UpdateCallback)) {
		
			Configurator.UpdateCallback = function () {

				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('UpdateCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
			};
		}
		
		with (Configurator.XMLHTTPRequest) {

			Send(Configurator.RequestTo + '?type=0' + Configurator.BuildQueryString() + '&r=' + Time(), 'GET', 'xml');
			Call('Configurator.UpdateCallback');
		}
	},
	
	Display : function () {
				
		if (!Empty(HTML('#display').Value())) {
		
			Configurator.LoadingWheel(true);
			Configurator.SearchButtonDisabled(true);
			
			HTML('#resolution').Clear().Option('Wird geladen ...', '').Disabled(true);
			
			if (Empty(Configurator.DisplayCallback)) {
			
				Configurator.DisplayCallback = function () {

					if (!Empty(Configurator.DebugMode)) {
						
						Display(
							'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
							'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
							'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
						);
					}

					/* Display resolution */
					
					if (HTML('#resolution').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['resolution']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#resolution').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
							
								HTML('#resolution').Option(Result[x]['text'], Result[x]['value']);	
							}
							
						} else HTML('#resolution').Option('Keine vorhanden', '');
					}

					Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
					Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
					Configurator.Unset('DisplayCallback');
					Configurator.LoadingWheel(false);
					Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
					
					HTML('#resolution').Disabled(false);
				};

				with (Configurator.XMLHTTPRequest) {
		
					Send(Configurator.RequestTo + '?type=2' + Configurator.BuildQueryString() + '&r=' + Time(), 'GET', 'xml');
					Call('Configurator.DisplayCallback');
				}
			}
		
		} else {
			
			HTML('#resolution').Clear().Option('- -', '').Disabled(true);
			
			Configurator.Update();
		}
	},
	
	Technologie : function () {
	
		if (!Empty(HTML('#technologie').Value())) {
		
			Configurator.LoadingWheel(true);
			Configurator.SearchButtonDisabled(true);
			
			HTML('/#(processor_speed|processor_type)$/').Clear().Option('Wird geladen ...', '').Disabled(true);
			
			ElementSizer.AddElement('TechnologieOptions', 'height');

			if (Empty(Configurator.TechnologieCallback)) {
			
				Configurator.TechnologieCallback = function () {
				
					if (!Empty(Configurator.DebugMode)) {
						
						Display(
							'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
							'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
							'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
						);
					}

					/* Processor speed */
					
					if (HTML('#processor_speed').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['processor_speed']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#processor_speed').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
								
								HTML('#processor_speed').Option(Result[x]['text'], Result[x]['value']);
							}

						} else HTML('#processor_speed').Option('Keine vorhanden', '');
					}
					
					/* Processor type */
					
					if (HTML('#processor_type').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['processor_type']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#processor_type').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
								
								HTML('#processor_type').Option(Result[x]['text'], Result[x]['value']);
							}
							
						} else HTML('#processor_type').Option('Keine vorhanden', '');
					}

					Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
					Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
					Configurator.Unset('TechnologieCallback');
					Configurator.LoadingWheel(false);
					Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);

					HTML('td', HTML('#TechnologieMainOption')[0]).Css('paddingBottom', '14px');
					ElementSizer.SetSize('TechnologieOptions', HTML('table', HTML('#TechnologieOptions')[0]).Height(), 20);
					
					HTML('/#(processor_speed|processor_type)$/').Disabled(false);
				};
				
				with (Configurator.XMLHTTPRequest) {
		
					Send(Configurator.RequestTo + '?type=3' + Configurator.BuildQueryString() + '&r=' + Time(), 'GET', 'xml');
					Call('Configurator.TechnologieCallback');
				}
			}
			
		} else {

			HTML('/#(processor_speed|processor_type)$/').Clear().Option('- -', '').Disabled(true);
			
			ElementSizer.SetSize('TechnologieOptions', 0, 10);
			
			HTML('td', HTML('#TechnologieMainOption')[0]).Css('paddingBottom', '0px');
			
			Configurator.Update();
		}
	},
	
	ProcessorSpeed : function () {
		
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('#processor_type').Clear().Option('- -', '').Disabled(true);

		if (Empty(Configurator.ProcessorSpeedCallback)) {
		
			Configurator.ProcessorSpeedCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				/* Processor speed */
				
				if (HTML('#processor_type').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['processor_type']['item'];
					
					if (!(Result instanceof Array)) {
						
						Result = [Result];
					}
					
					if (!Empty(Result)) {
						
						HTML('#processor_type').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#processor_type').Option(Result[x]['text'], Result[x]['value']);
						}
						
					} else HTML('#processor_type').Option('Keine vorhanden', '');
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);	
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('ProcessorSpeedCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
				
				HTML('#processor_type').Disabled(false);
			}
		}
		
		with (Configurator.XMLHTTPRequest) {

			Send(Configurator.RequestTo + '?type=4' + Configurator.BuildQueryString() + '&r=' + Time(), 'GET', 'xml');
			Call('Configurator.ProcessorSpeedCallback');
		}
	},
	
	GraphicCard : function () {
	
		if (!Empty(HTML('#graphic_card').Value())) {
		
			Configurator.LoadingWheel(true);
			Configurator.SearchButtonDisabled(true);
			
			HTML('/#(graphic_card_memory|graphic_card_processor)$/').Clear().Option('Wird geladen ...', '').Disabled(true);
			
			ElementSizer.AddElement('GraphicOptions', 'height');
			
			if (Empty(Configurator.GraphicCardCallback)) {
			
				Configurator.GraphicCardCallback = function () {
				
					if (!Empty(Configurator.DebugMode)) {
						
						Display(
							'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
							'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
							'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
						);
					}

					/* Graphic card memory */

					if (HTML('#graphic_card_memory').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['graphic_card_memory']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#graphic_card_memory').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
								
								HTML('#graphic_card_memory').Option(Result[x]['text'], Result[x]['value']);	
							}
							
						} else HTML('#graphic_card_memory').Option('Keine vorhanden', '');
					}
					
					/* Graphic card processor */
					
					if (HTML('#graphic_card_processor').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['graphic_card_processor']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#graphic_card_processor').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
								
								HTML('#graphic_card_processor').Option(Result[x]['text'], Result[x]['value']);
							}
							
						} else HTML('#graphic_card_processor').Option('Keine vorhanden', '');
					}

					Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
					Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
					Configurator.Unset('GraphicCardCallback');
					Configurator.LoadingWheel(false);
					Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);

					ElementSizer.SetSize('GraphicOptions', HTML('table', HTML('#GraphicOptions')[0]).Height(), 20);
					
					HTML('/#(graphic_card_memory|graphic_card_processor)$/').Disabled(false);
				};
				
				with (Configurator.XMLHTTPRequest) {
		
					Send(Configurator.RequestTo + '?type=5' + Configurator.BuildQueryString() + '&r=' + Time(), 'GET', 'xml');
					Call('Configurator.GraphicCardCallback');
				}
			}
			
		} else {
		
			HTML('/#(graphic_card_memory|graphic_card_processor)$/').Clear().Option('- -', '').Disabled(true);
			
			ElementSizer.SetSize('GraphicOptions', 0, 10);
			
			Configurator.Update();
		}
	},
	
	GraphicCardSpeed : function () {
		
		Configurator.LoadingWheel(true);
		Configurator.SearchButtonDisabled(true);
		
		HTML('#graphic_card_processor').Clear().Option('Wird geladen ...', '').Disabled(true);

		if (Empty(Configurator.GraphicCardSpeedCallback)) {
		
			Configurator.GraphicCardSpeedCallback = function () {
				
				if (!Empty(Configurator.DebugMode)) {
					
					Display(
						'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
						'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
						'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
					);
				}
				
				/* Graphic card processor */
				
				if (HTML('#graphic_card_processor').Clear()) {
					
					var Result = Configurator.XMLHTTPRequest['Data']['result']['graphic_card_processor']['item'];
					
					if (!(Result instanceof Array)) {
						
						Result = [Result];
					}
					
					if (!Empty(Result)) {
						
						HTML('#graphic_card_processor').Option('alle anzeigen', '').Option('- -', '');

						for (var x = 0; x < Result.length; ++x) {
							
							HTML('#graphic_card_processor').Option(Result[x]['text'], Result[x]['value']);
						}
						
					} else HTML('#graphic_card_processor').Option('Keine vorhanden', '');
				}
				
				Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);	
				Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
				Configurator.Unset('GraphicCardSpeedCallback');
				Configurator.LoadingWheel(false);
				Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);
				
				HTML('#graphic_card_processor').Disabled(false);
			}
		}
		
		with (Configurator.XMLHTTPRequest) {

			Send(Configurator.RequestTo + '?type=6' + Configurator.BuildQueryString() + '&r=' + Time(), 'GET', 'xml');
			Call('Configurator.GraphicCardSpeedCallback');
		}
	},
	
	StorageSizes : function () {
	
		if (!Empty(Formular.Value('storage_medium_type'))) {
		
			Configurator.LoadingWheel(true);
			Configurator.SearchButtonDisabled(true);
			
			HTML('#storage_size').Clear().Option('Wird geladen ...', '').Disabled(true);
			
			if (Empty(Configurator.StorageSizeCallback)) {
			
				Configurator.StorageSizeCallback = function () {
				
					if (!Empty(Configurator.DebugMode)) {
						
						Display(
							'<strong>Generate-Time:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['generate_time'] + '<br /><br />' + 
							'<strong>Url-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query_string'] + '<br /><br />' + 
							'<strong>SQL-Query:</strong> ' + Configurator.XMLHTTPRequest['Data']['result']['query']
						);
					}

					/* Storage Size */

					if (HTML('#storage_size').Clear()) {
						
						var Result = Configurator.XMLHTTPRequest['Data']['result']['storage_size']['item'];
						
						if (!(Result instanceof Array)) {
							
							Result = [Result];
						}
						
						if (!Empty(Result)) {
							
							HTML('#storage_size').Option('alle anzeigen', '').Option('- -', '');
	
							for (var x = 0; x < Result.length; ++x) {
								
								HTML('#storage_size').Option(Result[x]['text'], Result[x]['value']);	
							}
							
						} else HTML('#storage_size').Option('Keine vorhanden', '');
					}

					Element.Fade(['ResultsTop'], 'color', Configurator.ResultFadeColor.From, Configurator.ResultFadeColor.To, Configurator.ResultFadeSteps);
					Configurator.Result(['ResultsTop'], Configurator.XMLHTTPRequest['Data']['result']['results']);
					Configurator.Unset('StorageSizeCallback');
					Configurator.LoadingWheel(false);
					Configurator.SearchButtonDisabled(Configurator.XMLHTTPRequest['Data']['result']['results'] == '0' ? true : false);

					HTML('#storage_size').Disabled(false);
				};
				
				with (Configurator.XMLHTTPRequest) {
		
					Send(Configurator.RequestTo + '?type=2' + Configurator.BuildQueryString() + '&r=' + Time(), 'GET', 'xml');
					Call('Configurator.StorageSizeCallback');
				}
			}
			
		} else {
		
			HTML('#storage_size').Clear().Option('- -', '').Disabled(true);
			
			Configurator.Update();
		}
	}
});

Objects ('ProductMenuHover', {
	
	Init : function () {
		
		var Menu = null;
		
		if (Menu = Element.Find('ProductMenu')) {
			
			var MenuUL = Element.FindByTagName('UL', 'ProductMenu')[0];
			var MenuLI = Element.FindByTagName('LI', MenuUL);
			
			for (var x = 0; x < MenuLI.length; ++x) {

				if (MenuLI[x].className != 'activ') {

					MenuLI[x].A	 = Element.FindByTagName('A', MenuLI[x])[0];
					MenuLI[x].Span	 = Element.FindByTagName('span', MenuLI[x].A)[0];
					MenuLI[x].Images = {
					
						LIin 	: 'http://images.notebookinfo.de/iTo+8R1Z+kB9jJnJAsXbRYcp7YRuh2mBX2MnEB5VL/SA=',
						LIout 	: 'http://images.notebookinfo.de/iyJwsFFhkdXISMbJFnDnxDZeu98xp+MUdC/ZKMKCr5S4=',
						Ain 	: 'http://images.notebookinfo.de/itFbAWrJkG7vnW6NPVCoZTmpHFMHsXglHycv6IsVSqmw=',
						Aout 	: 'http://images.notebookinfo.de/iP7nVwhTczQsVcrjkN8MzpfEdatNUynCz4nfpEk8cpxY=',
						SPANin 	: 'http://images.notebookinfo.de/ivYqwIi/UFpIbyZaGl1ijAnb+1Q9oms+o9dZYNHq9jZ4=',
						SPANout : 'http://images.notebookinfo.de/iKor1XThwt0MNAzo4vTdVqp4kXuMTOm9KUby3ozt7lCk='
					};
					
					Element.SetEvent(MenuLI[x], 'onmouseover', function () {
	
						Element.SetCssProperty(this, {backgroundImage : 'url(' + this.Images['LIin'] + ')'});
						Element.SetCssProperty(this.A, {backgroundImage : 'url(' + this.Images['Ain'] + ')'});
						Element.SetCssProperty(this.Span, {backgroundImage : 'url(' + this.Images['SPANin'] + ')'});
					});
					
					Element.SetEvent(MenuLI[x], 'onmouseout', function () {
	
						Element.SetCssProperty(this, {backgroundImage : 'url(' + this.Images['LIout'] + ')'});
						Element.SetCssProperty(this.A, {backgroundImage : 'url(' + this.Images['Aout'] + ')'});
						Element.SetCssProperty(this.Span, {backgroundImage : 'url(' + this.Images['SPANout'] + ')'});
					});
				}
			}
		}
	}
});

Objects('Memo', {
	
	'XMLHTTPRequest': new Ajax(),
	'RequestTo' 	: '/Includes/Content/Ajax/Memo/Data.php',
	'Images'	: {'add' : 'http://media.notebookinfo.de/memo-button-off/6b45ca8812b511b60cb58b3b4f456521', 'delete' : 'http://media.notebookinfo.de/memo-button-on/50cc5056e11a6d197a56eb00084d943a'},
	
	'ProcessElements' : function (Elements) {
		
		if (!Empty(Elements)) {
			
			return Memo.PElements = Elements;
			
		} else return Memo.PElements;
	},

	'Add' : function (Product, ElementID) {

		var Elements = Memo.ProcessElements();

		if (Typeof(Elements) == 'array') {
			
			for (var x = 0; x < Elements.length; ++x) {

				if (Element.Find(Elements[x])) {
					Elements[x] 		 = Element.Find(Elements[x]);
					Elements[x].OnClickStore = Elements[x].onclick;
					Elements[x].onclick 	 = null;
				}
			}
			
		} Element.FindByTagName('img', ElementID)[0].src = 'http://media.notebookinfo.de/loading-wheel/e7200af28e5757b8d5ca3c8c1942d9f0';

		if (Empty(Memo.AddCallBack)) {
			
			Memo.Product	 = Product;
			Memo.Elements 	 = Elements;
			Memo.ElementID 	 = ElementID;
			Memo.AddCallBack = function () {

				for (var x = 0; x < Memo.Elements.length; ++x) {

					if (typeof Memo.Elements[x] == 'object') {

						Memo.Elements[x].onclick = Memo.Elements[x].OnClickStore;
					}
					
				} Element.FindByTagName('img', Memo.ElementID)[0].src = Memo.Images['delete'];

				Memo.ElementID.Product = Memo.Product;
				Memo.ElementID.onclick = function () {
				
					Memo.Delete(this.Product, this);
				
				}; Memo.AddCallBack = Memo.ElementID = null;
				
				if (Element.Find('MemoAmount')) {
				
					Element.Find('MemoAmount').innerHTML = Memo.XMLHTTPRequest.Data['text'];
				}
			};
		}

		with (Memo.XMLHTTPRequest) {

			Send(Memo.RequestTo + '?type=add&id=' + Product + '&r=' + Time(), 'GET', 'text');
			Call('Memo.AddCallBack');
		}
	},

	'Delete' : function (Product, ElementID) {

		var Elements = Memo.ProcessElements();

		if (Typeof(Elements) == 'array') {
			
			for (var x = 0; x < Elements.length; ++x) {

				if (Element.Find(Elements[x])) {
					Elements[x] 		 = Element.Find(Elements[x]);
					Elements[x].OnClickStore = Elements[x].onclick;
					Elements[x].onclick 	 = null;
				}
			}
			
		} Element.FindByTagName('img', ElementID)[0].src = 'http://media.notebookinfo.de/loading-wheel/e7200af28e5757b8d5ca3c8c1942d9f0';

		if (Empty(Memo.DeleteCallBack)) {
			
			Memo.Product	= Product;
			Memo.Elements	= Elements;
			Memo.ElementID 	= ElementID;
			Memo.DeleteCallBack = function () {

				for (var x = 0; x < Memo.Elements.length; ++x) {
					
					if (typeof Memo.Elements[x] == 'object') {
					
						Memo.Elements[x].onclick = Memo.Elements[x].OnClickStore;
					}
					
				} Element.FindByTagName('img', Memo.ElementID)[0].src = Memo.Images['add'];
				
				Memo.ElementID.Product = Memo.Product;
				Memo.ElementID.onclick = function () {
				
					Memo.Add(this.Product, this);
				
				}; Memo.DeleteCallBack = Memo.ElementID = null;
				
				if (Element.Find('MemoAmount')) {
				
					Element.Find('MemoAmount').innerHTML = Memo.XMLHTTPRequest.Data['text'];
				}
			};
		}
		
		with (Memo.XMLHTTPRequest) {
			
			Send(Memo.RequestTo + '?type=delete&id=' + Product + '&r=' + Time(), 'GET', 'text');
			Call('Memo.DeleteCallBack');
		}
	}
});

Objects('ToogleMenu', {
	
	'ToogleCount' 	 : 0,
	'ToggleRequest'  : null,
	'ToggelTime'	 : 8,
	'Displays' 	 : ['DisplayOffer', 'DisplayNotebooks', 'DisplayAdvisory', 'DisplayAccessories'],
	'Elements' 	 : ['ToggleMenuOffer', 'ToggleMenuNotebooks', 'ToggleMenuAdvisory', 'ToggleMenuAccessories'],
	
	'Images' : {
	
		'ToggleMenuOffer' : {'in' : 'http://images.notebookinfo.de/ia8bAIMN5WARcLLLV6ewufzsd36SWPAMKOLWwzW2f7c5pluMQyONPFG3Zl0RV45qjJRqvCOibJvsvBqqRH1bSpQ==', 'out' : 'http://images.notebookinfo.de/iWgS/uNNHdR8Eo4DpHRCW5z9plbRZ5Dw6iW6iKspEbIJW3JOdH3jmSY7Ygktj5iBeIpLPRSm28iW8xDeyS2+NHQ=='},
		'ToggleMenuNotebooks' : {'in' : 'http://images.notebookinfo.de/iW6FGF6f2WA4ceLx4S5I5z/zSZyd4UmIWCTTPIB0vi8AoUSYqemxEaaY4zxXr0UHbAtP0vyj1CwLKt469CukXIQ==', 'out' : 'http://images.notebookinfo.de/ihMORTOc/E7aIldpOPZMRYYLpg1yAghq6otqYpkXefNppxj0JMf7B/IonMKSeeKvfa8c7LiN0EXR48lakR2visQ=='},
		'ToggleMenuAdvisory' : {'in' : 'http://images.notebookinfo.de/iMADYn5/gmWuSKZyqXG6iwZqItc8BrcdbIyykKx+vXC83AujI4hxONj5gKPmSz92YdUn7eBLtM40g2D6C1WVDGw==', 'out' : 'http://images.notebookinfo.de/icn+ibb4sIWvIT1ICR3m/Xj9z3o1l1zqlwihezNTrPgYoUSYqemxEaaY4zxXr0UHbAtP0vyj1CwLKt469CukXIQ=='},
		'ToggleMenuAccessories' : {'in' : 'http://images.notebookinfo.de/i2NLcUmUU/VHD7GMaL9ux8K/3ow8nolgxaxfYCvMbA98Q2GKouarGhjHNwcV0hYhI8+29TvC9Wq3CtSI6ndTe5A==', 'out' : 'http://images.notebookinfo.de/inezDmJVoVKUK/bMhJ5eF6mKildxO0PF5MiV92DRfnnfEQxQygC0Qvf3XMq8oHgZJSUIwx9EdNV16M2MlHHgLdw=='}
	},
	
	'Show' : function (Display) {
		
		window.clearTimeout(ToogleMenu.ToggleRequest);
		
		ToogleMenu.ToogleCount = Display;
		
		for (var x = 0; x < ToogleMenu.Elements.length; ++x) {
		
			if (Element.Find(ToogleMenu.Displays[x])) {
		
				Element.SetCssProperty(ToogleMenu.Displays[x], {
					visibility : 'hidden'
				});
				
				Element.SetCssProperty(Element.FindByTagName('a', ToogleMenu.Elements[x])[0], {
					backgroundImage : 'url(' + ToogleMenu.Images[ToogleMenu.Elements[x]]['out'] + ')'
				});
			}
		}

		Element.SetCssProperty(ToogleMenu.Displays[Display], {
			visibility : 'visible'
		});
			
		Element.SetCssProperty(Element.FindByTagName('a', ToogleMenu.Elements[Display])[0], {
			backgroundImage	: 'url(' + ToogleMenu.Images[ToogleMenu.Elements[Display]]['in'] + ')'
		});
	},
	
	'Toggle' : function (ToggleTime) {
	
		for (var x = 0; x < ToogleMenu.Elements.length; ++x) {
		
			if (Element.Find(ToogleMenu.Displays[x])) {
		
				Element.SetCssProperty(ToogleMenu.Displays[x], {
					visibility : 'hidden'
				});
				
				Element.SetCssProperty(Element.FindByTagName('a', ToogleMenu.Elements[x])[0], {
					backgroundImage : 'url(' + ToogleMenu.Images[ToogleMenu.Elements[x]]['out'] + ')'
				});
			}
		}

		Element.SetCssProperty(ToogleMenu.Displays[ToogleMenu.ToogleCount], {
			visibility : 'visible'
		});
			
		Element.SetCssProperty(Element.FindByTagName('a', ToogleMenu.Elements[ToogleMenu.ToogleCount])[0], {
			backgroundImage	: 'url(' + ToogleMenu.Images[ToogleMenu.Elements[ToogleMenu.ToogleCount]]['in'] + ')'
		});
	
		if (ToogleMenu.ToogleCount < (ToogleMenu.Displays.length - 1)) {
			ToogleMenu.ToogleCount++;
		} else ToogleMenu.ToogleCount = 0;

		ToogleMenu.ToggleRequest = window.setTimeout('ToogleMenu.Toggle(' + ToggleTime + ')', ToggleTime * 1000);
	}
});

Objects ('ProductToggleBox', {

	Load : function () {
		
		if (Element.Find('ProductsToggleBox')) {
			
			var Li = Element.FindByTagName('li', 'ProductsToggleBox');
			
			for (var x = 0; x < Li.length; ++x) {
				
				var A = Element.FindByTagName('a', Li[x])[0];
				
				A.Li = Li;
				A.onmouseover = function () {
					
					for (var x = 0; x < this.Li.length; ++x) {
						
						Element.FindByTagName('a', this.Li[x])[0].className = '';
					
					} this.className = 'Activated';
					
					Element.Find('ToggleBoxImageFile').src = this.rel;
					Element.Find('ToggleBoxImageLink').href = this.href;
				
				}; (new Image()).src = A.rel;
			}
		}
	}
});

$ = function (RedirictCode) {
	window.open('http://www.mopolis.de/go/' + RedirictCode);
};

Objects ('Flag', {
	
	Load : function () {
	
		var A = document.getElementsByTagName('A');

		for (var x = 0; x < A.length; ++x) {
			
			if (A[x].rel.indexOf('Flag:') > -1) {
				
				A[x].onclick = function () {
					
					window.location.href = 'http://www.mopolis.de/flag/?flag=' + this.rel.split(':')[1] + '&url=' + encodeURIComponent(this.href) + (this.rel.split(':')[2] != null ? '&value=' + this.rel.split(':')[2] : '');
					return false;
				};
			}
		}
	}
});

Objects ('ElementSizer', {

	/**
	 *	Object zum dynamischen vergrößern und verkleinern von HTML-Elementen.
	 *
	 *	Company: Agentur More Style
	 *	Programmer: Robert Engelhardt
	 *	E-Mail: engelhardt@more-style.de
	 *
	 *	Created: 16 November 2006
	 *
	 *
	 *	Element initialisierung:
	 *	------------------------
	 *	ElementSizer.addElement('element1', 'height');
	 *	ElementSizer.addElement('element2', 'width');
	 *
	 *
	 *	Durchführen der Größenveränderung:
	 *	----------------------------------
	 *	ElementSizer.setElementSize('element1', 400, 50);
	 *	ElementSizer.setElementSize('element2', 650, 20);
	 */


	AddElement : function (element, sizeType)
	{

		/**
		 *	Methode zum initialisieren eines HTML-Elements über die ID
		 *
		 *	@param (element -> [object|string]) {
		 *		Enthält eine existierende ID oder eine direkte referenzierung auf HTML-Element.
		 *	}
		 *	@param (sizeType -> [string]) {
		 *		Enthält den Typ ('width' oder 'height') mit dem die Größe verändert werden soll.
		 *	}
		 */

		if (ElementSizer.e == null) {

			ElementSizer.e = {};
		}

		if (Element.Find(Typeof(element) == 'string' ? element : element['object']) != null) {

			ElementSizer.e[Typeof(element) == 'string' ? element : element['id']] = {

				element  		: Element.Find(Typeof(element) == 'string' ? element : element['object']),
				sizeType 		: (sizeType.toLowerCase() == 'width') ? 'width' : 'height',
				count			: null,
				newElementSize		: null,
				currentElementSize	: null,
				sizeDifferenz		: null,
				interval		: null
			};
		}
	},


	CalculateSize : function (t, b, c, d) {

		/**
		 *	Methode berechnet den derzeitigen Wert zwischen einem Anfangs- und einem Endendwert
		 *	in abhängigkeit von den bestimmten Durchlaufschritten.
		 *
		 *	Robert Penner
		 *	Easing Equations v1.5
		 *	Math.easeInOutQuart
		 *	http://www.robertpenner.com
		 */

		if (t==0) return b;
		if (t==d) return b+c;

		if ((t/=d/2) < 1) {

			return c/2 * Math.pow(2, 10 * (t - 1)) + b;

		} return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},


	SetSize : function (element, newSize, duration) {

		/**
		 *	Methode führt die Größenveränderung durch.
		 *
		 *	@param(element -> [string]) {
		 *		Enthält den anzusprechende ID-Namen des HTML-Elements.
		 *	}
		 *	@param(newSize -> [number]) {
		 *		Enthält die neues Größe.
		 *	}
		 *	@param(duration -> [number]) {
		 *		Enthält die anzahl der Durchlaufschritte.
		 *	}
		 */

		if(arguments[3] == null) {

			window.clearTimeout(ElementSizer.e[element]['interval']);

			ElementSizer.e[element]['count']		= 0;
			ElementSizer.e[element]['newElementSize']	= newSize;
			ElementSizer.e[element]['currentElementSize'] 	= parseInt(ElementSizer.e[element]['element'][(ElementSizer.e[element]['sizeType'] == 'width') ? 'offsetWidth' : 'offsetHeight']);
			ElementSizer.e[element]['sizeDifferenz']	= ElementSizer.e[element]['newElementSize'] - ElementSizer.e[element]['currentElementSize'];
			ElementSizer.e[element]['interval']		= 0;
		}

		if(ElementSizer.e[element]['count'] < duration) {

			ElementSizer.e[element]['element'].style[ElementSizer.e[element]['sizeType']] = ElementSizer.CalculateSize(ElementSizer.e[element]['count'], ElementSizer.e[element]['currentElementSize'], ElementSizer.e[element]['sizeDifferenz'], duration) + 'px';

			ElementSizer.e[element]['count']++;

			ElementSizer.e[element]['interval'] = window.setTimeout('ElementSizer.SetSize("' + element + '", ' + newSize + ', ' + duration + ', true)', duration);

		} else {

			ElementSizer.e[element]['count'] 		= null;
			ElementSizer.e[element]['newElementSize']	= null;
			ElementSizer.e[element]['currentElementSize'] 	= null;
			ElementSizer.e[element]['sizeDifferenz'] 	= null;
			ElementSizer.e[element]['interval']		= null;

			window.clearTimeout(ElementSizer.e[element]['interval']);
			
			ElementSizer.Callback();
		}
	},
	
	Callback : function (callback) {
		
		if (callback != null) {
			
			ElementSizer.CallbackFunction = callback;
			
		} else if (ElementSizer.CallbackFunction != null) {
		
			eval(ElementSizer.CallbackFunction)();
			ElementSizer.CallbackFunction = null;
		}
	}
});


Objects ('ValueClick', {
	
	Ads : function (Query, Width, Height, Results) {
		
		var IFrame  = '';

		IFrame += '<iframe ';
		IFrame += 'src="/Includes/Content/ValueClick/Output.php'
		IFrame += '?q=' + Query;
		IFrame += !Empty(Results) ? '&results=' + Results + '" ' : '" ';
		IFrame += 'frameborder="0" ';
		IFrame += 'scrolling="no" ';
		IFrame += 'marginwidth="0" ';
		IFrame += 'marginheight="0" ';
		IFrame += 'width="' + Width + '" ';
		IFrame += 'height="' + Height + '" ';
		IFrame += 'id="ValueClickFrame"';
		IFrame += '>';
		IFrame += '</iframe>';

		document.write(IFrame);
	}
});

Objects ('Test', {
	
	Request 	: new Ajax(),
	RequestURL 	: '/Includes/Content/Ajax/Test/Data.php',
	
	Output : function (TestID, Output) {

		if (Empty(Test.CallBack)) {
		
			Test.CallBack = function () {
			
				HTML('#' + Output).Css({
				
					'height' 	: '0px',
					'position'	: 'relative',
					'overflow' 	: 'hidden',
					'padding'	: '0',
					'margin'	: '0',
					'background'	: 'none',
					'border'	: 'none'
				}); 

				HTML('#' + Output).Html(Test.Request['Data']['text']);
				
				ElementSizer.AddElement(Output, 'height');
				ElementSizer.SetSize(Output, HTML('#TestReport').Height() + 25, 20);
				
				Test.CallBack = null;
			};
		}

		with (Test.Request) {
		
			Send(Test.RequestURL + '?id=' + TestID + '&r=' + Time(), 'GET', 'text');
			Call('Test.CallBack');
		}
	}
});


Objects ('PraxisSupport', {
	
	Request 	: new Ajax(),
	RequestURL 	: '/Includes/Content/Ajax/Praxis-Support/Data.php',
	
	Display : function (Text, Activator, Width) {
		
		HTML('#InformationDisplay').Remove();
		
		window.clearTimeout(PraxisSupport.DisplayTimer);
			
		HTML(document.body).Create('Div', {'id' : 'InformationDisplay'}).Create('P'); 
		HTML('#InformationDisplay').Create('Span');
		HTML('#InformationDisplay').Create('a', {
		
			'id'	  : 'Close',
			'onclick' : 'window.clearTimeout(PraxisSupport.DisplayTimer);HTML(\'#InformationDisplay\').Remove();'
		
		}).Create('Img', {'src' : 'http://images.notebookinfo.de/i2uZJZYn/1MSdFQQBx2c6KfpVMyMMsnnALXE+HAHCHG8='});
		
		HTML('P', HTML('#InformationDisplay')[0]).Html(Text);
		HTML('#InformationDisplay').Css('width', (Width == null ? 'auto' : Width + 'px'));
		HTML('#InformationDisplay').Css({

			'top'		: (HTML(Activator).Top() - HTML('#InformationDisplay').Height()) + 'px',
			'left'		: (HTML(Activator).Left() + 20) + 'px',
			'visibility' 	: 'visible'
		});
		
		HTML(Activator).IfEvent('mouseout', function () {
			
			window.clearTimeout(PraxisSupport.DisplayTimer);
			
			PraxisSupport.DisplayTimer = window.setTimeout('HTML(\'#InformationDisplay\').Remove()', 2000);
		});
		
		HTML('#InformationDisplay').IfEvent('mouseover', function () {
			
			window.clearTimeout(PraxisSupport.DisplayTimer);
		});
		
		HTML('#InformationDisplay').IfEvent('mouseout', function () {
			
			window.clearTimeout(PraxisSupport.DisplayTimer);
			
			PraxisSupport.DisplayTimer = window.setTimeout('HTML(\'#InformationDisplay\').Remove()', 2000);
		});
	},
	
	Rating : function (Rate, ArticleID, RatingAreaID) {
		
		if (PraxisSupport.CallBack == null) {
		
			PraxisSupport.CallBack = function () {
				
				HTML('#' + RatingAreaID).Html(PraxisSupport.Request['Data']['text']);
				
				PraxisSupport.CallBack = null;
			};
		}
		
		with (PraxisSupport.Request) {
		
			Send(PraxisSupport.RequestURL + '?type=1&article=' + ArticleID + '&rating=' + Rate + '&r=' + Time(), 'GET', 'text');
			Call('PraxisSupport.CallBack');
		}	
	}
});

Objects ('InfoDisplay', {

	'Delay'		: 2,
	'Request' 	: new Ajax(),
	'RequestURL' 	: '',
	
	'Show' : function (Content, Activator, Width) {
		
		window.clearTimeout(InfoDisplay.Timer);
		
		if (HTML('#InformationDisplay').Remove()) {

			var Left  = 0;
			var Image = {'background' : 'transparent url(http://media.notebookinfo.de/info-display-pop-arrow-left/aa262971da77b22e9660cf5f3cfa2084) 10px 0px no-repeat'};
			var Body  = document.compatMode && document.compatMode != 'BackCompat' ? document.documentElement : (document.body || null);

			if (HTML(Activator).Left() >= (HTML(Body).Width() / 2)) {
				Image = {'background' : 'transparent url(http://media.notebookinfo.de/info-display-pop-arrow-right/bc8b3bd0c4a9e75e811adec0f0cc4de1) 97% 0px no-repeat'};
			}

			HTML(document.body).Create('Div', {'id' : 'InformationDisplay'}, {'width' : !Empty(Width) ? Width + 'px' : 'auto'}).Create('P'); 
			HTML('#InformationDisplay').Create('Span', null, Image);
			HTML('#InformationDisplay').Create('a', {
			
				'id'	  : 'Close',
				'onclick' : 'window.clearTimeout(InfoDisplay.Timer);HTML(\'#InformationDisplay\').Remove();'
			
			}).Create('Img', {'src' : 'http://media.notebookinfo.de/info-display-close-button/b69c77666808cc86501d5a6e649cf8b9'});
			
			if (!Empty(InfoDisplay.RequestURL)) {
			
				if (Empty(InfoDisplay.CallBack)) {
				
					InfoDisplay.CallBack = function () {
					
						HTML('P', HTML('#InformationDisplay')[0]).Html(InfoDisplay.Request['Data']['text']);
						
						if (HTML(Activator).Left() < (HTML(Body).Width() / 2)) {
							Left  = HTML(Activator).Left() + 20;
						} else Left = HTML(Activator).Left() - HTML('#InformationDisplay').Width() + 20;
						
						HTML('#InformationDisplay').Css({
							
							'top'		: (HTML(Activator).Top() - HTML('#InformationDisplay').Height()) + 'px',
							'left'		: Left + 'px',
							'visibility' 	: 'visible'
						
						}); InfoDisplay.CallBack = null;
					};
				}
				
				with (InfoDisplay.Request) {
				
					Send(InfoDisplay.RequestURL + '?' + Content + '&r=' + Time(), 'GET', 'text');
					Call('InfoDisplay.CallBack');
				}
				
			} else {
			
				HTML('P', HTML('#InformationDisplay')[0]).Html(Content);
				
				if (HTML(Activator).Left() < (HTML(Body).Width() / 2)) {
					Left  = HTML(Activator).Left() + 20;
				} else Left = HTML(Activator).Left() - HTML('#InformationDisplay').Width() + 20;
				
				HTML('#InformationDisplay').Css({
					
					'top'		: (HTML(Activator).Top() - HTML('#InformationDisplay').Height()) + 'px',
					'left'		: Left + 'px',
					'visibility' 	: 'visible'
				});
			}

			HTML(Activator).IfEvent('mouseout', function () {
				
				window.clearTimeout(InfoDisplay.Timer);
				
				InfoDisplay.Timer = window.setTimeout('HTML(\'#InformationDisplay\').Remove()', InfoDisplay.Delay * 1000);
			});
			
			HTML('#InformationDisplay').IfEvent('mouseover', function () {
				
				window.clearTimeout(InfoDisplay.Timer);
			});
			
			HTML('#InformationDisplay').IfEvent('mouseout', function () {
				
				window.clearTimeout(InfoDisplay.Timer);
				
				InfoDisplay.Timer = window.setTimeout('HTML(\'#InformationDisplay\').Remove()', InfoDisplay.Delay * 1000);
			});
		}
	}
});

Objects ('Kaufberatung', {
	
	DisplayDelay  : 0.5,
	
	TeaserDisplay : function (Content, Activator) {
		
		Kaufberatung.TeaserDisplayClose();
		
		HTML(document.body).Create('Div', {'id' : 'KaufberatungTeaserDisplay'}, {
		
			'width'			: '350px',
			'position'		: 'absolute',
			'left'			: '0',
			'top'			: '0',
			'backgroundColor'	: '#FFF8E4',
			'border'		: '1px solid #D7D9E5',
			'MozBorderRadius' 	: '10px',
			'KhtmlBorderRadius' 	: '10px',
			'visibility'		: 'hidden'
		});
		
		HTML(document.body).Create('Span', {'id' : 'KaufberatungTeaserDisplayTube'}, {
		
			'position'		: 'absolute',
			'top'			: (HTML(Activator).Top() - 12) + 'px',
			'left'			: HTML(Activator).Left() + 'px',
			'width'			: (HTML(Activator).Width() - 2) + 'px',
			'height'		: '13px',
			'background'		: '#FFF url(http://images.notebookinfo.de/itAUmrSdyyYtMTIa7hf0rknu/W7H/YPrMEvg9ZcTBQSk=) 0px 0px repeat-x',
			'borderLeft'		: '1px solid #D7D9E5',
			'borderRight'		: '1px solid #D7D9E5',
			'display'		: 'block'
		});
		
		HTML('#KaufberatungTeaserDisplay').Create('P', null, {
		
			'lineHeight'		: '18px',
			'padding' 		: '13px 15px 13px 15px'
		});
		
		HTML('#KaufberatungTeaserDisplay').Create('A', 
		
			{'onclick' : 'Kaufberatung.TeaserDisplayClose();'},
			{'position' : 'absolute', 'top' : '5px', 'right' : '6px'}
			
		).Create('Img', {'src' : 'http://images.notebookinfo.de/imBoEZyMU44iM25JlGK2lsxulZflJ2KyVVPlZc28bDow='});
			
		HTML('P', HTML('#KaufberatungTeaserDisplay')[0]).Html(Content);
		HTML('#KaufberatungTeaserDisplay').Css({
		
			'left'		: '612px',
			'top'		: (HTML(Activator).Top() - HTML('#KaufberatungTeaserDisplay').Height() - 11) + 'px',
			'visibility' 	: 'visible'
		});
		

		HTML(Activator).IfEvent('mouseout', function () {
			
			window.clearTimeout(Kaufberatung.Timer);
			
			Kaufberatung.Timer = window.setTimeout('Kaufberatung.TeaserDisplayClose()', Kaufberatung.DisplayDelay * 1000);
		});
		
		HTML('#KaufberatungTeaserDisplay').IfEvent('mouseover', function () {
			
			window.clearTimeout(Kaufberatung.Timer);
		});
		
		HTML('#KaufberatungTeaserDisplay').IfEvent('mouseout', function () {
			
			window.clearTimeout(Kaufberatung.Timer);
			
			Kaufberatung.Timer = window.setTimeout('Kaufberatung.TeaserDisplayClose()', Kaufberatung.DisplayDelay * 1000);
		});
	},
	
	TeaserDisplayClose : function () {
		
		window.clearTimeout(Kaufberatung.Timer);
		
		HTML('#KaufberatungTeaserDisplay').Remove();
		HTML('#KaufberatungTeaserDisplayTube').Remove();
	}
});

Objects ('Login', {
	
	Do : function (Activator) {
	
		HTML('#Login').Css({
		
			'left' : (HTML(Activator).Left() - HTML('#Login').Width() + 50) + 'px',
			'top'  : (HTML(Activator).Top() + 17) + 'px'
		
		}); HTML('#Login').Css('visibility', 'visible');
	}
});

Objects ('Gimmick', {
	
	Sequences   : {'404038383739' : 'Gimmick.Eye', '3939393938' : 'Gimmick.Owl'},
	KeyReqeust  : null,
	KeySequence : '',
	
	ClearKeySequence : function () {
	
		Gimmick.KeySequence = '';
		window.clearTimeout(Gimmick.KeyReqeust);
	},
	
	RegisterKeySequence : function (KeyEvent) {
		
		window.clearTimeout(Gimmick.KeyReqeust);

		Gimmick.KeySequence += String((KeyEvent) ? KeyEvent.keyCode : window.event.keyCode);

		if (!Empty(Gimmick.Sequences[Gimmick.KeySequence])) {

			eval(Gimmick.Sequences[Gimmick.KeySequence])();
			Gimmick.KeySequence = '';
			
		} else Gimmick.KeyReqeust = window.setTimeout('Gimmick.ClearKeySequence()', 1000);
	},
	
	Eye : function () {

		var LeftEye  = document.createElement('Img');
		var RightEye = document.createElement('Img');
		
		if (Element.Find('GimmickEyeLeft')) {
			Element.Find('Header').removeChild(Element.Find('GimmickEyeLeft'));
		}
		if (Element.Find('GimmickEyeRight')) {
			Element.Find('Header').removeChild(Element.Find('GimmickEyeRight'));
		}

		with (LeftEye) {
		
			id		= 'GimmickEyeLeft';
			src		= 'http://images.notebookinfo.de/i4JX6yehu/X72AMDj1nsuZ8iuwoQLO/QFh4183r8pdys=';
			style.position 	= 'absolute';
			style.left	= Browser.Name() == 'Internet Explorer' ? '124px' : '125px';
			style.top	= '50px';
			style.zIndex	= '100';
		
		} Element.Find('Header').appendChild(LeftEye);
		
		with (RightEye) {
		
			id		= 'GimmickEyeRight';
			src		= 'http://images.notebookinfo.de/i4JX6yehu/X72AMDj1nsuZ8iuwoQLO/QFh4183r8pdys=';
			style.position 	= 'absolute';
			style.left	= Browser.Name() == 'Internet Explorer' ? '140px' : '142px';
			style.top	= '50px';
			style.zIndex	= '100';
		
		} Element.Find('Header').appendChild(RightEye);
	},
	
	Owl : function () {
		
		var Div = document.createElement('Div');
		var Owl = document.createElement('Img');
		
		if (Element.Find('GimmickOwlBox')) {
			Element.Find('Header').removeChild(Element.Find('GimmickOwlBox'));
		}
		
		with (Div) {

			id		= 'GimmickOwlBox';
			style.fontSize	= '1px';
			style.lineHeight= '0px';
			style.width	= '402px';
			style.position 	= 'absolute';
			style.left	= '10px';
			style.bottom	= '-1px';
			style.zIndex	= '100';
			style.overflow	= 'hidden';
			
		} Owl.src = 'http://images.notebookinfo.de/ivRvtWVDVcyqpWqLprHJn7AXmxH11xEgTHWM/fBpEUl8=';
		
		Element.Find('Header').appendChild(Div);
		Element.Find('GimmickOwlBox').appendChild(Owl);
	}
	
}); document.onkeyup = Gimmick.RegisterKeySequence;

window.SetEvent('onload', function () {
	
	Flag.Load();
	ProductToggleBox.Load();
	
	if (Browser.Name() == 'Internet Explorer') {
		ProductMenuHover.Init();
	}
	
	if (HTML('/#GoAdScale(.*)/').Length > 0) {
		
		window.setTimeout(function () {
			
			HTML('/#GoAdScale(.*)/').Each(function () {

				if (Empty(HTML('/#adscale(.*)/', this).Height())) {

					HTML(this).Css('display', 'none');
				}
			});
			
		}, 500);
	}
	
	if (HTML('#FreenetAd:Rectangle').Length > 0) {
		
		window.setTimeout(function () {
			
			HTML('#FreenetAd:Rectangle').Each(function () {

				if (HTML('div.AddContent', this).Height() == 1) {
				
					HTML(this).Css('display', 'none');
				}
			});
			
		}, 500);
	}
	
	
});

