function more(headline, information, l) {
	win_width=400;
	win_height=300;
	win_left=Math.round((screen.width-win_width)/2);
	win_top=Math.round((screen.height-win_height)/2);

	win_more=window.open("", "more", "left=" + win_left + ",top=" + win_top + ",width=" + win_width + ",height=" + win_height + ",toolbar=no,scrollbars=yes,location=no,statusbar=no,menubar=no,resizable=no");
	win_more.document.open();
	win_more.document.write('<html><head><title>WEB-GEAR</title><link rel="stylesheet" type="text/css" href="css/main.css"></head><body vlink="#606080"><table cellspacing="0" cellpadding="3" border="0" width="100%"><tr><td><img src="pics/blank.gif" width="5" height="1"></td><td></td><td><img src="pics/blank.gif" width="1" height="10"></td></tr><tr><td class="content"><img src="pics/blank.gif" width="1" height="1"></td><td class="content"><img src="pics/blank.gif" width="1" height="1"></td><td class="content"><img src="pics/blank.gif" width="1" height="5"></td></tr><tr><td class="content"><img src="pics/blank.gif" width="1" height="1"></td><td class="menu"><img src="pics/blank.gif" width="15" height="1"></td><td class="menu"><img src="pics/more.gif" width="10" height="23" alt="" align="absmiddle">&nbsp;&nbsp;<h1 style="display:inline;">' + headline + '</h1></td></tr><tr><td class="content"><img src="pics/blank.gif" width="1" height="1"></td><td class="menu"><img src="pics/blank.gif" width="1" height="1"></td><td class="content"><p>' + information + '</p></td></tr><tr><td class="content"><img src="pics/blank.gif" width="1" height="1"></td><td class="menu"><img src="pics/blank.gif" width="1" height="1"></td><td class="content"><img src="pics/blank.gif" width="1" height="10"></td></tr><tr><td></td><td class="menu"><img src="pics/blank.gif" width="1" height="1"></td><td align="right"><p style="text-align:right;">[ <a href="javascript:window.close();">X</a> ]</p></td></tr></table></body></html>');
	win_more.document.close();
}

// Veraltet
function filebrowser(session_url_string) {
	wg_start_filebrowser(session_url_string);
}

function wg_start_filebrowser(session_url_string) {
	win_width=750;
	win_height=500;
	win_left=Math.round((screen.width-win_width)/2);
	win_top=Math.round((screen.height-win_height)/2);

	window.open("/dir.php?dir_load_saved=1&" + session_url_string, "ufb", "width=" + win_width + ",height=" + win_height + ",left=" + win_left + ",top=" + win_top + ",scrollbars=no,locationbar=no,menubar=no,status=no"); //resizable=no,
}

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

function check_browser() {
	this.DOM = (document.getElementById ? true : false);
	this.IE4 = ((document.all && !this.DOM) ? true : false);
	this.IE5 = ((document.all && parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE ")+5))>=5.5) ? true : false);
	this.NS4 = (document.layers ? true : false);
	this.NS6 = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));

	this.IE =((this.IE4 || this.IE5) ? true : false);
	this.NS = ((this.NS4 || this.NS6) ? true : false);
}

function start_webgear(session_url_string, site_id) {

	room_x=100;
	room_y=20;

	is=new check_browser();

	if (document.all) {

		tutorial_step=7;

		window.open("/editor.php?site_id=" + site_id + "&" + session_url_string, "editor", "left=" + room_x + ",top=" + room_y + ",width=" + (screen.availWidth-room_x*2) + ",height=" + (screen.availHeight-room_y*2-50) + ",locationbar=no,menubar=no,resizable=yes,status=yes");

	} else {

		if (confirm("Dieser Editor ist nur mit dem Microsoft Internet Explorer verwendbar.\r\nMit einem Klick auf [OK] starten Sie den neuen Web-Gear Editor, der auch auf Ihrem Browser voll einsatzf�ig ist und au�rdem viele weitere Funktionen bietet!")) {
			start_webgear2(session_url_string, site_id, 1);
		}

	}

}

function start_webgear2(session_url_string, site_id, dict) {

	room_x=100;
	room_y=20;

	tutorial_step=7;

	window.open("/editor2.php?site_id=" + site_id + "&dict=" + dict + "&" + session_url_string, "editor", "left=" + room_x + ",top=" + room_y + ",width=" + (screen.availWidth-room_x*2) + ",height=" + (screen.availHeight-room_y*2-50) + ",locationbar=no,menubar=no,resizable=yes,status=yes");

}

function start_webgear3(session_url_string, site_id, dict) {

	room_x=100;
	room_y=20;

	tutorial_step=7;

	window.open("/editor3.php?site_id=" + site_id + "&dict=" + dict + "&" + session_url_string, "editor", "left=" + room_x + ",top=" + room_y + ",width=" + (screen.availWidth-room_x*2) + ",height=" + (screen.availHeight-room_y*2-50) + ",locationbar=no,menubar=no,resizable=yes,status=yes");

}

function wg_show_info(info_link) {
	//oBndRct=info_link.getBoundingClientRect();
	//info_link.children[0].style.display="block";
	//info_link.children[0].style.setAttribute("display", "block", 0);
	//client_rects=info_link.children[0].getClientRects();

	info_width=info_link.children[0].innerText.length*5;
	if (info_width>300) {
		info_width=300;
	}

	client_rects=info_link.getClientRects();

	if (client_rects && client_rects[0].right>document.body.clientWidth-info_width) {
		info_link.children[0].style.width=info_width + 'px';

		info_left=info_width-document.body.clientWidth+client_rects[0].left;
		if (info_left<0) {
			info_left=0;
		}

		info_link.children[0].style.setAttribute("left", "-" + info_left + "px", 0);

		if (info_width==300) {
			info_link.children[0].style.setAttribute("fontSize", "9pt", 0);
			info_link.children[0].style.setAttribute("lineHeight", "13pt", 0);
		}

	};

}

