function update () {
	
}

var DatArray = new Array("So","Mo","Di","Mi","Do","Fr","Sa","??" );
var today = new Date();
var dayOffset = 1000 * 60 *60 * 24;
var tomorow = new Date(today.getTime() + dayOffset);
function writeDateSelect(startDate, howMany, selected){
startTime = startDate.getTime();
var day = new Date(startTime);
for (var i=1; i<howMany; i++){
day.setTime(startTime + (dayOffset * i));
var selectStr = "<option value=\"" + (day.getTime()-
(day.getTime()%1000))/1000 + "\""
if (i == selected){
selectStr = selectStr + " selected "
}
selectStr = selectStr + ">" + Getdatum(i) + "</option>";
document.write(selectStr);
}
}
function Getdatum(offset)
{
var time = new Date()
time.setTime( time.getTime()+offset*86400000)
return DatArray[time.getDay()]+' '+time.getDate()
+'.'+(1+time.getMonth())+'.'+(2000+(time.getYear()%100))
}
function MM_reloadPage(init)
{ //reloads the window if Nav4 resized
if (init==true) with (navigator)
{
if ((appName=='Netscape')&&(parseInt(appVersion)==4))
{
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage;
}
}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
var zufallszahl = 1 + 9999999*(Math.random());
var zahl = Math.round(zufallszahl);
// Funktioniert nicht mit Netscape 4.7 !!!

var jetzt = new Date();
var Tag = jetzt.getDate()+3;
var Monat = jetzt.getMonth();
var Jahr = jetzt.getFullYear();
// Kommentar: heutiges Datum plus 7 Tage ( + 7 kann verändert werden)
var bald = new Date(Jahr,Monat,Tag + 7);
var Tag_b = bald.getDate();
var Monat_b = bald.getMonth();
var Jahr_b = bald.getFullYear();
// Kommentar: erzeuge Dropdown-Inhalt per JS-Function
function create_dd(start,end,selected){
for(var COUNT=start; COUNT <= end; COUNT++){
if(COUNT == selected) document.write("<option value=" + COUNT +"selected>" + COUNT + "</option>");
else document.write("<option value="+ COUNT+">"+ COUNT+"</option>");
}
}





function switch_visibility(id) {
	if (id == 1) {
        div=document.getElementById("bla_1");
        div.style.display=div.style.display=="block" ? "block" : "block";
		
		div=document.getElementById("bla_2");
        div.style.display=div.style.display=="block" ? "none" : "none";
		div=document.getElementById("bla_3");
        div.style.display=div.style.display=="block" ? "none" : "none";
		}
	if (id == 2) {
		 div=document.getElementById("bla_2");
        div.style.display=div.style.display=="block" ? "block" : "block";
		div=document.getElementById("bla_1");
        div.style.display=div.style.display=="block" ? "none" : "none";
		div=document.getElementById("bla_3");
        div.style.display=div.style.display=="block" ? "none" : "none";
		}
		if (id == 3) {
		 div=document.getElementById("bla_3");
        div.style.display=div.style.display=="block" ? "block" : "block";
		div=document.getElementById("bla_1");
        div.style.display=div.style.display=="block" ? "none" : "none";
		div=document.getElementById("bla_2");
        div.style.display=div.style.display=="block" ? "none" : "none";
}
}




function OpenWindow(strZiel, strName) {
  if (strName == "Auswahl1") {
    var who=document.forms[0].vnd[document.forms[0].vnd.selectedIndex].text;
    var who_utc=document.forms[0].vnd[document.forms[0].vnd.selectedIndex].value;
  }
  if (strName == "Auswahl2") {
    var who=document.forms[0].bsd[document.forms[0].bsd.selectedIndex].text;
    var who_utc=document.forms[0].bsd[document.forms[0].bsd.selectedIndex].value;
  }
    var elemente = who.split(".");
    var intMonth = elemente[1];
    var intYear = elemente[2].slice(0,4);
	var diff = (screen.width) / 2;
	var xleft = diff -75;
    strZiel = strZiel + "&year=" + intYear + "&month=" + intMonth + "&checked_utc=" + who_utc;
  Test = window.open(strZiel, strName, 'left='+xleft+',top=360,width=250,height=150,scrollbars=no,resizable=no');

}

function abreise(){
    switch  (document.forms[0].mmc.selectedIndex){
        case 0:
            duration = 7;
            break;
        case 1:
            duration = 4;
            break;
        case 2:
            duration = 8;
            break;
        case 3:
            duration = 7;
            break;
        case 4:
            duration = 15;
            break;
        case 5:
            duration = 14;
            break;
        case 6:
            duration = 22;
            break;
        case 7:
            duration = 28;
            break;
    }
	
    if((document.forms[0].vnd.selectedIndex + duration) <= document.forms[0].bsd.options.length){
        document.forms[0].bsd.selectedIndex = document.forms[0].vnd.selectedIndex +duration;
    }
    else{
        document.forms[0].bsd.selectedIndex = document.forms[0].bsd.options.length-1;
    }
	switch  (document.forms[1].mmc.selectedIndex){
        case 0:
            duration = 7;
            break;
        case 1:
            duration = 4;
            break;
        case 2:
            duration = 8;
            break;
        case 3:
            duration = 7;
            break;
        case 4:
            duration = 15;
            break;
        case 5:
            duration = 14;
            break;
        case 6:
            duration = 22;
            break;
        case 7:
            duration = 28;
            break;
    }
	 if((document.forms[1].vnd.selectedIndex + duration) <= document.forms[1].bsd.options.length){
        document.forms[1].bsd.selectedIndex = document.forms[1].vnd.selectedIndex +duration;
    }
    else{
        document.forms[1].bsd.selectedIndex = document.forms[1].bsd.options.length-1;
    }
	switch  (document.forms[2].mmc.selectedIndex){
        case 0:
            duration = 7;
            break;
        case 1:
            duration = 4;
            break;
        case 2:
            duration = 8;
            break;
        case 3:
            duration = 7;
            break;
        case 4:
            duration = 15;
            break;
        case 5:
            duration = 14;
            break;
        case 6:
            duration = 22;
            break;
        case 7:
            duration = 28;
            break;
    }
	 if((document.forms[2].vnd.selectedIndex + duration) <= document.forms[2].bsd.options.length){
        document.forms[2].bsd.selectedIndex = document.forms[2].vnd.selectedIndex +duration;
    }
    else{
        document.forms[2].bsd.selectedIndex = document.forms[2].bsd.options.length-1;
    }
}


