/**
 * @author	FirePanther (Suat Secmen)
 * @copyright	24.12.2009
 * @license	www.autoit.at
 */
_xmouse=0;_ymouse=0;abstand=0;cleartweens="";copybuttoncounter=0;copybuttons_collection=new Array();setBlendSourceArray=new Array();
if (typeof(AjaxRequest)=="function"){ ajaxRequest = new AjaxRequest(); }
lastWhatsUpEntryID=0;
document.onmousemove = saveMousePositions;
//onmousedown = mouseIsDown;
onmouseup = mouseIsUp;

// ONLOAD --------------------------------------------
if (typeof(onloadEvents)!="object"){
	onloadEvents = new Array();
	window.onload = function() {
		for (var i = 0; i < onloadEvents.length; i++)
			onloadEvents[i]();
	}
}
// WhatsUpEntry-Checker (Ajax)
onloadEvents.push(function() { if (document.getElementById("whatsupEntries")){ setInterval("checkForNewWhatsUpEntries()","3000"); };searchAutoItTextfields() });
// Clipboard Mono (Special)
onloadEvents.push(function() { if (document.getElementById("copybutton")){ clip = new ZeroClipboard.Client();clip.setText(Encoder.htmlDecode(document.getElementById("cleanSourceCode").innerHTML));clip.glue("copybutton"); } });
// Clipboards Codeboxes
onloadEvents.push(new Function(
	'for(var copybuttonid=1;copybuttonid<=copybuttoncounter;copybuttonid++){'+
	'	codeboxData = copybuttons_collection[copybuttonid];'+
	'	if (!document.getElementById("copybutton"+codeboxData)) break;'+
	'	clip = new ZeroClipboard.Client();'+
	'	clip.setVars("codeBoxGesamt"+codeboxData);'+
	'	clip.setText(document.getElementById("codeBoxCleanSource"+codeboxData).innerHTML, 1);'+
	'	clip.glue("copybutton"+codeboxData);'+
	'}'
));
// Clipboards Other
onloadEvents.push(function() {
	var copybuttonid=1;
	while (document.getElementById("copybuttonOther"+copybuttonid)){
		clip = new ZeroClipboard.Client();
		clip.setText(Encoder.htmlDecode(document.getElementById("cleanSource"+copybuttonid).innerHTML), 1);
		clip.glue("copybuttonOther"+copybuttonid);
		copybuttonid++;
	}
});
onloadEvents.push(function() { setUserProfileLinks();refreshOnlineUser() });
// ---

function _alpha(obj,prozent){
	obj.style.filter="alpha(opacity="+prozent+")";
	obj.style.MozOpacity=prozent/100;
	obj.style.KhtmlOpacity=prozent/100;
	obj.style.opacity=prozent/100;
}

function VoteSystemScrollOut(){
	for (i=0;i<=5;i++){ if(document.getElementById('scrollDownButton'+i)){ document.getElementById('scrollDownButton'+i).style.display='none'; } }
	document.getElementById('scrollDown').style.display='inline';
	VoteSystemButtonScrollOut(0);
}
function VoteSystemButtonScrollOut(step){
	if (step>0){ if(document.getElementById('scrollDownButton'+(6-step))){ document.getElementById('scrollDownButton'+(6-step)).style.display='block'; } }
	if (step<6){
		setTimeout('VoteSystemButtonScrollOut('+(step+1)+')', 20);
	}
}

function mouseIsDown(){
}
function mouseIsUp(){
	if (document.getElementById('scrollDownButton') && document.getElementById('scrollDownButton').style.display=="none"){
		document.getElementById('scrollDownButton').style.display="inline";
		document.getElementById('scrollDown').style.display="none";
	}
}
function saveMousePositions(e){
	if (navigator.appName == "Microsoft Internet Explorer"){
		_xmouse=window.event.clientX+document.body.scrollLeft;
		_ymouse=window.event.clientY+document.body.scrollTop;
	}else{
		_xmouse=e.pageX;
		_ymouse=e.pageY;
	}
	if (_xmouse<0){_xmouse=0;}
	if (_ymouse<0){_ymouse=0;}
}
function markieren(elem) {
	if (document.selection && document.selection.createRange) {
		var textRange = document.selection.createRange();
		textRange.moveToElementText(elem);
		textRange.select();
	} else if (document.createRange && window.getSelection) {
		var range = document.createRange();
		range.selectNode(elem);
		var selection = window.getSelection();
		selection.removeAllRanges();
		selection.addRange(range);
	}
}
function removeHTML(text){
	text = text.replace(/<br.?\/?>/g, "\r\n");
	text = text.replace(/\&nbsp\;/g, " ");
	text = text.replace(/<\/?[^>]+(>|$)/g, "");
	return text;
}
meldung_reset=0;lastsavedtext="";meldung_ausschalten=0;lastMeldungTitle=0;lastMeldungText=0;lastMeldungPos=0;
function minimeldung(text,lastxmouse,lastymouse){
	showMeldung=1;
	if (!lastxmouse || !lastymouse){
		lastxmouse=_xmouse;
		lastymouse=_ymouse;
	}else if((lastxmouse!=_xmouse || lastymouse!=_ymouse) && document.getElementById("meldungen_content").innerHTML==text){
		document.getElementById("meldungen").style.display="none";showMeldung=0;
	}else if(document.getElementById("meldungen_content").innerHTML!=text) {
		showMeldung=0;
	}
	if (showMeldung){
		document.getElementById("meldungen_content").innerHTML=text;
		document.getElementById("meldungen").style.display="block";
		document.getElementById("meldungen").style.width=document.getElementById("meldungen_content").offsetWidth+"px";
		document.getElementById("meldungen").style.height=document.getElementById("meldungen_content").offsetHeight+"px";
		document.getElementById("meldungen").style.position="absolute";
		document.getElementById("meldungen").style.zIndex="1000";
		document.getElementById("meldungen").style.padding="5px";
		document.getElementById("meldungen").style.left=(15+lastxmouse)+"px";
		document.getElementById("meldungen").style.top=(15+lastymouse)+"px";
		_alpha(document.getElementById("meldungen"),80);
		setTimeout(function(){minimeldung(text,lastxmouse,lastymouse);},10);
	}
}
function meldung_ein(text,right,title){
	if (!title) title="Hinweis";
	if (!right) right=0;
	clearTimeout(meldung_ausschalten);
	if (!(meldung_ausschalten && document.getElementById("meldungen").style.display!="none" && lastMeldungTitle==title && lastMeldungText==text && lastMeldungPos==right)){
		lastMeldungTitle=title;lastMeldungText=text;lastMeldungPos=right;
		meldung_reset=right;
		document.getElementById("meldungen").style.width="1px";
		document.getElementById("meldungen").style.height="1px";
		document.getElementById("meldungen").style.position="absolute";
		document.getElementById("meldungen").style.zIndex="1000";
		document.getElementById("meldungen").style.padding="1px 0px 0px 1px";
		document.getElementById("meldungen").style.overflow="hidden";
		document.getElementById("meldungen_content").innerHTML='<div class="containerHead"><div class="containerContent" style="padding:0px;margin:0px;"><span style="font-weight:bold;">'+title+'</span></div></div><div style="padding:5px 5px 5px 5px">'+text+'</div>';
		document.getElementById("meldungen").style.display="block";
		_alpha(document.getElementById("meldungen"),0);
		abstand=40;
		lastsavedtext=encodeURIComponent(text+right);
		meldung_move(right,lastsavedtext);
		prozenth=0;
		meldung_resize();
	}
}
function meldung_resize(){
	maxw=document.getElementById("meldungen_content").offsetWidth;
	maxh=document.getElementById("meldungen_content").offsetHeight;
	prozenth+=10;if (prozenth>100) prozenth=100;
	w=maxw*prozenth/100;
	h=maxh*prozenth/100;
	_alpha(document.getElementById("meldungen"),Math.round(prozenth<75 ? prozenth/3 : (prozenth<90 ? prozenth/2	: prozenth)));
	abstand=40-(prozenth/100*40);
	document.getElementById("meldungen").style.width=w+"px";
	document.getElementById("meldungen").style.height=h+"px";
	if ((w<maxw || h<maxh) && document.getElementById("meldungen").style.display!="none") setTimeout('meldung_resize(' + w + ', ' + h + ')', 20);
}
function meldung_move(right,lasttext){
	xkoordinate=(15+abstand+_xmouse);
	if (right) xkoordinate=_xmouse-document.getElementById("meldungen_content").offsetWidth-abstand-30;
	document.getElementById("meldungen").style.left=xkoordinate+"px";
	document.getElementById("meldungen").style.top=(15+abstand+_ymouse)+"px";
	if (document.getElementById("meldungen").style.display!="none" && lasttext==lastsavedtext){
		setTimeout(function(){ meldung_move(right,lasttext); },10);
	}
}
function meldung_aus(){
	meldung_ausschalten=setTimeout('document.getElementById("meldungen").style.display="none"',10);
}
function loadJavaScript(){
	for (i=0;i<arguments.length;i++){
		var newScriptFile = document.createElement("script");
		newScriptFile.type = "text/javascript";
		newScriptFile.src = arguments[i];
		document.body.appendChield(newScriptFile);
	}
}
function switchContainer(){
	if (document.getElementById(arguments[0]) && document.getElementById(arguments[0]).style.display=="none"){
		for (i=0;i<arguments.length;i++){
			if(document.getElementById(arguments[i])){
				document.getElementById(arguments[i]).style.display="block";
				document.getElementById(arguments[i]).style.height="1px";
				Tween(document.getElementById(arguments[i]), "height", 1, document.getElementById(arguments[i]+"Inner").offsetHeight, 10, -1, "setOnAuto");
				Tween(document.getElementById(arguments[i]), "alpha", 1, 100, 10, -1);
			}
		}
	}else{
		for (i=0;i<arguments.length;i++){
			if(document.getElementById(arguments[i])){
				Tween(document.getElementById(arguments[i]), "height", document.getElementById(arguments[i]+"Inner").offsetHeight, 1, 10, -1, "hideObject");
				Tween(document.getElementById(arguments[i]), "alpha", 100, 1, 10, -1);
			}
		}
	}
}

