/*<script>*/
this.author = "William Ochetski Hellas";
this.version = 1.0;
this.name = "JSWindow";

/* base functions */

this.$ = function() {
	if(document.getElementById(arguments[0]) != "undefined")
		return document.getElementById(arguments[0]);
	return false;
};

this.$$ = function() {
	// require Info
	var e = (arguments[0]) ? arguments[0] : event;
	return (Info.nsp) ? e.target : e.srcElement;
};

this.$cele = function() {
	try{
		return document.createElement(arguments[0]);
	} catch(e) {
		return false;
	}
};

this.$rele = function() {
	try{
		return $(arguments[0]).parentNode.removeChild($(arguments[0]));
	} catch(e) {
		return false;
	}
};

this.$tag = function() {
	return document.getElementsByTagName(arguments[0]);
};

this.$css = function() {
	this.objs = arguments[1].split(";");
	for(var i = 0; i < this.objs.length; i++) {
		if(this.objs[i] == null || this.objs[i] == "")
			continue;
		this.sobjs = this.objs[i].split(":");
		eval("arguments[0].style." + this.sobjs[0] + " = '" + this.sobjs[1] + "';");
	}
	return;
};

this.$style = function() {
	//
};

this.$include = function() {
	//
};

/* objects */

this._ = new function _() {
	this.author = window.author;
	this.version = 1.1;
	this.name = this.constructor.name;
	this.entities = {
		'chars' : new Array(
			'&','à','á','â','ã','ä','å','æ','ç','è',
			'é','ê','ë','ì','í','î','ï','ð','ñ','ò',
			'ó','ô','õ','ö','ø','ù','ú','û','ü','ý',
			'þ','ÿ','À','Á','Â','Ã','Ä','Å','Æ','Ç',
			'È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ',
			'Ò','Ó','Ô','Õ','Ö','Ø','Ù','Ú','Û','Ü',
			'Ý','Þ','€','\"','ß','<','>','¢','£','¤',
			'¥','¦','§','¨','©','ª','«','¬','­','®',
			'¯','°','±','²','³','´','µ','¶','·','¸',
			'¹','º','»','¼','½','¾'
		),
		'entities' : new Array(
			'amp','agrave','aacute','acirc','atilde','auml','aring','aelig','ccedil','egrave',
			'eacute','ecirc','euml','igrave','iacute','icirc','iuml','eth','ntilde','ograve',
			'oacute','ocirc','otilde','ouml','oslash','ugrave','uacute','ucirc','uuml','yacute',
			'thorn','yuml','Agrave','Aacute','Acirc','Atilde','Auml','Aring','AElig','Ccedil',
			'Egrave','Eacute','Ecirc','Euml','Igrave','Iacute','Icirc','Iuml','ETH','Ntilde',
			'Ograve','Oacute','Ocirc','Otilde','Ouml','Oslash','Ugrave','Uacute','Ucirc','Uuml',
			'Yacute','THORN','euro','quot','szlig','lt','gt','cent','pound','curren',
			'yen','brvbar','sect','uml','copy','ordf','laquo','not','shy','reg',
			'macr','deg','plusmn','sup2','sup3','acute','micro','para','middot','cedil',
			'sup1','ordm','raquo','frac14','frac12','frac34'
		)
	};
	String.prototype.htmlEntities = function() {
		var _string = this;
		for(var i = 0; i < _.entities['chars'].length; i++) {
			var _regexp = new RegExp();
			_regexp.compile(_.entities['chars'][i], 'g');
			_string = _string.replace(_regexp, '&' + _.entities['entities'][i] + ';');
		}
		return _string;
	};
	String.prototype.htmlEntitiesDecode = function() {
		var _string = this;
		for(var i = 0; i < _.entities['entities'].length; i++) {
			var _regexp = new RegExp();
			_regexp.compile('&' + _.entities['entities'][i] + ';', 'g');
			_string = _string.replace(_regexp, _.entities['chars'][i]);
		}
		return _string;
	};
	String.prototype.htmlEntitiesKill = function() {
		var _string = this;
		for(var i = 0; i < _.entities['chars'].length; i++) {
			var _regexp = new RegExp();
			_regexp.compile(_.entities['chars'][i], 'g');
			_string = _string.replace(_regexp, _.entities['entities'][i].replace(/(.){1}(.*)/g, '$1'));
		}
		return _string;
	};
	String.prototype.inArray = function() {
		var _string = this;
		var _result = false;
		for(var i = 0; i < arguments[0].length; i++) {
			if(_string == arguments[0][i]) {
				_restult = true;
				break;
			}
		}
		return _result;
	};
	Object.prototype.css = function() {
		var _object = this;
		var _objs = arguments[0].split(";");
		for(var i = 0; i <_objs.length; i++) {
			if(_objs[i] == null || _objs[i] == "")
				continue;
			_objs = _objs[i].split(":");
			eval("this.style." + _objs[0] + " = '" + _objs[1] + "';");
		}
		return;
	};
	Object.prototype.inn = function() {
		var _object = this;
		if(typeof arguments[0] != 'undefined')
			_object.innerHTML = arguments[0];
		else if(_object.innerHTML)
			return _object.innerHTML;
		else
			return false;
		return;
	};
};

