var x=[];
if(document.ids){x=['nc4','Netscape Navigator 4'];if(!window.navigator.securityPolicy)x[1]+='.0';else x[1]+='.5-4.8';}
else if(document.all&&!document.getElementById)x=['ie4','Internet Explorer 4'];
else if(window.opera&&!document.createElement)x=['op5','Opera 5'];
else if(window.opera&&window.getComputedStyle){
if(document.createRange)x=['op8','Opera 8'];
else if(window.navigate)x=['o75','Opera 7.5'];else x=['o72','Opera7.2'];}
else if(window.opera&&document.compatMode)x=['op7','Opera 7'];
else if(window.opera&&document.releaseEvents)x=['op6','Opera 6'];
else if(document.contains&&!window.opera){x=['kq3','Safari / Konqueror 3']; x[1]+=window.print?'.1/.2':'.0';}
else if(window.pkcs11&&document.compatMode)x=['nn7','Mozilla / FireFox / Gecko '];
else if(window.getSelection&&window.atob)x=['nn7','Mozilla / Gecko'];
else if(window.getSelection&&!document.compatMode)x=['nn6','Netscape 6 / Mozilla Beta'];
else if(window.clipboardData&&document.compatMode)x=['ie6','Internet Explorer 6'];
else if(window.clipboardData){x=['ie5','Internet Explorer 5.0']; 
if(!document.createDocumentFragment) x=['ie5.5','Internet Explorer 5.5']; 
if(document.doctype && !window.print ) x=['ie5m','Internet Explorer 5Mac'];}
else if(document.getElementById&&!document.all){ x[0]='op4';x[1]='Opera 4';if(!window.RegExp) x[1]+='.0';else x[1]+='.1';}
else if(document.images&&!document.all) x=['nn3','Netscape Naviagtor 3'];
else if(document.clientWidth&&!window.RegExp)x=['kq2','Safari / Konqueror 2']; 
else x=['???','unbekannt']; 

function WhichClicked(ww) { window.document.postmodify.waction.value = ww;}

function submitonce(theform){if (document.all||document.getElementById){for(i=0;i<theform.length;i++){var tempobj=theform.elements[i];if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset"){tempobj.disabled=true;}}}}

function storeCaret(text) { 
	if (text.createTextRange) {
		text.caretPos = document.selection.createRange().duplicate();
	}
}

function AddText(text) {
	if (document.postmodify.message.createTextRange && document.postmodify.message.caretPos) {
		var caretPos = document.postmodify.message.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
	} else {
		document.postmodify.message.value += text;
	}
	document.postmodify.message.focus(caretPos)
}

var text = "";
var DblClick = false;

function getActiveText() {
	var met;
	if (window.getSelection) {text = window.getSelection(); met='1 = window.getSelection';}
	else if (document.getSelection) {text = document.getSelection().toString(); met='2 = document.getSelection';}
	else if (document.selection) {text = document.selection.createRange().text; met='3 = document.selection';}
//	text = (document.all) ? document.selection.createRange().text : document.getSelection();
//alert(met+'\\n'+text);
}

function CoAdTx(a) {if (!DblClick) {getActiveText();
	AddText("["+a+"]"+text+"[/"+a+"]");
	}}
function DCoAdTx(a,t) {DblClick = true;getActiveText();var dtext = text ? text : "Text";Txt=window.prompt (stx[t],dtext);if (Txt != "" && Txt != null){AddText("["+a+"]"+Txt+"[/"+a+"]");}}
function altshowcolor(color) { getActiveText(); AddText("[color="+color+"]"+text+"[/color]");}
function showcolor(color) {getActiveText();AddText("[color=#"+color+"]"+text+"[/color]");}
function kto(f) { eval( 'setTimeout(\'n'+f+'()\', 250);' ); DblClick = false; }

function nbold() {CoAdTx("b");}
function jbold() {DCoAdTx("b","1500");}

function nitalicize() {CoAdTx("i");}
function jitalicize() {DCoAdTx("i","1501");}

function nunderline() {CoAdTx("u");}
function junderline() {DCoAdTx("u","1502");}

function nstrike() {CoAdTx("s");}
function jstrike() {DCoAdTx("s","1503");}

function nglow() {if (!DblClick) {getActiveText();AddText("[glow=red,2,100%]"+text+"[/glow]");}}
function jglow() {
	DblClick = true;
	getActiveText();
	var dtext = text ? text : "Text";
	Glwc=window.prompt (stx["1504"],"red");
	if (Glwc != null) { if (Glwc == "") {Glwc = "red"}
		Glws=window.prompt (stx["1505"],"2");
		if (Glws != null) { if (Glws == "") {Glws = "2"}
			Txt=window.prompt (stx["1506"],dtext);
			if (Txt != "" && Txt != null){
				AddText("[glow="+Glwc+","+Glws+",100%]"+Txt+"[/glow]");
			}
		}
	}
}

function nshadow() {if (!DblClick) {getActiveText();AddText("[shadow=red,45,100%]"+text+"[/shadow]");}}
function jshadow() {
	DblClick = true;
	getActiveText();
	var dtext = text ? text : "Text";
	Glwc=window.prompt (stx["1507"],"red");
	if (Glwc != null) { if (Glwc == "") {Glwc = "red"}
		Glws=window.prompt (stx["1508"],"45");
		if (Glws != null) { if (Glws == "") {Glws = "45"}
			Txt=window.prompt (stx["1509"],dtext);
			if (Txt != "" && Txt != null){
				AddText("[shadow="+Glwc+","+Glws+",100%]"+Txt+"[/shadow]");
			}
		}
	}
}

function nmove()	{CoAdTx("move");}
function jmove()	{DCoAdTx("move","1510");}

function npre() 	{CoAdTx("pre");}
function jpre()		{DCoAdTx("pre","1511");}

function nleft()	{CoAdTx("left");}
function jleft()	{DCoAdTx("left","1512");}

function ncenter()	{CoAdTx("center");}
function jcenter()	{DCoAdTx("center","1513");}

function nblockmode()	{CoAdTx("blockmode");}
function jblockmode()	{DCoAdTx("blockmode","1514");}

function nright()	{CoAdTx("right");}
function jright()	{DCoAdTx("right","1515");}

function jhr(){}
function nhr() {AddText("[hr]");}

function nfont(e){if(!DblClick){getActiveText();AddText("[font="+e+"]"+text+"[/font]");}}

function nsize() {if (!DblClick) {getActiveText();AddText("[size=2]"+text+"[/size]");}}
function jsize() {
	DblClick = true;
	getActiveText();
	var dtext = text ? text : "Text";
	Sze=window.prompt (stx["1516"],"2");
	if (Sze != null) { if (Sze == "") {Sze = "2"}
		Txt=window.prompt (stx["1517"],dtext);
		if (Txt != "" && Txt != null){
  			AddText("[size="+Sze+"]"+Txt+"[/size]");
		}
	}
}

function nflash() {if (!DblClick) {getActiveText();if (!text) {text="URL"}AddText("[flash=100%,400]"+text+"[/flash]");}}
function jflash() { 
	DblClick = true;
	getActiveText();
	var dtext = text ? text : "http://";
	URL=window.prompt (stx["1519"],dtext);
	if (Url != null) { 
		if (Url == "") {Url = "http://"}
		dwid = "100%";
		wid=window.prompt (stx["1520"],dwid);
		if (wid != null) {
		dhig = stx["1522"];
		hig=window.prompt (stx["1521"],dhig);
		if (hig != null) {
		if (wid == stx["1522"] || wid == "") {
			AddTxt="[flash=]"+Url+"[/flash]";
		} else {
			if (hig == stx["1522"] || hig == "") {
				AddTxt="[flash="+wid+"]"+Url+"[/flash]";
			} else {
				AddTxt="[flash="+wid+","+hig+"]"+Url+"[/flash]";
			} 
		}
		AddText(AddTxt);
		}
		}
	}
}

function nurl() {CoAdTx("url");}
function jurl() { 
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="http://"; }   	
	Url=window.prompt (stx["1523"],dtext);
	if (Url != null) { 
		if (Url == "") {Url = "http://"}
		Txt=window.prompt (stx["1524"],"Link");
		if (Txt != null){
			if (Txt == "") {
				AddTxt="[url]"+Url+"[/url]";
			}else{
				AddTxt="[url="+Url+"]"+Txt+"[/url]";
			}
			AddText(AddTxt);
		}
	}
}

function nanchor() {CoAdTx("urla");}
function janchor() { 
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="http://"; }   	
	Url=window.prompt (stx["1523"],dtext);
	if (Url != null) { 
		if (Url == "") {Url = "http://"}
		Txt=window.prompt (stx["1524"],"Link");
		if (Txt != null){
			if (Txt == "") {
				AddTxt="[urla]"+Url+"[/urla]";
			}else{
				AddTxt="[urla="+Url+"]"+Txt+"[/urla]";
			}
			AddText(AddTxt);
		}
	}
}

function nftp() {CoAdTx("ftp");}
function jftp() { 
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="ftp://"; }   	
	Url=window.prompt (stx["1526"],dtext);
	if (Url != null) { 
		if (Url == "") {Url = "ftp://"}
		Txt=window.prompt (stx["1524"],"Link");
		if (Txt != null){
			if (Txt == "") {
				AddTxt="[ftp]"+Url+"[/ftp]";
			}else{
				AddTxt="[ftp="+Url+"]"+Txt+"[/ftp]";
			}
			AddText(AddTxt);
		}
	}
}

function imageloc() {
	pic = GetCookie('pic')
	if (pic == null) {pic = "URL"}
	AddText("[img]" + pic + "[/img]");
}
   
function nimg() {
	if (!DblClick) {
		getActiveText();
		if (!text) {
			text = GetCookie('pic')
			if (text == null) {text = "URL"}
		}
		AddText("[img]"+text+"[/img]");
	}
}

function jimg() { 
	DblClick = true;
	getActiveText();
	if (text) { 
		var dtext=text; 
	} else {
		var dtext = GetCookie('pic')
		if (dtext == null) {dtext = "http://"}
	}   	
	Url=window.prompt (stx["1527"],dtext);
	if (Url != null) { 
		if (Url == "") {Url = "http://"}
		dwid = stx["1522"];
		wid=window.prompt (stx["1528"],dwid);
		if (wid != null) {
		dhig = stx["1522"];
		hig=window.prompt (stx["1530"],dhig);
		if (hig != null) {
		if (wid == stx["1522"] || wid == "") {
			if (hig == stx["1522"] || hig == "") {
				AddTxt="[img]"+Url+"[/img]";
			} else {
				AddTxt="[img height="+hig+"]"+Url+"[/img]";
			} 
		} else {
			if (hig == "Originalgröße" || hig == "") {
				AddTxt="[img width="+wid+"]"+Url+"[/img]";
			} else {
				AddTxt="[img width="+wid+" height="+hig+"]"+Url+"[/img]";
			} 
		}
		AddText(AddTxt);
		}
		}
	}
}

function nbimg() {
	if (!DblClick) {
		getActiveText();
		if (!text) {
			text = GetCookie('pic')
			if (text == null) {text = "URL"}
		}
		AddText("[bimg]"+text+"[/bimg]");
	}
}

function jbimg() { 
	DblClick = true;
	getActiveText();
	if (text) { 
		var dtext=text; 
	} else {
		var dtext = GetCookie('pic')
		if (dtext == null) {dtext = "http://"}
	}   	
	Url=window.prompt (stx["1529"],dtext);
	if (Url != null) { 
		if (Url == "") {Url = "http://"}
			AddTxt="[bimg]"+Url+"[/bimg]";
			AddText(AddTxt);
	}
}

function getCookieVal (offset) { 
	var endstr = document.cookie.indexOf (";", offset); 
	if (endstr == -1) endstr = document.cookie.length; 
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) { 
	var arg = name + "="; 
	var alen = arg.length; 
	var clen = document.cookie.length; 
	var i = 0; 
	while (i < clen) { 
		var j = i + alen; 
		if (document.cookie.substring(i, j) == arg) 
			return getCookieVal (j); 
		i = document.cookie.indexOf(" ", i) + 1; 
		if (i == 0) break; 
		} 
	return null;
}

function getpicurl() {
	pic = GetCookie('pic');
	if (pic == null) {pic = stx["1531"]}
	return pic;
}

function nemail2() {CoAdTx("email");}
function jemail2() { 
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="name@provider.com"; }   	
	Url=window.prompt (stx["1532"],dtext);
	if (Url != null) { 
		if (Url == "") {Url = "http://"}
		Txt=window.prompt (stx["1533"],"Link");
		if (Txt != null){
			if (Txt == "") {
				AddTxt="[email]"+Url+"[/email]";
			}else{
				AddTxt="[email="+Url+"]"+Txt+"[/email]";
			}
			AddText(AddTxt);
		}
	}
}

function ntable() {
	if (!DblClick) {
		getActiveText();
		AddTxt="[table][tr][td]"+text+"[/td][/tr][/table]";
		AddText(AddTxt);
	}
}

function jtable() {
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="Text"; }   	
	Txt=window.prompt (stx["1534"],dtext);
	if (Txt != "" && Txt != null){
		AddTxt="[table][tr][td]"+Txt+"[/td][/tr][/table]";
		AddText(AddTxt);}
}

function nxta() {
	if (!DblClick) {
		getActiveText();
		AddTxt="[xta]"+text+"[/xta]";
		AddText(AddTxt);
	}
}

function jxta() {
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="Text"; }   	
	Txt=window.prompt (stx["1534"],dtext);
	if (Txt != "" && Txt != null){
		AddTxt="[xta]"+Txt+"[/xta]";
		AddText(AddTxt);}
}

function ntrow() {
	if (!DblClick) {
		getActiveText();
		AddTxt="[tr][td]"+text+"[/td][/tr]";
		AddText(AddTxt);
	}
}

function jtrow() {
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="Text"; }   	
	Txt=window.prompt (stx["1535"],dtext);
	if (Txt != "" && Txt != null){
		AddTxt="[tr][td]"+Txt+"[/td][/tr]";
		AddText(AddTxt);}
}