// Textarea-Converter (bbcodes-reader) mit BBCodes
function MiniWysiwygInsert(type, value, title, code, element) {
	if (element==0){
		if (document.getElementsByName("text")[0]){
			element=document.getElementsByName("text")[0];
		}else if(document.getElementsByName("message")[0]){
			element=document.getElementsByName("message")[0];
		}else{
			return;
		}
	}
	if (type=="smiley"){
		AutoItTextareaInsertCode(element.name," "+code+" ","");
	}else if(type="attachment"){
		AutoItTextareaInsertCode(element.name,"[attach]"+value+"[/attach]","");
	}else{
		alert("Die Funktion: "+type+" einfuegen ist noch nicht moeglich.");return;
	}
	document.getElementsByName('t_'+element.name)[0].value=element.value;
	document.getElementsByName(element.name+'_previewform')[0].submit();
}
function searchAutoItTextfields(){
	i=0;
	while (true){
		if (document.getElementsByTagName("textarea")[i]!=undefined){
			if (document.getElementsByTagName("textarea")[i].getAttribute("bbcodes")){
				if (document.getElementsByTagName("textarea")[i].getAttribute("bbcodes").indexOf("|")>-1){ bbcodes=document.getElementsByTagName("textarea")[i].getAttribute("bbcodes").split("|");
				}else{ bbcodes[0]=document.getElementsByTagName("textarea")[i].getAttribute("bbcodes"); }
				bbcodetabs="";smiley=0;
				if (bbcodes.indexOf("smilie")>-1||bbcodes.indexOf("smiley")>-1) smiley=1;
				for (i2=0;i2<bbcodes.length;i2++){
					if (bbcodes[i2].length>0){
						switch(bbcodes[i2]){
							case "sep": bbcodetabs+='<td><img src="wcf/icon/wysiwyg/separatorM.png" style="padding:3px;" alt="" /></td>';break;
							case "b": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'Fette Schrift (Bold)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[b]\', \'[/b]\');" src="wcf/icon/wysiwyg/fontStyleBoldM.png" alt="" /></td>';break;
							case "u": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'Unterstrichene Schrift (Underline)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[u]\', \'[/u]\');" src="wcf/icon/wysiwyg/fontStyleUnderlineM.png" alt="" /></td>';break;
							case "i": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'Kursive Schrift (Italic)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[i]\', \'[/i]\');" src="wcf/icon/wysiwyg/fontStyleItalicM.png" alt="" /></td>';break;
							case "s": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'Durchgestrichene Schrift (Strikethrough)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[s]\', \'[/s]\');" src="wcf/icon/wysiwyg/fontStyleStriketroughM.png" alt="" /></td>';break;
							case "url": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'Link einf&uuml;gen (URL)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[url]\', \'[/url]\');" src="wcf/icon/wysiwyg/linkInsertM.png" alt="" /></td>';break;
							case "img": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'Bild einf&uuml;gen (IMG)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[img]\', \'[/img]\');" src="wcf/icon/wysiwyg/insertImageM.png" alt="" /></td>';break;
							case "autoit": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'AutoIt-Box (AutoIt-Highlighter)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[autoit]\', \'[/autoit]\');" src="wcf/icon/wysiwyg/autoit.png" alt="" /></td>';break;
							case "h": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'&Uuml;berschrift einf&uuml;gen (Headline)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[h]\', \'[/h]\');" src="wcf/icon/wysiwyg/headlineM.png" alt="" /></td>';break;
							case "alignleft": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'Linksb&uuml;ndig (Align:Left)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[align=left]\', \'[/align]\');" src="wcf/icon/wysiwyg/textAlignLeftM.png" alt="" /></td>';break;
							case "aligncenter": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'Linksb&uuml;ndig (Align:Left)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[align=center]\', \'[/align]\');" src="wcf/icon/wysiwyg/textAlignCenterM.png" alt="" /></td>';break;
							case "alignright": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'Linksb&uuml;ndig (Align:Left)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[align=right]\', \'[/align]\');" src="wcf/icon/wysiwyg/textAlignRightM.png" alt="" /></td>';break;
							case "alignjustify": bbcodetabs+='<td><img class="autoitbbcodetabsbutton message" onmouseover="meldung_ein(\'Linksb&uuml;ndig (Align:Left)\');" onmouseout="meldung_aus();" onclick="AutoItTextareaInsertCode(\''+document.getElementsByTagName("textarea")[i].name+'\', \'[align=justify]\', \'[/align]\');" src="wcf/icon/wysiwyg/textJustifyM.png" alt="" /></td>';break;
						}
					}
				}
				document.getElementsByTagName("textarea")[i].style.width="99%";
				if (document.getElementsByName(document.getElementsByTagName("textarea")[i].name+"_box")[0]){
					frame='<iframe src="" align="center" style="background-color:white;display:none;width:100%;height:245px" name="'+document.getElementsByTagName("textarea")[i].name+'_previewframe" frameborder="0"></iframe>';
					smilies="";
					if (smiley){
						smilies='<div id="smileyContainer" align="center"><ul class="smileys" id="smileyCategory-0"><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/smile.png\', \'smile\', \':)\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/smile.png" alt="" title="smile" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/sad.png\', \'sad\', \':(\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/sad.png" alt="" title="sad" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/wink.png\', \'wink\', \';)\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/wink.png" alt="" title="wink" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/tongue.png\', \'tongue\', \':P\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/tongue.png" alt="" title="tongue" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/cool.png\', \'Cool\', \'8)\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/cool.png" alt="" title="Cool" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/biggrin.png\', \'biggrin\', \':D\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/biggrin.png" alt="" title="biggrin" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/squint.png\', \'squint\', \'^^\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/squint.png" alt="" title="squint" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/crying.png\', \'crying\', \';(\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/crying.png" alt="" title="crying" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/rolleyes.png\', \'rolleyes\', \':rolleyes:\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/rolleyes.png" alt="" title="rolleyes" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/huh.png\', \'Huh\', \':huh:\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/huh.png" alt="" title="Huh" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/unsure.png\', \'unsure\', \':S\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/unsure.png" alt="" title="unsure" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/angry.png\', \'angry\', \'X(\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/angry.png" alt="" title="angry" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/blink.png\', \'blink\', \'8|\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/blink.png" alt="" title="blink" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/confused.png\', \'confused\', \'?(\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/confused.png" alt="" title="confused" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/cursing.png\', \'cursing\', \':cursing:\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/cursing.png" alt="" title="cursing" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/mellow.png\', \'mellow\', \':|\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/mellow.png" alt="" title="mellow" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/thumbdown.png\', \'thumbdown\', \':thumbdown:\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/thumbdown.png" alt="" title="thumbdown" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/thumbsup.png\', \'thumbsup\', \':thumbsup:\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/thumbsup.png" alt="" title="thumbsup" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/thumbup.png\', \'thumbup\', \':thumbup:\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/thumbup.png" alt="" title="thumbup" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/w00t.png\', \'w00t\', \'8o\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/w00t.png" alt="" title="w00t" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/pinch.png\', \'pinch\', \':pinch:\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/pinch.png" alt="" title="pinch" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/sleeping.png\', \'sleeping\', \':sleeping:\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/sleeping.png" alt="" title="sleeping" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/wacko.png\', \'wacko\', \':wacko:\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/wacko.png" alt="" title="wacko" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/whistling.png\', \'whistling\', \':whistling:\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/whistling.png" alt="" title="whistling" /></li><li><img onmouseover="this.style.cursor=\'pointer\'" onclick="MiniWysiwygInsert(\'smiley\', \'wcf/images/smilies/evil.png\', \'evil\', \':evil:\', document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0]);" src="wcf/images/smilies/evil.png" alt="" title="evil" /></li></ul></div>';
					}
					document.getElementsByName(document.getElementsByTagName("textarea")[i].name+"_box")[0].innerHTML='<div style="padding:0px;" class="message"><div style="margin:0px;background:url(wcf/images/AutoIt.At/tabActive.png) repeat-x #366D99;border:1px solid white;height:100%;padding:3px" class="message">'+document.getElementsByName(document.getElementsByTagName("textarea")[i].name+"_box")[0].innerHTML+frame+smilies+'</div></div>';
					document.getElementsByName(document.getElementsByTagName("textarea")[i].name+"_box")[0].className="message";
					document.getElementsByName(document.getElementsByTagName("textarea")[i].name+"_box")[0].style.width="100%";
					document.getElementsByName(document.getElementsByTagName("textarea")[i].name+"_box")[0].style.display="block";
					document.getElementsByName(document.getElementsByTagName("textarea")[i].name+"_box")[0].style.border="1px solid transparent";
				}
				if (document.getElementsByName(document.getElementsByTagName("textarea")[i].name+"_bbcodes")[0]){
					document.getElementsByName(document.getElementsByTagName("textarea")[i].name+"_bbcodes")[0].style.display="block";
					document.getElementsByName(document.getElementsByTagName("textarea")[i].name+"_bbcodes")[0].style.display="block";
					if (bbcodetabs.length>0){
						bbcodetabs+='<td width="100%" align="right">'+
						'<form method="post" action="/AutoIt/preview.php?tname='+
						document.getElementsByTagName("textarea")[i].name+'" name="'+
						document.getElementsByTagName("textarea")[i].name+
						'_previewform" target="'+document.getElementsByTagName("textarea")[i].name+
						'_previewframe"><input type="hidden" name="t_'+
						document.getElementsByTagName("textarea")[i].name+'" value="" /><span name="'+
						document.getElementsByTagName("textarea")[i].name+
						'_openframe" onclick="document.getElementsByName(\'t_'+document.getElementsByTagName("textarea")[i].name+'\')[0].value=document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0].value;'+
						'document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'_previewform\')[0].submit();document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'_openframe\')[0].style.display=\'none\';document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'_closeframe\')[0].style.display=\'inline\';document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0].style.display=\'none\';document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'_previewframe\')[0].style.display=\'block\';"><img src="/icon/previewM.png" alt="" onmouseover="meldung_ein(\'Vorschau der Eingabe ansehen (BBCodes und Smilies)\',1);" onmouseout="meldung_aus();" /></span><span name="'+document.getElementsByTagName("textarea")[i].name+'_closeframe" onclick="document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'_previewframe\')[0].style.display=\'none\';document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'_previewframe\')[0].src=\'AutoIt/preview.php?stopp\';document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'\')[0].style.display=\'block\';document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'_closeframe\')[0].style.display=\'none\';document.getElementsByName(\''+document.getElementsByTagName("textarea")[i].name+'_openframe\')[0].style.display=\'inline\';" style="display:none;"><img src="/icon/closepreviewM.png" alt="" onmouseover="meldung_ein(\'Vorschau beenden und wieder zur Bearbeitung zur&uuml;ckkehren.\',1);" onmouseout="meldung_aus();" /></span></form></td>';
						document.getElementsByName(document.getElementsByTagName("textarea")[i].name+"_bbcodes")[0].innerHTML='<table style="margin:0px;padding:0px;"><tr>'+bbcodetabs+'</tr></table>';
					}
				}
			}
			i++;
		}else{
			break;
		}
	}
}

