

var win = "";
function fenster(Grafik,width,height,name,titel)
 	{
 		/*Dafür sorgen, dass immer nur ein Fenster geöffnet ist*/
		if (win != "")
 	{ 
 		/*Falls ein Fenster geöffnet ist, dieses erst schliessen*/
		win.close();
	}
   win=window.open("",name,"width="+width+",height="+(height+30)+",left=150,top=100"); 

   win.document.open("text/html");
   win.document.write("<BODY leftmargin='0' topmargin='0' marginheight='0' marginwidth='0'>");
   win.document.bgColor="#00858E";
   win.document.fgColor="#ffffff";
   		
		/*Stylesheets für das neue Fenster*/
   		win.document.write("<style type= text/css>" +
		"a{color:#ffffff; text-decoration:none; font-size:11px;font-family:Verdana,Arial,sans-serif; }" +
		"a:link { color:#ffffff; text-decoration:none; font-size:11px;font-family:Verdana,Arial,sans-serif; }" +
		"a:vlink { text-decoration:none; color: #ffffff; font-size:11px;font-family:Verdana,Arial,sans-serif; }" +
		"a:hover { color: #ffffff; text-decoration:underline; font-size:11px;font-family:Verdana,Arial,sans-serif; }" +
		"a:alink { color: #ffffff; text-decoration:none; font-size:11px;font-family:Verdana,Arial,sans-serif; }" +
		"</style>");
		
   win.document.linkColor="#ffffff";
   win.document.vlinkColor="#ffffff";
   win.document.write("<TITLE>" +titel +"</title>");
   win.document.write("<IMG src='"+Grafik+"'>");
   win.document.write("<br>");
   win.document.write("<div align=center><a href='javascript:window.print()'>Seite drucken</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='javascript:self.close()'>Fenster schlie&szlig;en</a></div>");
   win.document.close();
   win = "";
 }
 
 
//Funktion die den Hauptlayer immer in der Mitte des Bildschirms ausrichtet
function pos()
{
	oe=0 
	le=0
	ob=0
	oh=0
	if(document.layers) //ns4
	{
		ob=parseInt(document.main.document.width)
		oh=parseInt(document.main.document.height)
		le=(parseInt(window.innerWidth)-ob)/2
		oe=(parseInt(window.innerHeight)-oh)/2
		document.main.top=oe
		document.main.left=le
		document.main.visibility="show"
	}
	if(document.getElementById&&!document.all) //NS6
	{
		ob=parseInt(document.getElementById('main').offsetWidth)
		oh=parseInt(document.getElementById('main').offsetHeight)
		le=(parseInt(window.innerWidth)-ob)/2
		oe=(parseInt(window.innerHeight)-oh)/2
		document.getElementById('main').style.top=oe
		document.getElementById('main').style.left=le
		document.getElementById('main').style.visibility="visible"
	}
	else if(document.all) //IE
	{
		ob=parseInt(document.all.main.offsetWidth)
		oh=parseInt(document.all.main.offsetHeight)
		le=(parseInt(window.document.body.clientWidth)-ob)/2
		oe=(parseInt(window.document.body.clientHeight)-oh)/2
		document.all.main.style.top=oe
		document.all.main.style.left=le
		document.all.main.style.visibility="visible"
	}
}