this.Info = new function Info() {
	this.author = window.author;
	this.version = 1.0;
	this.name = this.constructor.name;
	this.win = ((navigator.userAgent.toLowerCase().indexOf("win") != -1) || (navigator.userAgent.toLowerCase().indexOf("16bit") != -1));
	this.iep = document.all;
	this.nsp = document.getElementById && !document.all;
	this.ie = (navigator.appName.match("Internet Explorer")) ? true : false;
	this.ff = (navigator.appName.match("Firefox")) ? true : false;
	this.op = (navigator.appName.match("Opera")) ? true : false;
	this.MinH = function() {
		return (this.ie) ? document.documentElement.clientHeight : window.innerHeight;
	};
	this.MinW = function() {
		return (this.ie) ? document.documentElement.clientWidth : window.innerWidth;
	};
	this.MaxH = function() {
		return document.body.offsetHeight;
	};
	this.MaxW = function() {
		return document.body.offsetWidth;
	};
	this.Scroll = function() {
		return [ ((this.iep) ? document.documentElement.scrollHeight : document.body.scrollHeight), ((this.iep) ? document.documentElement.scrollWidth : document.body.scrollWidth) ];
	};
	this.ScrollN = function() {
		return [ ((this.iep) ? document.documentElement.scrollTop : document.body.scrollTop), ((this.iep) ? document.documentElement.scrollLeft : document.body.scrollLeft) ];
	};
};

this.Geist = new function Geist() {
	//require Info
	this.author = window.author;
	this.version = 2.2;
	this.name = this.constructor.name;
	this.id = "Geist";
	this.Open = function() {
		this.body = document.getElementsByTagName('body').item(0);
		this.obj = $cele("div");
		// needed -> add id to array
		this.obj.setAttribute("id", this.id + arguments[0]);
		this.body.insertBefore(this.obj, this.body.firstChild);
		this.alpha = (Info.ie) ? "filter:alpha(opacity=50);" : "opacity:0.5;";
		$css($(this.id + arguments[0]),
			this.alpha +
			"color:#fff;"+
			"background:#000 url(bild/laden.gif) center no-repeat;"+
			"left:0;"+
			"position:absolute;"+
			"top:0;"+
			"zIndex:10;"
		);
		document.getElementsByTagName("body").item(0).style.overflowY = "hidden";
		$(this.id + arguments[0]).style.height = Info.Scroll()[0] + "px";
		$(this.id + arguments[0]).style.width = Info.Scroll()[1] + "px";
		$(this.id + arguments[0]).style.top = Info.ScrollN()[0] + "px";
	};
	this.Close = function() {
		// needed -> del id from array
		if($(this.id + arguments[0])) {
			document.getElementsByTagName("body").item(0).style.overflowY = "auto";
			$rele(this.id + arguments[0]);
			return true;
		} else	
			return false;
	};
	this.Position = function() {
		// needed -> check all ids on array for positioning
		return;
	};
};

