var indent;var ind_level=12; // Einr\u00FCcken in Pixelvar refCount = 0; // Referenzz\u00E4hlervar cookieAr = new Array()String.prototype.trim = function() { // skip leading and trailing whitespace // and return everything in between  var x=this;  x=x.replace(/^\s*(.*)/, "$1");  x=x.replace(/(.*?)\s*$/, "$1");  return x;}function treeNode(obj) {this.collapsed = false;	this.obj = obj;	this.childNodes= new Array();	this.text = "";	this.type='dir';}treeNode.prototype.addChild = function(obj){	this.childNodes.push(obj);	obj.parentNode = this;	}treeNode.prototype.show = function() {	try {		this.obj.style.display='block'	} catch (e) {}}treeNode.prototype.hide = function(){	try {		this.obj.style.display='none'	} catch (e) {}}treeNode.prototype.showPlus = function() {	try {		var im=this.obj.getElementsByTagName("img")[0]		im.src = im.src.replace(/minus/, "plus")	} catch (e) {}}treeNode.prototype.showMinus = function() {	try {		var im=this.obj.getElementsByTagName("img")[0]		im.src = im.src.replace(/plus/, "minus")	} catch (e) {}}treeNode.prototype.collapse = function() {	cookieAr[ this.getPath() ]=0;		this.collapsed = true;	this.showPlus();	for (var i = 0; i < this.childNodes.length; i++) {		this.childNodes[i].collapse()		if (this.obj) this.childNodes[i].hide(); // do not hide nodes of ROOT	}}treeNode.prototype.expand = function() {	cookieAr[ this.getPath() ]=1;		this.collapsed = false	this.showMinus();	for (var i = 0; i < this.childNodes.length; i++) {		this.childNodes[i].show()	}}treeNode.prototype.expandPath = function(p) {	this.expand();	if (!p || p == "") return;	var tmp = p.split("\\",2);	for (var i = 0; i < this.childNodes.length; i++) {		var child = this.childNodes[i];		if (child.text == tmp[0]) {			if (child.type=='dir') {				child.expand()				child.expandPath(tmp[1])			} else {				//child.highlight(true)			}		}	}}treeNode.prototype.highlight = function(bDoIt) {	this.obj.firstChild.className="naviLinkHL";}treeNode.prototype.getSiblings = function() {	var res=new Array()		try {		var tmp = this.parentNode.childNodes;		for (var i = 0; i < tmp.length; i++) {			if (tmp[i] != this) res.push(tmp[i]);		}	} catch (e) {}	return res;}// Pfad im des Knotens ermittelntreeNode.prototype.getPath = function() {	if (this.parentNode) {		var tmp = this.parentNode.getPath();		if (tmp) {			return tmp + "\\" + this.text		} else {			return this.text;		}	} else {		return this.text;	}}function storeState() {		var i = 0;	for (var key in cookieAr) {		if (cookieAr[key] && key) {			document.cookie = "expand"+ i +"="+key+ "; path = /";			i++;		} 		document.cookie = "expand"+ i +"=---END---; path = /";			}}treeNode.prototype.showHide = function() {		if (this.collapsed)  {		this.expand()	} else {		this.collapse()	}		var i = 0;	storeState();}treeNode.prototype.openWithAjax = function() {	var xmlHttp = null;	// Mozilla, Opera, Safari sowie Internet Explorer 7	if (typeof XMLHttpRequest != 'undefined') {    		xmlHttp = new XMLHttpRequest();	}	if (!xmlHttp) {    		// Internet Explorer 6 und \u00E4lter    		try {    			xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");    		} catch(e) {    			try {    				xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");    			} catch(e) {    				xmlHttp  = null;    			}    		}	}	if (xmlHttp) {    		xmlHttp.open('GET', this, true);    		xmlHttp.onreadystatechange = function () {        			if (xmlHttp.readyState == 4) {            				var tmp=xmlHttp.responseText;				var b = tmp.indexOf("<!--BEGIN-AJAX-->")				var e = tmp.indexOf("<!--END-AJAX-->")				var c = document.getElementById("AJAXCONTENT");				c.innerHTML = tmp.substr(b,e)				//alert(tmp.substr(b,e))        			}    		};    		xmlHttp.send(null);	}	//alert(this)	return false;}treeNode.prototype.ModifyCode = function(level) {	if (this.obj) {	// not the root		this.obj.style.paddingLeft = ind_level * (level-1) ;		var li = this.obj.getElementsByTagName("A")[0]		if (li) { // es ist bereits ein Link drauf			this.type='file'			this.text=li.innerHTML;			li.innerHTML = li.innerHTML;			//debugger;			if (li.href == document.location.href) this.highlight(true);						//li.onclick= this.openWithAjax		} else {			var path = this.obj.innerHTML;			var delim = path.lastIndexOf("\\");			this.text = path.substr(delim+1);			li=document.createElement("A");			li.href='#'			li.className = 'bold'			var im1=document.createElement("img");			im1.src = _webdb+"minus.gif";			im1.border=0;			im1.width=12;			im1.height=9;						li.appendChild(im1)					li.appendChild(document.createTextNode(this.text));						var tmp = this			li.onclick = function () { tmp.showHide() }			this.obj.innerHTML=''; // Reset Element content			this.obj.appendChild(li)		}	}	for (var i = 0; i < this.childNodes.length; i++) this.childNodes[i].ModifyCode(level+1);}treeNode.prototype.indent = function(ind) {	if (ind == 0) return;	var siblings = this.parentNode.childNodes	var sib=null	for (var i = 0; i < siblings.length; i++) {		if (siblings[i] == this) break;		sib = siblings[i];	}	if (sib) { // get a child of last 'brother'		this.parentNode.childNodes = this.getSiblings()		sib.addChild(this)		this.indent(ind-1)	}}treeNode.prototype.init = function() { this.ModifyCode(0); }var treeRoot=new treeNode(null); // the tree-Rootfunction beautify() {	var tree=document.getElementById("tree");	if (tree) beautifyTree(tree);	fixLinks();}var fileextAr = Array("pdf","zip","exe","wav","mod","snd","mp3","tif","gif","jpg","bmp","png","lwp","cdr","cpt","ico","pcx","cmd",				  "bat","pif","arc","rar","cab","avi","mpg","mpeg","wmv","bin","dat","sys","inf","ini","log","iso","tmp","dbf",				  "apr","mdb","lnk","wk4","xls","xlt","sam","rtf","txt","doc","dot","ppt","pps","ttf","htm","html","css","xml",				  "url","js","hlp","chm","nsf","ns4","ns5","ntf","com","dll","odt","ott","sxw","stw","ods","ots","sxc","stc",				  "odg","otg","sxd","std","odp","otp","sxi","sti","odf","sxm")function fixLinks() {	// replace the ugly notes download icons	els = document.getElementsByTagName("a");	for (var i = 0; i < els.length; i++) {		var el = els[i];		if (el.href.indexOf("$FILE")==-1 || el.getAttribute('FocNoFix') == 1) continue;		el.target="_blank";		if (el.style && el.style.whiteSpace) el.style.whiteSpace="";		var im=el.firstChild;		var txt =im.alt;		//el.style.border='1px solid red;';		// Workaround for attachments inserted with mac		var uglyMacText = im.nextSibling		if (uglyMacText) el.removeChild(uglyMacText)//		var txtNode = document.createTextNode(" "+//			txt.replace(/-/g,"").replace(/_/g," "))		var txtNode = document.createTextNode(" "+ txt)		var txtSpan = document.createElement("span")		txtSpan.appendChild(txtNode);		txtSpan.innerHTML = txtSpan.innerHTML.replace(/-/g,"-&#8203;"); //.replace(/_/g," ")		el.appendChild(txtSpan);		//		el.innerHTML = txtNode.innerHTML.replace(/-/g,"- "); //.replace(/_/g," ")		var ext=txt.substr(txt.lastIndexOf('.')+1);		el.appendChild( document.createElement("br"));		var useext = _webdb+"/de.foconis.lib.file.dat.gif"		for (var exts in fileextAr) {			if (fileextAr[exts] == ext) {				useext = _webdb+"/de.foconis.lib.file."+ext+".gif" 			}		}		/*		switch (ext) { // Miniansichten			case "gif":			case "jpg":			case "png":				useext=el.href		}*/					im.height=16;		im.width=16;		im.border=0;		im.style.marginBottom='-3px';		im.src=useext			}}// macht einen sch\u00F6nen navigationsbaum aus einer Viewfunction beautifyTree(tree) {	var els = tree.getElementsByTagName("div")	for (var i=0; i < els.length; i++) {		var el=els[i]; //scanne alle Elemente		var clazz=el.className		if (clazz == 'treeDir' || clazz == 'treeItem') { // ein 'Verzeichniseintrag'			indent = parseInt(el.getAttribute('FocIndent'))			var node=new treeNode(el);			treeRoot.addChild(node) // parent for next indented node is this node			node.indent(indent)		}	}	treeRoot.init()	treeRoot.collapse();	//treeRoot.expandPath(_treePath)	var i = 0;	var tmp = document.cookie.split(";");	var tmpAr = new Array()	for( var ckie in tmp) {		var spl;		spl = tmp[ckie].split("=");		tmpAr[ spl[0].trim() ] = spl[1];	}		for( i = 0; i < 100; i++) {		var tmp = tmpAr[ "expand"+i ];		if ( !tmp || tmp == "---END---" ) break;						treeRoot.expandPath( tmp )	}	if (i == 0) {		try {			treeRoot.childNodes[0].expand();		} catch(e) {}		storeState();	}}var mainText;var navText;var navBottom;var sidepanel=new Array();var body;function initSizes () {	mainText = document.getElementById('mainText');	navText = document.getElementById('navText');	navBottom = document.getElementById('navBottom');	sidepanel[0] = document.getElementById('releasesText');	sidepanel[1] = document.getElementById('newsText');	sidepanel[2] = document.getElementById('body2Text');	resizeHandler();}function resizeHandler() {	var x,y;	if (self.innerHeight) // all except Explorer	{		 x = self.innerWidth;		 y = self.innerHeight;	}	else if (document.documentElement && document.documentElement.clientHeight)		 // Explorer 6 Strict Mode	{		 x = document.documentElement.clientWidth;		 y = document.documentElement.clientHeight;	}	else if (document.body) // other Explorers	{		 x = document.body.clientWidth;		 y = document.body.clientHeight;	}	if (y < 200) y = 200;	var h = y-113;	if (mainText) mainText.style.height=h;	if (navText && navBottom) navText.style.height=h-navBottom.offsetHeight;	var tmp=0;	var last = -1;	for (var i = 0; i < 3; i++) {		if (sidepanel[i])  {			var tmp=sidepanel[i].offsetHeight + 2*33+5; // Rundungen und 5px Spacer			//alert(dump(sidepanel[i]));			h -= tmp;			last = i;		}	}	h += tmp;	if (h < 40) h=40;	if (last != -1) sidepanel[last].style.height= h;	}function dump(x) {	var r;	for (var s in x) {		r = r+ " "+s+":"+x[s]+";"	}	return r;}		 		 