	
	var picwin=0;               /* globale picwin-Variable */

	function close_picture()
	{
	  if (picwin) 
	    if (!picwin.closed)
	      picwin.close(); 
	}

	
	function open_picture(picname)
	{
	  close_picture(); 
	  
	  picwin=open("","picwin","width=100,height=100,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
	                                     
	  picwin.document.open("text/html","replace");	                                   
	  picwin.document.write("<HTML>\n<head>\n");
	  picwin.document.write("<TITLE>" + picname + "</TITLE>" + "\n");
	  picwin.document.write("<LINK rel=\"stylesheet\" type=\"text/css\" href=\"/css/style_01.css\">\n");
	  picwin.document.write("</HEAD>" + "\n");
	    /* Benachrichtigung des opener-Fensters nach dem Laden: */
	  picwin.document.write("<BODY onLoad=\"opener.picture_size(window,document.images[0])\" bgcolor=\"#ffffff\" topmargin=2 leftmargin=2 rightmargin=2 marginwidth=2>\n");
	  picwin.document.write("<P align=\"center\"><IMG src=\"" + picname + "\" hspace=\"0\" vspace=\"0\" alt=\"\"></P>");
	  picwin.document.write("<TABLE><TR><TD><A href=\"javascript:window.close();\">Fenster schließen</A></TD>");
	  picwin.document.write("<TD><A href=\"javascript:window.close();\"><IMG src=\"/images/button_close.gif\" border=0 alt=\"Close\"></A></TD></TR></TABLE>");
	  picwin.document.write("</BODY>\n</HTML>");
	                                    /* Dokument schliessen: */
	  picwin.document.close();
	}


	/* Fensterdaten evaluieren und Fenstergroesse setzen: ----- */
	function picture_size(picwin,image)
	{
	  var output;
	                  /* Fenstergroesse und Fensterlage setzen: */
	  picwin.resizeTo(image.width + 70,image.height + 70);
	  picwin.moveTo((screen.width-image.width - 50)/2,(screen.height-image.height - 50)/2);
	  picwin.focus();
	}
	
	//BEGIN editcontent.php
	
	function EditorContent2hidden(objForm) {
		if (document.all.RTF_ShowHTML.checked) {				
			objForm.myRTFContent.value = document.all.editor.innerText;
		} else {				
			objForm.myRTFContent.value = document.all.editor.innerHTML;
		}						
		return true;
	}
	
	//Netscape Editor
	function Content2hidden(objForm) {
		myeditor = document.getElementById("editor");
		
		objForm.myRTFContent.value = myeditor.value;		
		return true;
	}
	
	function open_myimages (){
		open("myimages.php", "picwin", "width=600,height=200,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
	}

	//END editcontent.php	
