		
		function Load(data)	{
			
			if	(data[0] == "#")	{
				garbageA = data.shift();
			}
			
			if	(data.search("anchor") != -1)	{
				return;
			}
			
			
			Lade("omoxen2", data, "Handler");
			
			
			dateiensplit = data.split(",")
			for	(i in dateiensplit)	{
				tempG = dateiensplit[i].split("/");
				dateiensplit[i] = tempG[tempG.length-1];
			}
			idvon = document.getElementById("verzeichnis");
			if	(dateiensplit.length == 1)	{
				document.title = "OMOXEN > " + dateiensplit[0];
			}	else	{
				document.title = "O. > " + dateiensplit[dateiensplit.length-1] + " > " + dateiensplit[dateiensplit.length-2];
			}
			
			location.hash = data;
			
		}
		
		
		function Lade(datei, text, verarbeitung)	{
			
			if (window.ActiveXObject) {
				try {
					xmlHttp= new ActiveXObject("Msxml2.XMLHTTP");
				} catch (e) {
					try {
						xmlHttp= new ActiveXObject("Microsoft.XMLHTTP");
					} catch (e) {
					}
				}
			} else if (window.XMLHttpRequest) {
				try {
					xmlHttp= new XMLHttpRequest();
				} catch (e) {
				}
			}
		
			if (xmlHttp) {
				xmlHttp.open('GET', datei + '.php?q='+text, true);
				eval("xmlHttp.onreadystatechange = " + verarbeitung + ";");
				xmlHttp.send(null);
			}
		}	
		
		function Handler()	{
			if (xmlHttp.readyState == 4)	{
				var answer = xmlHttp.responseText;
				stack = answer.split("$0");
				
				for	(i in stack)	{
					teile = stack[i].split("|");
					
					//JavaScript-Bearbeitung
					js = teile[2].split("$2");
					for	(k in js)	{
						tempA = js[k].split("$4");
						AddToEval(tempA[0], tempA[1]);
					}
					
					//Includings aufnehmen
					includings = teile[0].split("%");
					garbageA = includings.push(teile[1]);
					for	(j in includings)	{
						tempB = includings[j].split(";");
						name = tempB.shift();
						inhalt = tempB.join(";");
						inklArray[name] = inhalt;
					}
					inklArray["main" + i] = inklArray[name];
				}
			
			thgsToEval = "";
			text = " " + inklArray[name];
			
			do {	textTeile = text.split("%");
				
				for	(i in textTeile)	{
					tempD = textTeile[i].split(";");
					
					if	(tempD.length > 1)	{
						tempE = tempD.shift();
						
						if	(tempE != "js")	{
							textTeile[i] = inklArray[tempE] + tempD.join(";");
						}	else	{
							thgsToEval += tempD.shift() + "	";
							textTeile[i] = tempD.join(";");
						}
						
					}	else	{
						textTeile[i] = tempD[0];
					}
				}
			text = textTeile.join("");
			
			} while (text != textTeile[0]);
			
			
			//Auf den Bildschirm zeichnen
			idvon = document.getElementById("haupt");
			idvon.innerHTML = text;
			
			eval(thgsToEval);
			
			}
		}
		
		function ProofURL()	{
			if	(location.hash != url)	{
				url = location.hash;
				hashCode = location.hash.substr(1,location.hash.length-1);
				Load(hashCode);
			}
			
			window.setTimeout("ProofURL()", 150);
		 }
		
		
		function Init()	{
			evalArray = new Array();
			inklArray = new Array();
			
			spinID = document.getElementById("spinner");
			spinPic = 0;
			
			if 	(location.hash != "")	{
				hashCode = location.hash.substr(1,location.hash.length-1);
				Load(hashCode);
			}
			
			url = location.hash;
			ProofURL();
		}
		
		function Eval(name, temp)	{
			eval(evalArray[name]);
		}
		
		function AddToEval(name, inhalt)	{
			evalArray[name] = inhalt;
		}
		
		
		
		
		function AnimateMenuTextA(id, text, a)	{
			var idvon = document.getElementById(id);
			idvon.src = "images/" + id+a+".png";
			
			idvon = document.getElementById("MenuTextA");
			idvon.innerHTML = text;
		}
		
		function AnimateSpin()	{
			spinID.src = "spin/spin" + spinPic + ".png";
			
			spinPic += 1;
			if	(spinPic > 14)
				spinPic = 0;
			
			if	(spinAllow == 1)	{
				window.setTimeout("AnimateSpin()", 100);
			}	else	{
				spinID.src = "nothing.png";
			}
		}
		
		function RPLCNorm(id, no)	{
			switch (no)	{
				case 1: RPLCString(id, "[schat]|[/schat]", "<div class='shadow5'><div class='shadow4'><div class='shadow3'><div class='shadow2'><div class='shadow'>|</div></div></div></div></div>");
					break;
				case 2: { document.write('<font>Caught 2</font><br>'); break }
				default: { document.write('<font>Error: ' + ex + '</font><br>'); break }
			}
		}
		
		function RPLCString(id, string, ersetzen)	{
			alleString = string.split("|");
			alleErsetzen = ersetzen.split("|");
			idvon = document.getElementById(id);
			text = idvon.innerHTML;
			
			for	(i in alleString)	{
				text = text.replace(alleString[i], alleErsetzen[i]);
			}
			
			idvon.innerHTML = text;
		}
		
		
		function cmpnum(inp1, inp2) {
			return inp1.wert-inp2.wert;
		}
		
		function ent(key, wert) {
			this.key=key;
			this.wert=wert;
		}
		
		function SortM(arr)	{
			arrayAll = arr;
			arrayNo = new Array();
			arraySorted = new Array();
			
			for	(i in arrayAll)	{
				arrayNo[i] = arrayAll[i][0];
			}
			
			arrayNo.sort();
			
			for	(i in arrayNo)	{
				for	(j in arrayAll)	{
					if	(arrayNo[i] == arrayAll[j][0])	{
						name = " " + arrayNo[i];
						
						arraySorted[name] += arrayAll[j][1];
						arraySorted[name] = arraySorted[name].replace(/undefined/g, "");
						
						arrayAll[j][0] = "";
						continue;
					}
				}
			}
			return arraySorted;
		}
		
