// Öffnet ein Vorschau-Fenster des eingegebenen News-Kommentars
function openPreview(s, u) {
	window.open( "/?section=popup&action=showpreview&preview=" + document.getElementById("Entry").value.replace(/\n/g, "%%BR%%") + "&s=" + s + "&u=" + u, "Preview", "width=527,height=400,left=200,top=200" );
}

// Fügt einen Smily-Code aus der Übersicht in das Kommentar-Textfeld ein
function InsertSmily(text) {
	var txtarea = opener.document.getElementById("Entry");
	text = ' ' + text + ' ';
	if (txtarea.createTextRange && txtarea.caretPos) {
		var caretPos = txtarea.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
		txtarea.focus();
	} else {
		txtarea.value += text;
		txtarea.focus();
	}
	self.close();
}

// Öffnet eine Übersicht der Verfügbaren Smilies
function openSmiliesOverview(s, u) {
	win = window.open( "/?section=popup&action=showsmiliesoverview" + "&s=" + s + "&u=" + u, "SmiliesOverview", "width=350,height=445,left=200,top=200,scrollbars=yes,resizable=yes" );
}
