  hhs=new Array(24); hhm=new Array(24); sa="--:--"; su="--:--"; ma="--:--"; mu="--:--";
  datum=new Date(); jr=2012; mo=datum.getMonth()+1; tg=datum.getDate(); std=datum.getHours(); mi=datum.getMinutes();
  if (tg<10) {aktdatum="0"+tg+"."} else {aktdatum=tg+"."} 
  if (mo<10) {aktdatum=aktdatum+"0"+mo+"."} else {aktdatum=aktdatum+mo+"."}
  aktdatum=aktdatum+jr; jd0=juldatum(jr,mo,tg,0);
  for (i=0;i<25;i++) {jd=juldatum(jr,mo,tg,i-1); stz=stzt(jd0,i-1); t=(jd-51545)/36525; hhm[i]=mohh(jd,t,stz,0)+0.0145; hhs[i]=sohh(jd,t,stz,0)+0.0145;}
  i=1; do {
    if (hhs[i-1]<0 && hhs[i+1]>0) {sa=suchzeit(hhs[i-1],hhs[i],hhs[i+1],i);}
	if (hhs[i-1]>0 && hhs[i+1]<0) {su=suchzeit(hhs[i-1],hhs[i],hhs[i+1],i);}
	if (hhm[i-1]<0 && hhm[i+1]>0) {ma=suchzeit(hhm[i-1],hhm[i],hhm[i+1],i);}
	if (hhm[i-1]>0 && hhm[i+1]<0) {mu=suchzeit(hhm[i-1],hhm[i],hhm[i+1],i);}
	i=i+2;
  } while (i<24);
  std=std+mi/60; jd0=juldatum(jr,mo,tg,0); jd=juldatum(jr,mo,tg,std-1); stz=stzt(jd0,std-1); t=(jd-51545)/36525; 
  lgm=mohh(jd,t,stz,1); lgs=sohh(jd,t,stz,1); ps=lgm-lgs; if (ps<0) {ps=ps+360}
  var pspic="mondphasen/mond"; ps=Math.round(ps/2); if (ps<10) {pspic=pspic+"00";}
  if (ps<100 && ps>9) {pspic=pspic+"0";}
  pspic=pspic+ps+".jpg";
  zuf=Math.floor(Math.random()*9)+1; picim1="bilder/start2"+zuf+".jpg";
  zuf=Math.floor(Math.random()*9)+1; picim2="bilder/start4"+zuf+".jpg";
  zuf=Math.floor(Math.random()*9)+1; picim3="bilder/start6"+zuf+".jpg";
  zuf=Math.floor(Math.random()*4); picim4="bilder/start0"+zuf+".jpg";
