bdlnr = new Array('08', '09', '11', '12', '04', '02', '06', '13', '03', '05', '07', '10', '14', '15', '01', '16');
bdlname = new Array('Baden-W\u00fcrttemberg', 'Bayern', 'Berlin', 'Brandenburg', 'Bremen', 'Hamburg', 'Hessen', 'Mecklenburg-Vorpommern', 'Niedersachsen', 'Nordrhein-Westfalen', 'Rheinland-Pfalz', 'Saarland', 'Sachsen', 'Sachsen-Anhalt', 'Schleswig-Holstein', 'Th\u00fcringen');
kreisnr= new Array('07', '09', '08', '16', '07', '15', '09', '07', '09', '09', '03', '15', '09', '09', '09', '03', '07', '09', '07', '09', '08', '09', '12', '14', '09', '09', '06', '11', '07', '08', '05', '07', '08', '05', '08', '05', '15', '05', '05', '12', '03', '08', '04', '04', '15', '08', '03', '09', '14', '03', '09', '07', '05', '12', '03', '09', '12', '06', '06', '09', '03', '15', '03', '09', '09', '01', '09', '07', '05', '14', '05', '05', '05', '09', '16', '09', '07', '16', '12', '03', '08', '03', '05', '08', '09', '16', '09', '09', '14', '05', '08', '05', '01', '09', '07', '12', '06', '08', '09', '08', '09', '03', '06', '09', '09', '09', '05', '16', '07', '06', '03', '08', '14', '03', '16', '03', '03', '16', '06', '09', '05', '05', '15', '02', '03', '05', '03', '15', '09', '12', '03', '08', '08', '08', '05', '03', '05', '05', '06', '01', '16', '03', '05', '06', '09', '08', '03', '05', '16', '09', '16', '15', '07', '08', '06', '09', '09', '09', '01', '09', '05', '07', '05', '08', '05', '09', '09', '07', '16', '06', '07', '09', '09', '03', '14', '14', '05', '09', '06', '09', '05', '08', '01', '03', '08', '07', '13', '03', '15', '06', '09', '08', '06', '07', '07', '08', '15', '06', '05', '12', '07', '13', '14', '09', '10', '05', '09', '09', '05', '14', '05', '09', '05', '09', '05', '08', '09', '09', '01', '10', '09', '09', '07', '09', '07', '03', '01', '16', '14', '13', '03', '09', '09', '09', '05', '05', '12', '12', '06', '12', '06', '06', '03', '03', '05', '08', '03', '08', '09', '03', '03', '01', '12', '05', '09', '03', '09', '08', '01', '07', '01', '12', '12', '12', '08', '08', '05', '09', '09', '03', '10', '05', '08', '01', '08', '05', '06', '07', '05', '05', '07', '08', '07', '05', '09', '09', '13', '03', '09', '09', '08', '16', '15', '16', '16', '10', '10', '14', '03', '15', '03', '01', '16', '09', '08', '06', '09', '08', '09', '13', '01', '05', '08', '05', '05', '16', '16', '07', '12', '10', '03', '05', '09', '01', '05', '15', '01', '09', '09', '08', '07', '07', '16', '12', '09', '09', '07', '07', '08', '08', '12', '03', '08', '05', '16', '09', '03', '03', '05', '06', '14', '13', '13', '07', '06', '08', '05', '16', '09', '09', '16', '16', '09', '06', '05', '03', '07', '06', '06', '03', '15', '03', '03', '03', '07', '09', '05', '09', '08', '07', '14');
kreisname= new Array('Ahrweiler', 'Aichach-Friedberg', 'Alb-Donau-Kreis', 'Altenburger Land', 'Altenkirchen (Westerwald)', 'Altmarkkreis Salzwedel', 'Alt\u00f6tting', 'Alzey-Worms', 'Amberg', 'Amberg-Sulzbach', 'Ammerland', 'Anhalt-Bitterfeld', 'Ansbach', 'Aschaffenburg', 'Augsburg', 'Aurich', 'Bad D\u00fcrkheim', 'Bad Kissingen', 'Bad Kreuznach', 'Bad T\u00f6lz-Wolfratshausen', 'Baden-Baden', 'Bamberg', 'Barnim', 'Bautzen', 'Bayreuth', 'Berchtesgadener Land', 'Bergstra\u00dfe', 'Berlin', 'Bernkastel-Wittlich', 'Biberach', 'Bielefeld', 'Birkenfeld', 'B\u00f6blingen', 'Bochum', 'Bodenseekreis', 'Bonn', 'B\u00f6rde', 'Borken', 'Bottrop', 'Brandenburg an der Havel', 'Braunschweig', 'Breisgau-Hochschwarzwald', 'Bremen', 'Bremerhaven', 'Burgenlandkreis', 'Calw', 'Celle', 'Cham', 'Chemnitz', 'Cloppenburg', 'Coburg', 'Cochem-Zell', 'Coesfeld', 'Cottbus', 'Cuxhaven', 'Dachau', 'Dahme-Spreewald', 'Darmstadt', 'Darmstadt-Dieburg', 'Deggendorf', 'Delmenhorst', 'Dessau-Roßlau', 'Diepholz', 'Dillingen a.d. Donau', 'Dingolfing-Landau', 'Dithmarschen', 'Donau-Ries', 'Donnersbergkreis', 'Dortmund', 'Dresden', 'Duisburg', 'D\u00fcren', 'D\u00fcsseldorf', 'Ebersberg', 'Eichsfeld', 'Eichst\u00e4tt', 'Eifelkreis Bitburg-Pr\u00fcm', 'Eisenach', 'Elbe-Elster', 'Emden', 'Emmendingen', 'Emsland', 'Ennepe-Ruhr-Kreis', 'Enzkreis', 'Erding', 'Erfurt', 'Erlangen', 'Erlangen-H\u00f6chstadt', 'Erzgebirgskreis', 'Essen', 'Esslingen', 'Euskirchen', 'Flensburg', 'Forchheim', 'Frankenthal (Pfalz)', 'Frankfurt (Oder)', 'Frankfurt am Main', 'Freiburg im Breisgau', 'Freising', 'Freudenstadt', 'Freyung-Grafenau', 'Friesland', 'Fulda', 'F\u00fcrstenfeldbruck', 'F\u00fcrth', 'Garmisch-Partenkirchen', 'Gelsenkirchen', 'Gera', 'Germersheim', 'Gießen', 'Gifhorn', 'G\u00f6ppingen', 'G\u00f6rlitz', 'Goslar', 'Gotha', 'G\u00f6ttingen', 'Grafschaft Bentheim', 'Greiz', 'Groß-Gerau', 'G\u00fcnzburg', 'G\u00fctersloh', 'Hagen', 'Halle (Saale)', 'Hamburg', 'Hameln-Pyrmont', 'Hamm', 'Harburg', 'Harz', 'Haßberge', 'Havelland', 'Heidekreis', 'Heidelberg', 'Heidenheim', 'Heilbronn', 'Heinsberg', 'Helmstedt', 'Herford', 'Herne', 'Hersfeld-Rotenburg', 'Herzogtum Lauenburg', 'Hildburghausen', 'Hildesheim', 'Hochsauerlandkreis', 'Hochtaunuskreis', 'Hof', 'Hohenlohekreis', 'Holzminden', 'H\u00f6xter', 'Ilm-Kreis', 'Ingolstadt', 'Jena', 'Jerichower Land', 'Kaiserslautern', 'Karlsruhe', 'Kassel', 'Kaufbeuren', 'Kelheim', 'Kempten (Allg\u00e4u)', 'Kiel', 'Kitzingen', 'Kleve', 'Koblenz', 'K\u00f6ln', 'Konstanz', 'Krefeld', 'Kronach', 'Kulmbach', 'Kusel', 'Kyffh\u00e4userkreis', 'Lahn-Dill-Kreis', 'Landau in der Pfalz', 'Landsberg am Lech', 'Landshut', 'Leer', 'Leipzig', 'Leipziger Land', 'Leverkusen', 'Lichtenfels', 'Limburg-Weilburg', 'Lindau (Bodensee)', 'Lippe', 'L\u00f6rrach', 'L\u00fcbeck', 'L\u00fcchow-Dannenberg', 'Ludwigsburg', 'Ludwigshafen am Rhein', 'Ludwigslust-Parchim', 'L\u00fcneburg', 'Magdeburg', 'Main-Kinzig-Kreis', 'Main-Spessart', 'Main-Tauber-Kreis', 'Main-Taunus-Kreis', 'Mainz', 'Mainz-Bingen', 'Mannheim', 'Mansfeld-S\u00fcdharz', 'Marburg-Biedenkopf', 'M\u00e4rkischer Kreis', 'M\u00e4rkisch-Oderland', 'Mayen-Koblenz', 'Mecklenburgische Seenplatte', 'Meißen', 'Memmingen', 'Merzig-Wadern', 'Mettmann', 'Miesbach', 'Miltenberg', 'Minden-L\u00fcbbecke', 'Mittelsachsen', 'M\u00f6nchengladbach', 'M\u00fchldorf a. Inn', 'M\u00fclheim an der Ruhr', 'M\u00fcnchen', 'M\u00fcnster', 'Neckar-Odenwald-Kreis', 'Neuburg-Schrobenhausen', 'Neumarkt i.d. OPf.', 'Neum\u00fcnster', 'Neunkirchen', 'Neustadt a.d. Aisch-Bad Windsheim', 'Neustadt a.d. Waldnaab', 'Neustadt an der Weinstraße', 'Neu-Ulm', 'Neuwied', 'Nienburg (Weser)', 'Nordfriesland', 'Nordhausen', 'Nordsachsen', 'Nordwestmecklenburg', 'Northeim', 'N\u00fcrnberg', 'N\u00fcrnberger Land', 'Oberallg\u00e4u', 'Oberbergischer Kreis', 'Oberhausen', 'Oberhavel', 'Oberspreewald-Lausitz', 'Odenwaldkreis', 'Oder-Spree', 'Offenbach', 'Offenbach am Main', 'Oldenburg', 'Oldenburg (Oldenburg)', 'Olpe', 'Ortenaukreis', 'Osnabr\u00fcck', 'Ostalbkreis', 'Ostallg\u00e4u', 'Osterholz', 'Osterode am Harz', 'Ostholstein', 'Ostprignitz-Ruppin', 'Paderborn', 'Passau', 'Peine', 'Pfaffenhofen a.d. Ilm', 'Pforzheim', 'Pinneberg', 'Pirmasens', 'Pl\u00f6n', 'Potsdam', 'Potsdam-Mittelmark', 'Prignitz', 'Rastatt', 'Ravensburg', 'Recklinghausen', 'Regen', 'Regensburg', 'Region Hannover', 'Regionalverband Saarbr\u00fccken', 'Remscheid', 'Rems-Murr-Kreis', 'Rendsburg-Eckernf\u00f6rde', 'Reutlingen', 'Rhein-Erft-Kreis', 'Rheingau-Taunus-Kreis', 'Rhein-Hunsr\u00fcck-Kreis', 'Rheinisch-Bergischer Kreis', 'Rhein-Kreis Neuss', 'Rhein-Lahn-Kreis', 'Rhein-Neckar-Kreis', 'Rhein-Pfalz-Kreis', 'Rhein-Sieg-Kreis', 'Rh\u00f6n-Grabfeld', 'Rosenheim', 'Rostock', 'Rotenburg (W\u00fcmme)', 'Roth', 'Rottal-Inn', 'Rottweil', 'Saale-Holzland-Kreis', 'Saalekreis', 'Saale-Orla-Kreis', 'Saalfeld-Rudolstadt', 'Saarlouis', 'Saarpfalz-Kreis', 'S\u00e4chsische Schweiz-Osterzgebirge', 'Salzgitter', 'Salzlandkreis', 'Schaumburg', 'Schleswig-Flensburg', 'Schmalkalden-Meiningen', 'Schwabach', 'Schw\u00e4bisch Hall', 'Schwalm-Eder-Kreis', 'Schwandorf', 'Schwarzwald-Baar-Kreis', 'Schweinfurt', 'Schwerin', 'Segeberg', 'Siegen-Wittgenstein', 'Sigmaringen', 'Soest', 'Solingen', 'S\u00f6mmerda', 'Sonneberg', 'Speyer', 'Spree-Neiße', 'St. Wendel', 'Stade', 'St\u00e4dteregion Aachen', 'Starnberg', 'Steinburg', 'Steinfurt', 'Stendal', 'Stormarn', 'Straubing', 'Straubing-Bogen', 'Stuttgart', 'S\u00fcdliche Weinstraße', 'S\u00fcdwestpfalz', 'Suhl', 'Teltow-Fl\u00e4ming', 'Tirschenreuth', 'Traunstein', 'Trier', 'Trier-Saarburg', 'T\u00fcbingen', 'Tuttlingen', 'Uckermark', 'Uelzen', 'Ulm', 'Unna', 'Unstrut-Hainich-Kreis', 'Unterallg\u00e4u', 'Vechta', 'Verden', 'Viersen', 'Vogelsbergkreis', 'Vogtlandkreis', 'Vorpommern-Greifswald', 'Vorpommern-R\u00fcgen', 'Vulkaneifel', 'Waldeck-Frankenberg', 'Waldshut', 'Warendorf', 'Wartburgkreis', 'Weiden i.d. OPf.', 'Weilheim-Schongau', 'Weimar', 'Weimarer Land', 'Weißenburg-Gunzenhausen', 'Werra-Meißner-Kreis', 'Wesel', 'Wesermarsch', 'Westerwaldkreis', 'Wetteraukreis', 'Wiesbaden', 'Wilhelmshaven', 'Wittenberg', 'Wittmund', 'Wolfenb\u00fcttel', 'Wolfsburg', 'Worms', 'Wunsiedel i. Fichtelgebirge', 'Wuppertal', 'W\u00fcrzburg', 'Zollernalbkreis', 'Zweibr\u00fccken', 'Zwickau');