function ntcol() {CoAdTx("td");}
function jtcol() {
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="Text"; }   	
	Txt=window.prompt (stx["1536"],dtext);
	if (Txt != "" && Txt != null){
		AddTxt="[td]"+Txt+"[/td]";
		AddText(AddTxt);}
}

function nsuperscript() {CoAdTx("sup");}
function jsuperscript() {
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="Text"; }   	
	Txt=window.prompt (stx["1537"],dtext);
	if (Txt != "" && Txt != null){
		AddTxt="[sup]"+Txt+"[/sup]";
		AddText(AddTxt);}
}

function nsubscript() {CoAdTx("sub");}
function jsubscript() {
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="Text"; }   	
	Txt=window.prompt (stx["1538"],dtext);
	if (Txt != "" && Txt != null){
		AddTxt="[sub]"+Txt+"[/sub]";
		AddText(AddTxt);}
}

function nteletype() {CoAdTx("tt");}
function jteletype() {
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="Text"; }   	
	Txt=window.prompt (stx["1539"],dtext);
	if (Txt != "" && Txt != null){
		AddTxt="[tt]"+Txt+"[/tt]";
		AddText(AddTxt);}
}

function ncode() {CoAdTx("code");}
function jcode() {
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="Text"; }   	
	Txt=window.prompt (stx["1540"],dtext);
	if (Txt != "" && Txt != null){
		AddTxt="[code]"+Txt+"[/code]";
		AddText(AddTxt);}
}

function nquote2() {CoAdTx("quote");}
function jquote2() {
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="Text"; }   	
	Txt=window.prompt (stx["1541"],dtext);
	if (Txt != "" && Txt != null){
		AddTxt="[quote]"+Txt+"[/quote]";
		AddText(AddTxt);}
}

function nlist() {
	if (!DblClick) {
		getActiveText();
		AddTxt="[list][*]"+text+"[*][*][/list]";
		AddText(AddTxt);
	}
}

function jlist() {
   	DblClick = true;
  var AddTxtZ = "";
  var txt = " ";
  var a = 1;
  while ((txt != "") && (txt != null)){
    txt=window.prompt (stx["1542"]+a+stx["1543"],"");
		a = a + 1;
    if (txt != "" && txt != null) {
      AddTxtZ=AddTxtZ + "[*] " + txt;
    }
  }
        AddTxt= "[list]" + AddTxtZ + "[/list]";
			  if ((AddTxt != "[list][/list]") && (AddTxt != "[list][*] null[/list]")){
          AddText(AddTxt);}
  }

function nvote() {CoAdTx("vote");}
function jvote() {
	DblClick = true;
	var AddTxtZ = "";
	var txt = " ";
	var a = 1;
	while ((txt != "") && (txt != null)){
		txt=window.prompt (stx["1546"]+a+stx["1547"],"");
		a = a + 1;
		if (txt != "" && txt != null) {
			AddTxtZ=AddTxtZ + "\n" + txt;
		}
	}
	AddTxt= "[vote]" + AddTxtZ + "[/vote]";
	if ((AddTxt != "[vote][/vote]") && (AddTxt != "[vote]null[/vote]")){
		AddText(AddTxt);
	}
}

function nhtml() {CoAdTx("html");}
function jhtml() {
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="Text"; }   	
	Txt=window.prompt (stx["1544"],dtext);
	if (Txt != "" && Txt != null){
		AddTxt="[html]"+Txt+"[/html]";
		AddText(AddTxt);}
}

function nalbum() {CoAdTx("album");}
function jalbum() {
	DblClick = true;
	getActiveText();
	if (text) { var dtext=text; } else { var dtext="Text"; }   	
	Txt=window.prompt (stx["1545"],dtext);
	if (Txt != "" && Txt != null){
		AddTxt="[album]"+Txt+"[/album]";
		AddText(AddTxt);}
}

function openslnew(NID) { // Wohl die profanste Funktion, aber die wichtigste weil es anders nicht geht!
 	newwin=open(NID);
}

function eye() {
	var pic = GetCookie('pic');
	if (pic != null) {
	document.write('<td>');
	document.write('<img src="'+imagesdir+'/eye1.gif" alt="" width=23 height=22 border="0" ');
	document.write('onClick="popUpPicWindow(\''+pic+'\');" ');
 	document.write('onmouseover="overlib(\''+stx["1000"]+'\', WIDTH, 60, FGCOLOR, \'#ffffff\'); this.style.cursor=\'hand\';" ');
	document.write('onmouseout="return nd();">');
	document.write('</td>');
	}
}

function popUpPicWindow(xImage){
	var xImg = new Image();
	xImg.src=xImage;
	var xWidth=xImg.width+40;
	var xHeight=xImg.height+100;
	if (xWidth < 400) {xWidth=400;}
	var popup=window.open("","","status=no,width=1,height=1");
	popup.moveTo((screen.width-xWidth)/2,(screen.height-xHeight)/2);
	popup.resizeTo(xWidth,xHeight);
	d=popup.document;
	d.bgcolor="#666666";
	d.fgcolor="#666666";
	d.write('<title>Kontrolldarstellung des im Uploader ausgewählten Bildes in Originalgröße.... </title>');
	d.write('<meta http-equiv="expires" content="0">');
	d.write('<center><form>');	
//	d.write('<input type=image src="" name="img" border=0 alt="" onClick="self.close()"><br>');
	d.write('<img name="xImg" src="'+xImg.src+'" alt="" border=0><br>');
	d.write('<input type="button" value="  Fenster schließen  " onClick="self.close()"><br><small>Dieser Bild kannst Du danach per Klick auf das Kamera- oder das Hintergrundsymbol in Deinen Beitrag einfügen</small>');
	d.write('</form></center>');
//	document.xImg.src=xImage; //opera prob!
//	d.images["img"].title=xImage+'  '+xWidth+' x '+xHeight;
//	d.images["img"].alt=xImage+'  '+xWidth+' x '+xHeight;
	d.close();
}

function UPicClicked(ww) {
	alert("Die Adresse des Bildes :"+ww+", wurde für die Übernahme in Deinem Beitrag gespeichert!");
	document.cookie = "pic=" + escape(ww) + "; expires=Sun, 17-Jan-2038 00:00:00 GMT;";
	self.close();
}

//HelpWin=null;
//ChatWin=null;
NewWin =new Array();
function openNewWin(addr, varhigh, varwidth, WinName) {
//	NewWin=getElementById(WinName);
	NewWin[WinName] = typeof NewWin[WinName] == 'undefined' ? null : NewWin[WinName];
	if(NewWin[WinName] && !NewWin[WinName].closed) {NewWin[WinName].close()} // Erst schließen... dann wieder öffnen! Dadurch immer oben!
	iMyWidth = (window.screen.width) - (varwidth + 10); // An die rechte Seite des aktuellen Windows
	iMyHeight = (window.screen.height/2) - (600/2 + 50); //half the screen height minus half the new window height (plus title and status bars).
	NewWin[WinName] = window.open(addr, WinName , 'status=no,titlebar=no,resizable=yes,scrollbars=yes,height=' + varhigh + ',width=' + varwidth + ',resizable=yes,left=' + iMyWidth + ',top=' + iMyHeight + ',screenX=' + iMyWidth + ',screenY=' + iMyHeight);
	} 

var hxy = new Array ();hxy['0']=0;hxy['1']=1;hxy['2']=2;hxy['3']=3;hxy['4']=4;hxy['5']=5;hxy['6']=6;hxy['7']=7;hxy['8']=8;hxy['9']=9;hxy['a']=10;hxy['b']=11;hxy['c']=12;hxy['d']=13;hxy['e']=14;hxy['f']=15;hxy['A']=10;hxy['B']=11;hxy['C']=12;hxy['D']=13;hxy['E']=14;hxy['F']=15;
var hex = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];
function bca(hc) {
	hc=hc.substring(hc.length-6,hc.length);
	var ca = new Array();
	for(var i=0;i<3;i++) {
		ca[i]=16*hxy[hc.charAt(2*i)]+hxy[hc.charAt(2*i+1)];
	}
	return ca;
}

function initwritebar(innum,startcol,centercol,endcol,id) {
	var i,j,a;
	var num=typeof innum=='undefined'?200:innum;
	var cs=typeof startcol=='undefined'?bca('00ff00'):bca(startcol);
	var cc=typeof centercol=='undefined'?bca('ffff00'):bca(centercol);
	var ce=typeof endcol=='undefined'?bca('ff0000'):bca(endcol);
	var id=typeof id=='undefined'?'mb':id;
	var d1=new Array(), d2=new Array();
	for(i=0;i<3;i++){
		d1[i]=Math.round((cc[i]-cs[i])/num*2);
		d2[i]=Math.round((ce[i]-cc[i])/num*2);
	}
	a = new Array();
	for(j=0;j<=num;j++){
		a[j]="";
		for(i=0;i<3;i++) {
			a[j]+=hex[Math.floor(cs[i]/16)]+hex[cs[i]%16];
			cs[i]+=j<num/2?d1[i]:d2[i];
			if(cs[i]>255)cs[i]=255;
			if(cs[i]<0)cs[i]=0;
		}
	}
	if (typeof barsar=='undefined') {barsar = new Array();}
	barsar[id]=a;
}

function writebar(innumwidth,indistext,ingap,inheight,intextleng,inrestcol,inbord,inspace,inrettype,inid) {
	if (typeof barsar=='undefined') {initwritebar();}
	var numwidth=typeof innumwidth=='undefined'?1:innumwidth;
	var distext=typeof indistext=='undefined'||indistext==''?'':indistext;
	var gap=typeof ingap=='undefined'?5:ingap;
	var height=typeof inheight=='undefined'?10:inheight;
	var textleng=typeof intextleng=='undefined'?distext.length:intextleng;
	var restcol=typeof inrestcol=='undefined'||inrestcol==''?'':' bgcolor="#'+inrestcol+'"';
	var bord =typeof inbord=='undefined'?0:inbord;
	var space =typeof inspace=='undefined'?0:inspace;
	var rettype =typeof inrettype=='undefined'?1:inrettype;
	var id =typeof inid=='undefined'?'mb':inid;
	var colbar = barsar[id];
	var num=colbar.length;
	numwidth = Math.round(numwidth*num);
	baroutstr='<table style="display:inline" border='+bord+' cellpadding=0 cellspacing=0><tr><td><table border=0 cellpadding=0 cellspacing='+space+' width=100% height="'+height+'"><tr>';
	for(i=0;i<=num;i++){
		var bgcolor=i<numwidth?' bgcolor="#'+colbar[i]+'" ':restcol;
		var distexteff='';
		tgap=gap;
		if(i==numwidth){
			i=num;
			distexteff=distext;
			tgap=gap*(num-numwidth)+textleng;
		}
		baroutstr+='<td ' + bgcolor + ' width="'+tgap+'" height="'+height+'">'+distexteff+'</td>';
	}
	baroutstr+='</tr></table></td></tr></table>';
	if (rettype) {
		document.write(baroutstr);
	}
}

blinkColTbl = new Array('blue','red');
blinkTimeout = 500; 

function blinky() {
blinkTimeout = 500;
blink();
}

var blinkIdx = 0;
function blink () {
	if ( document.all && document.all.blink ) {
		blinkIdx = (blinkIdx+=1) % 2 ;
		var color = blinkColTbl [ blinkIdx ];
		if ( document.all.blink.length ) {
			for(i=0;i<document.all.blink.length;i++) document.all.blink[i].style.color=color;
        	} else
       			document.all.blink.style.color=color;
       		setTimeout( "blinky();" , blinkTimeout);
    	}
}

var loaded = false;
if (document.layers)
document.write( '<STYLE>.rewritable { position: absolute; }<\/STYLE>'   );

function Clock (offsetSec, style) {
	this.id = Clock.cnt;
	Clock.clocks[Clock.cnt++] = this;
	this.offsetSec = offsetSec || 0;
	this.style = style || '';
	this.writeHTML();
	this.startTimer();
}

function Clock_writeHTML () {
	var html = '';
	if (document.layers) {
		html += '<SPAN ID="Clock' + this.id + '" CLASS="rewritable"><SPAN';
		html += this.style ? ' CLASS="' + this.style + '"' : '';
		html += '>';
		html += this.formatTime();
		html += '<\/SPAN><\/SPAN>';
	} else {
		html += '<SPAN ID="Clock' + this.id + '"';
		html += this.style ? ' CLASS="' + this.style + '"' : '';
		html += '>';
		html += this.formatTime();
		html += '<\/SPAN>';
	}
	document.write(html);
}

Clock.prototype.writeHTML = Clock_writeHTML;

function printf (num,nks) {
	var num = num;
	var innum = ' '+Math.floor(num)+' ', newnum = '';
	for (var i=1; i<innum.length-1; i++) {
		if ((innum.length-i-1)%3==0&&i>1) newnum += '.';
		newnum += innum.charAt(i);
	}
	if (nks!=null&&nks>0){
		nkspo=1;
		for (var i=0; i<nks; i++) nkspo = nkspo*10;
		newnum += ',<small>';
//		var hks1 = Math.floor(num*nkspo);
//		var hks2 = nkspo * Math.floor(num);
		var hks = Math.floor(num*nkspo) - (nkspo * Math.floor(num));
		if (hks < 10) newnum += '0';
		newnum += hks+' </small>';
//('+nkspo+' '+hks1+' '+hks2+')	
	}
	return newnum;
}

function Clock_formatTime () {
	var time = new Date();
	time.setTime(time.getTime() + this.offsetSec * 1000);
	var year = time.getYear();
	if (year<1900) year+= 1900;
	var month=time.getMonth(),days=time.getDate(),hours=time.getHours(),minutes=time.getMinutes(),seconds=time.getSeconds();
//	BDate = Date.UTC(2002,8,14,22,35,0);
	CDate = Date.UTC(year,time.getMonth(),time.getDate(),time.getHours(),time.getMinutes(),time.getSeconds());
	secs = (CDate-BDate)/1000;
	var html = printf(secs)+' Sekunden, oder '+printf(secs/60,2)+'Minuten, oder '+printf(secs/3600,2)+'Stunden, oder '+printf(secs/86400,2)+'Tage, oder '+printf(secs/604800,2)+'Wochen';
	return html; 
} 