function AutoItTextareaInsertCode(elementName,aTag,eTag){
  element=document.getElementsByName(elementName)[0];
  element.focus();
  if(typeof document.selection != 'undefined') {
    var range = document.selection.createRange();
    var insText = range.text;
    range.text = aTag + insText + eTag;
    range = document.selection.createRange();
    if (insText.length == 0) {
      range.move('character', -eTag.length);
    } else {
      range.moveStart('character', aTag.length + insText.length + eTag.length);      
    }
    range.select();
  }
  else if(typeof element.selectionStart != 'undefined')
  {
    var start = element.selectionStart;
    var end = element.selectionEnd;
	if (element.style.display=="none") {
		start=element.value.length;
		end=element.value.length;
	}
    var insText = element.value.substring(start, end);
    element.value = element.value.substr(0, start) + aTag + insText + eTag + element.value.substr(end);
    var pos;
    if (insText.length == 0) {
      pos = start + aTag.length;
    } else {
      pos = start + aTag.length + insText.length + eTag.length;
    }
    element.selectionStart = pos;
    element.selectionEnd = pos;
  }
  else
  {
    var pos;
    var re = new RegExp('^[0-9]{0,3}$');
    while(!re.test(pos)) {
      pos = prompt("Einfügen an Position (0.." + element.value.length + "):", "0");
    }
    if(pos > element.value.length) {
      pos = element.value.length;
    }
    var insText = prompt("Bitte geben Sie den zu formatierenden Text ein:");
    element.value = element.value.substr(0, pos) + aTag + insText + eTag + element.value.substr(pos);
  }
}

