// Häufige Funktionen:

function openBox(page,fname,boxh,boxb)
{
   if (boxh==0) boxh=screen.height*0.85; else boxh=screen.height*boxh/100;	            
   Box=window.open(escape(page),fname,'toolbar=no,location=no,status=no,copyhistory=no,scrollbars=yes,resizable=no,height='+boxh+',width='+boxb+',top=10,left=10');
   Box.focus();
   if (Box.opener==null) Box.opener=wind;
}

function openFenster(page,fname,boxh,boxb)
{
   if (boxh==0) boxh=screen.height*0.85; else boxh=screen.height*boxh/100;	            
   Box=window.open(escape(page),fname,'toolbar=no,location=no,status=no,copyhistory=no,scrollbars=yes,resizable=no,height='+boxh+',width='+boxb+',top=10,left=10');
   Box.focus();
   if (Box.opener==null) Box.opener=wind;
   return !Box;
}

function openF (adresse,fname,boxh,boxb) 
{
  basis=768 //Grundeinstellung für screen.height = 768 Pixel
  if (boxh==0) boxh=screen.height*0.85; else boxh=basis*boxh/100;	            
  MeinFenster = window.open(adresse, fname, 'toolbar=no,location=no,status=no,copyhistory=no,scrollbars=yes,resizable=no,height='+boxh+',width='+boxb+',top=10,left=10');
  MeinFenster.focus();
}

function openF_alt (adresse,fname,boxh,boxb) 
{
  if (boxh==0) boxh=screen.height*0.85; else boxh=screen.height*boxh/100;	            
  MeinFenster = window.open(adresse, fname, 'toolbar=no,location=no,status=no,copyhistory=no,scrollbars=yes,resizable=no,height='+boxh+',width='+boxb+',top=10,left=10');
  MeinFenster.focus();
}

function Entscheide()
{
   if(top==self)
      {window.close();}
   else
      {history.back();}	
}


function an(i)
{
   document.images[i].src = bildan[i].src;
}		

function aus(i)
{
   document.images[i].src = bildaus[i].src;
}


function UpDater()
{
	Monat=new Array("01.", "02.", "03.", "04.", "05.", "06.", "07.", "08.", "09.", "10.", "11.", "12.")
	Tag=new Array("00.", "01.", "02.", "03.", "04.", "05.", "06.", "07.", "08.", "09.", "10.", "11.", "12.", "13.", "14.", "15.", "16.", "17.", "18.", "19.", "20.", "21.", "22.", "23.", "24.", "25.", "26.", "27.", "28.", "29.", "30.", "31.")
	var FTag=0
	Heute=new Date();
	if (Heute.getHours()<9)
		Heute.setDate(Heute.getDate()-1);
	do
	{
		FTag=0
		if (Heute.getDay()==0)
			FTag=-1;
		if ((Heute.getMonth()==0) && (Heute.getDate()==1 || Heute.getDate()==6))
			FTag=-1;
		if (Heute.getMonth()==4 && Heute.getDate()==1)
			FTag=-1;
		if (Heute.getMonth()==7 && Heute.getDate()==15)
			FTag=-1;
		if (Heute.getMonth()==9 && Heute.getDate()==26)
			FTag=-1;
		if (Heute.getMonth()==10 && Heute.getDate()==1)
			FTag=-1;
		if ((Heute.getMonth()==11) && (Heute.getDate()==8 || Heute.getDate()==24 || Heute.getDate()==25 || Heute.getDate()==26 || Heute.getDate()==31))
			FTag=-1;
		
		if (FTag==-1)
			Heute.setDate(Heute.getDate()-1);
	}
	while (FTag==-1);
	
	document.write("Update: " + Tag[Heute.getDate()] + Monat[Heute.getMonth()] + Heute.getFullYear());
}


function ZZ (bis)
   // Gibt eine Zufallszahl von 0 bis 'bis' zurück
{
   return Math.floor((bis+1)*Math.random());
}


function XZZ (anz,bis)
   // Gibt 'anz'-Zufallszahlen von 0 bis 'bis' ohne Doppelwerte zurück
{
   zuz=new Array();  // Global
   var z;
   var n=0;
   while (n<anz)
   {
      n=n+1;
      z=Math.floor((bis+1)*Math.random());
      zuz[n]=z;
      if (n>1)
         { for (var i=1; i<=n-1; i++)  // Prüft ob doppelt
            { if (zuz[i]==zuz[n])
               { n=n-1;
                 break;
               }
             }
         }
   }
}

function SchalterAbdecken()
{
  if (navigator.appName.indexOf("Microsoft")!=-1)
	{document.write("<div class='posabs' style='top:211; left:322'><img border='0' src='images/farbe1.jpg' width='40' height='33'></div>");}
  if (navigator.appName.indexOf("Netscape")!=-1)
	{document.write("<div class='posabs' style='top:208; left:319'><img border='0' src='images/farbe1.jpg' width='40' height='33'></div>");}
  if (navigator.appName.indexOf("Opera")!=-1)
	{document.write("<div class='posabs' style='top:213; left:330'><img border='0' src='images/farbe1.jpg' width='40' height='33'></div>");}
}