<!--
function popup(url,breite,hoehe) {
f3=window.open(url,"fenster3","dependent=yes,width="+breite+",height="+hoehe+",left=10,top=20,location=no,menubar=no,personalbar=no,scrollbars=no,status=no,titlebar=no,toolbar=no,resizable=1");
f3.focus();
}

function immervorn() {
  self.focus();
  window.setTimeout("immervorn()",100);
}

time = new Date();
function istneu(maxdays, addDate){
	var oldDate = new Date(addDate);
	var newDate = new Date();
	var maxdaysold = maxdays*24*60*60*1000;

	if ((newDate.getTime()-oldDate.getTime()) <=  maxdaysold) {
   		document.write("<img border='0' src=images/neu.gif width=28 height=20 ALIGN=MIDDLE Alt='Neu'>");
	}
	else if ((newDate.getTime()-oldDate.getTime()) >  maxdaysold) {
        document.write("<img border='0' src=images/alt.gif width=28 height=20 ALIGN=MIDDLE>");
    }
}


function istanders(maxdays, addDate){
	var altDate = new Date(addDate);
	var neuDate = new Date();
	var maxdaysalt = maxdays*24*60*60*1000;

	if ((neuDate.getTime()-altDate.getTime()) <=  maxdaysalt) {
   		document.write("<img border='0' src=images/anders.gif width=28 height=20 ALIGN=MIDDLE Alt='geändert'>");
	}
	else if ((neuDate.getTime()-altDate.getTime()) >  maxdaysalt) {
        document.write("<img border='0' src=images/alt.gif width=28 height=20 ALIGN=MIDDLE>");
    }
}


function emailkommentar() {
	mail_str = "mailto:help@freeadhocudf.org?subject=Kommentar zu - comment to: " + document.title;

      location.href = mail_str;
}

function emailvorschlag() {
	mail_str = "mailto:help@freeadhocudf.org?subject=was ich vermisse - what I missed";
      location.href = mail_str;
}

function copyright() {
var dateObject = new Date();
var fullYear = dateObject.getFullYear();
document.write("© 2004-"+fullYear+" adhoc dataservice GmbH Christoph Theuring");
}

function letzteAenderung() {
lastmod=new Date(document.lastModified);
if (lastmod.getYear()<2000) year=lastmod.getYear()+1900; else year=lastmod.getYear();
if (lastmod.getYear()<10) year=lastmod.getYear()+2000;
if (lastmod.getMinutes()<10) min="0"+lastmod.getMinutes(); else min=lastmod.getMinutes();
if (lastmod.getSeconds()<10) sec="0"+lastmod.getSeconds(); else sec=lastmod.getSeconds();
document.write("Letzte Aktualisierung dieser Seite: "+year+"-"+(lastmod.getMonth()+1)+ "-"+lastmod.getDate()+" "+lastmod.getHours()+":"+min+":"+sec+" +01:00");
}

function lastmodified() {
lastmod=new Date(document.lastModified);
if (lastmod.getYear()<2000) year=lastmod.getYear()+1900; else year=lastmod.getYear();
if (lastmod.getYear()<10) year=lastmod.getYear()+2000;
if (lastmod.getMinutes()<10) min="0"+lastmod.getMinutes(); else min=lastmod.getMinutes();
if (lastmod.getSeconds()<10) sec="0"+lastmod.getSeconds(); else sec=lastmod.getSeconds();
document.write("last modified: "+year+"-"+(lastmod.getMonth()+1)+ "-"+lastmod.getDate()+" "+lastmod.getHours()+":"+min+":"+sec+" +01:00");
}

function modification() {
lastmod=new Date(document.lastModified);
if (lastmod.getYear()<2000) year=lastmod.getYear()+1900; else year=lastmod.getYear();
if (lastmod.getYear()<10) year=lastmod.getYear()+2000;
if (lastmod.getMinutes()<10) min="0"+lastmod.getMinutes(); else min=lastmod.getMinutes();
if (lastmod.getSeconds()<10) sec="0"+lastmod.getSeconds(); else sec=lastmod.getSeconds();
document.write("la dernière modification: "+year+"-"+(lastmod.getMonth()+1)+ "-"+lastmod.getDate()+" "+lastmod.getHours()+":"+min+":"+sec+" +01:00");
}

function ist_Schaltjahr(jahr) {
   if (jahr % 4 == 0)
      if (jahr < 1582)
         return 1;
      else if (!(jahr % 100 == 0))
              return 1;
           else if (jahr % 400 == 0)
                   return 1;
   return 0;
}

var Monatstage = new Array
                  (31,28,31,30,31,30,31,31,30,31,30,31);

function Tag_des_Jahres(tag,monat,jahr) {
  var Tage       = 0;

  Monatstage[1]  = 28 + ist_Schaltjahr(jahr);
  if (tag <= Monatstage[monat-1]) {
     for (var i=0; i < monat-1; i++)
         Tage = Tage + Monatstage[i];
     Tage = Tage + tag;
  }
  return Tage;
}

var WochenTage = new Array
                  ("Mo","Di","Mi","Do","Fr","Sa","So");

function CurrentDoomDay(jahr) {
   var CenturyDoomDay = new Array (5,4,2,0);
   var CC             = Math.floor(jahr/100);
   var YY             = jahr%100;
   var CCDoomDay      = CenturyDoomDay[CC%4];
   var YYDoomDay      = 0;

   if (YY == 0)
      YYDoomDay = CCDoomDay;
   else if (YY%12 == 0)
           YYDoomDay = (CCDoomDay + YY/12 - 1) % 7;
   else YYDoomDay = ( CCDoomDay
                     + (Math.floor(YY/12)
                     + (YY%12)
                     + Math.floor(((YY-1)%12)/4))
                    ) % 7;
   if ((CC%4 == 0) && (YY != 0))
      YYDoomDay = YYDoomDay + 1;

   return YYDoomDay;
}

function Kalenderwoche(tag,monat,jahr) {
   var Woche      = 0;
   var Wchtag1Jan = CurrentDoomDay(jahr);
   var Tage       = Tag_des_Jahres(tag,monat,jahr)-1;

   if (Wchtag1Jan > 3)
      Tage = Tage - (7 - Wchtag1Jan);
   else Tage = Tage + Wchtag1Jan;

   if (Tage < 0)
      if (   (Wchtag1Jan == 4)
          || (CurrentDoomDay(jahr-1) == 3))
         Woche = 53;
      else Woche = 52;
   else Woche = Math.floor(Tage/7) + 1;

   if ((Tage > 360) && (Woche > 52)) {
      if (Wchtag1Jan == 3)
          Woche = 53;
      else if (CurrentDoomDay(jahr+1) == 4)
              Woche = 53;
           else Woche = 1;
   }

   return Woche;
} 
//-->