Clock.prototype.formatTime = Clock_formatTime; 

function Clock_startTimer () {   
this.tid = setInterval('Clock.clocks[' + this.id + '].updateTime()',  1000); 
} 

Clock.prototype.startTimer = Clock_startTimer; 

function Clock_updateTime () {
if (document.layers && loaded) {
	var l = document['Clock' + this.id];
	if (!l.ol) {
		var ol = l.ol = new Layer(l.clip.width);
		ol.clip.height = l.clip.height;
		ol.left = l.pageX;
		ol.top = l.pageY;
		ol.visibility = 'show';
		l.visibility = 'hide';
	}
	var ol = l.ol;
	var html = '';
	html += '<SPAN';
	html += this.style ? ' CLASS="' + this.style + '"' : '';
	html += '>';
	html += this.formatTime();
	html += '<\/SPAN>';
	ol.document.open();
	ol.document.write(html);
	ol.document.close();
	}
//else if (document.getElementById)  document.getElementById('Clock' + this.id).firstChild.nodeValue = this.formatTime(); // da sind die Tags zu sehen!
else if (document.all)  document.all['Clock' + this.id].innerHTML = this.formatTime();
}

Clock.prototype.updateTime = Clock_updateTime; 
Clock.cnt = 0; 
Clock.clocks = new Array(); 

function init () {   
loaded = true; 
}  

function getPageItem(itemID) {
	if (document.getElementById) {return document.getElementById(itemID);}
	if (document.all) {return document.all[itemID];}
	return null;
}

function UpdateGuageValue(tableID, newFgWidth, newBgWidth) {
	var guage_table = getPageItem(tableID);
	if (guage_table && guage_table.rows) {
		var lone_row = guage_table.rows[0];
		lone_row.cells[1].width = newBgWidth;
		lone_row.cells[0].width = newFgWidth;
	}
}

function AddGuageValue(tableID, newFgWidth) {
	var guage_table = getPageItem(tableID);
	if (guage_table && guage_table.rows) {
		var lone_row = guage_table.rows[0];
		if (lone_row.cells[1].width -1 > 0) {
			lone_row.cells[1].width -= 1;
//			lone_row.cells[0].width += 1;
		}
	}
	setTimeout('AddGuageValue("idSlGuage1")',100);
}

function slUpdateSpan(id, newHtml) {
	var span_obj = getPageItem(id);
	span_obj.style.left =  document.body.scrollLeft + 120;
	span_obj.style.top = document.body.scrollTop + 200;
	var newHtml = newHtml + "<table cellspacing=0 cellpadding=0 border=1 align=center><tr><td style=\"padding: 0, 0, 0, 0\"><table id=\"idSlGuage1\" cellspacing=0 cellpadding=0 width=250 height=5 align=\"center\"><tr><td width=0 height=5 bgcolor=#ff0000 style=\"padding: 0, 0, 0, 0\"><img src=\"http://127.0.0.1/BoardImages/bar5.g"+"if\" width=1 height=1></td><td width=250 height=5 bgcolor=#FFFFFF style=\"padding: 0, 0, 0, 0\"><img src=\"http://127.0.0.1/BoardImages/bar5.g"+"if\" width=1 height=1></td></tr></table></td></tr></table><br>";
	if (span_obj) {
		if (span_obj.style.display != "inline") {
			span_obj.style.display = "inline";
		}
		span_obj.innerHTML = newHtml;
	}
	setTimeout('AddGuageValue("idSlGuage1")',100);
}

function TESTdismess(id, newHtml) {
	var span_obj = getPageItem(id);
		span_obj.style.left =  window.event.x/2 + document.body.scrollLeft;
//		span_obj.style.left =  document.body.scrollLeft + 120;
//window.pageYOffset  - führt zu Fehler!???
		span_obj.style.left =  window.event.y/2 + document.body.scrollTop;
//		span_obj.style.top = window.PageYOffset + document.body.scrollTop + 10 ;
//		span_obj.style.top = document.body.scrollTop+200;
	span_obj.style.width = "70%";
	span_obj.style.filter = "alpha(opacity=90) -moz-opacity:90%";
	span_obj.style.padding = "1px";
//	span_obj.style.vertical-align = "top";
	var newHtml = newHtml;
//	if (span_obj) {
//		if (span_obj.style.display != "inline") {
			span_obj.style.display = "inline";
//		}
		span_obj.innerHTML = newHtml;
//	}
}

function dismess(id, newHtml) {
	var span_obj = getPageItem(id);
//		span_obj.style.left =  window.event.x/2 + document.body.scrollLeft;
		span_obj.style.left =  document.body.scrollLeft + 120;
//window.pageYOffset  - führt zu Fehler!???
//		span_obj.style.top = window.PageYOffset + document.body.scrollTop + 10 ;
		span_obj.style.top = document.body.scrollTop+200;
	span_obj.style.width = "70%";
	span_obj.style.filter = "alpha(opacity=90) -moz-opacity:90%";
	span_obj.style.padding = "1px";
//	span_obj.style.vertical-align = "top";
	var newHtml = newHtml;
//	if (span_obj) {
//		if (span_obj.style.display != "inline") {
			span_obj.style.display = "inline";
//		}
		span_obj.innerHTML = newHtml;
//	}
}

function killUpdateSpan(id) {
	var span_obj = getPageItem(id);
	if (span_obj) {
		span_obj.style.display = "none";
	}
}


//var nav = (document.layers) ? true : false;
function mover(myBo){ if (x[0].substring(0,2) == "ie" && myBo) myBo.style.backgroundColor="yellow" }
function mout(myBo) { if (x[0].substring(0,2) == "ie" && myBo) myBo.style.backgroundColor="#D4D0C8" }
function mout1(myBo){ if (x[0].substring(0,2) == "ie" && myBo) myBo.style.backgroundColor=windowbg }
function mout2(myBo){ if (x[0].substring(0,2) == "ie" && myBo) myBo.style.backgroundColor=windowbg2 }
function mcli(myBo) { if (x[0].substring(0,2) == "ie" && myBo) myBo.style.backgroundColor="red" }

function csmil(iname) {
	document.postmodify.message.focus();
	document.postmodify.message.value += iname;
}

function name(iname) {document.postmodify.message.focus(); document.postmodify.message.value = iname;}

function startCountdown(){
	if (typeof g_iCount == 'undefined') g_iCount = 0;
	if (typeof maxg_iCount == 'undefined') maxg_iCount = 0;
	maxg_iCount = g_iCount >  maxg_iCount ? g_iCount : maxg_iCount;
	g_iCount = g_iCount > 0 ? g_iCount-1 : 0;
	if (typeof barsar=='undefined'||typeof barsar['chba']=='undefined') initwritebar(200,'#ffcc00','#ff0000','#00ccff','chba');
	writebar(g_iCount/maxg_iCount, '<small>'+g_iCount+'sec.</small>',5,1,0,0,0,0,0,'chba');
	document.getElementById('numberCountdown').innerHTML = baroutstr; 
//	document.getElementById('numberCountdown').innerHTML = '<small>'+g_iCount+'sec.</small>'; 
	if (g_iCount == 1) {
		document.getElementById("chatbox").src = cgi+'&action=mexi&clines='+gcli+'&ctimeout='+gcto+'&kenid='+ckenid;
	}
	setTimeout('startCountdown()',1000);
}
function clear(field) {field.value=""; field.focus();}
if (document.layers) document.captureEvents(Event.KEYPRESS)
function enter(e) {
if (document.layers){if (e.which==13) e.which=32;}
if (document.all){if (event.keyCode==13) event.keyCode=32;}
}
function showimage() {
	document.images.icons.src=imagesdir+"/"+document.postmodify.oicon.options[document.postmodify.oicon.selectedIndex].value+".g"+"if";
}
function rshowimage(rnum) {
	document.images.icons.src=imagesdir+"/"+document.postmodify.raicon[rnum].value+".g"+"if";
	document.postmodify.icon.value = document.postmodify.raicon[rnum].value;
}
function p_disty(n,t,z,d){
var cs=(typeof d=='undefined')?'':' colspan='+d+' ';
var im=(typeof d=='undefined')?'empty':'emptyd';
// <td><a href="javascript:document.postmodify.icon[0].click()"><img src="$imagesdir/xx.g'+'if"  ALIGN='center' alt='$txt{'281'}' border=0></a><input type="hidden" name="icon" value="xx" $icc1 onClick="window.focus(); rshowimage(0)"></td>
document.write('<td width=23 height=22 '+cs+' align=center background="'+imagesdir+'/'+im+'.g'+'if" style="BACKGROUND-POSITION: left top; BACKGROUND-REPEAT: no-repeat;"><a href="javascript:document.postmodify.raicon['+z+'].click()"><img src="'+imagesdir+'/'+n+'.g'+'if" alt="" border="0" onmouseover="overlib(\''+t+'\',  WIDTH, 60, FGCOLOR, \'#ffffff\'); this.style.cursor=\'hand\';" onmouseout="return nd();"></a><div style="width:0px; height:0px; visibility:hidden;"><input style="width:0px; height:0px; visibility:hidden;" type="radio" name="raicon" value="'+n+'" onClick="window.focus(); rshowimage('+z+')"></div></td>');
}
function disthsy(){
document.write('<table cellspacing=3 cellpadding=0 border=0><tr>');
p_disty('xx',stx['0281'],0);p_disty('thumbup',stx['0282'],1);p_disty('thumbdown',stx['0283'],2);p_disty('exclamation',stx['0284'],3);p_disty('question',stx['0285'],4);p_disty('lamp',stx['0286'],5);
document.write('</tr><tr>');
p_disty('smiley',stx['0287'],6);p_disty('angry',stx['0288'],7);p_disty('cheesy',stx['0289'],8);p_disty('laugh',stx['0290'],9);p_disty('sad',stx['0291'],10);p_disty('wink',stx['0292'],11);
document.write('</tr></table>');
}
function p_diss(n,t,z,d){
var cs=(typeof d=='undefined')?'':' colspan='+d+' ';
var im=(typeof d=='undefined')?'empty':'emptyd';
document.write('<td width=23 height=22 '+cs+' align=center background="'+imagesdir+'/'+im+'.g'+'if" style="BACKGROUND-POSITION: left top; BACKGROUND-REPEAT: no-repeat;"><img src="'+imagesdir+'/'+n+'.g'+'if" alt="" border="0"  onmouseover="overlib(\''+t+'\',  WIDTH, 60, FGCOLOR, \'#ffffff\'); this.style.cursor=\'hand\';" onmouseout="return nd();" onClick="AddText(\' '+z+'\');"></td>');
}
function pdismiles () {
if((navigator.appName == "Netscape" && navigator.appVersion.charAt(0) >= 4) || (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.charAt(0) >= 4) || (navigator.appName == "Opera" && navigator.appVersion.charAt(0) >= 4)) {
document.write('<table cellpadding=0 cellspacing=3 border=0><tr>');
p_diss('smiley',stx['0289'],':)');p_diss('wink',stx['0292'],';)');p_diss('cheesy',stx['0290'],':D');p_diss('grin',stx['0293'],';D');p_diss('angry',stx['0288'],'>:(');p_diss('sad',stx['0291'],':(');
document.write('</tr><tr>');
p_diss('shocked',stx['0294'],':o');p_diss('cool',stx['0295'],'8)');p_diss('huh',stx['0296'],'???');p_diss('rolleyes',stx['0450'],'::)');p_diss('tongue',stx['0451'],':P');p_diss('embarassed',stx['0526'],':-[');
document.write('</tr><tr>');
p_diss('lipsrsealed',stx['0527'],':-X');p_diss('undecided',stx['0528'],':-/');p_diss('kiss',stx['0529'],':-*');p_diss('cry',stx['0530'],':\\\'(');p_diss('alarm',stx['0977'],':alarm:');p_diss('rotwerd',stx['0976'],':rotwerd:');
document.write('</tr><tr>');
p_diss('nuts',stx['0975'],':nuts:');p_diss('flaming',stx['0974'],':flaming:');p_diss('engel',stx['0973'],':engel:');p_diss('bonk',stx['0972'],':bonk:');p_diss('bounce0',stx['0971'],':bounce:',2);
document.write('</tr></table>');
} else {document.write("<small>"+stx["0215"]+"</small>"); }
}

