// Notdienst Pfaffenhofen

var Apotheke = new Array();

Apotheke[0] = new Array("St.-Johannis-Apotheke<br>Hauptplatz 25<br>85276 Pfaffenhofen<br>Tel.: (0 84 41) 8 09 40",
	"Hofmark-Apotheke<br>Bahnhofstr. 8<br>85296 Rohrbach<br>Tel.: (0 84 42) 86 70",
	"St.-Florian-Apotheke<br>Moosburger Str. 3<br>85406 Zolling<br>Tel.: (0 81 67) 15 00");

Apotheke[1] = new Array("Marien-Apotheke<br>Schyrenplatz 2<br>85298 Scheyern<br>Tel.: (0 84 41) 4 03 60",
	"Kapuziner-Apotheke<br>Kapuzinerstr. 4<br>85283 Wolnzach<br>Tel.: ( 0 84 42) 9 26 80");

Apotheke[2] = new Array("Rathaus-Apotheke<br>Hauptplatz 5<br>85276 Pfaffenhofen<br>Tel.: (0 84 41) 80 94 21",
	"Sonnen-Apotheke<br>Abensbergstr. 46<br>84048 Mainburg<br>Tel.: (0 87 51) 84 51 84");

Apotheke[3] = new Array("Adler-Apotheke<br>Hauptstr. 32<br>85301 Schweitenkirchen<br>Tel.: (0 84 44) 12 70",
	"Marien-Apotheke<br>Augsburger Str. 5<br>85290 Geisenfeld<br>Tel.:(0 84 52) 5 08");

Apotheke[4] = new Array("Stadt-Apotheke<br>Hauptplatz 30<br>85276 Pfaffenhofen<br>Tel.: (0 84 41) 26 55",
	"Apotheke im Winklerbräu<br>Landshuter Str. 1<br>84048 Mainburg<br>Tel.: (0 87 51) 81 08 65");

Apotheke[5] = new Array("Engel-Apotheke<br>Preysingstr. 18<br>85283 Wolnzach<br>Tel.: (0 84 42) 26 71",
	"Rathaus-Apotheke<br>Pfaffenhofener Str. 4<br>85293 Reichertshausen<br>Tel.: (0 84 41) 4 04 90");

Apotheke[6] = new Array("Kreisapotheke am Volksfestplatz<br>Ingolstädter Str. 57<br>85276 Pfaffenhofen<br>Tel.: (0 84 41) 49 04 10",
	"Gabelsberger-Apotheke<br>Abensberger Str. 19<br>84048 Mainberg<br>Tel.: (0 87 51) 8 64 50");

Apotheke[7] = new Array("Marien-Apotheke<br>Bäcker-Nandl-Gasse 2<br>85283 Wolnzach<br>Tel.: (0 84 42) 34 35",
	"Richildis-Apotheke<br>Marktplatz 4<br>86558 Hohenwart<br>Tel.: (0 84 43) 2 72");

Apotheke[8] = new Array("Ilm-Apotheke<br>Münchener Str. 18<br>85276 Pfaffenhofen<br>Tel.: (0 84 41) 96 29",
	"St.-Martin-Apotheke<br>Marktstr. 14a<br>85405 Nandlstadt<br>Tel.: (0 87 56) ");

Apotheke[9] = new Array("Schyren-Apotheke<br>Adolf-Rebl-Str. 40<br>85296 Rohrbach<br>Tel.: (0 84 41) 40 84 60",
	"Marien-Apotheke<br>Klosterberg 4<br>84072 Au<br>Tel.: (0 8752) 2 14");

Apotheke[10] = new Array("Sonnen-Apotheke<br>Pfaffenhofener Str. 6<br>85290 Geisenfeld<br>Tel.: (0 87 52) 86 90 00 0",
	"Linden-Apotheke<br>Kellerstr. 38-40<br>85276 Pfaffenhofen<br>Tel.: (0 84 41) 7 64 64",
	"Hopfen-Apotheke<br>Marienplatz 13<br>85290 Geisenfeld<br>Tel.: (0 84 52) 73 05 22");

Apotheke[11] = new Array("<b>Markt-Apotheke<br>Hauptplatz 10<br>85276 Pfaffenhofen<br>Tel.: (0 84 41) 8 44 48</b>",
	"Abens-Apotheke<br>Bahnhofstr. 10a<br>84048 Mainberg<br>Tel.: (0 87 51) 81 08 61");

Apotheke[12] = new Array("Hopfen-Apotheke<br>Hauptstr. 5<br>85395 Attenkirchen<br>Tel.: (0 81 68) 99 70 70</b>",
	"Schyren-Apotheke<br>Adolf-Rebl-Str. 40<br>85276 Pfaffenhofen<br>Tel.: (0 84 41) 40 84 60");


// Notdienstanfang der ersten Gruppe (minus 1 im Monat)
// 10.01.2004
var Anfang = new Date(2008,09,17);
var einTag = 86400000;
var Gruppe = 0;
var Gestern = 0;
var Morgen = 0;
var Tagevergangen = 0;

// aktuelles Datum holen und setzen -------------------
aktuell = new Date();
if (document.location.search.length > 1)
{
	aktuell.setTime(Number(document.location.search.substring(1)));
}

// gruppe errechnen, gruppe Apotheke[Gruppe] -------------------
Tagevergangen = aktuell.getTime() - Anfang.getTime();
Gruppe = Math.floor((Tagevergangen/einTag) % 13) ;

// Datumsstring erstellen
var Jahr = aktuell.getFullYear();
var Monat = aktuell.getMonth()+1;
var Tag = aktuell.getDate();
var Datum = Tag+"."+Monat+"."+Jahr ;

// Tage in millisekunden
Gestern = aktuell.getTime()-einTag;
Morgen = aktuell.getTime()+einTag;

// einzelne Apotheke aus der Gruppe
var aktuelleApotheke = new Array();
aktuelleApotheke=Apotheke[Gruppe];
if (!aktuelleApotheke[2]) aktuelleApotheke[2]="";

// debug -------------------
// document.write("<br>gruppe: "+Gruppe);
// document.write("<br> "+Apotheke[Gruppe]);
// document.write("<br> "+aktuelleApotheke[0]);
// document.write("<br> "+aktuelleApotheke[1]);
// document.write("<br> "+aktuelleApotheke[2]);
// document.write("<br><br>");
// document.write(Datum);
// document.write("<br><br>");
// document.write("<a href=scripttest.htm?"+Gestern+">gestern</a><br>");
// document.write("<a href=scripttest.htm?"+Morgen+">morgen</a><br>");
// debug ende


// This JavaScript is a fucking mystery. It seems like it just makes up a plan.