//-----------------------------------------------------------------------------------------------
  function juldatum(j0,m0,t0,st0) {  
    if (m0<=2) {y=j0-1; m=m0+12;}
	if (m0>2) {m=m0; y=j0;}
	b=Math.floor(y/400)-Math.floor(y/100); jd=Math.floor(365.25*y)+Math.floor(30.6001*(m+1))+b+1720996.5+t0+(st0-1)/24; jd=jd-2400000; return jd;
  }
  function stzt(jd0,std) {  
    jd0=jd0-1/24; gmst=6.656306+0.06570982*(jd0-45700.5)+1.0027379093*(std-1);
	lmst=frac((gmst*15+7)/360)*360; if (lmst<0) {lmst=lmst+360}
	lmst=lmst/57.29577951; return lmst;
  }
  function mohh(jd,t,stz,mod) {  
    lo=frac(0.606433+1336.855225*t)*360; l=frac(0.374897+1325.552410*t)*360; ls=frac(0.993133+99.99736*t)*360; 
	f=frac(0.259086+1342.227825*t)*360; d=frac(0.827361+1236.853087*t)*360;
	dl=22640*sn(l)-4586*sn(l-2*d)+2370*sn(2*d)+769*sn(2*l)-668*sn(ls)-412*sn(2*f)-212*sn(2*l-2*d)-206*sn(l+ls-2*d);
	dl=dl+192*sn(l+2*d)-165*sn(ls-2*d)-125*sn(d)-110*sn(l+ls)+148*sn(l-ls)-55*sn(2*f-2*d);
	s=f+(dl+412*sn(2*f)+541*sn(ls))/3600; h=f-2*d; n=-526*sn(h)+44*sn(l+h)-31*sn(-l+h)-23*sn(ls+h)+11*sn(-ls+h)-25*sn(-2*l+f)+21*sn(-l+f);
	lg=frac((lo+dl/3600)/360)*360; br=(18520*sn(s)+n)/3600; if (mod==1) {hh=lg; return hh;}
	x=cs(br)*cs(lg); y=0.91748*cs(br)*sn(lg)-0.39778*sn(br); z=0.39778*cs(br)*sn(lg)+0.91748*sn(br);
	ra=Math.atan2(y,x)*57.29577951; de=Math.atan(z/Math.sqrt(x*x+y*y))*57.29577951;
    x=384000*cs(de)*cs(ra)-6378*0.62388*Math.cos(stz); y=384000*cs(de)*sn(ra)-6378*0.62388*Math.sin(stz); z=384000*sn(de)-6378*0.78152;
    ra=Math.atan2(y,x)*57.29577951; de=Math.atan(z/Math.sqrt(x*x+y*y))*57.29577951;
    x=0.78152*cs(de)*cs(stz*57.29577951-ra)-0.62388*sn(de); y=cs(de)*sn(stz*57.29577951-ra);
    z=0.78152*sn(de)+0.62388*cs(de)*cs(stz*57.29577951-ra); hh=Math.atan(z/Math.sqrt(x*x+y*y)); hh=Math.sin(hh); return hh;
  }
  function sohh(jd,t,stz,mod) {  
    m=frac(0.993133+99.997361*t)*360; dl=6893*sn(m)+72*sn(2*m);
	lg=frac(0.7859453+m/360)*360+(6191.2*t+dl)/3600; if (mod==1) {return lg;}
	x=cs(lg); y=0.91748*sn(lg); z=0.39778*sn(lg);
	ra=Math.atan2(y,x)*57.29577951; de=Math.atan(z/Math.sqrt(x*x+y*y))*57.29577951;
    x=0.78152*cs(de)*cs(stz*57.29577951-ra)-0.62388*sn(de); y=cs(de)*sn(stz*57.29577951-ra);
    z=0.78152*sn(de)+0.62388*cs(de)*cs(stz*57.29577951-ra); hh=Math.atan(z/Math.sqrt(x*x+y*y)); hh=Math.sin(hh); return hh;
  }
  function suchzeit(ymi,y0,ypl,std) {
    a=0.5*(ypl+ymi)-y0; b=0.5*(ypl-ymi); c=y0;
    xe=-b/(2*a); ye=(a*xe+b)*xe+c; dis=b*b-4*a*c;
    dx=0.5*Math.sqrt(dis)/Math.abs(a); nu1=xe-dx; nu2=xe+dx;
    if (Math.abs(nu1)<=1) {zt=i+nu1;}
    if (Math.abs(nu2)<=1) {zt=i+nu2;}
	st=Math.floor(zt); mi=Math.floor(frac(zt)*60);
	if (mi<0) {mi=mi+60; st--;}
	if (st<10) {zeit="0"+st+":";} else {zeit=st+":";}
	if (mi<10) {zeit=zeit+"0"+mi;} else {zeit=zeit+mi;}
	return zeit;
  }
  function frac(wert) {wert=wert-Math.floor(wert); return wert;}
  function sn(wert) {wert=Math.sin(wert/57.29577951); return wert;}
  function cs(wert) {wert=Math.cos(wert/57.29577951); return wert;}