function p_dis(n,t,c){
	if (typeof c=='undefined') {var c=n;}
	document.write('<td><img src="'+imagesdir+'/'+n+'.g'+'if" onmouseover="overlib(\''+t+'\',  WIDTH, 60, FGCOLOR, \'#ffffff\'); this.style.cursor=\'hand\';" onmouseout="return nd();" align=bottom width=23 height=22 alt="" border="0" onDblClick="j'+c+'();" onClick="kto(\''+c+'\');"></td>');
}
function pdisubbcb (board) {
if((navigator.appName == "Netscape" && navigator.appVersion.charAt(0) >= 4) || (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.charAt(0) >= 4) || (navigator.appName == "Opera" && navigator.appVersion.charAt(0) >= 4)) {
document.write("<table border=0 valign=bottom cellspacing=3 cellpadding=0><tr>");
if (board != 'langs') {
document.write('<td colspan=2 align=center valign=middle background="'+imagesdir+'/emptyd.g'+'if" style="BACKGROUND-POSITION: left top; BACKGROUND-REPEAT: no-repeat;"><input style="width:44; height:17; font-size:8Pt;" type=text name="color" id="color" size="4" value="000000" onClick="nd(); selcol(this.value,this.id,this.form.id);" onmouseover="overlib(\''+stx["0911"]+'\',  WIDTH, 60, FGCOLOR, \'#ffffff\'); this.style.cursor=\'hand\';" onmouseout="return nd();"></td>');
document.write('<td id="cfcolor"><img src="'+imagesdir+'/facecol.g'+'if" align=bottom width="23" height="22" alt="" border="0" onClick="showcolor(document.getElementById(\'color\').value);" onmouseover="overlib(\''+stx["0912"]+'\',  WIDTH, 60, FGCOLOR, \'#ffffff\'); this.style.cursor=\'hand\';" onmouseout="return nd();"></td>');
p_dis("size",stx["0532"]);p_dis("face",stx["0533"],"getwinfont");p_dis("bold",stx["0253"]);
	}
document.write("</tr><tr>");
p_dis("italicize",stx["0254"]);p_dis("underline",stx["0255"]);p_dis("strike",stx["0441"]);
if (board != 'langs') {
p_dis("glow",stx["0442"]);p_dis("shadow",stx["0443"]);p_dis("move",stx["0439"]);
document.write("</tr><tr>");p_dis("sup",stx["0447"],"superscript");p_dis("sub",stx["0448"],"subscript");p_dis("tele",stx["0440"]);p_dis("pre",stx["0444"]);p_dis("left",stx["0445"]);p_dis("center",stx["0256"]);
document.write("</tr><tr>");p_dis("blockmode",stx["0962"]);p_dis("right",stx["0446"]);p_dis("hr",stx["0531"]);p_dis("flash",stx["0433"]);p_dis("url",stx["0257"]);p_dis("anchor",stx["0987"]);
document.write("</tr><tr>");p_dis("ftp",stx["0434"]);p_dis("img",stx["0435"]);p_dis("bimg",stx["0978"]);p_dis("email2",stx["0258"]);p_dis("code",stx["0259"]);p_dis("quote2",stx["0260"]);
document.write("</tr><tr>");p_dis("table",stx["0436"]);p_dis("tcol",stx["0437"]);p_dis("trow",stx["0449"]);p_dis("xta",stx["0705"]);p_dis("list",stx["0261"]);p_dis("vote",stx["0910"]);
document.write("</tr><tr>");
if (set7=="Administrator") {p_dis("html",stx["0963"]);}
if (set7=="uploader" || set7=="Administrator") {p_dis("cd3",stx["3053"],"album");
//document.write("<td><img src='"+imagesdir+"/cd3.g'+'if' align=bottom width=23 height=22 alt='"+stx["3053"]+"' border='0' onDblClick='jalbum();' onClick='album();'></td>");
}}
document.write("</tr></table>");
}}

function dithh(typ, text, tmask, masksize) {
	if (typeof headar=='undefined') {headar = new Array();}
	if (typeof maskar=='undefined') {maskar = new Array();}
	if (masksize==null) {masksize=10;}
	var thisdir = '';
	var thisback = titlebg;
	var thisfont = titletext;	
	var abauftxt = stx["2006"];
	var pic = 'up-green.g'+'if';
	if (text != "-") {
		headar[headar.length] = true;
		if (typ == "") {
			document.write('<td class="title1" bgcolor="'+titlebg+'"><font class="text1" color="'+titletext+'"><b>'+text+'</b></font></td>');
		} else {
			var addtext = "";
//			if (typeof tmask != 'undefined') {
			if (tmask!=null) {
				addtext  = '<td width=1% nowrap align=right><input type=text id="'+typ+'mask" name="'+typ+'mask" value="'+tmask+'" size="'+masksize+'" maxlength="30" onMouseOver="return overlib(txt0+stx[\'2002\']+txt1, FULLHTML)" onMouseOut="nd();"></td>';
				maskar[maskar.length] = typ+'mask';
			}
			if (sosel == typ) {
				thisdir = dir == 'rev' ? "forw" : "rev";
				thisback = titletext;
				thisfont = titlebg;
				if (dir == 'rev') {
					abauftxt = stx["2007"];
					pic = 'down-red.g'+'if'
				} else {
					pic = 'up-red.g'+'if';
				}
			}			
			document.write('<td height=28 bgcolor="'+thisback+'" onMouseOver="this.style.backgroundColor=\''+windowbg3+'\'; this.style.cursor=\'hand\';" onMouseOut ="this.style.backgroundColor=\''+thisback+'\';"><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td nowrap valign=middle onMouseOver="this.style.cursor=\'hand\'; return overlib(txt0+\''+stx["2004"]+' '+abauftxt+' '+stx["2008"]+'\'+txt1, FULLHTML);" onMouseOut ="nd();" onclick="headsc(\''+typ+'\', \''+thisdir+'\');"><font class="text1" color="'+thisfont+'"><b><img src="'+imagesdir+'/'+pic+'" alt="" border=0> <u>'+text+'</u></b></td>'+addtext+'</tr></table></td>');
		}
	} else {
		headar[headar.length] = false;
	}
}

function headsc(typ, dir) {
	var maskval='';
	var action = typeof haction != 'undefined' ? haction : cgi;
//	if (typeof haction!='undefined') {
//		var action=haction+'&sortselect='+typ;
//	}else{
//		var action=cgi+'&sortselect='+typ;
//	}
	if (typeof maskar!='undefined') {
		for (i=0; i<maskar.length; i++) {
			maskval = document.getElementById(maskar[i]).value;
			if (maskval!='') action += '&'+maskar[i]+'='+maskval;
		}
		if (dir) {
			action += '&dir='+dir;
		}
	}
	if (typ) {
		action += '&sortselect='+typ;
	}

	if(document.getElementById('stylemask')) {
	var mysfid = document.getElementById('stylemask');
	var mydfid = document.getElementById('mihform');
	action += '&stylebox=';
	for (var i = 0; i < mysfid.length; i++) {
		if (mysfid.elements[i].checked == true) {
			var myvalue = mysfid.elements[i].name;
			myvalue = myvalue.replace(/\=/g, '%3d');
			myvalue = myvalue.replace(/\?/g, '%3f');
			myvalue = myvalue.replace(/\&/g, '%26');
			action += myvalue+'|';
		}
	}
	}
	window.location.href=action;
}

function ditb(jsp){
	var jspa=jsp.split("\|");
	var curtext=jspa[0]=='off'?stx["0334"]:stx["0333"];
	document.write('<tr>');
	if (headar[0]) {document.write('<td class="form1" bgcolor="'+windowbg2+'" width="10" valign="top" align="right"><img src="'+imagesdir+'/'+jspa[0]+'.g'+'if" alt="'+curtext+'" border="0"></td>');}
	if (headar[1]) {
		document.write('<td class="form2" bgcolor="'+windowbg+'" valign=top');
		if (jspa[1] == 0) {
			document.write('><b><a href="'+scripturl+'&board='+jspa[3]+'">'+jspa[3]+'</a></b><br>'+jspa[4]+'</td>');
		} else {
			document.write(' onMouseOver="this.style.backgroundColor=\''+windowbg2+'\'; this.style.cursor=\'hand\';" onMouseOut="this.style.backgroundColor=\''+windowbg+'\';" onclick="window.location.href=\''+scripturl+'&board='+jspa[3]);
			if (jspa[1] == 1 && jspa[2] != "") {
				document.write('&action=display&num='+jspa[2]+'\'"><b><a href="'+scripturl+'&board='+jspa[3]+'&action=display&num='+jspa[2]);
			} else {
				document.write('\'"><b><a href="'+scripturl+'&board='+jspa[3]);
			}
			document.write('">'+jspa[4]+'</a></b><br>'+jspa[5]+'</td>');
		}
	}
	if (headar[2]) {document.write('<td class="form1" bgcolor="'+windowbg2+'" valign="middle" align="right" width=1%>'+jspa[1]+'</td>');}
	if (headar[3]) {document.write('<td class="form2" bgcolor="'+windowbg+'"  valign="middle" align="right" width=1%>'+jspa[6]+'&nbsp;<small>('+(jspa[6]-jspa[1])+')</small></td>');}
	if (headar[4]) {
		document.write('<td nowrap class="form1" bgcolor="'+windowbg2+'" valign="middle" align="center" width=10%');
		if (jspa[2] == "") {
			document.write('><small>'+jspa[7]+'<br>'+stx["0525"]+' '+jspa[8]);
		} else {
			document.write(' onMouseOver="this.style.backgroundColor=\''+windowbg+'\'; this.style.cursor=\'hand\';" onMouseOut="this.style.backgroundColor=\''+windowbg2+'\';" onclick="window.location.href=\''+scripturl+'&board='+jspa[3]+'&action=display&num='+jspa[2]+'&disnum='+jspa[9]+'#'+jspa[9]+'\'"><small>'+jspa[7]+'<br>'+stx["0525"]+' '+jspa[8]+'<a href="'+scripturl+'&board='+jspa[3]+'&action=display&num='+jspa[2]+'&disnum='+jspa[9]+'#'+jspa[9]+'">[>>]</a>');
		}
		document.write('</small></td>');
	}
	if (headar[5]) {document.write('<td class="form1" bgcolor="'+windowbg2+'" valign="middle" align="center" width=10%><small>'+jspa[10]+'</small></td>');}
	document.write('</tr>');
}

function dith(jsp){
//mnum, msub, mnew, mreplies,views,mydate,lastpostername
	var jspa = jsp.split("\|");
	if (jspa[2] == "new") {jspa[2]='<img src="'+imagesdir+'/new.g'+'if" alt="'+stx["0333"]+'">';}
	if (jspa[8] != "") {
		var jspa8a = jspa[8].split(",");
//		var sty=eval('sty'+jspa8a[0]);
//		if (jspa8a[0]=="RampB"){jspa8a[0] = "R\&amp\;B";}
		jspa[8]='<br><small> &nbsp; &nbsp; &nbsp;<b>'+jspa8a[0]+'</b>';
		if (jspa8a.length>1) {
			jspa[8]+=' (';
			for (i=1; i<jspa8a.length; i++) {
//				jspa[8]+=i==1?sty[jspa8a[i]]:', '+sty[jspa8a[i]];
				jspa[8]+= i==1 ? stymain[jspa8a[i]] : ', '+stymain[jspa8a[i]];
			}
			jspa[8]+=')';
		}		
		jspa[8]+='</small>';
	}	
//	if( mstate == 1 )      { $threadclass = qq~<img src="$imagesdir/locked.g'+'if" alt="$txt{'456'}">~; }
	var threadclass = '<img src="'+imagesdir+'/thread.g'+'if" alt="'+stx["0457"]+'">';
	if( jspa[3] > 14 ) {var threadclass = '<img src="'+imagesdir+'/hotthread.g'+'if" alt="'+stx["0454"]+'">'};
	if( jspa[3] > 24 ) {var threadclass = '<img src="'+imagesdir+'/veryhotthread.g'+'if" alt="'+stx["0455"]+'">'};
//	if( mstate == 0 )   { $threadclass = qq~<img src="$imagesdir/thread.g'+'if" alt="$txt{'457'}">~; }
	document.write('<tr><td class="form1" valign=middle bgcolor="'+windowbg+'" onMouseOver="this.style.backgroundColor=\''+windowbg2+'\'; this.style.cursor=\'hand\';" onMouseOut="this.style.backgroundColor=\''+windowbg+'\';" onclick="window.location.href=\''+cgi+'&action=display&num='+jspa[0]+'\'"><table border=0 cellpadding=0 cellspacing=0><tr><td><img src="'+imagesdir+'/xx.g'+'if" alt="" border="0" align=middle></td><td> &nbsp;</td><td><a href="'+cgi+'&action=display&num='+jspa[0]+'"><b>'+jspa[1]+'</b></a> '+jspa[2]+jspa[8]+'</td></tr></table></td>');
	if (jspa[7]!="") {
	document.write('<td class="form1" width=1% valign=middle align=middle bgcolor="'+windowbg+'">'+jspa[7]+'&nbsp; </td>');
	}
	document.write('<td class="form1" width=1% valign=middle align=right bgcolor="'+windowbg+'">'+jspa[3]+'&nbsp; '+threadclass+' &nbsp; </td>');
	document.write('<td class="form1" width=1% valign=middle align=right bgcolor="'+windowbg+'">'+jspa[4]+'&nbsp; </td>');
	document.write('<td class="form2" nowrap width=1% valign=middle align=center bgcolor="'+windowbg2+'"><small>'+jspa[5]+'<br>'+stx["0525"]+' '+jspa[6]+'</small></td></tr>');
}
function mapex(upic) {
	var up = upic.replace(/\+j/, "\.j"+"pg");
	up = up.replace(/\+J/, "\.J"+"PG");
	up = up.replace(/\+e/, "\.j"+"peg");
	up = up.replace(/\+E/, "\.J"+"PEG");
	up = up.replace(/\+G/, "\.G"+"IF");
	up = up.replace(/\+g/, "\.g"+"if");
	up = up.replace(/\+p/, "\.p"+"ng");
	up = up.replace(/\+P/, "\.P"+"NG");
	return (up);
}

