// Häufige Funktionen:

//function openF (adresse,fname,boxh,boxb) 
//{
// 	plinks=(screen.width/2)-boxb;  //Linke Position
// 	if (plinks<0) plinks=0; 
//  basis=768; //Grundeinstellung für screen.height = 768 Pixel
//  if (boxh==0) boxh=basis; else boxh=basis*boxh/100;
//  if (screen.height<=768) poben=0; else poben=30;	            
//  MeinFenster = window.open(adresse, fname, 'toolbar=no,location=no,status=no,copyhistory=no,scrollbars=yes,resizable=no,height='+boxh+',width='+boxb+',left='+plinks+',top='+poben+'');
//  MeinFenster.focus();
//}



function openF (adresse,fname,boxh,boxb) 
{
 	plinks=(screen.width/2)-boxb;  //Linke Position
 	if (plinks<0) plinks=0; 
  basis=1080; //Grundeinstellung für screen.height = 768 Pixel
  if (boxh==0) boxh=basis; else boxh=basis*boxh/100*0.85;
  if (boxh>screen.height*0.85) boxh=screen.height*0.85;
//  if (screen.height<basis) poben=10; else poben=20;
	poben=20;	            
//alert(boxh);
  MeinFenster = window.open(adresse, fname, 'toolbar=no,location=no,status=no,copyhistory=no,scrollbars=yes,resizable=no,height='+boxh+',width='+boxb+',left='+plinks+',top='+poben+'');
  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>");}
}
