// JavaScript Document
var _innerHeight =  window.opera ? window.innerHeight : document.getElementsByTagName("html")[0].clientHeight;
var _innerWidth =  window.opera ? window.innerWidth : document.getElementsByTagName("html")[0].clientWidth;
var _WinId = 1;
var _infoWinId = 1;
var _x = 0;
var _y = 0;
var _OnMouseMoveFunction = null;
var _ExtWinId = 1;

var _ObjectOpacity = new Array();
var _BlendInterval = new Array();
var _SetLoadingOnBlend = true;
var _PageInitFunction = null;

var _IE = (document.all && !document.captureEvents);

var _BlendInfoWinInterval = null;
var _InfoWinOpacity = 0;
var _MaxInfoWinOpacity = 100;

var _MaxBlendObjectOpacity = 100;
var _BlendObjectPostFunction = null;

var _Drag = null;

var _NewPostLId = 0;
var _NewPostAxFunction = "newPostShow";

function initMsg(){
	
	var div = document.createElement("div");
	div.setAttribute("id", "msgTop");
	if (document.all && !document.captureEvents)
		div.style.setAttribute("cssText", "position:absolute; display:none; width:275px; top:150px; left:50%; margin-left:-137px;", 0);
	else
		div.setAttribute("style", "position:absolute; display:none; width:275px; top:100px; left:50%; margin-left:-137px;");
	var html = "<div style=\"width:275px; height:10px; " + imgTransPNGBackground("/images/msg/msg_bg_top.png") + "\">&nbsp;</div>";
	html += "<div style=\"width:267px; padding-left:8px; background-image:url(/images/msg/msg_bg_center.png);\">";
	html += "<table width=\"259\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"32\" align=\"center\"><img onclick=\"javascript:closeMsg();\" title=\"Information ausblenden\" style=\"cursor:pointer;\" src=\"/images/msg/msg_icon.png\" /></td>";
	html += "<td id=\"msgText\" width=\"226\">&nbsp;</td></tr></table>";
	html += "</div>";
	html += "<div style=\"width:275px; height:10px; " + imgTransPNGBackground("/images/msg/msg_bg_bottom.png") + "\">&nbsp;</div>";

	div.innerHTML = html;
	document.getElementsByTagName("body")[0].appendChild(div);
}
function set_msg(msg){
	if(msg == "") return;
	if(document.getElementById("transLayer"))
		document.getElementById("transLayer").style.display = "";
	document.getElementById("msgTop").style.display="";
	document.getElementById("msgText").innerHTML=msg;
}
function closeMsg(){
	if(document.getElementById("transLayer"))
		document.getElementById("transLayer").style.display = "none";
	document.getElementById("msgTop").style.display="none";
	document.getElementById("msgText").innerHTML="";
}

function setinfotext(text){
	document.getElementById("infotext").firstChild.nodeValue=text;
}

function closeInfoWin(id){
	if(id==0) id = _infoWinId-1;
	var rm = document.getElementById("infoWin" + id);
	document.getElementsByTagName("body")[0].removeChild(rm);
}

function closeBodyWin(id){
	if(!document.getElementById(id)) return;
	var rm = document.getElementById(id);
	document.getElementsByTagName("body")[0].removeChild(rm);
}