function dmenu(mbname,helpf,stmen,numret,thty,selh,title,selu) {
	var MaMe = "";
	var Movermenu = "";
	MaMe += '<table width=100% cellpadding=0 cellspacing=0 border=0>';
	MaMe += '<tr><td width=2% nowrap valign=bottom><a href="'+scripturl+'"><img src="'+imagesdir+'/open.g'+'if" border=0><font color='+outsidec+'><b>'+mbname+'</font></b></a> - </td><td>';
	if (typeof helpf!='undefined' && helpf!='') {
		if (helpf.substring(0,7) != "http://") {
			var helpf = scripturl+'&board=Hilfe&action=display&num='+helpf;
		}
		MaMe += '<a href="javascript:void(0);" onClick="openNewWin(\''+helpf+'\',600,550,\'HelpWin\');"><img src="'+imagesdir+'/help.g'+'if" alt="" border="0"><font color='+outsidec+'><b>'+stx["0119"]+'</b></font></a> ';
	}
	var MeCo=0;
	for (var i=0; i<stmen.length; i++) {
		MaMe += '<a href="'+cgi+'&action=';
		if (stmen.charAt(i)=="s") MaMe += 'search"><img src="'+imagesdir+'/search.g'+'if" alt="" border="0"><font color='+outsidec+'><b>'+stx["0182"]+'</b></font></a> ';
		if (stmen.charAt(i)=="m") MaMe += 'mlall"><img src="'+imagesdir+'/guest.g'+'if" alt="" height=16 border="0"><font color='+outsidec+'><b>'+stx["0331"]+'</b></font></a> ';
		if (stmen.charAt(i)=="a") MaMe += 'admin"><img src="'+imagesdir+'/admin.g'+'if" alt="" border="0"><font color='+outsidec+'><b>'+stx["0011"]+'</b></font></a> ';
		if (stmen.charAt(i)=="l") MaMe += 'login"><img src="'+imagesdir+'/login.g'+'if" alt="" border="0"><font color='+outsidec+'><b>'+stx["0034"]+'</b></font></a> ';
		if (stmen.charAt(i)=="r") MaMe += 'register"><img src="'+imagesdir+'/register.g'+'if" alt="" border="0"><font color='+outsidec+'><b>'+stx["0097"]+'</b></font></a> ';
		if (stmen.charAt(i)=="n") MaMe += 'shownotify"><img src="'+imagesdir+'/notification.g'+'if" alt="" border="0"><font color='+outsidec+'><b>'+stx["0418"]+'</b></font></a> ';
		if (stmen.charAt(i)=="o") MaMe += 'logout"><img src="'+imagesdir+'/logout.g'+'if" alt="" border="0"><font color='+outsidec+'><b>'+stx["0108"]+'</b></font></a> ';
	}
	MaMe += ' Browser: '+x[1]+'</td></tr>';
	document.write(MaMe);
	document.write('<tr height=22><td colspan=2 nowrap><IMG SRC="'+imagesdir+'/tline.g'+'if" BORDER=0><a href="'+cgi+'"><IMG SRC="'+imagesdir+'/'+thty+'.g'+'if" BORDER=0><font color='+outsidec+'><b>'+title+'</b></font></a> <a href="javascript:void(0);" onClick="openNewWin(\''+cgi+'&action=shortmen\',750,400,\'MenuWin\');"><font color=red><b>...mehr!</b></a>');

	document.write('</td></tr>');
	document.write('</table>');
//	Movermenu += '<a href=\'javascript:void(0);\' onmouseover=\'return overlib(txt0+txt1, STICKY, MOUSEOFF, FULLHTML);\' onmouseout=\'return nd();\'>Oder Bookmark</a>';
//	document.write('<a href="javascript:void(0);" onmouseover="return overlib(txt0 + \''+Movermenu+'\' + txt1, STICKY, MOUSEOFF, FULLHTML);" onmouseout="return nd();">[0]</a>');
}

function extendmenu() {
	openNewWin(cgi+'&action=shortmen', 700, 300, 'ExMenuWin');	
}

function defpa(pa){
	var paa = pa.split("|");
	msub = paa[0];
	viewnum = paa[3];
	beitragsnum = paa[4];	
	if (typeof curcol=='undefined') {
		curcol = windowbg; altcol = windowbg2;
	} else {
		if (curcol==windowbg) {
			curcol = windowbg2; altcol = windowbg;
		} else {
			curcol = windowbg; altcol = windowbg2;
		}
//		curcol = curcol==windowbg?windowbg2:windowbg;
//		altcol = altcol==windowbg?windowbg2:windowbg;
	}
//	pstr = 'para' + viewnum + beitragsnum + '="' + pa + '";'; 
	eval('para' + viewnum + beitragsnum + '="' + pa + '";');
}

function disus(unlin){
	var unl = users[unlin];
// Achtung! Die Werte im unla-Array dürfen hier nicht verändert werden!
	if (unl!="") {unla = unl.split("|");}
	if (unla[4]!="Opener") {
//#x#
	document.write('<td nowrap bgcolor="'+altcol+'" style="overflow:hidden;" class="windowcss" width=110 valign=top rowspan='+unla[1]+' >');
	if (!unla[2]) {unla[2]=unla[4];}
	document.write('<div style="display:inline; border:2px; position:absolute; clip:rect(0px 110px 200px 0px);">')

	if (unla[4]!="") {
		document.write('<a href="'+cgi+'&action='+unla[3]+'profile&username='+unla[4]+'"><b>'+unla[2]+'</b></a>');
	} else {
		document.write('<b>'+unla[2]+'</b>');
	}
	document.write('</div>');
	document.write('<br><small>'+unla[5]+'<br><small>');
	for (var i=0; i<unla[6]; i++) {
		var mstar = 'star';
		if (unla[7]=='m') mstar="starmod";
		if (unla[7]=='a') mstar="staradmin";
		document.write('<img src="'+imagesdir+'/'+mstar+'.g'+'if" border="0" alt="*">');
	}
	if (unla[8] > 0) {
		var unla8=unla[8]==1?stx["0072"]:stx["0086"];
		document.write('<br><small>'+unla[8]+' '+unla8+'</small>');
	}
	document.write('<center>');
	if (typeof unla[9]!='undefined' && unla[9] !="" && unla[9] !="blank+g") {
//	if (unla[9]) {
		var upic = unla[9].substring(0,7) == "http://" ? unla[9] : facesurl+'/'+unla[9];	
//		document.write('<br><img src="'+unla[9]+'"  border="0">');
		document.write('<table cellpadding=0 cellspacing=0 width=105 height=140 border=0><tr><td style="BACKGROUND-POSITION: left top; BACKGROUND-REPEAT: no-repeat" background="'+mapex(upic)+'"> </td></tr></table>');
	}
	document.write('<small>'+unla[10]);
	if (unla[11]) {
		var geschl=unla[11]=="male"?stx["0238"]:stx["0239"];
		document.write('<br><b>'+stx["0231"]+'</b> <img src="'+imagesdir+'/'+unla[11]+'.g'+'if" border="0" alt="" onMouseOver="return overlib(txt0+\''+unla[2]+' '+geschl+'!\'+txt1, FULLHTML);" onMouseOut="nd();"><br>');
	}
	
	if (unla[12]) {
		document.write('<a href="'+cgi+'&action=icqpager&UIN='+unla[12]+'" target="_blank"><img src="http://wwp.icq.com/scripts/online.dll?icq='+unla[12]+'&img=5" alt="'+unla[12]+'" border="0"></a>');
		document.write('<a href="http://wwp.icq.com/scripts/search.dll?to='+unla[12]+'" target="_blank"><img src="'+imagesdir+'/icqadd.g'+'if" alt="'+unla[12]+'" border="0"></a> ');
	}
	if (unla[13]) {
		document.write('<a href="http://edit.yahoo.com/config/send_webmesg?.target='+unla[13]+'" target="_blank"><img src="'+imagesdir+'/yim.g'+'if" alt="'+unla[13]+'" border="0"></a>');
		document.write('<img SRC="http://opi.yahoo.com/online?u='+unla[13]+'&m=g&t=0" NOSAVE BORDER=0 alt="'+unla[13]+'"> ');
	}
	if (unla[14]) {
		document.write('<a href="aim:goim?screenname='+unla[14]+'&message=Hi.+Are+you+there?"><img src="'+imagesdir+'/aim.g'+'if" alt="'+unla[14]+'" border="0"></a> ');
	}
	if (unla[15] && unla[16]) {
		document.write('<a href="'+unla[15]+'" target="_blank"><img src="'+imagesdir+'/www.g'+'if" border="0" alt="'+unla[16]+'"></a> ');
	}
	document.write('<br>');
	if (unla[17]) {
		document.write('<a href="mailto:'+unla[17]+'"><img src="'+imagesdir+'/email.g'+'if" border="0" alt="" onMouseOver="return overlib(txt0+\''+stx["2011"]+' <b>'+unla[2]+'</b> '+stx["2012"]+'\'+txt1, FULLHTML);" onMouseOut="nd();"></a> ');
	}
	document.write('<a href="'+scripturl+'&action=viewprofile&username='+unla[4]+'"><img src="'+imagesdir+'/profile.g'+'if" border="0" alt="" onMouseOver="return overlib(txt0+\''+stx["2013"]+' '+unla[2]+' '+stx["2014"]+'\'+txt1, FULLHTML);" onMouseOut="nd();"></a>');
	if (username != "Guest") {
	document.write('<a href="'+cgi+'&action=imsend&to='+unla[4]+'"><img src="'+imagesdir+'/message.g'+'if" border="0" alt="" onMouseOver="return overlib(txt0+\''+stx["2015"]+' '+unla[2]+' '+stx["2016"]+'\'+txt1, FULLHTML);" onMouseOut="nd();"></a>');
	}
	document.write('</small></td>');
	}
}
//function dishe(micon,note,stimmen,sorti,msubdadd) {
function dishe(dhev) {	
	var dhar = dhev.split("\|");
	var micon = dhar[0];
	var note = dhar[1];
	var stimmen = dhar[2];
	var sorti = dhar[3];
	var msubdadd = dhar[4];
	var msubdadd=typeof msubdadd=='undefined'||msubdadd==''?'':' PR: <font color=red>'+msubdadd+'</font>';
	document.write('<td bgcolor="'+altcol+'" valign=top height="16"><table border=0 cellspacing=0 cellpadding=0 width="100%" height="16"><tr><td width=35 valign="middle"><img src="'+imagesdir+'/'+micon+'.g'+'if"></td><td valign="middle"><a name="'+beitragsnum+'"></a><b>'+msub+msubdadd+'</b></td><td align=right>');
	if (note>=0 || note=="?") {
	var notetxt1 = stimmen==0 ? 'Bisher wurden keine Stimmen abgegeben.' : 'Bisher wurden für die Durchschnittsnote '+note+', '+stimmen+' Stimmen abgegeben.';
	document.write('Note:<select style="width: 50px; background-color: \''+curcol+'\'" name="notes" onChange="if(this.options[this.selectedIndex].value) window.focus(); window.location.href=\''+cgi+'&action=display&num='+viewnum+'&start='+beitragsnum+'&note=\'+this.options[this.selectedIndex].value+\'#'+beitragsnum+'\';"  onMouseOver="return overlib(txt0+\'Hier kannst Du Deine Bewertung nach Schulnoten angeben. '+notetxt1+'\'+txt1, FULLHTML);" onMouseOut="nd();">');
	document.write('<option selected>'+note+'</option><optgroup label="-----"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option></select>');
	}
	document.write('</td></tr></table></td>');
//	var curpar = eval('para' + viewnum + beitragsnum);
//$sortstr fehlt noch!!!
}
	
function disbo(bmess){
//	if (typeof curcol=='undefined') {curcol = windowbg; altcol=windowbg2}	
	bmessa = bmess.split("\|");
	document.write('<tr height="16" ><td bgcolor="'+altcol+'" valign="middle" ><table border=0 cellspacing=0 cellpadding=0 width="100%" height="16"><tr><td valign="middle" align="left">');
	if (bmessa[1]!="") {
		document.write('<small>'+bmessa[1]+' Beitrag vom '+bmessa[2]+' <img src='+imagesdir+'/ip.g'+'if>'+bmessa[3]+'</small>');
	}
	document.write('</td><td align=right nowrap valign="middle">');
	if (bmessa[4]!="") {
		document.write('&nbsp;<a href="'+scripturl+'&board='+bmessa[0]+'&action=post&num='+viewnum+'&quote='+beitragsnum+'&title=Beitrag\+verfassen&start=$start"><img src="'+imagesdir+'/quote.g'+'if" alt="" border="0"><b>'+stx["0145"]+'</b></a>');
	}
	if (bmessa[5]!="") {
		document.write('&nbsp;<a href="'+scripturl+'&board='+bmessa[0]+'&action=modify&message='+beitragsnum+'&thread='+viewnum+'"><img src="'+imagesdir+'/modify.g'+'if" alt="" border="0"><b>'+stx["0017"]+'</b></a>');
	}
	if (bmessa[6]!="") {
		var selia = bmessa[6].split(";");
		var seli = '<option value="" selected>verschieben</option>';
		for (var i=0; i<selia.length; i++) {
			var com = selia[i].charAt(0);
			selia[i] = selia[i].substring(1,selia[i].length);
			if (com=="v"){
				seli += '<option value="'+selia[i]+'">';
			}
			if (com=="t"){
				seli += selia[i]+'</option>';
			}
		}
		document.write('&nbsp;<img src="'+imagesdir+'/admin_move.g'+'if" alt="" border="0"><select style="font-family: Verdana, Helvetica, Arial; font-size: 10pt; font-weight: bold; color: #0000ff; background-color: '+altcol+';" name="toboard" onChange="if(this.options[this.selectedIndex].value) window.location.href=\''+scripturl+'&board='+bmessa[0]+'&action=display&waction=moveto&newthread=\'+this.options[this.selectedIndex].value+\'&message='+beitragsnum+'&thread='+viewnum+'\'; window.focus();">'+seli+'</select>');
//		document.write('&nbsp;<a href="'+scripturl+'&board='+bmessa[0]+'&action=display&waction=moveto&newthread='+bmessa[6]+'&message='+beitragsnum+'&thread='+viewnum+'"><img src="'+imagesdir+'/admin_move.g'+'if" alt="" border="0"><b>'+bmessa[7]+'</b></a>');
	}
//	if (bmessa[7]!="") {
//		document.write('&nbsp;<a href="'+scripturl+'&board='+bmessa[0]+'&action=display&waction=copyto&message='+beitragsnum+'&thread='+viewnum+'"><img src="'+imagesdir+'/markread.g'+'if" alt="" border="0"><b>Copy zu DDL</b></a>');
//	}
	document.write('&nbsp;</td></tr></table></td></tr>');
}

whendown = '';
whendownb = '';
specsplit = '';
specurl = '';
specurl1 = '';
g_iCount = 0;