function DateCheck(dat) {
	//if (document.getElementById('Kalender').style.visibility=='visible') {}
	if (1==2) {}
	else {
	OK = 1;
	//alert(dat.length)
	msg = "Falsches Datumsformat! \n richtig w\u00e4re : 01.01.2014 \n\n Tag: 2-stellig \n Monat: 2-stellig \n Jahr: 4-stellig \n\n ";
	if (dat.length != 10) { OK=0; msg += "Ung\u00fcltige Zeichenanzahl \n"; }
	Punkt = dat.substr(2,1); if (Punkt != "." ) { OK=0; msg += "Zeichen 3 : . \n"; }
	Punkt = dat.substr(5,1); if (Punkt != "." ) { OK=0; msg += "Zeichen 5 : . \n"; }
	//if (OK==0) { alert(msg); } 
	if (OK==1) {
	Tag = dat.substr(0,2); Monat = dat.substr(3,2); Jahr = dat.substr(6,4);
	if (Monat.substr(0,1) == 0) Monat = Monat.substr(1,1);
	//if (! (Monat > 0 && Monat < 13)) alert(msg + "\n Monat > 12 !!! " + "\n");
//Das Monitoringjahr geht immer von Mai bis April z.B. WJ 10/11 (01.05.2010-30.04.2011). WJ 2011/2012 (01.05.2011-30.04.2012) 
	Mjahr = Jahr.substr(2,2); Mjahr++;Mjahr--; NJ = Mjahr+1; LJ = Mjahr-1; 
	if (Mjahr == "00") LJ = "99";
	if (Mjahr < 10)Mjahr = "0" + Mjahr; if (NJ < 10) NJ = "0" + NJ; if (LJ < 10) LJ = "0" + LJ;
	if (Monat > 4) Mjahr = Mjahr +"_"+ NJ;  
	if (Monat < 5) Mjahr = LJ +"_"+ Mjahr; 
	document.getElementById('Mjahr').value = Mjahr;
//Saison: Winter (w): DEZ, JAN, FEB; Frühling (f): MäRZ, APRIL, MAI; Sommer (s): JUNI, JULI, AUGUST; Herbst (h): SEP, OKT, NOV
	Saison = "Unbestimmt"; 
	if (Monat == 12 || Monat == 1 || Monat == 2) Saison = "w";
	if (Monat == 3 || Monat == 4 || Monat == 5) Saison = "f";
	if (Monat == 6 || Monat == 7 || Monat == 8) Saison = "s";
	if (Monat == 9 || Monat == 10 || Monat == 11) Saison = "h";
	document.getElementById('Saison').value = Saison;
	document.getElementById('Jahr').value = Jahr;
	document.getElementById('Monat').value = Monat;
	//alert(Tag + " - " + Monat + " - " + Jahr);
	}