function showInfoWin(width, height, top, left, text){
	var win = "<div id=\"infoWin" + _infoWinId + "\" style=\"position:absolute; overflow:auto; border:1px solid #000000; background-color:#AAAAAA; width:" + width + "px; height:" + height + "px; top:" + top + "px; left:" + left + "px;\">";
	win += "<a href=\"javascript:closeInfoWin(" + _infoWinId + ");\">Schlie&szlig;en</a> <br />";
	win += text;
	win += "</div>";
	_infoWinId++;
	document.getElementsByTagName("body")[0].innerHTML += win;
}
function createInfoWin(left, top, width, height, opacity, content, blend){
	_InfoWinOpacity = 0;
	_MaxInfoWinOpacity = opacity;
	
	var div = newDiv("infoWin", "position:absolute; height:" + height + "px; width:" + width + "px; visibility:" + (blend ? "hidden" : "show") + "; left:" + left + "px; top:" + top + "px; opacity:" + (blend ? "0" : (opacity/100)) + "; filter:revealTrans(Duration=0.2,Transition=12) Alpha(opacity:" + opacity + ");");
	var html = "<div class=\"ifLeftTop\" style=\"" + imgTransPNGBackground("/images/infowin/leftTop.png") + "\">&nbsp;</div><div class=\"ifTop\" style=\"" + imgTransPNGBackground("/images/infowin/top.png") + (_IE ? "width:" + (width - 52) + "px;" : "") + "\">&nbsp;</div><div class=\"ifRightTop\" style=\"" + imgTransPNGBackground("/images/infowin/rightTop.png") + "\">&nbsp;</div><div id=\"infoWinLeft\" class=\"ifLeft\" style=\"" + imgTransPNGBackground("/images/infowin/left.png") + (_IE ? "height:" + (height - 52) + "px;" : "") + "\">&nbsp;</div><div id=\"infoWinRight\" class=\"ifRight\" style=\"" + imgTransPNGBackground("/images/infowin/right.png") + (_IE ? "height:" + (height - 52) + "px;" : "") + "\">&nbsp;</div><div class=\"ifRightBottom\" style=\"" + imgTransPNGBackground("/images/infowin/rightBottom.png") + "\">&nbsp;</div><div class=\"ifLeftBottom\" style=\"" + imgTransPNGBackground("/images/infowin/leftBottom.png") + "\">&nbsp;</div><div class=\"ifBottom\" style=\"" + imgTransPNGBackground("/images/infowin/bottom.png") + (_IE ? "width:" + (width - 52) + "px;" : "") + "\">&nbsp;</div>";
	html += "<div id=\"infoWinMain\" class=\"ifMain\" " + (_IE ? "style=\"height:" + (height - 52) + "px; width:" + (width - 52) + "px;\"" : "") + ">" + content + "</div>";
	div.innerHTML = html;
	document.getElementsByTagName("body")[0].appendChild(div);
	if(blend) blendInfoWin(15);
}
function blendInfoWin(add){
	if(_BlendInfoWinInterval != null){
		window.clearInterval(_BlendInfoWinInterval);
		_BlendInfoWinInterval = null;
	}
	
	if(_IE){
		document.getElementById("infoWin").filters.revealTrans.Apply();
		document.getElementById("infoWin").style.visibility = document.getElementById("infoWin").style.visibility == "hidden" ? "visible" : "hidden";
		document.getElementById("infoWin").filters.revealTrans.Play();
	}else{
		document.getElementById("infoWin").style.visibility = "visible";
		
		this.blend = function(add){
			if( (add > 0 && _InfoWinOpacity >= _MaxInfoWinOpacity) || (add < 0 && _InfoWinOpacity <= 0) ){
				if(_InfoWinOpacity <= 0) document.getElementById("infoWin").parentNode.removeChild(document.getElementById("infoWin"));
				window.clearInterval(_BlendInfoWinInterval);
				_BlendInfoWinInterval = null;
				return;
			}
			_InfoWinOpacity += add;
			document.getElementById("infoWin").style.opacity = (_InfoWinOpacity/100);
		}
		
		_BlendInfoWinInterval = window.setInterval("this.blend(" + add + ")", 60);
	}
	
}
 
function loading(text){
	var loading = "<table border='0' cellpadding='0' cellspacing='0'><tr><td>";
	loading += "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"42\" height=\"13\" id=\"loading\" align=\"middle\">";
	loading += "<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
	loading += "<param name=\"movie\" value=\"/images/flash/loading.swf\" /><param name=\"quality\" value=\"high\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"bgcolor\" value=\"#ffffff\" /><embed src=\"/images/flash/loading.swf\" quality=\"high\" wmode=\"transparent\" bgcolor=\"#ffffff\" width=\"42\" height=\"13\" name=\"loading\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
	loading += "</object></td><td style=\"padding-left:3px;\">" + text + "</td></tr></table>";
	return loading;
}

function showSNWin(user){
	var html = "<table border=\"0\" align=\"center\">";
	html +=	"<tr><td><b>An User</b></td>";
	html +=	"<td align=\"right\"><input type=\"text\" id=\"sn_user\" size=\"41\" value=\"" + user + "\"  onfocus=\"javascript:top._KeyCheckEnabled=0;\" onblur=\"javascript:top._KeyCheckEnabled=1;\" /></td></tr>";
	html +=	"<tr><td colspan=\"2\" align=\"center\"><b>Nachricht</b></td></tr>";
	html += "<tr><td colspan=\"2\"><textarea id=\"sn_text\" cols=\"47\" rows=\"7\" onfocus=\"javascript:top._KeyCheckEnabled=0;\" onblur=\"javascript:top._KeyCheckEnabled=1;\"></textarea></td></tr>";
	html += "<tr><td colspan=\"2\" align=\"center\"><input type=\"button\" value=\"Versenden\" onclick=\"javascript:ax_sendSN();\" /></td></tr>";
	html += "</table>";
	
	var left = parseInt((_innerWidth/2)-160);
	var top = parseInt((_innerHeight/2)-200);
	
	document.getElementById("transLayer").style.display = "";
	createToolWin(320, 215, left, top, html);
}