function removeComment(commentID){
	new Image().src="/index.php?removeComment="+commentID;
	document.getElementById("comment"+commentID).style.display="none";
	document.getElementById("comment"+commentID+"info").style.display="block";
}
function Tween(obj,type,from,to,speed,last,endfunc,isID,maxdif,tweenname){
	if (!isID) isID=0;
	if (!maxdif) maxdif=0;
	var durchschnitt = Math.round(((to+from)/2)*100)/100;
	if (maxdif>0 && (durchschnitt-from)>maxdif) durchschnitt=maxdif+from;
	if(last==-1 || !last){
		if (endfunc=='pastebinsidebaron'){
			document.getElementById("sidebartd").style.display="";document.getElementById("sidebaronbutton").style.display="none";
		}else if(endfunc=='pastebinsidebaroff'){
			document.getElementById("sidebaronbutton").style.display="";
		}
		durchschnitt=from;
	}
	objID=0;
	if (isID){ objID=obj;obj=document.getElementById(objID); }else if(obj.id){ objID=obj.id; }
	if (last==durchschnitt) durchschnitt=to;
	if (type=="width"){
		obj.style.width=durchschnitt+'px';
	}else if(type=="height"){
		obj.style.height=durchschnitt+'px';
	}else if(type=="top"){
		obj.style.top=durchschnitt+'px';
	}else if(type=="left"){
		obj.style.left=durchschnitt+'px';
	}else if(type=="right"){
		obj.style.right=durchschnitt+'px';
	}else if(type=="bottom"){
		obj.style.bottom=durchschnitt+'px';
	}else if(type=="alpha"){
		_alpha(obj,durchschnitt);
	}else if(type=="zoom"){
		obj.style.zoom=durchschnitt;
		//obj.style.MozTransform="scale("+durchschnitt+")";
	}
	if (isID){ obj=objID; }
	if (to!=durchschnitt){
		if (typeof(tweenname)!="undefined" && objID && cleartweens.indexOf(tweenname+",")>-1) {
			while (cleartweens.indexOf(tweenname+",")>-1){
				cleartweens=cleartweens.replace(tweenname+",","");
			}
		}else{
			setTimeout(function(){ Tween(obj,type,durchschnitt,to,speed,durchschnitt,endfunc,isID) }, speed);
		}
	}else{
		switch (endfunc){
			case 'pastebinsidebaroff':
				document.getElementById("sidebartd").style.display="none";
				break;
			case 'newentryalpha':
				Tween(document.getElementById("newestWhatsUpEntry"),"alpha",1,100,100,-1,'setNewEntryReadyTrue');
				break;
			case 'setNewEntryReadyTrue':
				document.getElementById("newestWhatsUpEntry").id="";
				addNewEntry_turn++;
				break;
			case 'removeLastEntryFromWhatsUpInfo':
				document.getElementById("whatsupEntries").removeChild(div.getElementsByTagName("div")[maxWhatsUpEntries]);
				break;
			case 'hideUserProfileField':
				document.getElementById("UserProfileField").style.display="none";
				break;
			case 'hideObject':
				obj.style.display="none";
				break;
			case 'setOnAuto':
				if (type=="width"){
					obj.style.width='auto';
				}else if(type=="height"){
					obj.style.height='auto';
				}else if(type=="top"){
					obj.style.top='auto';
				}else if(type=="left"){
					obj.style.left='auto';
				}else if(type=="right"){
					obj.style.right='auto';
				}else if(type=="bottom"){
					obj.style.bottom='auto';
				}else if(type=="zoom"){
					obj.style.zoom=1;
				}
				break;
		}
	}
}
addNewEntry_turn=0;
function newWhatsUpEntry(text,turn,skipwait){
	var div=document.getElementById("whatsupEntries");
	if (!div) return;
	if (text.indexOf("-")>-1){
		splitted=text.split("-");
		splitted[0]="";
		splitted[1]=splitted.join("-");
	}else{
		splitted=new Array("","");
	}
	
	if (skipwait){
		if (splitted[1].length<3){ setTimeout("checkForNewWhatsUpEntries()",10);return; }
		randomID="WhatsUpEntry"+Math.round(Math.random()*999999);
		newentry='<div id="'+randomID+'" style="overflow-y:hidden;height:1px">'+text+'</div>';
		div.innerHTML=newentry+div.innerHTML;
		_alpha(document.getElementById(randomID),1);
		Tween(randomID,"alpha",1,100,100,-1,-1,1);
		Tween(randomID,"height",1,20,100,-1,-1,1);
		if (document.getElementById("loadImage")){
			document.getElementById("loadImage").style.display="none";
		}
		addNewEntry_turn++;
	}else{
		if (addNewEntry_turn==turn){
			if (splitted[1].length<3){ setTimeout("checkForNewWhatsUpEntries()",10);return; }
			newentry='<div id="newestWhatsUpEntry" style="overflow-y:hidden;height:1px;display:none;">'+text+'</div>';
			div.innerHTML=newentry+div.innerHTML;
			_alpha(document.getElementById("newestWhatsUpEntry"),1);
			document.getElementById("newestWhatsUpEntry").style.display="";
			Tween(document.getElementById("newestWhatsUpEntry"),"height",1,20,100,-1,'newentryalpha');
			if (div.getElementsByTagName("div")[maxWhatsUpEntries]){
				Tween(div.getElementsByTagName("div")[maxWhatsUpEntries],"alpha",100,1,100,-1);
				Tween(div.getElementsByTagName("div")[maxWhatsUpEntries],"height",20,1,100,-1,'removeLastEntryFromWhatsUpInfo');
			}
		}else{
			setTimeout("newWhatsUpEntry(unescape(\""+escape(text)+"\"),"+turn+")","10");
		}
	}
}
function checkForNewWhatsUpEntries(){
	ajaxRequest.openPost('index.php','newWhatsUpEntries=1',function(){ if(this.readyState==4){ callBackWhatsUpEntry(this.responseText); } });
}
function callBackWhatsUpEntry(lastLoadedID){
	if (lastLoadedID>lastWhatsUpEntryID){
		ajaxRequest.openPost('index.php','newWhatsUpEntries=1&lastEntry='+lastWhatsUpEntryID,function(){ if(this.readyState==4){ if(this.responseText.length>0) newWhatsUpEntry(this.responseText, addNewEntry_turn,0); } });
		lastWhatsUpEntryID++;
	}
}