this.PopWin = new function PopWin() {
	// require Info
	// require Geist
	// alters Geist
	this.author = window.author;
	this.version = 1.2;
	this.name = this.constructor.name;
	this.id = "PopWin";
	this._opened = false;
	this.Open = function() {
		if(this._opened === false) {
			Geist.Open(this.id);
			this._win = $cele("div");
			this._win.setAttribute("id", this.id);
			this._body = $tag("body").item(0);
			this._html = $tag("html").item(0);
			this._body.insertBefore(this._win, this._body.firstChild);
			$(this.id).innerHTML = (arguments[0][1] ? '' : '<div class="menu"><a href="javascript:PopWin.Close();" id="PopWinTaste" class="PopWinTaste"><img src="bild/symbole/cross.png" alt="ok" title="ok" /></a></div>') + '<div id="PopWinText"></div>';
			$('PopWinText').innerHTML = arguments[0][0];
			if(arguments[0][1] != "" &&  arguments[0][1] != null) {
				$('PopWinText').className = (arguments[0][1] == "ok") ? "success" : arguments[0][1];
			}
			this._opened = true;
			this.Position();
			if(arguments[0][1]) {
				this.Timer();
			}
			//$(Geist.id + this.id).setAttribute('onclick', 'PopWin.Close();');
		}
		return;
	};
	this.Close = function() {
		if(this._opened === true) {
			Geist.Close(this.id);
			$rele(this.id);
			this._opened = false;
		}
		return;
	};
	this.Do = function() {
		if(this._opened === false)
			this.Open(arguments);
		else if(this._opened === true)
			this.Close(arguments);
		else
			return false;
		return;
	};
	this.Position = function() {
		if($("Geist" + this.id)) {
			Geist.Close(this.id);
			Geist.Open(this.id);
		}
		var WinHeight = Info.MinH();
		var WinWidth = Info.MinW();
		if($(this.id)) {
			$(this.id).style.top = ((WinHeight - $(this.id).offsetHeight) / 2) + this._html.scrollTop + "px";
			//$(this.id).style.left = (this.Body.offsetWidth - $(this.id).offsetWidth) / 2 + "px";
			$(this.id).style.left = ((WinWidth - $(this.id).offsetWidth) / 2) + this._html.scrollLeft + "px";
		}
		return;
	};
	this.Timer = function() {
		this.time = setTimeout("PopWin.Close();", 2000);
	};
};

this.Fade = new function Fade() {
	this.author = window.author;
	this.version = 2.0;
	this.name = this.constructor.name;
	this.Do = function() {
		if(!arguments[0] || typeof arguments[1] == "undefined" || typeof arguments[2] == "undefined" || typeof arguments[3] == "undefined")
			return;
		var str = arguments[0];
		var red = arguments[1];
		var green = arguments[2];
		var blue = arguments[3];
		var rr = 255;
		var gg = 255;
		var bb = 255;
		if(typeof str.fadeTime != 'undefined')
			clearTimeout(str.fadeTime);
		if(red == rr && green == gg && blue == bb) {
			str.style.backgroundColor = ('rgb(' + rr + ', ' + gg + ', ' + bb + ')');
			return;
		}
		var newred = red + Math.floor((rr - red) / 10);
		var newgreen = green + Math.floor((gg - green) / 10);
		var newblue = blue + Math.floor((bb - blue) / 10);
		str.style.backgroundColor = 'rgb(' + newred + ', ' + newgreen + ', ' + newblue + ')';
		str.fadeTime = setTimeout(function() { Fade.Do(str, newred, newgreen, newblue); }, 60);
	};
};

this.Error = new function Error() {
	// require Info
	this.author = window.author;
	this.version = 1.0;
	this.name = this.constructor.name;
	this.id = "window.Error";
	this.Show = function() {
		if($(this.id)) {
			this.Time();
			$(this.id).innerHTML = '<p style="padding:3px;border-bottom:1px solid #555;">' + ((typeof arguments[0] != "string") ? arguments[0][0] + ' (' + arguments[0][2] + ')<br />' + arguments[0][1] : arguments[0]) + '</p>' + $(this.id).innerHTML;
		} else
			this.Create(arguments[0]);
	};
	this.Create = function() {
		this.body = $tag("body").item(0);
		this.box = $cele("div");
		this.box.setAttribute("id", this.id);
		this.body.insertBefore(this.box, this.body.firstChild);
		this.obj = $(this.id);
		this.obj.innerHTML = '<p style="padding:3px;border-bottom:1px solid #555;">' + ((typeof arguments[0] != "string") ? arguments[0][0] + ' (' + arguments[0][2] + ')<br />' + arguments[0][1] : arguments[0]) + '</p>';
		this.alpha = (Info.ie) ? "filter:alpha(opacity=80);" : "opacity:.8;";
		$css(this.obj,
			this.alpha +
			"color:#000;"+
			"background:#fff;"+
			"border:1px solid #555;"+
			"borderBottom:0 none;"+
			"font:normal 10px verdana, sans-serif;"+
			"right:20px;"+
			"overflowX:auto;"+
			"position:absolute;"+
			"top:-1px;"+
			"width:350px;"+
			"zIndex:1000;"
		);
		this.Time();
	};
	this.Time = function() {
		if(typeof(this.time) != "undefined")
			clearTimeout(this.time);
		this.time = setTimeout(new Function("$rele('" + this.id + "');"), 5000);
	};
};