function showMailWin(user, loginid){
	var html = "<table border=\"0\" align=\"center\">";
	html +=	"<tr><td><b>An User</b></td>";
	html +=	"<td align=\"right\"><input type=\"text\" id=\"mail_user\" size=\"41\" value=\"" + user + "\" /></td></tr>";
	html += "<tr><td><b>Betreff</b></td>";
	html += "<td align=\"right\"><input type=\"text\" id=\"mail_betreff\" size=\"41\" onfocus=\"javascript:top._KeyCheckEnabled=0;\" onblur=\"javascript:top._KeyCheckEnabled=1;\" /></td></tr>";
	html +=	"<tr><td colspan=\"2\" align=\"center\"><b>Nachricht</b></td></tr>";
	html += "<tr><td colspan=\"2\"><textarea id=\"mail_text\" cols=\"47\" rows=\"7\" onfocus=\"javascript:top._KeyCheckEnabled=0;\" onblur=\"javascript:top._KeyCheckEnabled=1;\"></textarea></td></tr>";
	html += "<tr><td colspan=\"2\" align=\"center\"><input type=\"button\" value=\"Versenden\" onclick=\"javascript:ax_sendMail(" + loginid + ");\" /></td></tr>";
	html += "</table>";
	
	document.getElementById("transLayer").style.display = "";
	createToolWin(320, 240, 65, 80, html);
}

function showElementOnCheck(checkbox, elementid){
	if(checkbox.checked)
		document.getElementById(elementid).style.display = "";
	else
		document.getElementById(elementid).style.display = "none";
}

function events(){
	function MouseMove(e){
		_x =  e ? e.pageX : window.event.x;
		_y =  e ? e.pageY : window.event.y;
		
		if(_OnMouseMoveFunction != null)
			eval(_OnMouseMoveFunction);
		
		if(opener == null){
			if(!e) var e = window.event;
			top._EventFrame = window.name;
			top.MousePosition(e);
		}
	}
	
	function KeyDown(e){
		if(!e) var e = window.event;
		
	    if (window.getSelection) {
		  top._selected_text=window.getSelection();
	    } else if (document.getSelection) {
		  top._selected_text=document.getSelection();
	    } else if (document.selection) {
		  top._selected_text=document.selection.createRange().text;
	    }
		
		
		top.checkKey(e);
	}
	
	if(opener == null) document.onkeydown = KeyDown;
	document.onmousemove = MouseMove;
}

function pageInit(){
	events();
	initMsg();
	if(_PageInitFunction != null)
		eval(_PageInitFunction);
		
	if(top._Hilfemodus != null && top._Hilfemodus.Status == 1){
		var file = document.location.href;
		file = file.substr(file.lastIndexOf('/')+1);
		top._Hilfemodus.LadeDaten(file, window.name);
	}
}

function newPost(id, tbl, lid){
	_NewPostLId = lid;
	
	axSend("/configs/ajax/functions.php", "a=5&pid=" + id + "&tbl=" + escape(tbl), _NewPostAxFunction);
}
function newPostShow(ret){
	var lid = _NewPostLId;
	var text = unescape(ret);
	var newPost = document.createElement("div");
	newPost.innerHTML = text;
	newPost.getElementsByTagName("td")[1].style.backgroundColor = "#cccccc";
	newPost.getElementsByTagName("td")[2].style.backgroundColor = "#cccccc";

	if(lid == 0){	
		document.getElementById("postsBody").innerHTML = newPost.innerHTML + document.getElementById("postsBody").innerHTML;
	}else{
		document.getElementById("d" + lid).appendChild(newPost);
		document.getElementById("maindiv").scrollTop = newPost.offsetTop - 40;
	}
}
function editPost(winid, pid){
	var eintragenFrame = top.window.frames["winFrame_" + winid];
	document.getElementById("post" + pid + "_content").innerHTML = eintragenFrame.document.getElementById("pText").value;
	top.closew(winid, 'windows');
}

