
<!-- copyright joachim hecht - monks aerzte-im-netz 
//Datums ausgabe Formatierung
function makeArray(len){
for (var i = 0; i < len; i++) this[i]=null;
this.length = len;
}
function makeArray() {
    for (i = 0; i<makeArray.arguments.length; i++)
        this[i + 1] = makeArray.arguments[i];
}
var months = new makeArray('Januar','Februar',unescape('M%E4rz'),'April',
                           'Mai','Juni','Juli','August','September',
                           'Oktober','November','Dezember');
function y2k(number) { return (number < 1000) ? number + 1900 : number; }
function PregEvent(theForm) {

//Daten ausgabe:

//Setzen des Befruchtungsdatums
var v_LastMensDate = Date.UTC(theForm.Year.value, theForm.Month.options[theForm.Month.selectedIndex].value, theForm.Date.options[theForm.Date.selectedIndex].value);

//Berechnung Eisprung und Befruchtung 
var v_FertDateMS = v_LastMensDate + (theForm.Cycle.options[theForm.Cycle.selectedIndex].value *  86400000) - 1209600000;
var v_FertDateFormatted = new Date(v_FertDateMS)
theForm.FertDate.value = v_FertDateFormatted.getDate()  + ". " +  months[v_FertDateFormatted.getMonth() + 1]  + " " + y2k(v_FertDateFormatted.getYear());

//Berechnung Einnistung 5 Tage
var v_5daysMS = v_FertDateMS + 432000000;
var v_5daysFormatted = new Date(v_5daysMS)
theForm.EstDate5D.value = v_5daysFormatted.getDate()  + ". " +  months[v_5daysFormatted.getMonth() + 1]  + " " + y2k(v_5daysFormatted.getYear());

//Berechnung Urinschwangerschaftstest 14 Tage
var v_14daysMS = v_FertDateMS + 1209600000;
var v_14daysFormatted = new Date(v_14daysMS)
theForm.EstDate14D.value = v_14daysFormatted.getDate()  + ". " +  months[v_14daysFormatted.getMonth() + 1]  + " " + y2k(v_14daysFormatted.getYear());

//Berechnung erster Temin beim Frauenarzt 28 Tage
var v_28daysMS = v_FertDateMS + 2419200000;
var v_28daysFormatted = new Date(v_28daysMS)
theForm.EstDate28D.value = v_28daysFormatted.getDate()  + ". " +  months[v_28daysFormatted.getMonth() + 1]  + " " + y2k(v_28daysFormatted.getYear());

//Berechnung Herzschlag im Ultraschall 28 Tage
var v_u_28daysMS = v_FertDateMS + 2419200000;
var v_u_28daysFormatted = new Date(v_u_28daysMS)
theForm.EstDate28UD.value = v_u_28daysFormatted.getDate()  + ". " +  months[v_u_28daysFormatted.getMonth() + 1]  + " " + y2k(v_u_28daysFormatted.getYear());

//Berechnung Erste große Ultaschalluntersuchung Termin A 43 Tage
var v_a_43daysMS = v_FertDateMS + 3715200000;
var v_a_43daysFormatted = new Date(v_a_43daysMS)
theForm.EstDatea_43D.value = v_a_43daysFormatted.getDate()  + ". " +  months[v_a_43daysFormatted.getMonth() + 1]  + " " + y2k(v_a_43daysFormatted.getYear());

//Berechnung Erste große Ultaschalluntersuchung Termin B 70 Tage
var v_b_70daysMS = v_FertDateMS + 6048000000;
var v_b_70daysFormatted = new Date(v_b_70daysMS)
theForm.EstDateb_70D.value = v_b_70daysFormatted.getDate()  + ". " +  months[v_b_70daysFormatted.getMonth() + 1]  + " " + y2k(v_b_70daysFormatted.getYear());

//Berechnung Nackenfaltentransparenzmessung Termin A 64 Tage
var v_a_64daysMS = v_FertDateMS + 5529600000;
var v_a_64daysFormatted = new Date(v_a_64daysMS)
theForm.EstDatea64D.value = v_a_64daysFormatted.getDate()  + ". " +  months[v_a_64daysFormatted.getMonth() + 1]  + " " + y2k(v_a_64daysFormatted.getYear());

//Berechnung Nackenfaltentransparenzmessung Termin B 84 Tage
var v_b_84daysMS = v_FertDateMS + 7257600000;
var v_b_84daysFormatted = new Date(v_b_84daysMS)
theForm.EstDateb84D.value = v_b_84daysFormatted.getDate()  + ". " +  months[v_b_84daysFormatted.getMonth() + 1]  + " " + y2k(v_b_84daysFormatted.getYear());

//Berechnung Fruchtwasseruntersuchung Termin A 91 Tage
var v_a_91daysMS = v_FertDateMS + 7862400000;
var v_a_91daysFormatted = new Date(v_a_91daysMS)
theForm.EstDatea91D.value = v_a_91daysFormatted.getDate()  + ". " +  months[v_a_91daysFormatted.getMonth() + 1]  + " " + y2k(v_a_91daysFormatted.getYear());

//Berechnung Fruchtwasseruntersuchung Termin B 112 Tage
var v_b_112daysMS = v_FertDateMS + 9676800000;
var v_b_112daysFormatted = new Date(v_b_112daysMS)
theForm.EstDateb112D.value = v_b_112daysFormatted.getDate()  + ". " +  months[v_b_112daysFormatted.getMonth() + 1]  + " " + y2k(v_b_112daysFormatted.getYear());

//Berechnung Zweite große Ultaschalluntersuchung Termin A 119 Tage
var v_a_119daysMS = v_FertDateMS + 10281600000;
var v_a_119daysFormatted = new Date(v_a_119daysMS)
theForm.EstDatea119D.value = v_a_119daysFormatted.getDate()  + ". " +  months[v_a_119daysFormatted.getMonth() + 1]  + " " + y2k(v_a_119daysFormatted.getYear());

//Berechnung Zweite große Ultaschalluntersuchung Termin B 140 Tage
var v_b_140daysMS = v_FertDateMS + 12096000000;
var v_b_140daysFormatted = new Date(v_b_140daysMS)
theForm.EstDateb140D.value = v_b_140daysFormatted.getDate()  + ". " +  months[v_b_140daysFormatted.getMonth() + 1]  + " " + y2k(v_b_140daysFormatted.getYear());

//Berechnung ersten Kindsbewegungen 126 Tage
var v_126daysMS = v_FertDateMS + 10886400000;
var v_126daysFormatted = new Date(v_126daysMS)
theForm.EstDate126D.value = v_126daysFormatted.getDate()  + ". " +  months[v_126daysFormatted.getMonth() + 1]  + " " + y2k(v_126daysFormatted.getYear());

//Berechnung Frühgeborene 154 Tage
var v_154daysMS = v_FertDateMS + 13305600000;
var v_154daysFormatted = new Date(v_154daysMS)
theForm.EstDate154D.value = v_154daysFormatted.getDate()  + ". " +  months[v_154daysFormatted.getMonth() + 1]  + " " + y2k(v_154daysFormatted.getYear());

//Berechnung Dritte große Ultaschalluntersuchung Termin A 189 Tage
var v_a_189daysMS = v_FertDateMS + 16329600000;
var v_a_189daysFormatted = new Date(v_a_189daysMS)
theForm.EstDatea189D.value = v_a_189daysFormatted.getDate()  + ". " +  months[v_a_189daysFormatted.getMonth() + 1]  + " " + y2k(v_a_189daysFormatted.getYear());

//Berechnung Dritte große Ultaschalluntersuchung Termin B 210 Tage
var v_b_210daysMS = v_FertDateMS + 18144000000;
var v_b_210daysFormatted = new Date(v_b_210daysMS)
theForm.EstDateb210D.value = v_b_210daysFormatted.getDate()  + ". " +  months[v_b_210daysFormatted.getMonth() + 1]  + " " + y2k(v_b_210daysFormatted.getYear());

//Berechnung Geburtsvorbereitung 197 Tage
var v_197daysMS = v_FertDateMS + 17020800000;
var v_197daysFormatted = new Date(v_197daysMS)
theForm.EstDate197D.value = v_197daysFormatted.getDate()  + ". " +  months[v_197daysFormatted.getMonth() + 1]  + " " + y2k(v_197daysFormatted.getYear());

//Berechnung Mutterschutzes 225 Tage
var v_225daysMS = v_FertDateMS + 19440000000;
var v_225daysFormatted = new Date(v_225daysMS)
theForm.EstDate225D.value = v_225daysFormatted.getDate()  + ". " +  months[v_225daysFormatted.getMonth() + 1]  + " " + y2k(v_225daysFormatted.getYear());

//Berechnung Entbindungstermin 267 Tage
var v_267daysMS = v_FertDateMS + 23068800000;
var v_267daysFormatted = new Date(v_267daysMS)
theForm.EstDate267D.value = v_267daysFormatted.getDate()  + ". " +  months[v_267daysFormatted.getMonth() + 1]  + " " + y2k(v_267daysFormatted.getYear());
}
// -->

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { 
        obj=obj.style; 
        if(v == 'show') {
            display = 'block';
        }
        else if(v == 'hide') {
            display = 'none';
        }
        v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
    }
    obj.visibility=v;
    obj.display=display;
   }
}