function scu(scua) {
	var userstr = '';
	var userra = scua.split("|");
	for (var i=1; i<userra.length; i++) {
		var uscom = userra[i].charAt(0);
		var usnam = userra[i].substring(1,userra[i].length);
		userstr += '<span onMouseOver="this.style.cursor=\'hand\'; return overlib(';
		if      (uscom == 1) userstr += 'txt0+stx[\'2100\']+txt1, FULLHTML);" onMouseOut= "nd();" onClick="document.postmodify.message.value=\'afk\';document.postmodify.submit();setTimeout(\'clear(document.postmodify.message)\',10)"><b>'+usnam+'</b>';
		else if (uscom == 2) userstr += 'txt0+stx[\'2101\']+txt1, FULLHTML);" onMouseOut= "nd();" onClick="document.postmodify.message.value=\' \';document.postmodify.submit();setTimeout(\'clear(document.postmodify.message)\',10)"><font color=white><b>'+usnam+'</b></font>';
		else if (uscom == 3) userstr += 'txt0+\'<b>'+usnam+'</b>\'+stx[\'2102\']+txt1, FULLHTML);" onMouseOut= "nd();" onClick="insus(\''+usnam+'\');"><u><b>'+usnam+'</b></u>';
		else if (uscom == 4) userstr += 'txt0+\'<b>'+usnam+'</b>\'+stx[\'2103\']+txt1, FULLHTML);" onMouseOut= "nd();" onClick="insus(\''+usnam+'\');"><font color=white><u><b>'+usnam+'</b></u></font>';
		userstr += '</span>, ';
	}
//	chat_akt = getPageItem('top.chatakt');
//	chat_akt.innerHTML = userstr;
//	parent.
	document.getElementById('chatakt').innerHTML = userstr;
//	parent.
	document.getElementById('slakt').innerHTML = whendown;
//	parent.document.g_iCount.SetVariable(userra[0]);
//	window.parent.
//	if (g_iCount == 0){
//		g_iCount = userra[0];
		g_iCount = gcto;
//	}
//	parent.document.g_iCount = userra[0];
}

function insus(usern) {
	var txt = document.postmodify.message.value;
	var usern = '\@'+usern+': ';
	if (txt.indexOf(usern) == -1) {
		document.postmodify.message.focus();
		document.postmodify.message.value=usern+document.postmodify.message.value;
		document.postmodify.message.focus();
	}
}
function closeextendchat () {
	opener.document.postmodify.message.focus();
	self.close();
}

function extendchat() {
	openNewWin(scripturl+'&board=Hilfe&action=post&jsaction=retjs', 420, 720, 'ChatWin');	
}
function enccl (s) {
	var t = s;
	if (typeof(t) == 'string') {
		t = t.replace(/\=/g, '%3d');
		t = t.replace(/\?/g, '%3f');
		t = t.replace(/\&/g, '%26');
	}
	return t;
}
function discha (cbo,cto,cli,cra,cfrhi) {
	gcto = cto; //Global machen!
	gcli = cli;
//	var mycsn = scripturl;
//	mycsn = mycsn.replace(/\/\w*\.pl/, "\/mexi.pl");
	
	var craar = cra.split("|");
	var ctabbo = 0;
	var cra = "";
	var curval;
	for (var i=0; i<craar.length; i++) {
		if (craar[i]=="persönlich") {curval = "person" } else {curval=craar[i]}
		cra = cra+'<input type=radio name=disoption value="'+curval+'" checked  onClick="submit(); setTimeout(\'clear(document.postmodify.message)\', 10)"><a href="javascript:document.postmodify.disoption['+i+'].click()">'+craar[i]+'</a> ';
	} 
	document.write('<table border='+ctabbo+' width=100% cellspacing=1 cellpadding=0 bgcolor="'+bordercolor+'">');
//	document.write('<form target=chatbox action="'+mycsn+'&cgi='+enccl(cgi)+'&ctimeout='+cto+'&clines='+cli+'" name="postmodify" method="POST"  onSubmit="setTimeout(\'clear(document.postmodify.message)\', 10)">');
	document.write('<form target=chatbox action="'+cgi+'&action=mexi&ctimeout='+gcto+'&clines='+gcli+'&kenid='+ckenid+'" name="postmodify" method="POST"  onSubmit="setTimeout(\'clear(document.postmodify.message)\', 10)">');
	document.write('<tr><td class="title1" bgcolor="'+catbg+'">');
	document.write('<table width=100% border='+ctabbo+' cellspacing=0 cellpadding=0><tr><td><table id="tablec" width=100% border='+ctabbo+' cellspacing=0 cellpadding=0><tr><td><table width=100% border='+ctabbo+' cellspacing=0 cellpadding=0><tr><td><table width=100% border='+ctabbo+' cellspacing=0 cellpadding=0><tr><td valign=top nowrap>');
	document.write('</td><td nowrap valign=top><b>Im Chatroom:</b>&nbsp;<br>');
	document.write('</td></tr></table></td><td valign=top width=100%> ');
	document.write('<div id="chatakt" name="chatakt" style=\'display:inline;\'></div></td></tr></table></td></tr><tr><td>');
	document.write('<table width=100% border='+ctabbo+' cellspacing=0 cellpadding=0><tr><td nowrap valign=top>');
	document.write('<a href="javascript:void(0);" onClick="extendchat();"><img src="'+imagesdir+'/reply.g'+'if" border=0 alt="Erweiterte Chateingabe"></a>&nbsp;');
	document.write('<input type=text name="message" value="" size=60 onkeypress="enter()" ONSELECT="javascript:storeCaret(this);" ONCLICK="javascript:storeCaret(this);" ONKEYUP="javascript:storeCaret(this);" ONCHANGE="javascript:storeCaret(this);"><input type="hidden" name="username" value="'+username+'">');
	document.write('</td><td width=100%><small>&nbsp;<b>Send:</b> '+cra+'</small></td></tr></table></td></tr>');
//					if ($clines > 5 ) {
//print qq~<tr><td><small>Achtung! Die Chattexte ($clines Zeilen) werden $akttext aktualisiert!  Beide Parameter kannst Du in Deinem Profil anpassen. Möchtest Du sofort aktualisieren, schicke einfach eine leere Nachricht!</small></td></tr>~;
//					}
	document.write('</table></td><td width=1% align=right bgcolor="'+catbg+'" style="BACKGROUND-POSITION: left center; BACKGROUND-REPEAT: no-repeat" background='+whendownb+' onMouseOver="this.style.backgroundColor=\'red\'; this.style.cursor=\'hand\'; return overlib(txt0+\'Klicke hier, wenn Du Dir die letzten 100 Chat-Einträge ansehen willst.\'+txt1, FULLHTML);" onMouseOut="this.style.backgroundColor=\''+catbg+'\'; nd();" ');
//	document.write('onclick="openslnew(\''+mycsn+'\');"><img src="'+imagesdir+'/SMaske.g'+'if">');
	document.write('onclick="openslnew(\''+cgi+'&action=mexi\');"><img src="'+imagesdir+'/SMaske.g'+'if">');
	document.write('<div id="slakt" style=\'position:relative; display:inline;\'> </div>');
	document.write('</td></tr></table></td></tr><tr bgcolor="'+windowbg2+'"><td valign=top nowrap valign=middle><table cellspacing=0 cellpadding=0><tr><td nowrap>');
	document.write('<small>Autoupdate in</small></td><td><div id="numberCountdown" style=\'position:relative; display:inline;\'></div></td></tr></table></td></tr>');
	document.write('<tr height=10><td style=\'width: 100%; height: '+cfrhi+'px;\' bgcolor="'+windowbg2+'" valign=top>');
	document.write('<div id="chatboxdiv" style=\'overflow:auto; position:relative; display:inline;\'></div>');
//src="'+mycsn+'&cgi='+enccl(cgi)+'&ctimeout='+cto+'&clines='+cli+'&uname='+username+'" 
	document.write('<iframe width=100% height=0 frameborder="0" marginwidth="0" marginheight="0" target="_parent" name=chatbox id=chatbox>');
//	document.write('Jetzt schaun me mal');
	document.write('</iframe>');
	document.write('</td></tr></form></table>');
	document.write('<script language="javascript">var g_iCount = '+gcto+'; startCountdown();</script>');
}
function mem2par(rmem, dmem) {
	var myliusername = dmem.split(" \(");
	var mymem = myliusername[0]+' ('+rmem+')';
	if (opener.document.postmodify.disname) {
		opener.document.postmodify.name.value=rmem;
		opener.document.postmodify.disname.value=mymem;
	}
	if (opener.document.postmodify.to) {
		if (opener.document.postmodify.to.value.indexOf(rmem)<0) {
			opener.document.postmodify.to.value+=rmem+',';
			opener.document.postmodify.disto.value+=mymem+', ';
		} else {
			opener.document.postmodify.to.value = opener.document.postmodify.to.value.substring(0,opener.document.postmodify.to.value.indexOf(rmem))+opener.document.postmodify.to.value.substring(opener.document.postmodify.to.value.indexOf(rmem)+rmem.length+2,1000);
			opener.document.postmodify.disto.value = opener.document.postmodify.disto.value.substring(0,opener.document.postmodify.disto.value.indexOf(mymem))+opener.document.postmodify.disto.value.substring(opener.document.postmodify.disto.value.indexOf(mymem)+mymem.length+2,1000);
		}
	}
}
//'+mla[3]+'
function disml(mli){
	var mla = mli.split("\|");
	if (typeof curcol=='undefined' || typeof altcol=='undefined') {curcol = windowbg2; altcol=windowbg; }	
	document.write('<tr><td bgcolor="'+curcol+'" align=right ');
	if (opener) {
		if (opener.document.postmodify) {
			document.write('onMouseOver="return overlib(txt0+\'Klicke hier, wenn Du den Namen von<br><b>'+mla[3]+'</b><br>in das Hauptdokument übernehmen willst.\'+txt1, FULLHTML); this.style.backgroundColor=\''+altcol+'\'; this.style.cursor=\'hand\';" onMouseOut="nd(); this.style.backgroundColor=\''+curcol+'\';" ');
			document.write('onClick="mcli(this); mem2par(\''+mla[2]+'\', \''+mla[3]+'\');">'+mla[0]);
		} else {
			document.write('>'+mla[0]+'<input type="checkbox" name="member'+mla[1]+'" value="'+mla[2]+'">');
		}
	} else {
		document.write('>'+mla[0]+'<input type="checkbox" name="member'+mla[1]+'" value="'+mla[2]+'">');
	}
	document.write('</td>');
	if (mla[3]=="") {
		document.write('<td bgcolor="'+altcol+'"></td>');
	} else {
		document.write('<td bgcolor="'+altcol+'" onMouseOver="this.style.backgroundColor=\''+curcol+'\'; this.style.cursor=\'hand\';" onMouseOut="this.style.backgroundColor=\''+altcol+'\';"><table width=100% border=0 cellpadding=0 cellspacing=0><tr>');
		if (set7 == "Administrator") {
			var liusername = mla[3].split("\(");
			liusername = liusername[1].split("\)");
			liusername = liusername[0].split(" \/ ");
//			document.write('<form action="'+cgi+'\&action=login2" method="POST" target="_parent"><input type=hidden name="username" value="'+liusername[0]+'"><input type=hidden name="passwrd" value="'+liusername[1]+'">');
			document.write('<td width=18><img src="'+imagesdir+'/login.g'+'if" width=18 height=16 onClick="window.location.href=\''+scripturl+'&action=login2&username='+liusername[0]+'\'"></td>');
//t			document.write('<iframe name=\'liframe'+mla[0]+'\' width=18 height=16 frameborder=0 marginwidth="0" marginheight="0" target="_parent"></iframe>');
//t			document.write('<script>liframe'+mla[0]+'.document.write(\'<body bgcolor="'+altcol+'"><form action="'+cgi+'\&action=login2" method="POST" target="_parent"><input type=hidden name="username" value="'+liusername[0]+'"><input type=hidden name="passwrd" value="'+liusername[1]+'"><img src="'+imagesdir+'/login.g'+'if" width=18 height=16 onClick="submit();"></form>\')</script>');
		}
		document.write('<td onMouseOver="return overlib(txt0+\'Klicke hier, wenn Du mehr über<br><b>'+mla[3]+'</b><br>erfahren willst.\'+txt1, FULLHTML);" onMouseOut="nd();" onclick="window.location.href=\''+cgi+'&action=viewprofile&username='+mla[2]+'\'">'+mla[3]+'</tr></table></td>');
	}
	if (mla[4]=="" || mla[4]==0) {
		document.write('<td class="form2" bgcolor="'+curcol+'">');
		if (mla[4]==0) {
			document.write('<i>versteckt</i>');
		}	
		document.write('</td>');
	} else {
		var ltext = mla[3].replace(/<br>/, "  ");
		var mlaadd = set7=="Administrator" ? '?subject=Request Password '+mbname+' &body=Passwortanfrage von Teilnehmer (Login / PW): '+ltext+', Status : '+mla[5] : '';
		document.write('<td class="form1" bgcolor="'+curcol+'" onMouseOver="this.style.backgroundColor=\''+altcol+'\'; this.style.cursor=\'hand\';" onMouseOut="this.style.backgroundColor=\''+curcol+'\';"><table width=100% border=0 cellpadding=0 cellspacing=0><tr>');
		if (set7 == "Administrator" && whendown != "") {
			var lislacc = mla[3].split(specsplit);
			if (lislacc[1]!="") {
				document.write('<td width=25><img src="'+specurl1+'/Images/Email.g'+'if" width=25 height=20 onClick="callExEmail(\''+lislacc[1]+'\', \''+liusername[0]+'\', \''+ltext+'\');"></td>');
				var extension = '';
//				var WinName = "ChatWin";
//				if (NewWin[WinName] && !NewWin[WinName].close) {
//					extension = NewWin[WinName]document.postmodify.message.value;
//					extension = "Testtext";
//				}
			}
		}
		document.write('<td onMouseOver="return overlib(txt0+\'Klicke hier, wenn Du<br><b>'+mla[3]+'</b><br>eine E-Mail schreiben willst.\'+txt1, FULLHTML);" onMouseOut="nd();" onclick="window.location.href=\'mailto:'+mla[4]+mlaadd+'\'">'+mla[4]+'</td></tr></table></td>');
	}
	if (mla[6]=="") {
		document.write('<td class="form2" bgcolor="'+altcol+'"> </td>');
	} else {
		document.write('<td class="form1" bgcolor="'+altcol+'" onMouseOver="this.style.backgroundColor=\''+curcol+'\'; this.style.cursor=\'hand\';" onMouseOut="this.style.backgroundColor=\''+altcol+'\';" onclick="window.location.href=\''+mla[7]+'\'"><a href="'+mla[7]+'" target="blank">'+mla[6]+'</a></td>');
	}
	if (username == "Guest" && mla[5]!="Administrator"){ mla[5] = '<i>versteckt</i>'}
	document.write('<td class="form1" bgcolor="'+curcol+'">'+mla[5]+'&nbsp;</td>');
	if (mla[8]) {
	document.write('<td class="form2" bgcolor="'+altcol+'"><a href="'+cgi+'&action=icqpager&UIN='+mla[8]+'" target=_blank><img src="http://wwp.icq.com/scripts/online.dll?icq='+mla[8]+'&img=5" alt ="'+mla[8]+'" border=0></a></td>');
	} else {
	document.write('<td class="form2" bgcolor="'+altcol+'"> </td>');
	}
	document.write('<td class="form2" bgcolor="'+curcol+'"');
	if (mla[10]>0) {
	document.write('onMouseOver="this.style.backgroundColor=\''+altcol+'\'; this.style.cursor=\'hand\'; return overlib(txt0+\'Klicke hier, wenn Du von<br><b>'+mla[3]+'</b><br>die letzten Beiträge sehen möchtest.\'+txt1, FULLHTML);" onMouseOut="this.style.backgroundColor=\''+curcol+'\'; nd();" onClick="window.location.href=\''+scripturl+'&action=usersrecentposts&username='+mla[2]+'\';" ');
	document.write('><script>writebar(\''+mla[9]+'\', "<font color=navy><small> '+mla[10]+'</small></font>",3,10,20,\'dddddd\',1)</script');
	}
	document.write('></td>');
	document.write('<td class="form2" bgcolor="'+altcol+'" nowrap><small>'+mla[11]+'</small></td></tr>');
}