Encoder = {
	EncodeType : "entity",

	isEmpty : function(val){
		if(val){
			return ((val===null) || val.length==0 || /^\s+$/.test(val));
		}else{
			return true;
		}
	},
	HTML2Numerical : function(s){
		var arr1 = new Array('&nbsp;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&shy;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&sup1;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&agrave;','&aacute;','&acirc;','&atilde;','&Auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&Ouml;','&times;','&oslash;','&ugrave;','&uacute;','&ucirc;','&Uuml;','&yacute;','&thorn;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;','&quot;','&amp;','&lt;','&gt;','&oelig;','&oelig;','&scaron;','&scaron;','&yuml;','&circ;','&tilde;','&ensp;','&emsp;','&thinsp;','&zwnj;','&zwj;','&lrm;','&rlm;','&ndash;','&mdash;','&lsquo;','&rsquo;','&sbquo;','&ldquo;','&rdquo;','&bdquo;','&dagger;','&dagger;','&permil;','&lsaquo;','&rsaquo;','&euro;','&fnof;','&alpha;','&beta;','&gamma;','&delta;','&epsilon;','&zeta;','&eta;','&theta;','&iota;','&kappa;','&lambda;','&mu;','&nu;','&xi;','&omicron;','&pi;','&rho;','&sigma;','&tau;','&upsilon;','&phi;','&chi;','&psi;','&omega;','&alpha;','&beta;','&gamma;','&delta;','&epsilon;','&zeta;','&eta;','&theta;','&iota;','&kappa;','&lambda;','&mu;','&nu;','&xi;','&omicron;','&pi;','&rho;','&sigmaf;','&sigma;','&tau;','&upsilon;','&phi;','&chi;','&psi;','&omega;','&thetasym;','&upsih;','&piv;','&bull;','&hellip;','&prime;','&prime;','&oline;','&frasl;','&weierp;','&image;','&real;','&trade;','&alefsym;','&larr;','&uarr;','&rarr;','&darr;','&harr;','&crarr;','&larr;','&uarr;','&rarr;','&darr;','&harr;','&forall;','&part;','&exist;','&empty;','&nabla;','&isin;','&notin;','&ni;','&prod;','&sum;','&minus;','&lowast;','&radic;','&prop;','&infin;','&ang;','&and;','&or;','&cap;','&cup;','&int;','&there4;','&sim;','&cong;','&asymp;','&ne;','&equiv;','&le;','&ge;','&sub;','&sup;','&nsub;','&sube;','&supe;','&oplus;','&otimes;','&perp;','&sdot;','&lceil;','&rceil;','&lfloor;','&rfloor;','&lang;','&rang;','&loz;','&spades;','&clubs;','&hearts;','&diams;');
		var arr2 = new Array('&#160;','&#161;','&#162;','&#163;','&#164;','&#165;','&#166;','&#167;','&#168;','&#169;','&#170;','&#171;','&#172;','&#173;','&#174;','&#175;','&#176;','&#177;','&#178;','&#179;','&#180;','&#181;','&#182;','&#183;','&#184;','&#185;','&#186;','&#187;','&#188;','&#189;','&#190;','&#191;','&#192;','&#193;','&#194;','&#195;','&#196;','&#197;','&#198;','&#199;','&#200;','&#201;','&#202;','&#203;','&#204;','&#205;','&#206;','&#207;','&#208;','&#209;','&#210;','&#211;','&#212;','&#213;','&#214;','&#215;','&#216;','&#217;','&#218;','&#219;','&#220;','&#221;','&#222;','&#223;','&#224;','&#225;','&#226;','&#227;','&#228;','&#229;','&#230;','&#231;','&#232;','&#233;','&#234;','&#235;','&#236;','&#237;','&#238;','&#239;','&#240;','&#241;','&#242;','&#243;','&#244;','&#245;','&#246;','&#247;','&#248;','&#249;','&#250;','&#251;','&#252;','&#253;','&#254;','&#255;','&#34;','&#38;','&#60;','&#62;','&#338;','&#339;','&#352;','&#353;','&#376;','&#710;','&#732;','&#8194;','&#8195;','&#8201;','&#8204;','&#8205;','&#8206;','&#8207;','&#8211;','&#8212;','&#8216;','&#8217;','&#8218;','&#8220;','&#8221;','&#8222;','&#8224;','&#8225;','&#8240;','&#8249;','&#8250;','&#8364;','&#402;','&#913;','&#914;','&#915;','&#916;','&#917;','&#918;','&#919;','&#920;','&#921;','&#922;','&#923;','&#924;','&#925;','&#926;','&#927;','&#928;','&#929;','&#931;','&#932;','&#933;','&#934;','&#935;','&#936;','&#937;','&#945;','&#946;','&#947;','&#948;','&#949;','&#950;','&#951;','&#952;','&#953;','&#954;','&#955;','&#956;','&#957;','&#958;','&#959;','&#960;','&#961;','&#962;','&#963;','&#964;','&#965;','&#966;','&#967;','&#968;','&#969;','&#977;','&#978;','&#982;','&#8226;','&#8230;','&#8242;','&#8243;','&#8254;','&#8260;','&#8472;','&#8465;','&#8476;','&#8482;','&#8501;','&#8592;','&#8593;','&#8594;','&#8595;','&#8596;','&#8629;','&#8656;','&#8657;','&#8658;','&#8659;','&#8660;','&#8704;','&#8706;','&#8707;','&#8709;','&#8711;','&#8712;','&#8713;','&#8715;','&#8719;','&#8721;','&#8722;','&#8727;','&#8730;','&#8733;','&#8734;','&#8736;','&#8743;','&#8744;','&#8745;','&#8746;','&#8747;','&#8756;','&#8764;','&#8773;','&#8776;','&#8800;','&#8801;','&#8804;','&#8805;','&#8834;','&#8835;','&#8836;','&#8838;','&#8839;','&#8853;','&#8855;','&#8869;','&#8901;','&#8968;','&#8969;','&#8970;','&#8971;','&#9001;','&#9002;','&#9674;','&#9824;','&#9827;','&#9829;','&#9830;');
		return this.swapArrayVals(s,arr1,arr2);
	},
	NumericalToHTML : function(s){
		var arr1 = new Array('&#160;','&#161;','&#162;','&#163;','&#164;','&#165;','&#166;','&#167;','&#168;','&#169;','&#170;','&#171;','&#172;','&#173;','&#174;','&#175;','&#176;','&#177;','&#178;','&#179;','&#180;','&#181;','&#182;','&#183;','&#184;','&#185;','&#186;','&#187;','&#188;','&#189;','&#190;','&#191;','&#192;','&#193;','&#194;','&#195;','&#196;','&#197;','&#198;','&#199;','&#200;','&#201;','&#202;','&#203;','&#204;','&#205;','&#206;','&#207;','&#208;','&#209;','&#210;','&#211;','&#212;','&#213;','&#214;','&#215;','&#216;','&#217;','&#218;','&#219;','&#220;','&#221;','&#222;','&#223;','&#224;','&#225;','&#226;','&#227;','&#228;','&#229;','&#230;','&#231;','&#232;','&#233;','&#234;','&#235;','&#236;','&#237;','&#238;','&#239;','&#240;','&#241;','&#242;','&#243;','&#244;','&#245;','&#246;','&#247;','&#248;','&#249;','&#250;','&#251;','&#252;','&#253;','&#254;','&#255;','&#34;','&#38;','&#60;','&#62;','&#338;','&#339;','&#352;','&#353;','&#376;','&#710;','&#732;','&#8194;','&#8195;','&#8201;','&#8204;','&#8205;','&#8206;','&#8207;','&#8211;','&#8212;','&#8216;','&#8217;','&#8218;','&#8220;','&#8221;','&#8222;','&#8224;','&#8225;','&#8240;','&#8249;','&#8250;','&#8364;','&#402;','&#913;','&#914;','&#915;','&#916;','&#917;','&#918;','&#919;','&#920;','&#921;','&#922;','&#923;','&#924;','&#925;','&#926;','&#927;','&#928;','&#929;','&#931;','&#932;','&#933;','&#934;','&#935;','&#936;','&#937;','&#945;','&#946;','&#947;','&#948;','&#949;','&#950;','&#951;','&#952;','&#953;','&#954;','&#955;','&#956;','&#957;','&#958;','&#959;','&#960;','&#961;','&#962;','&#963;','&#964;','&#965;','&#966;','&#967;','&#968;','&#969;','&#977;','&#978;','&#982;','&#8226;','&#8230;','&#8242;','&#8243;','&#8254;','&#8260;','&#8472;','&#8465;','&#8476;','&#8482;','&#8501;','&#8592;','&#8593;','&#8594;','&#8595;','&#8596;','&#8629;','&#8656;','&#8657;','&#8658;','&#8659;','&#8660;','&#8704;','&#8706;','&#8707;','&#8709;','&#8711;','&#8712;','&#8713;','&#8715;','&#8719;','&#8721;','&#8722;','&#8727;','&#8730;','&#8733;','&#8734;','&#8736;','&#8743;','&#8744;','&#8745;','&#8746;','&#8747;','&#8756;','&#8764;','&#8773;','&#8776;','&#8800;','&#8801;','&#8804;','&#8805;','&#8834;','&#8835;','&#8836;','&#8838;','&#8839;','&#8853;','&#8855;','&#8869;','&#8901;','&#8968;','&#8969;','&#8970;','&#8971;','&#9001;','&#9002;','&#9674;','&#9824;','&#9827;','&#9829;','&#9830;');
		var arr2 = new Array('&nbsp;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&shy;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&sup1;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&agrave;','&aacute;','&acirc;','&atilde;','&Auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&Ouml;','&times;','&oslash;','&ugrave;','&uacute;','&ucirc;','&Uuml;','&yacute;','&thorn;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;','&quot;','&amp;','&lt;','&gt;','&oelig;','&oelig;','&scaron;','&scaron;','&yuml;','&circ;','&tilde;','&ensp;','&emsp;','&thinsp;','&zwnj;','&zwj;','&lrm;','&rlm;','&ndash;','&mdash;','&lsquo;','&rsquo;','&sbquo;','&ldquo;','&rdquo;','&bdquo;','&dagger;','&dagger;','&permil;','&lsaquo;','&rsaquo;','&euro;','&fnof;','&alpha;','&beta;','&gamma;','&delta;','&epsilon;','&zeta;','&eta;','&theta;','&iota;','&kappa;','&lambda;','&mu;','&nu;','&xi;','&omicron;','&pi;','&rho;','&sigma;','&tau;','&upsilon;','&phi;','&chi;','&psi;','&omega;','&alpha;','&beta;','&gamma;','&delta;','&epsilon;','&zeta;','&eta;','&theta;','&iota;','&kappa;','&lambda;','&mu;','&nu;','&xi;','&omicron;','&pi;','&rho;','&sigmaf;','&sigma;','&tau;','&upsilon;','&phi;','&chi;','&psi;','&omega;','&thetasym;','&upsih;','&piv;','&bull;','&hellip;','&prime;','&prime;','&oline;','&frasl;','&weierp;','&image;','&real;','&trade;','&alefsym;','&larr;','&uarr;','&rarr;','&darr;','&harr;','&crarr;','&larr;','&uarr;','&rarr;','&darr;','&harr;','&forall;','&part;','&exist;','&empty;','&nabla;','&isin;','&notin;','&ni;','&prod;','&sum;','&minus;','&lowast;','&radic;','&prop;','&infin;','&ang;','&and;','&or;','&cap;','&cup;','&int;','&there4;','&sim;','&cong;','&asymp;','&ne;','&equiv;','&le;','&ge;','&sub;','&sup;','&nsub;','&sube;','&supe;','&oplus;','&otimes;','&perp;','&sdot;','&lceil;','&rceil;','&lfloor;','&rfloor;','&lang;','&rang;','&loz;','&spades;','&clubs;','&hearts;','&diams;');
		return this.swapArrayVals(s,arr1,arr2);
	},
	numEncode : function(s){
		
		if(this.isEmpty(s)) return "";

		var e = "";
		for (var i = 0; i < s.length; i++)
		{
			var c = s.charAt(i);
			if (c < " " || c > "~")
			{
				c = "&#" + c.charCodeAt() + ";";
			}
			e += c;
		}
		return e;
	},
	htmlDecode : function(s){

		var c,m,d = s;
		
		if(this.isEmpty(d)) return "";
		d = this.HTML2Numerical(d);
		arr=d.match(/&#[0-9]{1,5};/g);
		if(arr!=null){
			for(var x=0;x<arr.length;x++){
				m = arr[x];
				c = m.substring(2,m.length-1);
				if(c >= -32768 && c <= 65535){
					d = d.replace(m, String.fromCharCode(c));
				}else{
					d = d.replace(m, "");
				}
			}			
		}

		return d;
	},		
	htmlEncode : function(s,dbl){
		if(this.isEmpty(s)) return "";
		dbl = dbl | false;
		if(dbl){
			if(this.EncodeType=="numerical"){
				s = s.replace(/&/g, "&#38;");
			}else{
				s = s.replace(/&/g, "&amp;");
			}
		}
		s = this.XSSEncode(s,false);
		
		if(this.EncodeType=="numerical" || !dbl){
			s = this.HTML2Numerical(s);
		}
		s = this.numEncode(s);
		if(!dbl){
			s = s.replace(/&#/g,"##AMPHASH##");
		
			if(this.EncodeType=="numerical"){
				s = s.replace(/&/g, "&#38;");
			}else{
				s = s.replace(/&/g, "&amp;");
			}

			s = s.replace(/##AMPHASH##/g,"&#");
		}
		s = s.replace(/&#\d*([^\d;]|$)/g, "$1");

		if(!dbl){
			s = this.correctEncoding(s);
		}
		if(this.EncodeType=="entity"){
			s = this.NumericalToHTML(s);
		}

		return s;					
	},
	XSSEncode : function(s,en){
		if(!this.isEmpty(s)){
			en = en || true;
			if(en){
				s = s.replace(/\'/g,"&#39;");
				s = s.replace(/\"/g,"&quot;");
				s = s.replace(/</g,"&lt;");
				s = s.replace(/>/g,"&gt;");
			}else{
				s = s.replace(/\'/g,"&#39;");
				s = s.replace(/\"/g,"&#34;");
				s = s.replace(/</g,"&#60;");
				s = s.replace(/>/g,"&#62;");
			}
			return s;
		}else{
			return "";
		}
	},
	hasEncoded : function(s){
		if(/&#[0-9]{1,5};/g.test(s)){
			return true;
		}else if(/&[A-Z]{2,6};/gi.test(s)){
			return true;
		}else{
			return false;
		}
	},
	stripUnicode : function(s){
		return s.replace(/[^\x20-\x7E]/g,"");
		
	},
	correctEncoding : function(s){
		return s.replace(/(&amp;)(amp;)+/,"$1");
	},
	swapArrayVals : function(s,arr1,arr2){
		if(this.isEmpty(s)) return "";
		var re;
		if(arr1 && arr2){
			if(arr1.length == arr2.length){
				for(var x=0,i=arr1.length;x<i;x++){
					re = new RegExp(arr1[x], 'g');
					s = s.replace(re,arr2[x]);
				}
			}
		}
		return s;
	},

	inArray : function( item, arr ) {
		for ( var i = 0, x = arr.length; i < x; i++ ){
			if ( arr[i] === item ){
				return i;
			}
		}
		return -1;
	}

}

var ZeroClipboard = {
	clients: {},
	moviePath: 'clipboard',
	nextId: 1,
	$: function(thingy) {
		if (typeof(thingy) == 'string') thingy = document.getElementById(thingy);
		if (!thingy.addClass) {
			thingy.hide = function() { this.style.display = 'none'; };
			thingy.show = function() { this.style.display = ''; };
			thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; };
			thingy.removeClass = function(name) {
				this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, '');
			};
			thingy.hasClass = function(name) {
				return !!this.className.match( new RegExp("\\s*" + name + "\\s*") );
			}
		}
		return thingy;
	},
	
	setMoviePath: function(path) {
		this.moviePath = path;
	},
	
	dispatch: function(id, eventName, args) {	
		var client = this.clients[id];
		if (client) {
			client.receiveEvent(eventName, args);
		}
	},
	
	register: function(id, client) {
		this.clients[id] = client;
	},
	
	getDOMObjectPosition: function(obj) {
		var info = {
			left: 0, 
			top: 0, 
			width: "16px",
			height: "16px"
		};

		while (obj) {
			info.left += obj.offsetLeft;
			info.top += obj.offsetTop;
			obj = obj.offsetParent;
		}

		return info;
	},
	
	Client: function(elem) {
		this.handlers = {};
		this.id = ZeroClipboard.nextId++;
		this.movieId = 'ZeroClipboardMovie_' + this.id;
		ZeroClipboard.register(this.id, this);
		if (elem) this.glue(elem);
	}
};
ZeroClipboard.Client.prototype = {
	id: 0,
	ready: false,
	movie: null,
	clipText: '',
	clipVars: 0,
	handCursorEnabled: true,
	cssEffects: true,
	handlers: null,
	glue: function(elem) {
		this.domElement = ZeroClipboard.$(elem);
		var zIndex = 99;
		if (this.domElement.style.zIndex) {
			zIndex = parseInt(this.domElement.style.zIndex) + 1;
		}
		var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
		var id = "clip"+(Math.random()*999999999);
		this.div = document.createElement('div');
		this.div.id = id;
		var style = this.div.style;
		style.position = (typeof(setFlashPosition)!="undefined"?setFlashPosition:'absolute');
		
		if (box.left>0) {
			style.left = '' + box.left + 'px';
			style.top = '' + box.top + 'px';
		}else{
			// Falls z.B. versteckt in einem Spoiler
			style.left = '-100px';
			style.top = '-100px';
		}
		style.zIndex = zIndex;
		var body = document.getElementsByTagName('body')[0];
		body.appendChild(this.div);
		setInterval(function(){ clip.refreshPosition(elem, id); },1000);
		if (this.domElement.getElementsByTagName("img")[0] && this.domElement.getElementsByTagName("img")[0].src.indexOf("copySourceDisabledS.png")>-1) this.domElement.getElementsByTagName("img")[0].src=this.domElement.getElementsByTagName("img")[0].src.replace("copySourceDisabledS.png","copySourceS.png");
		this.div.innerHTML = this.getHTML();
	},
	refreshPosition: function(elem,id){
		this.domElement = ZeroClipboard.$(elem);
		var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
		this.div = document.getElementById(id);
		if (box.left) {
			this.div.style.left = '' + box.left + 'px';
			this.div.style.top = '' + box.top + 'px';
		}else{
			// Falls z.B. versteckt in einem Spoiler
			this.div.style.left = '-100px';
			this.div.style.top = '-100px';
		}
	},
	getHTML: function() {
		var html = '';
		var flashvars = 'id=' + this.id + 
			'&width=16' +
			'&height=16';
		
		if (navigator.userAgent.match(/MSIE/)) {
			var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
			html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="16px" height="16px" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="movie" value="/AutoIt/'+ZeroClipboard.moviePath+'.swf" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
		}
		else {
			html += '<embed id="'+this.movieId+'" src="/AutoIt/'+ZeroClipboard.moviePath+'.swf" loop="false" menu="false" width="16px" height="16px" name="'+this.movieId+'" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
		}
		return html;
	},
	hide: function() {
		if (this.div) {
			this.div.style.left = '-2000px';
		}
	},
	show: function() {
		this.reposition();
	},
	reposition: function(elem) {
		if (elem) {
			this.domElement = ZeroClipboard.$(elem);
			if (!this.domElement) this.hide();
		}
		
		if (this.domElement && this.div) {
			var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
			var style = this.div.style;
			style.left = '' + box.left + 'px';
			style.top = '' + box.top + 'px';
		}
	},
	setVars: function(vars) {
		this.clipVars = vars;
	},
	setText: function(newText, delHTML) {
		if (delHTML) {
			newText = newText.replace(/<b> <\/b>/g, "<br />");
			newText=removeHTML(newText);
			newText=Encoder.htmlDecode(newText);
		}
		this.clipText = newText;
		if (this.ready) this.movie.setText(newText);
	},
	addEventListener: function(eventName, func) {
		eventName = eventName.toString().toLowerCase().replace(/^on/, '');
		if (!this.handlers[eventName]) this.handlers[eventName] = [];
		this.handlers[eventName].push(func);
	},
	setHandCursor: function(enabled) {
		this.handCursorEnabled = enabled;
		if (this.ready) this.movie.setHandCursor(enabled);
	},
	setCSSEffects: function(enabled) {
		this.cssEffects = !!enabled;
	},
	receiveEvent: function(eventName, args) {
		eventName = eventName.toString().toLowerCase().replace(/^on/, '');
		switch (eventName) {
			case 'load':
				this.movie = document.getElementById(this.movieId);
				if (!this.movie) {
					var self = this;
					setTimeout( function() { self.receiveEvent('load', null); }, 1 );
					return;
				}
				if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
					var self = this;
					setTimeout( function() { self.receiveEvent('load', null); }, 100 );
					this.ready = true;
					return;
				}
				
				this.ready = true;
				this.movie.setText( this.clipText );
				this.movie.setHandCursor( this.handCursorEnabled );
				break;
			
			case 'mouseover':
				meldung_ein("Quelltext in die Zwischenablage kopieren");
				if (this.domElement && this.cssEffects) {
					this.domElement.addClass('hover');
					if (this.recoverActive) this.domElement.addClass('active');
				}
				break;
			
			case 'mouseout':
				meldung_aus();
				if (this.domElement && this.cssEffects) {
					this.recoverActive = false;
					if (this.domElement.hasClass('active')) {
						this.domElement.removeClass('active');
						this.recoverActive = true;
					}
					this.domElement.removeClass('hover');
				}
				break;
			
			case 'mousedown':
				if (this.domElement && this.cssEffects) {
					this.domElement.addClass('active');
				}
				break;
			
			case 'mouseup':
				if (this.domElement && this.cssEffects) {
					this.domElement.removeClass('active');
					this.recoverActive = false;
				}
				meldung_aus();
				if (typeof(setBlendSourceArray[this.clipVars.replace("codeBoxGesamt","")])!="undefined"){
					Tween(document.getElementById(setBlendSourceArray[this.clipVars.replace("codeBoxGesamt","")]),"alpha",1,100,20,-1);
				}else if (typeof(setBlendSource)!="undefined"){
					Tween(document.getElementById(setBlendSource),"alpha",1,100,20,-1);
				}else if (typeof(setBlendSourceArray)!="undefined"){
					Tween(document.getElementById(setBlendSourceArray[this.domElement.id.replace("copybuttonOther","")]),"alpha",1,100,20,-1);
				}else if(this.clipVars && document.getElementById(this.clipVars)){
					Tween(document.getElementById(this.clipVars),"alpha",1,100,20,-1);
				}else{
					alert("Quelltext wurde erfolgreich in die Zwischenablage kopiert."+typeof(setBlendSourceArray));
				}
				break;
		}
		
		if (this.handlers[eventName]) {
			for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
				var func = this.handlers[eventName][idx];
				if (typeof(func) == 'function') {
					func(this, args);
				}
				else if ((typeof(func) == 'object') && (func.length == 2)) {
					func[0][ func[1] ](this, args);
				}
				else if (typeof(func) == 'string') {
					window[func](this, args);
				}
			}
		}
	}
	
};
function getPosition(element, type) {
	var x=0, y=0;
	while (typeof(element)=="object" && typeof(element.tagName)!="undefined") {
		y+=element.offsetTop;
		x+=element.offsetLeft;
		if (element.tagName.toUpperCase()=="BODY")
			element=0;
		if (typeof(element)=="object")
			if (typeof(element.offsetParent)=="object")
				element=element.offsetParent;
	}
	return (type?(type.toLowerCase()=='x'?x:y):x+'x'+y);
}
setInterval("setUserProfileLinks()","1000");
function setUserProfileLinks() {
	var i=0;
	while (document.getElementsByTagName("a")[i]) {
		if (!document.getElementsByTagName("a")[i].getAttribute("onmouseover") && document.getElementsByTagName("a")[i].href.indexOf("#")==-1 && document.getElementsByTagName("a")[i].href.match(/http\:\/\/www\.autoit\.at\/Benutzer([0-9]+)\_(.+)\.html/)) {
			if (!document.getElementsByTagName("a")[i].id){
				document.getElementsByTagName("a")[i].id='UserProfileLink'+(Math.random()*9999999);
			}
			document.getElementsByTagName("a")[i].setAttribute('onmouseover','showUserProfile("'+document.getElementsByTagName("a")[i].id+'")');
			document.getElementsByTagName("a")[i].setAttribute('onmouseout','hideUserProfile()');
		}
		i++;
	}
}
function showUserProfile(linkID,showField,content) {
	if (document.getElementById("UserProfileField")) {
		if (linkID && document.getElementById(linkID)) {
		if(showField && content && content.indexOf(" | ")>-1) {
		if (userprofilefieldajax) {
		cleartweens+='topUserProfile,';
		cleartweens+='alphaUserProfile,';
		content=content.split(" | ");
		userprofilefield=document.getElementById("UserProfileField");
		document.getElementById("userprofilefield_username").innerHTML=unescape(content[0]);
		document.getElementById("userprofilefieldcontent").innerHTML=unescape(content[1]);
		userprofilefield.style.left=getPosition(document.getElementById(linkID),'x')+'px';
		_alpha(userprofilefield,0);
		userprofilefield.style.display='block';
		topposition=getPosition(document.getElementById(linkID),'y');
		if ((topposition-userprofilefield.offsetHeight)<document.body.scrollTop) {
			document.getElementById("userprofilefieldTop").style.display='none';
			document.getElementById("userprofilefieldBottom").style.display='block';
			endtoppos=(topposition+document.getElementById(linkID).offsetHeight);
			prevendtoppos=endtoppos+20;
		} else {
			document.getElementById("userprofilefieldBottom").style.display='none';
			document.getElementById("userprofilefieldTop").style.display='block';
			endtoppos=(topposition-userprofilefield.offsetHeight);
			prevendtoppos=endtoppos-20;
		}
		Tween(userprofilefield,'alpha',5,90,50,-1,-1,0,1);
		Tween(userprofilefield,'top',prevendtoppos,endtoppos,50,-1,-1,0,1);
		}
		}else{
			userprofilefieldajax=1;
			ajaxRequest.openPost(
				'AutoIt/loadUserDetails.php',
				'link='+encodeURIComponent(document.getElementById(linkID).href),
				function(){
					if(this.readyState==4 && userprofilefieldajax && this.responseText.length>0){
						userprofilefieldtimeout=setTimeout("showUserProfile(\""+linkID+"\",1,\""+this.responseText+"\")",1000);
					}
				}
			);
		}
		}
	}else{
		var userprofilefield = document.createElement('div');
		userprofilefield.style.position='absolute';
		userprofilefield.style.display='none';
		userprofilefield.id='UserProfileField';
		userprofilefield.style.zIndex='10000';
		userprofilefield.innerHTML='<div id="userprofilefieldBottom" style="display:none;width:31px;height:16px;background:url(images/bottomleft.png) no-repeat;margin-left:5px;"></div>'+
'<div style="background:url(images/trans_bg.png);border-radius:5px;padding:5px;">'+
'<div style="border-radius:5px;border:1px solid #366D99;background:white;padding:1px;">'+
'<div style="border-radius:5px 5px 0 0;background:#366D99;margin-bottom:1px;padding:2px;text-align:center;color:white;"><span id="userprofilefield_username"></span></div>'+
'<div style="border-radius:0 0 5px 5px;border:1px solid #366D99;background:white;padding:2px;" id="userprofilefieldcontent">'+
'</div>'+
'</div>'+
'</div>'+
'<div id="userprofilefieldTop" style="display:none;width:31px;height:16px;background:url(images/topleft.png) no-repeat;margin-left:5px;"></div>';
		document.body.appendChild(userprofilefield);
		showUserProfile(linkID);
	}
}
function hideUserProfile() {
	if (userprofilefieldajax) userprofilefieldajax=0;
	if (userprofilefieldtimeout) clearTimeout(userprofilefieldtimeout);
	if (document.getElementById("UserProfileField").style.display!='none' && typeof(animatingUserProfile)=="undefined") {
		animatingUserProfile=1;
		var currentpos=Math.round(document.getElementById("UserProfileField").style.top.replace('px',''));
		while (cleartweens.indexOf("topUserProfile,")>-1){ cleartweens=cleartweens.replace("topUserProfile,", ""); }
		while (cleartweens.indexOf("alphaUserProfile,")>-1){ cleartweens=cleartweens.replace("alphaUserProfile,", ""); }
		Tween(document.getElementById("UserProfileField"),'top',currentpos,currentpos+20*(document.getElementById("userprofilefieldBottom").style.display=="block"?-1:1),50,-1,-1,0,1,"topUserProfile");
		Tween(document.getElementById("UserProfileField"),'alpha',90,1,50,-1,'hideUserProfileField',0,1,"alphaUserProfile");
	}
	animatingUserProfile=undefined;
}

setInterval("refreshOnlineUser()",3000);lastMembersRead="";
function refreshOnlineUser() {
	if (document.getElementById("showOnlineUserList")) {
		ajaxRequest.openPost(
			'AutoIt/showOnlineUser.php','',
			function(){
				if(this.readyState==4){
					splitted=this.responseText.split(" | ");
					splitted[0]=unescape(splitted[0]);
					if (splitted[0].length>0 && lastMembersRead!=splitted[0]){
						lastMembersRead=splitted[0];
						document.getElementById("showOnlineUserList").innerHTML=lastMembersRead;
					}
					if (document.getElementById("showOnlineVisitorList") && splitted[1].length>0 && document.getElementById("showOnlineVisitorList").innerHTML!=splitted[1])
						document.getElementById("showOnlineVisitorList").innerHTML=splitted[1];
					if (document.getElementById("countOnlineVisitor") && splitted[2].length>0 && document.getElementById("countOnlineVisitor").innerHTML!=splitted[2])
						document.getElementById("countOnlineVisitor").innerHTML=splitted[2];
				}
			}
		);
	}
}

function popupShowSource(sourceElement,delHTML, delHighlighter) {
	if (!delHighlighter) delHighlighter=0;
	if (typeof(popupCounter)!="undefined"){ popupCounter++; }else{ popupCounter=0;popupArray=new Array(); };
	form=document.createElement("form");
	form.action="/Quelltext"+(delHighlighter?"_NoHighlight":"")+".html";
	form.method="post";
	form.target="popup"+popupCounter;
	sourcecode=document.createElement("input");
	sourcecode.type="hidden";
	sourcecode.name="source";
	if (delHTML){ getsourcecode = sourceElement.innerHTML.replace(/<b> <\/b>/g, "<br />");getsourcecode=removeHTML(getsourcecode);getsourcecode=Encoder.htmlDecode(getsourcecode); }else{ getsourcecode=sourceElement.innerHTML; }
	sourcecode.value=getsourcecode;
	form.appendChild(sourcecode);
	document.body.appendChild(form);
	popupArray[popupCounter] = window.open("", "popup"+popupCounter, "width=600,height=500,left="+((screen.width-600)/2)+",top="+((screen.height-500)/2)+",scrollbars=yes,locationbar=no,menubar=no,personalbar=no,statusbar=no,toolbar=no,dependent=yes,directories=no,status=no,resizable=yes");
	form.submit();
	popupArray[popupCounter].focus();
	form.removeChild();
}
function downloadSource(sourceElement,delHTML) {
	form=document.createElement("form");
	form.action="/Download.html";
	form.method="post";
	sourcecode=document.createElement("input");
	sourcecode.type="hidden";
	sourcecode.name="source";
	if (delHTML){ getsourcecode = sourceElement.innerHTML.replace(/<b> <\/b>/g, "<br />");getsourcecode=removeHTML(getsourcecode);getsourcecode=Encoder.htmlDecode(getsourcecode); }else{ getsourcecode=sourceElement.innerHTML; }
	sourcecode.value=getsourcecode;
	form.appendChild(sourcecode);
	document.body.appendChild(form);
	form.submit();
	form.removeChild();
}
function showContainerLinklist(id,nr){
	if (nr==1){
		found=0;i=1;
		while(document.getElementById("linklistContainer"+i)){
			if (document.getElementById("linklistContainer"+i).style.display!="none"){
				found=1;hideContainerLinklist(i,id,1);
			}
			i++;
		}
		if (!found){
			showContainerLinklist(id,0);
		}
	}else{
		document.getElementById("linklistContainer"+id).parentNode.getElementsByTagName("img")[0].src="/wcf/icon/minusS.png";
		document.getElementById("linklistContainer"+id).style.display="block";
		newheight=(document.getElementById("linklistContainer"+id).offsetHeight*2);
		if (newheight>document.getElementById("linklistContent"+id).offsetHeight) newheight=document.getElementById("linklistContent"+id).offsetHeight;
		if (newheight<=0) newheight=1;
		document.getElementById("linklistContainer"+id).style.height=newheight+"px";
		if (document.getElementById("linklistContainer"+id).offsetHeight<document.getElementById("linklistContent"+id).offsetHeight){
			setTimeout('showContainerLinklist('+id+',0)',50);
		}
	}
}
function hideContainerLinklist(id,showID,first){
	document.getElementById("linklistContainer"+id).style.height=(document.getElementById("linklistContainer"+id).offsetHeight/1.5)+"px";
	containerheight=document.getElementById("linklistContainer"+id).offsetHeight;
	if (containerheight>1){
		setTimeout('hideContainerLinklist('+id+','+showID+', 0)',50);
	}else{
		document.getElementById("linklistContainer"+id).parentNode.getElementsByTagName("img")[0].src="/wcf/icon/plusS.png";
		document.getElementById("linklistContainer"+id).style.display="none";
		if(id!=showID || first==1){
			document.getElementById("linklistContainer"+id).style.height=document.getElementById("linklistContent"+id).offsetHeight;
			showContainerLinklist(showID,0);
		}
	}
}
function createFontSizeButtons(){
	if (document.body.style.zoom!=undefined) {
		document.body.style.zoom=1;
		document.write('<div style="position:fixed;right:0px;top:0px;">');
		document.write('<a href="#" onclick="if(Number(document.body.style.zoom)<1.5)Tween(document.body,\'zoom\',Number(document.body.style.zoom),Number(document.body.style.zoom)+0.1,100);return false;"><img src="/images/zoomIn.png" alt="" /></a>');
		document.write('<a href="#" onclick="if(Number(document.body.style.zoom)>0.5)Tween(document.body,\'zoom\',Number(document.body.style.zoom),Number(document.body.style.zoom)-0.1,100);return false;"><img src="/images/zoomOut.png" alt="" /></a>');
		document.write('</div>');
	}
}
new Image().src="/AutoIt/cron.php";