this.Cookie = new function Cookie() {
	this.author = window.author;
	this.version = 1.0;
	this.name = this.constructor.name;
	this.Set = function() {
		this._name = arguments[0];
		this._value = arguments[1];
		this._days = arguments[2];
		this._today = new Date();
		this._expire = new Date();
		if(this._days == null || this._days == 0)
			this._days = 1;
		this._expire.setTime(this._today.getTime() + 3600000 * 24 * this._days);
		document.cookie = this._name + '=' + escape(this._value) + ';expires=' + this._expire.toGMTString();
	};
	this.Get = function() {
		this._name = arguments[0];
		this._cookies = '' + document.cookie;
		this._result = this._cookies.indexOf(this._name);
		if(this._result == -1 || this._name == '')
			return ''; 
		this._result1 = this._cookies.indexOf(';', this._result);
		if(this._result1 == -1)
			this._result1 = this._cookies.length; 
		return unescape(this._cookies.substring(this._result + this._name.length + 1, this._result1));
	};
	this.Del = function() {
		this._name = arguments[0];
		this._date = new Date();
		this._date.setTime(this._date.getTime() - 1);
		document.cookie = this._name + '=; expires=' + this._date.toGMTString(); 
	};
};

this.BB = new function BB() {
	// require Info
	this.author = window.author;
	this.version = 2.0;
	this.name = this.constructor.name;
	this.Tag = function(areaId, openerTag, closerTag) {
		if(Info.ie && Info.win)
			this.TagIE(areaId, openerTag, closerTag);
		else
			this.TagNS(areaId, closerTag, openerTag);
		return;
	};
	this.TagIE = function(areaId, openerTag, closerTag, innerData) {
		var txtArea = $(areaId);
		var aSelection = document.selection.createRange().text;
		var range = txtArea.createTextRange();
		if(aSelection) {
			if(innerData != "" && typeof(innerData) != "undefined") {
				document.selection.createRange().text = aSelection + openerTag + innerData + closerTag;
			} else {
				document.selection.createRange().text = openerTag + aSelection + closerTag;
			}
			txtArea.focus();
			range.move('textedit');
			range.select();
		} else {
			var oldStringLength = range.text.length + openerTag.length;
			if(innerData != "" && typeof(innerData) != "undefined") {
				txtArea.value += openerTag + innerData + closerTag;
			} else {
				txtArea.value += openerTag + closerTag;
			}
			txtArea.focus();
			range.move('character', oldStringLength);
			range.collapse(false);
			range.select();
		}
		return;
	};
	this.TagNS = function(areaId, openerTag, closerTag, innerData) {
		var txtArea = $(areaId);
		if (txtArea.selectionEnd && (txtArea.selectionEnd - txtArea.selectionStart > 0)) {
			var preString = (txtArea.value).substring(0, txtArea.selectionStart);
			if(innerData != "" && typeof(innerData) != "undefined") {
				var newString = (txtArea.value).substring(txtArea.selectionStart,txtArea.selectionEnd) + openerTag + innerData + closerTag;
			} else {
				var newString = openerTag + (txtArea.value).substring(txtArea.selectionStart,txtArea.selectionEnd) + closerTag;
			}
			var postString = (txtArea.value).substring(txtArea.selectionEnd);
			txtArea.value = preString + newString + postString;
			txtArea.focus();
		} else {
			var offset = txtArea.selectionStart;
			var preString = (txtArea.value).substring(0, offset);
			if(innerData != "" && typeof(innerData) != "undefined") {
				var newString = openerTag + innerData + closerTag;
			} else {
				var newString = openerTag + closerTag;
			}
			var postString = (txtArea.value).substring(offset);
			txtArea.value = preString + newString + postString;
			txtArea.selectionStart = offset + openerTag.length;
			txtArea.selectionEnd = offset + openerTag.length;
			txtArea.focus();
		}
		return;
	};
};