function imgTransPNG(img, width, height){
	if (document.all && !document.captureEvents)
		return "<div style=\"width:" + width + "px; height:" + height + "px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img + "', sizingMethod='image');\">&nbsp;</div>";
	else
		return "<img border=\"0\" src=\"" + img + "\" />";
}

function imgTransPNGBackground(img){
	if (document.all && !document.captureEvents)
		return "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img + "', sizingMethod='scale');";
	else
		return "background-image:url(" + img + ");";
}

function newDiv(id, style){
	var div = document.createElement("div");
	div.setAttribute("id", id);
	if (document.all && !document.captureEvents)
		div.style.setAttribute("cssText", style, 0);
	else
		div.setAttribute("style", style);
	
	return div;
}

function setElementStyle(element, style){
	if(_IE) element.style.setAttribute("cssText", style, 0);
	else element.setAttribute("style", style, 0);
	return element;
}

function createToolWin(width, height, left, top, text){
	var div = newDiv("toolWin", "position:absolute; width:"+ width + "px; height:" + height + "px; top:" + top + "px; left:" + left + "px;");
	
	var html = imgTransPNG('/images/toolbox/bg_topleft.png', 20, 20);
	html += "<div style=\"position:absolute; top:0px; left:20px; height:20px; width:" + (width-40) + "px; " + imgTransPNGBackground('/images/toolbox/bg_top.png') + "\">&nbsp;</div>";
	html += "<div style=\"position:absolute; top:20px; left:20px; height:5px; width:" + (width-40) + "px; background-color:#C2C1C1;\">&nbsp;</div>";
	html += "<div style=\"position:absolute; top:0px; left:" + (width-20) + "px; height:20px; width:20px;\">" + imgTransPNG('/images/toolbox/bg_topright.png', 20, 20) + "</div>";
	html += "<div style=\"position:absolute; top:20px; left:0px; height:" + (height-40) + "px; width:20px; " + imgTransPNGBackground('/images/toolbox/bg_left.png') + "\">&nbsp;</div>";
	html += "<div style=\"position:absolute; top:" + (height-20) + "px; left:0px; height:20px; width:20px;\">" + imgTransPNG('/images/toolbox/bg_bottomleft.png', 20, 20) + "</div>";
	html += "<div style=\"position:absolute; top:" + (height-20) + "px; left:20px; height:20px; width:" + (width-40) + "px; " + imgTransPNGBackground('/images/toolbox/bg_bottom.png') + "\">&nbsp;</div>";
	html += "<div style=\"position:absolute; top:" + (height-20) + "px; left:" + (width-20) + "px; height:20px; width:20px;\">" + imgTransPNG('/images/toolbox/bg_bottomright.png', 20, 20) + "</div>";
	html += "<div style=\"position:absolute; top:20px; left:" + (width-20) + "px; height:" + (height-40) + "px; width:20px; " + imgTransPNGBackground('/images/toolbox/bg_right.png') + "\">&nbsp;</div>";
	html += "<div id=\"toolWinMainDiv\" style=\"position:absolute; top:25px; overflow:auto; left:18px; width:" + (width-34) + "px; height:" + (height-41) + "px; background-color:#C2C1C1;\">" + text + "</div>";
	html += "<div style=\"position:absolute; top:15px; right:15px; width:9px; height:8px; cursor:pointer; background-color:#C2C1C1;\" onClick=\"javascript:closeToolWin();\"><img src=\"/images/toolbox/close.png\"></div>";
	
	div.innerHTML = html;
	
	if(document.getElementById("toolWin")) closeToolWin();
	if(document.getElementById("transLayer")) document.getElementById("transLayer").style.display = "";
	document.getElementsByTagName("body")[0].appendChild(div);
}

function closeToolWin(){
	if(document.getElementById("toolWin"))
		document.getElementsByTagName("body")[0].removeChild(document.getElementById("toolWin"));
	if(document.getElementById("transLayer") && document.getElementById("transLayer").style.display != "none")
		document.getElementById("transLayer").style.display = "none";
}

function showModBereichTabs(){
	document.getElementById("mod_tabs").style.display = document.getElementById("mod_tabs").style.display == 'none' ? '' : 'none';
}
function showConfigTabs(){
	document.getElementById("config_tabs").style.display = document.getElementById("config_tabs").style.display == 'none' ? '' : 'none';
}