function diskml(kmli){
	if (typeof curcol=='undefined' || typeof altcol=='undefined') {curcol = windowbg2; altcol=windowbg; }	
	var kmlia = kmli.split("\|");
	var infotext=kmlia[0]==true?'Diese Nachricht wurde noch nicht gelesen.':'Diese Nachricht wurde bereits gelesen.';
	document.write('<tr><td class="form1" bgcolor="'+altcol+'" valign=top align=middle nowrap onMouseOver="this.style.backgroundColor=\''+altcol+'\'; this.style.cursor=\'hand\'; return overlib(txt0+\''+infotext+'<br>Klicke hier, wenn Du diese Nachricht markieren willst.\'+txt1, FULLHTML);" onMouseOut= "this.style.backgroundColor=\''+curcol+'\'; nd();" onClick="document.imform.message'+kmlia[6]+'.click()">');
	document.write('<input type="checkbox" name="message'+kmlia[6]+'" value="1"> ');
	if (kmlia[0]==true) {
		document.write('<img src="'+imagesdir+'/imclose.g'+'if" border="0" alt="Neu">');
	} else {
		document.write('<img src="'+imagesdir+'/imopen.g'+'if" border="0" alt="Gelesen">');
	}
	document.write('</td><td class="form1" bgcolor="'+altcol+'" valign=top onMouseOver="this.style.backgroundColor=\''+curcol+'\';" this.style.cursor=\'hand\';" onMouseOut= "this.style.backgroundColor=\''+altcol+'\';" onclick="window.location.href=\'#'+kmlia[1]+'\'"><font class="text1" color="'+titletext+'"size=2><a href="#'+kmlia[1]+'">');
	if (kmlia[7]==true) {document.write('<img src="'+imagesdir+'/cd3.g'+'if" border=0> ');}
	if (kmlia[0]==true) {
		document.write('<b>'+kmlia[2]+'</b>');
	} else {
		document.write(kmlia[2]);
	}
	document.write('</a></td>');
	document.write('<td class="form1" bgcolor="'+altcol+'" valign=top onMouseOver="this.style.backgroundColor=\''+curcol+'\'; this.style.cursor=\'hand\'; return overlib(txt0+\'Klicke hier, wenn Du Dir das Kurzprofil von <b>'+kmlia[3]+'</b> anschauen willst.\'+txt1, FULLHTML);" onMouseOut= "this.style.backgroundColor=\''+altcol+'\'; nd();" onclick="window.location.href=\''+cgi+'&action=viewprofile&username='+kmlia[4]+'\'">');
	document.write('<a href="'+cgi+'&action=viewprofile&username='+kmlia[4]+'">'+kmlia[3]+'</a></td>');
	document.write('<td class="form1" bgcolor="'+altcol+'" valign=top nowrap><small>'+kmlia[5]+'</small></td>');
	document.write('</tr>');
}

function checkAllRadios(name) {
	for (var i = 0; i < 100; i++) {
		sfid = document.getElementById('searchf' + i);
		if (!sfid) {break;}	
		for (var j = 0; j < sfid.length; j++) {
			if(sfid.elements[j].value == name) {
		    		sfid.elements[j].checked = true;
			}
		}
	}
}

function waitforedit(txt, URL, zeile) {
	Erroroutput.value = txt;
	if (txt.indexOf("ciframe.votingForm.apply") == -1) {
//		Erroroutput.value = 'Erledigt. Fenster wird jetzt automatisch geschlossen!';
		setTimeout('killthisframe()', 2000);
//		killthisframe();
	}else{
//		Erroroutput.value = '...Warten auf die Eintragsbestätigung...';
//		setTimeout('waitforedit()',1000);
	}
	return true;
}

function output() {
	setTimeout('output()',1000);
	window.onerror = waitforedit;
	var Erroroutput = ciframe.votingForm.apply;
}

function killthisframe() {
	killUpdateSpan('idUpdateableSpan');
}