this.Ajax = new function Ajax() {
	// require Geist
	// require Error
	// alters PopWin
	this.author = window.author;
	this.version = 2.3;
	this.name = this.constructor.name;
	this.Execute = false;
	this.DoPost = false;
	this.XMLRun = false;
	this.Img = new Array();
	this.sxmlObj = new Array('Msxml2.XMLHTTP.4.0', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP');
	this.Loading = function() {
		/*
			readyState = 1
			* Explorer: twice
			* Mozilla: twice
			* Safari: once
			* Opera: once
		*/
		var out = arguments[0];
		if(this.Img[out]) {
			if(!$("GeistAjax"))
				Geist.Open("Ajax");
			this.Img[out] = false;
		}
		//this.Helem[out].innerHTML = "...";
		return;
	};
	this.Loaded = function() {
		/*
			readyState = 2
			* Explorer: once
			* Mozilla: once
			* Safari: once
			* Opera: none
		*/
		var out = arguments[0];
		//this.Helem[out].innerHTML = "...";
		return;
	};
	this.Interactive = function() {
		/*
			readyState = 3
			* Explorer: once
			* Mozilla: once
			* Safari: once
			* Opera: once
		*/
		var out = arguments[0];
		//this.Helem[out].innerHTML = "...";
		return;
	};
	this.Complete = function() {
		/*
			readyState = 4
			* Explorer: once
			* Mozilla: once
			* Safari: once
			* Opera: once
		*/
		var out = arguments[0];
		var HelemNN = this.Helem[out].nodeName.toLowerCase();
		if(this.Hajax[out].responseText == "NULL")
			return;
		if(HelemNN == "input" || HelemNN == "select" || HelemNN == "option") {
			if(this.JustAdd[out] === true) {
				this.Helem[out].value += this.Hajax[out].responseText;
			} else if(this.JustAdd[out] === false) {
				this.Helem[out].value = this.Hajax[out].responseText + this.Helem[out].value;
			} else {
				this.Helem[out].innerHTML = "&nbsp;";
				this.Helem[out].value = this.Hajax[out].responseText;
			}
		} else if(HelemNN == "img") {
			this.Helem[out].src = this.Hajax[out].responseText;
		} else {
			if(this.JustAdd[out] === true) {
				this.Helem[out].innerHTML += this.Hajax[out].responseText;
			} else if(this.JustAdd[out] === false) {
				this.Helem[out].innerHTML = this.Hajax[out].responseText + this.Helem[out].innerHTML;
			} else {
				this.Helem[out].innerHTML = this.Hajax[out].responseText;
			}
		}
		if($('PopWin')) PopWin.Position();
		return;
	};
	this.Run = function() {
		var out = arguments[0];
		if(this.Hajax[out].responseText.match(/(<script(.type..text.javascript.)?>)(([\r\n\t]|.)*)(<\/script>)/g))
			eval(this.Hajax[out].responseText.replace(/(\r|\n|\t)/g, "").replace(/^((.*)<script(.type..text.javascript.)?>)(.*)(<\/script>(.*))$/g, "$4"));
		else if(this.Hajax[out].responseText.match("\<javascript\>") || this.Execute === true)
			eval(this.Hajax[out].responseText.replace(/(<javascript>|\r|\n|\t)/g, ""));
		this.Execute = false;
		return;
	};
	this.XMLNode = function() {
		var out = arguments[0];
		var XML = this.Hajax[out].responseXML;
		//this.Helem[out].innerHTML = XML;
		this.XMLRun = false;
		return;
	};
	this.Error = function() {
		var out = arguments[0];
		var AjaxError = "Ajax error: " + this.Hajax[out].status + " - " + this.Hajax[out].statusText + ".";
		Error.Show(AjaxError);
		return;
	};
	this.Init = function() {
		try {
			var AjaxRqst = new XMLHttpRequest();
		} catch(e) {
			for(var i = 0, j = this.sxmlObj.length; i < j; i++) {
				try{
					var AjaxRqst = new ActiveXObject(this.sxmlObj[i]);
					break;
				} catch(e) {
					var AjaxRqst = null;
				}
			}
		}
		return AjaxRqst;
	};
	this.encodeURL = function() {
		var varArray = arguments[0].split("&");
		for(var i = 0; i < varArray.length; i++) {
			urlVars = varArray[i].split("=");
			if(urlVars[0].indexOf("amp;") != -1)
				urlVars[0] = urlVars[0].substring(4);
			varArray[i] = this.encGet(urlVars[0], urlVars[1]);
		}
		return varArray.join("&");
	};
	this.encGet = function() {
		return encodeURIComponent(arguments[0]) + ((arguments[1]) ? "=" + encodeURIComponent(arguments[1]) : "");
	};
	this.setGet = function() {
		if(this.PostURL.length < 3)
			this.PostURL = arguments[0] + "=" + arguments[1];
		else
			this.PostURL += "&" + arguments[0] + "=" + arguments[1];
	};
	this.Load = function() {
		var out = arguments[1];
		if(!this.JustAdd) this.JustAdd = new Array();
		this.JustAdd[out] = (arguments[3] === true) ? true : (arguments[3] === false) ? false : null;
		this.Img[out] = (arguments[4] === false) ? false : true;
		if(typeof(this.Helem) == "undefined")
			this.Helem = new Array();
		if(typeof(this.Hajax) == "undefined")
			this.Hajax = new Array();
		if($(out)) {
			this.Helem[out] = $(out);
			this.Hajax[out] = this.Init();
			var self = this;
			this.Hajax[out].onreadystatechange = function() {
				switch(self.Hajax[out].readyState) {
					case 0:
						self.Uninitialized(out);
					case 1:
						self.Loading(out);
					break;
					case 2:
						self.Loaded(out);
					break;
					case 3:
						self.Interactive(out);
					break;
					case 4:
						if(self.Hajax[out].status == 200)
							if(self.Execute === true)
								self.Run(out);
							else if(self.Hajax[out].responseText.match(/\<(java)?script/g)) {
								self.Run(out);
								if(self.XMLRun === true)
									self.XMLNodes(out);
								else
									self.Complete(out);
							} else
								if(self.XMLRun === true)
									self.XMLNodes(out);
								else
									self.Complete(out);
						else
							self.Error(out);
						Geist.Close("Ajax");
					break;
				}
			};
			this.PostURL = this.encodeURL(arguments[0]);
			this.setGet("rndtime", new Date().getTime());
			if(this.DoPost === true)
				this.Hajax[out].open("POST", arguments[2], true);
			else
				this.Hajax[out].open("GET", arguments[2] + "?" + this.PostURL, true);
			this.Hajax[out].setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
			this.Hajax[out].setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
			this.Hajax[out].setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			this.Hajax[out].setRequestHeader("Pragma", "no-cache");
			if(this.DoPost === true) {
				this.Hajax[out].send(this.PostURL);
				this.DoPost = false;
			} else
				this.Hajax[out].send(null);
		}
		return;
	};
};

/**************************************************************************/

this.Haus = new function() {
	// require $$
	// require Ajax
	this.author = window.author;
	this.version = 1.0;
	this.name = this.constructor.name;
	// history
	this._history = new function _history() {
		this.author = window.author;
		this.version = 1.0;
		this.name = this.constructor.name;
		//
		this._actual = null;
		this.Start = function() {
			this._refresher();
			this._obj = setInterval("Haus._history._refresher();", 100);
		};
		this._refresh = function() {
			Ajax.Load(Haus._link(), 'Inhalt', 'ajax.php');
		};
		this._refresher = function() {
			if(this._actual != Haus._link()) {
				Ajax.Load(Haus._link(), 'Inhalt', 'ajax.php');
				this._actual = Haus._link();
				this._menuChange();
				return;
			}
		};
		this._menuChange = function() {
			//this.obj = arguments[0];
			this.obj = $('menu' + Haus._link().replace(/^(.*)(seite\=)([0-9]+)(.*)$/g, "$3"));
			if(!this.obj) {
				this.as = $tag('a');
				for(var i = 0; i < this.as.length; i++) {
					if(this.as[i].name.match("menu" + window.location.hash.replace(/^(#)([0-9]+)(.*)$/g, "$2"))) {
						this.obj = this.as[i];
						break;
					}
				};
			}
			if(!this.obj)
				return;
			this.as = this.obj.parentNode.getElementsByTagName('a');
			for(var i = 0; i < this.as.length; i++) {
				this.as[i].className = "";
			}
			this.obj.className = "selected";
			return;
		};
	};
	this.Start = function() {
		// first content loader (obsolete -> _history)
		//Ajax.Load(this._link(), 'Inhalt', 'ajax.php');
		// history listener
		this._history.Start();
		// add logo link
		$('Logo').onclick = function() {
			window.location = "#";
		};
		$('Logo').style.cursor = "pointer";
		// automatic inputs cleaner
		var inputs_auto = new Array('suche_eins');
		for(var i = 0; i < inputs_auto.length; i++) {
			$(inputs_auto[i]).onfocus = function() {
				!this.inntext ? this.inntext = this.value : this.inntext;
				this.value = '';
			};
			$(inputs_auto[i]).onblur = function() {
				this.value == '' ? this.value = this.inntext : false;
			};
		};
		return;
	};
	this.Change = function() {
		if(!arguments[0] || !arguments[1])
			return;
		window.location = "#" + arguments[1]; void(0);
		// (obsolete -> _history)
		//Ajax.Load(this._link(), 'Inhalt', 'ajax.php');
		this.obj = $$(arguments[0]);
		if(!this.obj)
			return;
		this.obj.blur();
		this.as = this.obj.parentNode.getElementsByTagName('a');
		for(var i = 0; i < this.as.length; i++) {
			this.as[i].className = "";
		}
		this.obj.className = "selected";
		return;
	};
	this.Lnk = function() {
		window.location = "#" + arguments[0]; void(0);
		// (obsolete -> _history)
		//Ajax.Load(this._link(), 'Inhalt', 'ajax.php');
		return;
	};
	this._link = function() {
		_link = window.location.hash.replace("#", "");
		if(_link == '')
			window.location = "#1";
		return "seite=" + (_link == '' ? 1 : _link);
	};
	this.Go = function() {
		this.actions = {
			// Uber
			'rss' : "Ajax.Load('data=rss', 'PopWinText', 'infos.php');",
			'dank' : "Ajax.Load('data=dank', 'PopWinText', 'infos.php');",
			'kontakt' : "Ajax.Load('data=kontakt', 'PopWinText', 'infos.php');",
			'unb' : "Ajax.Load('data=unb', 'PopWinText', 'infos.php');",
			// Politik
			'datenschutzrichtlinie' : "Ajax.Load('data=datenschutzrichtlinie', 'PopWinText', 'infos.php');",
			'agb' : "Ajax.Load('data=agb', 'PopWinText', 'infos.php');",
			// Validierung und Technologie
			'xhtml' : "Ajax.Load('data=xhtml', 'PopWinText', 'infos.php');",
			'css' : "Ajax.Load('data=css', 'PopWinText', 'infos.php');",
			'ajax' : "Ajax.Load('data=ajax', 'PopWinText', 'infos.php');",
			'php' : "Ajax.Load('data=php', 'PopWinText', 'infos.php');",
			'mysql' : "Ajax.Load('data=mysql', 'PopWinText', 'infos.php');"
		};
		if(this.actions[arguments[0].toLowerCase()]) {
			PopWin.Do('...');
			eval(this.actions[arguments[0].toLowerCase()]);
		}
		return;
	};
	this.Search = function() {
		if($("suche_zwei") && $("suche_zwei").value != "") {
			var TMP = "";
			TMP += $('suche_kanji').checked ? '&suche_kanji': '';
			TMP += $('suche_wort').checked ? '&suche_wort': '';
			TMP += $('suche_radikal').checked ? '&suche_radikal': '';
			window.location = "#4&suche=" + (parseInt($("suche_zwei").value) + 1) + TMP;
		}
		return;
	};
	this.Load = function() {
		this._history._refresh();
	};
	this.Lang = function() {
		var not_done_langs = new Array('de', 'es');
		for(var i = 0; i < not_done_langs.length; i++) {
			if(arguments[0].match(not_done_langs[i])) {
				PopWin.Do("<img src='bild/flaggen/" + not_done_langs[i] + ".png'> This dictionary was not trasnlated to this language yet.<br />We are sorry. Try to use the dictionary using another for now.");
				return;
			}
		};
		window.location = '?lang=' + arguments[0];
	};
	// aktionen
	this.Aktion = new function Aktion() {
		this.author = window.author;
		this.version = 1.0;
		this.name = this.constructor.name;
		//
		this.AddKanji = function() {
			Ajax.Execute = true;
			Ajax.Load('kanji=' + arguments[0], 'Inhalt', 'aktionen.php');
		};
		this.AddRadical = function() {
			Ajax.Execute = true;
			Ajax.Load('radical=' + arguments[0], 'Inhalt', 'aktionen.php');
		};
		this.DelKanji = function() {
			this.AddKanji(arguments[0]);
		};
		this.DelRadical = function() {
			this.AddRadical(arguments[0]);
		};
		this.SeeKanji = function() {
			PopWin.Do('...');
			Ajax.Load('kanji', 'PopWinText', 'aktionen.php');
		};
		this.SeeRadical = function() {
			PopWin.Do('...');
			Ajax.Load('radical', 'PopWinText', 'aktionen.php');
		};
		this.ChoseKR = function() {
			Haus.Lnk(arguments[0]);
			PopWin.Close();
		};
		this.LoginWindow = function() {
			PopWin.Do('...');
			Ajax.Load('login', 'PopWinText', 'ajax.php');
		};
		this.LoginAlert = function() {
			$('LoginAlert').innerHTML = arguments[0];
			$('LoginAlert').className = arguments[1];
		};
		this.Login = function() {
			var user = $('LoginUser').value;
			var pass = $('LoginPass').value;
			if(user != '' && pass != '') {
				Ajax.DoPost = true;
				Ajax.Execute = true;
				Ajax.Load('user=' + user + '&pass=' + pass, 'Inhalt', 'aktionen.php');
				user = "";
				pass = "";
			}
		};
		this.RegisterWindow = function() {
			PopWin.Do('...');
			Ajax.Load('register', 'PopWinText', 'aktionen.php');
		};
		this.RegisterAlert = function() {
			$('RegAlert').innerHTML = arguments[0];
			$('RegAlert').className = arguments[1];
		};
		this.Register= function() {
			var gets = "";
			var user = "";
			try{
				var user = $('RegisterUser').value;
				gets += 'RegisterUser=' + user;
			} catch(e) { }
			var passa = "";
			try{
				var passa = $('RegisterPass').value;
				gets += '&RegisterPass=' + passa;
			} catch(e) { }
			var passb = "";
			try{
				var passb = $('RegisterPass2').value;
				gets += '&RegisterPass2=' + passb;
			} catch(e) { }
			var name = "";
			try{
				var name = $('RegisterName').value;
				gets += '&RegisterName=' + name;
			} catch(e) { }
			var mail = "";
			try{
				var mail = $('RegisterMail').value;
				gets += '&RegisterMail=' + mail;
			} catch(e) { }
			Ajax.DoPost = true;
			Ajax.Execute = true;
			Ajax.Load(gets, 'Inhalt', 'aktionen.php?register=1');
		};
		this.Suggest = function() {
			var id = $('SugId').value;
			var text = $('SugText').value;
			if(id != '' && text != '') {
				Ajax.DoPost = true;
				Ajax.Execute = true;
				Ajax.Load('id=' + id + '&text=' + text + '&type=' + (arguments[0]==1?'1':'2'), 'Inhalt', 'aktionen.php');
				id = "";
				text = "";
			}
		};
		this.Suche = function() {
			Ajax.DoPost = true;
			Ajax.Execute = true;
			Ajax.Load('suche=' + user, 'Inhalt', 'aktionen.php');
		};
	};
};



/* events */

this.onerror = function() {
	// require Error
	Error.Show(arguments);
	return false;
};

this.onunload = function() {
	return;
};

this.onload = function() {
	// requires Haus
	// slow IE precessing fix
	var _started = false;
	while(!_started) {
		try{
			Haus.Start();
			_started = true;
		} catch(e) {
			_started = false;
		}
	};
	return;
};

this.onresize = function() {
	// alters Geist
	// alters PopWin
	if($('Geist')) {
		Geist.Close();
		Geist.Open();
	}
	PopWin.Position();
	return;
};

this.onscroll = function() {
	// alters PopWin
	PopWin.Position();
	return;
};

this.oncontextmenu = new Function("return false;");
document.oncontextmenu = window.oncontextmenu;

this.onselectstart = function() { return false; };
document.onselectstart = window.onselectstart;
/*</script>*/