function setCheckboxAuswahl(chName, art){
	var checkboxes = document.getElementsByName(chName);
	var count = checkboxes.length;
	for(var i = 0; i < count; i++){
		switch(art){
			case 1: if(checkboxes[i].tagName == "IMG"){
						checkboxes[i].src = "/images/icons/checkbox_checked.png";
						checkboxes[i].alt = "checked";
					}else
						checkboxes[i].checked = true;
				break;
			case 0: if(checkboxes[i].tagName == "IMG"){
						checkboxes[i].src = "/images/icons/checkbox.png";
						checkboxes[i].alt = "";
					}else
						checkboxes[i].checked = false;
				break;
			case 2: if(checkboxes[i].tagName == "IMG"){
						checkboxes[i].src = checkboxes[i].src.indexOf("checkbox.png") != -1 ? "/images/icons/checkbox_checked.png" : "/images/icons/checkbox.png";
						checkboxes[i].alt = checkboxes[i].alt == "" ? "checked" : "";
					}else
						checkboxes[i].checked = checkboxes[i].checked ? false : true;
				break;
		}
	}
}

function blendObject(add, obj){
	if(_SetLoadingOnBlend){
		setLoadingToCursor();
		_OnMouseMoveFunction = "setLoadingToCursor()";
	}

	if(_IE){
		/*var object = document.getElementById(obj);
		var selectFields = object.getElementsByTagName("select");
		var count = selectFields.length;
		for(var i = 0; i < count; i++){
			selectFields[i].style.visibility = selectFields[i].style.visibility != "visible" ? "visible" : "hidden"; 
		}*/
		if(add < 0){
			document.getElementById(obj).style.visibility = "visible";
			document.getElementById(obj).filters.blendTrans.Stop();
			document.getElementById(obj).filters.blendTrans.Apply();
			document.getElementById(obj).style.visibility = "hidden";
			document.getElementById(obj).filters.blendTrans.Play();
		}else{
			document.getElementById(obj).style.visibility = "hidden";
			document.getElementById(obj).filters.blendTrans.Stop();
			document.getElementById(obj).filters.blendTrans.Apply();
			document.getElementById(obj).style.visibility = "visible";
			document.getElementById(obj).filters.blendTrans.Play();
		}
		return;
	}
	if(_BlendInterval[obj] != null){
		window.clearInterval(_BlendInterval[obj]);
		_BlendInterval[obj] = null;
	}
	if(_ObjectOpacity[obj] == null){
		if(!document.getElementById(obj).style.opacity)
			_ObjectOpacity[obj] = 100;
		else
			_ObjectOpacity[obj] = document.getElementById(obj).style.opacity * 100;
	}
	
	document.getElementById(obj).style.display = "";
	document.getElementById(obj).style.visibility = "visible";

	this.blend = function(){
		_ObjectOpacity[obj] += add;
		document.getElementById(obj).style.opacity = (_ObjectOpacity[obj]/100);
		if(_ObjectOpacity[obj] <= 0 || _ObjectOpacity[obj] >= _MaxBlendObjectOpacity){
			_ObjectOpacity[obj] = _ObjectOpacity[obj] <= 0 ? 0 : _MaxBlendObjectOpacity;
			document.getElementById(obj).style.opacity = (_ObjectOpacity[obj]/100);
			window.clearInterval(_BlendInterval[obj]);
			_BlendInterval[obj] = null;
			_MaxBlendObjectOpacity = 100;
			if(_BlendObjectPostFunction != null){
				eval(_BlendObjectPostFunction);
				_BlendObjectPostFunction = null;
			}
		}
	}
	
	_BlendInterval[obj] = window.setInterval("this.blend()", 100);
}
function setLoadingToCursor(){
	if(!document.getElementById("curLoading")){
		var div = newDiv("curLoading", "position:absolute; left:" + (_x + 13) + "px; top:" + (_y + 16) + "px;");
		div.innerHTML = loading("Lade..");
		document.getElementsByTagName("body")[0].appendChild(div);
	}
	document.getElementById("curLoading").style.left = (_x + 13) + "px";
	document.getElementById("curLoading").style.top = (_y + 16) + "px";
}

