//Funktion die den Hauptlayer immer in der MItte des Bildschirms ausrichtet
function pos()
{
	le=0
	ob=0
	if(document.layers) //ns4
	{
		ob=parseInt(document.main.document.width)
		le=(parseInt(window.innerWidth)-ob)/2
		document.main.left=le
		document.main.visibility="show"
	}
	
	if(document.getElementById&&!document.all) //NS6
	{
		ob=parseInt(document.getElementById('main').offsetWidth)
		le=(parseInt(window.innerWidth)-ob)/2
		document.getElementById('main').style.left=le
		document.getElementById('main').style.visibility="visible"
	}
	else if(document.all) //IE
	{
		ob=parseInt(document.all.main.offsetWidth)
		le=(parseInt(window.document.body.clientWidth)-ob)/2
		document.all.main.style.left=le
		document.all.main.style.visibility="visible"
	}
}

var win = "";
function fenster(Grafik,b,h,n,titel)
 	{
 		/*Dafür sorgen, dass immer nur ein Fenster geöffnet ist*/
		if (win != ""&&win.closed==false)
 	{ 
 		/*Falls ein Fenster geöffnet ist, dieses erst schliessen*/
		win.close();
	}
   win=window.open("",n,"width="+b+",height="+(h+40)+",left=50,top=20"); 
   
   win.document.open("text/html");
   win.document.write("<BODY leftmargin='0' topmargin='0' marginheight='0' marginwidth='0'>");
   win.document.bgColor="#ffffff";
   		
		/*Stylesheets für das neue Fenster*/
   		win.document.write("<style type= text/css>" +
		"a{color:red; }" +
		"a:link { text-decoration:none;color:#0080E5;font-size:10px;font-family:Verdana,Arial;}" +
		"a:visited { text-decoration:none; color:#0080E5;font-size:10px;font-family:Verdana,Arial;}" +
		"a:hover { color:#FFCC00; text-decoration:none;font-size:10px;font-family:Verdana,Arial;}" +
		"a:active { color:#0080E5; text-decoration:none;font-size:10px;font-family:Verdana,Arial;}" +
		"</style>");
		
   win.document.linkColor="#0080E5";
   win.document.vlinkColor="#0080E5";
   win.document.fgColor="black";
   win.document.write("<TITLE>" +titel +"</title>");
   win.document.write("<IMG src='"+Grafik+"'>");
   win.document.write("<div align=center><a href='javascript:window.print()'>Seite drucken</a></div>");
   win.document.write("<div align=center><a href='javascript:self.close()'>Fenster schlie&szlig;en</a></div>");
   win.document.close();
   win = "";
 }
 
var win = "";
function fenster_mit_text(Grafik,b,h,n,titel,text,zugabe)
 	{
 		/*Dafür sorgen, dass immer nur ein Fenster geöffnet ist*/
		if (win != ""&&win.closed==false)
 	{ 
 		/*Falls ein Fenster geöffnet ist, dieses erst schliessen*/
		win.close();
	}
   win=window.open("",n,"width="+b+",height="+(h+zugabe)+",left=50,top=20"); 
   
   win.document.open("text/html");
   win.document.write("<BODY leftmargin='0' topmargin='0' marginheight='0' marginwidth='0'>");
   win.document.bgColor="#ffffff";
   		
		/*Stylesheets für das neue Fenster*/
   		win.document.write("<style type= text/css>" +
		"a{color:red; }" +
		"a:link { text-decoration:none;color:#0080E5;font-size:10px;font-family:Verdana,Arial;}" +
		"a:visited { text-decoration:none; color:#0080E5;font-size:10px;font-family:Verdana,Arial;}" +
		"a:hover { color:#FFCC00; text-decoration:none;font-size:10px;font-family:Verdana,Arial;}" +
		"a:active { color:#0080E5; text-decoration:none;font-size:10px;font-family:Verdana,Arial;}" +
		"</style>");
		
   win.document.linkColor="#0080E5";
   win.document.vlinkColor="#0080E5";
   win.document.fgColor="black";
   win.document.write("<TITLE>" +titel +"</title>");
   win.document.write("<IMG src='"+Grafik+"'>");
   win.document.write("<div align=center style='font-size:12px;font-family:Verdana,Arial;'>" +text+ "</div>");
   win.document.write("<div align=center>&nbsp;</div>");
   win.document.write("<div align=center><a href='javascript:window.print()'>Seite drucken</a></div>");
   win.document.write("<div align=center><a href='javascript:self.close()'>Fenster schlie&szlig;en</a></div>");
   win.document.close();
   win = "";
 }
