var grafik_win;
function pop_up(imageName,oname,breite,hoehe)
{
	grafik_win = window.open("",oname,"toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,width=" + breite + ",height="+hoehe);
	grafik_win.document.open();
	grafik_win.document.write('<html><head><title>Grüne Gentechnik und Ethik</title></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
	grafik_win.document.write('<img src=\"'+imageName+'\" alt=\"Bild\" name=\"bild\"></body></html>');
	grafik_win.document.close();
	grafik_win.focus();
}
var newwin;
function fenster(welches,name,breite,hoehe)
{
	newwin = window.open(welches,name,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width=" + breite + ",height="+hoehe + ",left=200,top=200");
}
var newwin2;
function fenster_scroll(welches,name,breite,hoehe)
{
	newwin2 = window.open(welches,name,"toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + breite + ",height="+hoehe + ",left=200,top=200");
}

function AskPrompt(action,kapitelid) {
		var returnMessage;
		var currentMessage = opener.document.forms[0].text.value;


		if (action == "ilink") {
			var thisTitle = prompt("Geben Sie hier den Text ein, welcher als Link dargestellt werden soll.", "");

			if (!thisTitle == "") {
				var TitleCode = "[ilink="+kapitelid+"]"+thisTitle+"[/ilink] ";
				returnMessage = currentMessage+TitleCode;
				opener.document.forms[0].text.value=returnMessage;
				window.close();
			}
			return;
		}
		
		if (action == "glossar") {
			var thisTitle = prompt("Geben Sie hier den Text ein, welcher als Link dargestellt werden soll.", "");

			if (!thisTitle == "") {
				var TitleCode = "[g="+kapitelid+"]"+thisTitle+"[/g] ";
				returnMessage = currentMessage+TitleCode;
				opener.document.forms[0].text.value=returnMessage;
				window.close();
			}
			return;
		}

		

	}