function extendWindow(obj, title){
	if(title == "") title = document.getElementsByTagName("title")[0].innerHTML;
	top.create_window("ExtWin" + _ExtWinId, title, 430, 500, 15, 15);
	
	var html = "<iframe src=\"/extWinBlank.html\" id=\"extWinFrame\" title=\"extWinFrame\" name=\"extWinFrame\" frameborder=\"0\" style=\"position:absolute; left:0px; top:0px; right:0px; bottom:0px; width:100%; height:expression(this.parentNode.style.height);\"></iframe>";
	top.document.getElementById("ExtWin" + _ExtWinId + "_bottom").innerHTML = html;
	
	this.FillExtWin = function(){
		top.extWinFrame.document.getElementsByTagName("body")[0].innerHTML = document.getElementById(obj).innerHTML;
		top.extWinFrame.document.getElementsByTagName("body")[0].style.backgroundColor = document.getElementById(obj).style.backgroundColor;
		top.extWinFrame.document.getElementsByTagName("body")[0].style.backgroundImage = document.getElementById(obj).style.backgroundImage;
		top.extWinFrame.document.getElementsByTagName("body")[0].style.overflow = "auto";
		
		var scripts = document.getElementsByTagName("script");
		for(var i = 0; i < scripts.length; i++){
			var node = scripts[i].cloneNode(true);
			top.extWinFrame.document.getElementsByTagName("head")[0].appendChild(node);
		}
		var links = document.getElementsByTagName("link");
		for(var i = 0; i < links.length; i++){
			var node = links[i].cloneNode(true);
			top.extWinFrame.document.getElementsByTagName("head")[0].appendChild(node);
		}
		
		//top.extWinFrame.pageInit();
		
		top.document.getElementById("ExtWin" + _ExtWinId).style.display = "";
		alert(top.extWinFrame.document.getElementsByTagName("head")[0].innerHTML);
		_ExtWinId++;
	}
	
	window.setTimeout("FillExtWin()", 200);
}

function setCheckbox(checkbox, checked){
	if(checked){
		checkbox.alt = "checked";
		checkbox.src = "/images/icons/checkbox_checked.png";
	}else{
		checkbox.alt = "";
		checkbox.src = "/images/icons/checkbox.png";
	}
}

function makeUserout(uid, uname, ufarbe){
	return "<a id=\"u" + uid + "\" onmouseover=\"javascript:top.mover='u" + uid + "';\" onmouseout=\"javascript:top.mover=0;\" href=\"/main/profil/home.php?user=" + uid + "\" target=\"mainFrame\"><font color=\"" + ufarbe + "\">" + uname + "</font></a>";
}

function openEintragen(table, wo, id, method){
	winid = "Eintragen" + top._WinId;
	winid_b = winid + "_bottom";
	top.create_window(winid, "Eintragen", 340, 415, 100, 100);
	top.document.getElementById(winid_b).innerHTML = "<iframe id=\"winFrame_" + winid + "\" name=\"winFrame_" + winid + "\" title=\"winFrame_" + winid + "\" src=\"/main/eintragen/eintragen.php?table=" + table + "&wo=" + wo + "&id=" + id + "&method=" + method + "&winid=" + winid + "\" width=\"100%\" height=\"100%\" frameborder=\"0\"></iframe>";
	top.document.getElementById(winid).style.display = "";
	top._WinId++;
}
function openEintragenWin(table, wo, id, method){
	winid = "Eintragen" + top._WinId;
	window.open("/main/eintragen/eintragen.php?table=" + table + "&wo=" + wo + "&id=" + id + "&method=" + method + "&winid=" + winid, winid, "menubar=no,scrollbars=auto,width=340,height=415");
	top._WinId++;
}

function getNodeValue(obj, tagname){
	try{
		return obj.getElementsByTagName(tagname)[0].firstChild.nodeValue;
	}catch(e){
		return "";
	}
}

function delPost(table, id){
	document.getElementById("d" + id).parentNode.removeChild(document.getElementById("d" + id));
	ax_del(table, id, id, "Eintrag");	
}

function dragObject(){
	if(_Drag != null){
		var x = ((_x+215) > _innerWidth) ? _x - 215 : _x + 5;
		
		_Drag.style.left = x + "px";
		_Drag.style.top = (_y+10) + "px";
	}
}

function QuickHelpGet(kat, id){
	createInfoWin(_x + 5, _y + 5, 250, 110, 90, "Hilfe wird geladen...", false);
	_Drag = document.getElementById("infoWin");
	_OnMouseMoveFunction = "dragObject()";
	axSend("/configs/ajax/functions.php", "a=9&kat=" + kat + "&id=" + id, "QuickHelpShow");
}
function QuickHelpShow(ret){
	document.getElementById("infoWinMain").innerHTML = unescape(ret);
}