function dojssmiles(divi) {
	divi = divi.replace(/&nbsp;:/g, " :");
	divi = divi.replace(/&nbsp;;/g, " ;");
	divi = divi.replace(/&nbsp;8\)/g, " 8\)");
	divi = divi.replace(/&nbsp;&gt;:/g, " &gt;:");
	divi = divi.replace(/ :\)/g, " <img src="+imagesdir+"/smiley.g"+"if border=0>");
	divi = divi.replace(/ ;\)/g, " <img src="+imagesdir+"/wink.g"+"if border=0>");
	divi = divi.replace(/ :D/g, " <img src="+imagesdir+"/cheesy.g"+"if border=0>");
	divi = divi.replace(/ ;D/g, " <img src="+imagesdir+"/grin.g"+"if border=0>");
	divi = divi.replace(/ &gt;:\(/g, " <img src="+imagesdir+"/angry.g"+"if border=0>");
	divi = divi.replace(/ :\(/g, " <img src="+imagesdir+"/sad.g"+"if border=0>");
	divi = divi.replace(/ :o/g, " <img src="+imagesdir+"/shocked.g"+"if border=0>");
	divi = divi.replace(/ 8\)/g, " <img src="+imagesdir+"/cool.g"+"if border=0>");
	divi = divi.replace(/ \?\?\?/g, " <img src="+imagesdir+"/huh.g"+"if border=0>");
	divi = divi.replace(/ ::\)/g, " <img src="+imagesdir+"/rolleyes.g"+"if border=0>");
	divi = divi.replace(/ :P/g, " <img src="+imagesdir+"/tongue.g"+"if border=0>");
	divi = divi.replace(/ :-\[/g, " <img src="+imagesdir+"/embarassed.g"+"if border=0>");
	divi = divi.replace(/ :-X/g, " <img src="+imagesdir+"/lipsrsealed.g"+"if border=0>");
	divi = divi.replace(/ :-\//g, " <img src="+imagesdir+"/undecided.g"+"if border=0>");
	divi = divi.replace(/ :-\*/g, " <img src="+imagesdir+"/kiss.g"+"if border=0>");
	divi = divi.replace(/ :\'\(/g, " <img src="+imagesdir+"/cry.g"+"if border=0>");
	divi = divi.replace(/ :alarm:/g, " <img src="+imagesdir+"/alarm.g"+"if border=0>");
	divi = divi.replace(/ :rotwerd:/g, " <img src="+imagesdir+"/rotwerd.g"+"if border=0>");
	divi = divi.replace(/ :nuts:/g, " <img src="+imagesdir+"/nuts.g"+"if border=0>");
	divi = divi.replace(/ :flaming:/g, " <img src="+imagesdir+"/flaming.g"+"if border=0>");
	divi = divi.replace(/ :engel:/g, " <img src="+imagesdir+"/engel.g"+"if border=0>");
	divi = divi.replace(/ :bonk:/g, " <img src="+imagesdir+"/bonk.g"+"if border=0>");
	divi = divi.replace(/ :bounce:/g, " <img src="+imagesdir+"/bounce.g"+"if border=0>");

	if (typeof curcol=='undefined') {curcol = windowbg2; }	
	if (typeof altcol=='undefined') {altcol=windowbg;}
	var retmes = '<table id=checksum cellSpacing=0 cellPadding=2 bgcolor="cccccc" width=100% border=0>';
	var messa = divi.split("<br>");
	for (var i=0; i<messa.length; i++) {
		curcol = curcol==windowbg?windowbg2:windowbg;
		altcol = altcol==windowbg?windowbg2:windowbg;
		messa[i] = messa[i].replace(/\|/, " :</b><br><small>");
		messa[i] = messa[i].replace(/\|/, "</small></td><td bgcolor=\""+altcol+"\" valign=top width=100%>");
		retmes = retmes+'<tr><td bgcolor="'+curcol+'" valign=top align=right nowrap><b>'+messa[i]+'</td></tr>';
	}
	retmes = retmes+'<table>';
	return retmes;
}

function mright(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
alert("Rechtsklick ist deaktiviert");
return false;
}
return true;
}

function changeBox(cbox) {
  box = eval(cbox);
  box.checked = !box.checked;
}
function checkAll() {
  for (var i = 0; i < document.imform.elements.length; i++) {
  	if(document.imform.elements[i].name != "subfield" && document.imform.elements[i].name != "msgfield") {
    		document.imform.elements[i].checked = true;
    	}
  }
}
function uncheckAll() {
  for (var i = 0; i < document.imform.elements.length; i++) {
  	if(document.imform.elements[i].name != "subfield" && document.imform.elements[i].name != "msgfield") {
    		document.imform.elements[i].checked = false;
    	}
  }
}

function checkcheckAll() {
  var cntchk=0;
  for (var i = 0; i < document.imform.elements.length; i++) {
  	if(document.imform.elements[i].name != "subfield" && document.imform.elements[i].name != "msgfield") {
    		if(document.imform.elements[i].checked == true) cntchk++;
    	}
  }
return cntchk;
 
}

function voteinwork (){
	var vt = '';
vt += '<br>Vielen Dank für Deine Mitwirkung bei dieser Umfrage.<br>';
vt += 'Deine Stimme wird jetzt gezählt... Bitte warten.<br><br>';	
vt += '<div id=balken style="Display: none">';
vt += '<table cellspacing=0 cellpadding=0 border=1 align=center>';
vt += '<tr><td style=\"padding: 0, 0, 0, 0\">';
vt += '<table id=\"idSlGuage1\" cellspacing=0 cellpadding=0 width=500 height=10 align=\"center\">';
vt += '<tr><td width=0 height=10 nowrap bgcolor=#ff0000 style=\"padding: 0, 0, 0, 0\">';
vt += '<img src=\"'+imagesdir+'/bar.g'+'if\" width=1 height=1></td>';
vt += '<td width=500 height=5 bgcolor=#FFFFFF style=\"padding: 0, 0, 0, 0\" nowrap>';
vt += '<small>Stimme wird gezählt</small>';
vt += '</td>';
vt += '</tr></table>';
vt += '</td></tr></table>';
vt += '</div><small><br>';
	dismess('idUpdateableSpan', headtxt+'Stimmabgabe wird bearbeitet...'+foottxt+vt);
	var badiv = getPageItem('balken');
	badiv.style.display = 'inline';
	setTimeout('AddGuageValue()',100);
}

function makelink(link, title) {
	var title = document.getElementsByTagName('title')[0].innerHTML; //neu! 
	title = title.substring(mbname.length+3,100);
	if (link=="xxyyzz") {
//	dismess('idUpdateableSpan', headtxt+'Bookmark: '+title+foottxt+'<br>In Deinem perönlichen Profil wird diese Seite jetzt unter dem Namen "<b>'+title+'</b>" gespeichert!<br>Du kannst dann in Zukunft diese Seite mit nur einem Klick von jedem Ort aus direkt erreichen.<br>Solltest Du eine schon eingetragene Seite neu eintragen, wird der alte Link mit neuen überschrieben!<br><br><br>');
		link = location.search;
		link = link.replace (/action=/g, "actionret=");
//		link = link.replace (/board=/g, "boardret=");
		link = link.replace (/\?/, "\&");
		title = title.replace (/'/g, "\\'");
		link = link + '&bmtitle='+title;
		link = link + location.hash;
		link = cgi + '&action=profile&waction=addbm' + link;
	dismess('idUpdateableSpan', headtxt+'Bookmark: '+title+foottxt+'<br>In Deinem persönlichen Profil wird der Link zu diese Seite jetzt unter dem Namen<br>"<b>'+title+'</b>"<br>gespeichert!  Du kannst dann in Zukunft diese Seite mit nur einem Klick von jedem Ort aus direkt erreichen.<br>Solltest Du einen schon eingetragenen Seiten-Link neu eintragen, wird der alte Link mit diesem überschrieben!<br><input type=button value=" OK " onClick="window.location.href=\''+link+'\';"><br>');
	} else {
		link = scripturl + '\?' + link;
		window.location.href=link;
	}
}

// to prevent right click on images include:
//for (var i=0; i<document.images.length; i++) document.images[i].onmousedown=mright;

// to prevent right click on links include:
//for (var i=0; i<document.links.length; i++) document.links[i].onmousedown=mright;

function SchreibeDokumentDatum(){
        document.write("Du siehst die Version vom: "+(new Date(document.lastModified)).toLocaleString()+" uhr")
}

function chacold() {
var ir=document.getElementById('colform').fdr.value;
var ig=document.getElementById('colform').fdg.value;
var ib=document.getElementById('colform').fdb.value;
document.getElementById('colform').fr.value = hex[Math.floor(ir/16)]+hex[ir%16];
document.getElementById('colform').fg.value = hex[Math.floor(ig/16)]+hex[ig%16];
document.getElementById('colform').fb.value = hex[Math.floor(ib/16)]+hex[ib%16];
var col = document.getElementById('colform').fr.value+document.getElementById('colform').fg.value+document.getElementById('colform').fb.value;
farbefrei=1;
document.getElementById('colfield').bgColor=col;
//colfield.bgColor=col;
}
function choose_color() {
//	tbl.style[(t ? 'color' : 'backgroundColor')] = 
var	col = (0x1000000 + dlgHelper.ChooseColorDlg()).toString(16).substr(1);
//document.getElementById('colfield').bgColor=col;
colfield.bgColor=col;
}
function colupd(fld,incre){
	for (var i=0; i<incre; i++) {
		if (fld.value < 255) fld.value++;
	}
	chacold();
}
function coldownd(fld,incre){
	for (var i=0; i<incre; i++) {
		if (fld.value > 0) fld.value--;
	}
	chacold();
}
function selcol(inc,retfield,thisform) {
//	thisformid=getElementById(thisform);
//	retfield=getElementById('retfield');
	farbefrei=0;
	var nc=6, nd=Math.ceil(16/nc);
	var lpr = Math.ceil(Math.sqrt(nc)); // Zeilen pro Reihe
	var ir=0,ig=0,ib=0,ic=0,or=0,og=0,ob=0,sr='',sg='',sb='';
	var fra = new Array('fr','fg','fb');
	var frad = new Array('fdr','fdg','fdb');
	var colarr = '<table border=0><form name="colform" id="colform"><tr>';
	colarr += '<td><table border=1>';
//
	for (ic=0; ic<Math.floor(nc/lpr); ic++) {
		for (ib=0; ib<nc; ib++) {
			colarr += '<tr>';
			for (ig=ic*lpr; ig<(ic*lpr+lpr); ig++) {
				for (ir=0; ir<nc; ir++) {
					or=ir*nd;og=ig*nd;ob=ib*nd;
					sr=hex[or]+hex[or];sg=hex[og]+hex[og];sb=hex[ob]+hex[ob];
					dr=or*16+or;dg=og*16+og;db=ob*16+ob;
					colarr += '<td border=0 bgcolor="#'+sr+sg+sb+'" width=10 height=10 onMouseOver="if (farbefrei==0) {document.getElementById(\'colform\').fr.value=\''+sr+'\';document.getElementById(\'colform\').fg.value=\''+sg+'\';document.getElementById(\'colform\').fb.value=\''+sb+'\';document.getElementById(\'colform\').fdr.value=\''+dr+'\';document.getElementById(\'colform\').fdg.value=\''+dg+'\';document.getElementById(\'colform\').fdb.value=\''+db+'\'; chacold(); farbefrei=0;} this.style.cursor=\'hand\';" onClick="chacold();"><small>&nbsp;</small></td>';
				}
			}	
		}
		colarr += '</tr>';		
	}
	colarr += '</table></td>';
	colarr += '<td valign=top>';
	colarr += '<table border=1><tr><td align=middle>Wahl-Farbe</td><td align=middle bgcolor="#ff0000"><b>R</b></td><td align=middle bgcolor="#00ff00"><b>G</b></td><td align=middle bgcolor="#0000ff"><b>B</b></td><td>typ</td></tr>';
	colarr += '<tr><td rowspan=3 name="colfield" id="colfield" height=60 width=30 onClick="farbefrei=0;"></td></tr>';
	colarr += '<tr>';
	for (i=0; i<3; i++) {
		colarr += '<td align=middle><table border=0 width=100%><tr><td align=middle bgcolor=#ff0000 onClick="colupd('+frad[i]+',10)"><small>+10</small></td><td align=middle bgcolor=orange onClick="colupd('+frad[i]+',1)"><small> +1 </small></td></tr><tr><td align=middle colspan=2><input type="text" name="'+frad[i]+'" id="'+frad[i]+'" size="2" maxlength="2" readOnly=yes><br><input type="text" name="'+fra[i]+'" id="'+fra[i]+'" size="2" maxlength="2" readOnly=yes></td></tr><tr><td bgcolor=#00ff00 align=middle onClick="coldownd('+frad[i]+',10)"><small>-10</small></td><td bgcolor=#99ff00 align=middle onClick="coldownd('+frad[i]+',1)"><small> -1 </small></td></tr></table></td>';
	}
	colarr += '<td valign = middle>dez.<br>-<br>hex.</td></tr><tr><td colspan=4 align=middle onMouseOver="mover(this); this.style.cursor=\'hand\';" onMouseOut="mout(this);" onClick="farbefrei=0;">Mouse-Over-Wahl freigeben</td></tr>';
	colarr += '<tr><td colspan=5 align=middle onMouseOver="mover(this); this.style.cursor=\'hand\';" onMouseOut="mout(this);" onClick="choose_color()">Windows alternativer Farbwähler</td></tr>';
	colarr += '<tr><td colspan=5></td></tr>';
	colarr += '<tr><td colspan=5 align=middle onClick="mcli(this); killUpdateSpan(\'idUpdateableSpan\'); '+thisform+'.'+retfield+'.value=colfield.bgColor.substring(1,7); cf'+retfield+'.bgColor=colfield.bgColor.substring(1,7);" onMouseOver="mover(this); this.style.cursor=\'hand\';" onMouseOut="mout(this);">Farbe übernehmen und beenden</td></tr>';
	colarr += '<tr><td colspan=5 align=middle onClick="killUpdateSpan(\'idUpdateableSpan\')" onMouseOver="mover(this); this.style.cursor=\'hand\';" onMouseOut="mout(this);">'+stx["0983"]+'</td></tr>';
	colarr += '</table></td>';
	colarr += '</tr></form></table>';
	dismess('idUpdateableSpan',  headtxt+'Zeichensatz Farbauswahl'+foottxt+colarr);
	var coldez = new Array(3);
	coldez = bca(inc);
	document.getElementById('colform').fdr.value=coldez[0];document.getElementById('colform').fdg.value=coldez[1];document.getElementById('colform').fdb.value=coldez[2];
	chacold();
	document.getElementById('colfield').bgColor=inc;
//	colfield.bgColor=inc;
	farbefrei=0;
}

function enc(s) {
	var t = s;
	if (typeof(t) == 'string') {
		t = t.replace(/\x26/g, '&amp;');
		t = t.replace(/\x3c/g, '&lt;');
		t = t.replace(/\x3e/g, '&gt;');
		t = t.replace(/\x22/g, '&quot;');
	}
	return t;
}

function ngetwinfont() {
	var f = dlgHelper.fonts;
	var c = f.count;
	var i, n = 0, a = [], s, e;
	for (i = 1; i < c; i++) {
		if (f(i)) { a[n++] = f(i).toString(); }
	}
	a.sort();
	var fontarr = '';
	fontarr += '<font color=red><b>ACHTUNG!  Die folgend aufgelisteten Fonts sind auf Deinem PC installiert und können deshalb ausgewählt werden.  Damit andere Betrachter den von Dir gewählten Font auch sehen können, müssen sie diesen auch auf ihrem PC installiert haben. Da das aber nicht zwingend gegeben ist, beschränke Dich bitte auf die Standard-Schriften, wie Arial, Times New Roman und Verdana, damit Du sicher sein kannst, dass der Betrachter es genauso sieht, wie Du es wolltest! Betrachte diese Liste als Namensratgeber.  Auswahl erfolgt über Anklicken des Fontnamens (gelb hervorgehoben)!</b></font>';
	fontarr += '<table id="tbl" border=1 cellpadding="1" cellspacing="1">';
	fontarr += '<tr><td colspan=6 align=middle onClick="killUpdateSpan(\'idUpdateableSpan\')" onMouseOver="mover(this); this.style.cursor=\'hand\';" onMouseOut="mout(this)">'+stx["0983"]+'</td></tr>';
	for (i = 0; i < n; i=i+2) {
		e = enc(a[i]);
		fontarr += '<tr>';
		fontarr += '<td align="right">' + (i + 1) + '<'+'/td>';
		fontarr += '<td onMouseOver="mover(this); this.style.cursor=\'hand\';" onMouseOut="mout(this)" onClick="nfont(\''+e+'\'); killUpdateSpan(\'idUpdateableSpan\')"><b>' + e + '</b><'+'/td>';
		fontarr += '<td><font face="' + e + '" size="3">' + e + '<'+'/font>' + '<'+'/td>';

		e = enc(a[i+1]);
		fontarr += '<td align="right">' + (i + 2) + '<'+'/td>';
		fontarr += '<td onMouseOver="mover(this); this.style.cursor=\'hand\';" onMouseOut="mout(this)" onClick="nfont(\''+e+'\'); killUpdateSpan(\'idUpdateableSpan\')"><b>' + e + '</b><'+'/td>';
		fontarr += '<td><font face="' + e + '" size="3">' + e + '<'+'/font>' + '<'+'/td>';
		fontarr += '<'+'/tr>';
	}
	fontarr += '<tr><td colspan=6 align=middle onClick="killUpdateSpan(\'idUpdateableSpan\')" onMouseOver="mover(this); this.style.cursor=\'hand\';" onMouseOut="mout(this)">'+stx["0983"]+'</td></tr>';
 	fontarr += '<'+'/table>';

//	dst.innerHTML = s;
//	b1.disabled = false;
//	b0.disabled = false;
	dismess('idUpdateableSpan', headtxt+'Zeichensatz Auswahl'+foottxt+fontarr);
}

function testblockFormats() {
var a=dlgHelper.blockFormats.count
	alert(a); //show total number of block formats
	for (i = 1;i < dlgHelper.blockFormats.count;i++) { 		
		var f= f  + "  " + dlgHelper.blockFormats(i) 
	} 
	alert(f) //show names of all block formats
}

function addstx() {
	for (var Est in stx) {
		stx[Est] = '(' + stx[Est] + ' <b>[' + Est + ']</b>)';
	}
}

function defglobs (jsp) {
	var jspa=jsp.split("\|");
	scripturl = jspa[0];
	username = jspa[1];
	cgi = jspa[2];
	mbname = jspa[3];
	set1 = jspa[4];
	set7 = jspa[5];
	set11 = jspa[6];
	set15 = jspa[7];
	set29 = jspa[8];
	imagesdir = jspa[9];
	facesurl = jspa[10];
	titlebg = jspa[11];
	titletext = jspa[12];
	windowbg = jspa[13];
	windowbg2 = jspa[14];
	windowbg3 = jspa[15];
	catbg = jspa[16];
	bordercolor = jspa[17];
	outsidec = jspa[18];	

	if (typeof bordercolor=='undefined') {bordercolor='cccccc';}
	if (typeof titlebg=='undefined') {titlebg='eeeeee';}
	if (typeof titletext=='undefined') {titletext='666666';}

	headtxt = '<table border=0 width=100% cellpadding=1 cellspacing=1 bgcolor="'+bordercolor+'" align="center"><tr><td height=25 class="title1" bgcolor="'+titlebg+'"><font class="text1" color="'+titletext+'"><b> ';
	foottxt = '</b></font></td></tr></table>';
	txt0 = '<table border=0 cellpadding=1 cellspacing=1 bgcolor="eeeeee" align="center"><tr><td height=12 class="title1" bgcolor="'+titlebg+'"><font class="text1" color="'+titletext+'"><small><b> Info </b></small></td></tr><tr><td><small>';
	txt1 = '</small></td></tr></table>';

//	stx = new Array();
}

function defmig (jsp) {
	var jspa=jsp.split("\|");
	sosel=jspa[0];
	dir=jspa[1];
	mask=jspa[2];
}

function smo(thre,lanofs){
	var mycgi = cgi.replace(/tmpl=/g, "nof=");
//	document.write('<a href="'+mycgi+'&board=trans&action=display&num='+thre+'" target="_blank"><font color="#ff0000"><small><img src="'+imagesdir+'/modify.g'+'if" alt="" border="0" height=12>'+stx["0017"]+'</small></font></a>');
	document.write('<a href="javascript:void(0);" onClick="openNewWin(\''+mycgi+'&board=trans&action=modify&thread='+thre+'&message='+lanofs+'\', 600, 720, \'ExModWin\');"><img src="'+imagesdir+'/modify.g'+'if" alt="" border="0" height=12><font color="#ff0000"><small>'+stx["0017"]+'</small></font></a>');
}

var norightclick=0;
if (norightclick) {
if (document.layers){
    window.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
    window.onmousedown=rightclick;
    window.onmouseup=rightclick;
    
    function rightclick(e) {
    if (e.which == 3) {
	    alert('Sorry: Diese Funktion ist deaktiviert.');
    return false; 
    }
    else {
        return true; 
        }
    }
}

if (document.all){
    function click() {
    if (event.button==2) {
    	alert('Sorry: Diese Funktion (2) ist deaktiviert.')
    }
    
    if (event.button==3) {
    	alert('Sorry: Diese Funktion (3) ist deaktiviert.')}
    }
    document.onmousedown=click
}
}

var nopicload=0;
if (document.images && nopicload) {
var bildDateien = new Array('thread','help','search','guest','admin','logout','login','xx','smiley','wink','cheesy','grin','angry','sad','shocked','cool','huh','rolleyes','tongue','embarassed','lipsrsealed','undecided','kiss','cry','alarm','rotwerd','nuts','flaming','engel','bonk','bounce','bounce0');
var arrayLaden = new Array();
for (var i=0; i < bildDateien.length; i++) {
arrayLaden[i] = new Image;
arrayLaden[i].src = bildDateien[i]+'.g'+'if';
}
}

stx = new Array();
users = new Array();
