Temp = new Array (

"le,de,df,md","","","",
"le,de,df,md","","","",
"le,de,df,md","","","",
"le,de,df,md","","","",				//Januar 1998
"le,de,df,md","","","",
"le,de,df,md","","","",
"le,de,df,md,je","","","",
"le,de,df,md,je","","","",
"le,de,df,md,je","","","",			//Juni 1998
"le,de,df,md,je,ks","","","",
"le,de,df,md,je,ks","","","",	
"le,de,df","md,je,ks","","",			//September 1998
"le,de,df","md,je,ks","","",	
"le,de,df","md,je,ks","","",			//November 1998
"le,de,df","md,je,ks","","",
"le,de,df","md,je,ks,ma","","",			//Januar 1999
"le,de,df,no","md,je,ks,ma","","",
"md,de","le,ks,je,ma","df,no,la","",
"md,de,hm","le,ks,je,ma","df,no,la","",		//April 1999
"md,de,hm","le,ks,je,ma","df,no,la","hs",
"md,de,hm","le,ks,je,ma","df,no,la","hs",	//Juni 1999
"md,de,hm","le,ks,je,ma","df,no,la","hs",
"md,hm","le,ks,je,ma","df,no,la","hs",		//August 1999
"md,hm","le,ks,ma","df,no,la","hs",
"md,hm","le,ks,ma","df,no,la","hs",
"md,hm","le,ks,ma","df,no,la","hs",		//November 1999
"md,hm","le,ks,ma","df,no,la","hs",
"md,hm,lo","le,ks,nu","df,no,la","hs",		//Januar 2000
"md,hm,lo","le,ks,nu","df,no,la","hs",
"md,hm,lo","le,ks,nu","df,no,la,bl","hs",	//März 2000
"md,hm,lo","le,ks,nu","df,no,la,bl","hs,gm",
"md,hm,lo","le,ks,nu","df,no,la,bl","hs,gm"	//Mai 2000
);


Druck = new Array(
"","","","",					//Oktober 1997
"","","","",
"","","","",
"","","","",					//Januar 1998
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",					//Januar 1999
"","","","",
"","","","",
"md","le,je,ks,ma","df,no,la","",		//April 1999
"md,hm","le,ks,je","df,no,la","",
"md","le,ks,je","no","hs",			//Juni 1999
"md,hm","le,ks,ma","df,no,la","hs",
"md,hm","le,ks,ma","df,no,la","hs",		//August 1999
"md,hm","le,ks,ma","df,no,la","hs",
"md,hm","le,ks,ma","df,no,la","hs",
"md,hm","le,ks,ma","df,no,la","hs",		//November 1999
"md,hm","le,ks,ma","df,no,la","hs",
"md,hm,lo","le,ks,nu","df,no,la","hs",		//Januar 2000
"md,hm,lo","le,ks,nu","df,no,la","hs",
"md,hm,lo","le,ks,nu","df,no,la,bl","hs",	//März 2000
"md,hm,lo","le,ks,nu","df,no,la,bl","hs,gm",
"md,hm,lo","le,ks,nu","df,no,la,bl","hs,gm"	//Mai 2000
);

Regen = new Array(
"","","","",					//Oktober 1997
"","","","",
"","","","",
"","","","",					//Januar 1998
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",
"","","","",					//Januar 1999
"","","","",
"md,de","le,ks,je,ma","df,no,la","",
"md,de,hm","le,ks,je,ma","df,no,la","",		//April 1999
"md,de,hm","le,ks,je,ma","df,no,la","",
"md,de,hm","le,ks,je,ma","df,no,la","hs",	//Juni 1999
"md,de,hm","le,ks,je,ma","df,no,la","hs",
"md,de,hm","le,ks,je,ma","df,no,la","hs",	//August 1999
"md,le,hm","ks,je,ma","df,no,la","hs",
"md,le,hm","ks,ma","df,no,la","hs",
"md,le,hm","ks,ma","df,no,la","hs",		//November 1999
"md,le,hm","ks,ma","df,no,la","hs",
"md,le,hm","ks,ma","df,no,la","hs",		//Januar 2000
"","","","",
"md,hm,lo","le,ks,nu","df,no,la,bl","hs",	//März 2000
"md,hm,lo","le,ks,nu","df,no,la,bl","hs,gm",
"md,hm,lo","le,ks,nu","df,no,la,bl","hs,gm"	//Mai 2000
);


imgDir = "../img/dia/";


function runSelection()
{
	fileName="";
	with (document.DiaSelection) {
		fileName=Groesse.options[Groesse.selectedIndex].value;
		fileName=fileName+Monat.options[Monat.selectedIndex].value;		
		Month=Math.round(fileName.substring(3,5));
		Year=Math.round(fileName.substring(1,3));	
		if (Year<97) Year=Year+100;
		found=false;
		if (Groesse.options[Groesse.selectedIndex].value=="t") {
			if (Temp[(Year-97)*12*4+(Month-1)*4-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"a";
				found=true;
			}
			if (Temp[(Year-97)*12*4+(Month-1)*4+1-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"b";
				found=true;
			}
			if (Temp[(Year-97)*12*4+(Month-1)*4+2-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"c";
				found=true;
			}
			if (Temp[(Year-97)*12*4+(Month-1)*4+3-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"d";
				found=true;
			}
			if ((Math.round(Monat.options[Monat.selectedIndex].value)<=9902)&&(Math.round(Monat.options[Monat.selectedIndex].value)>=9701)) {
				breite = 717;
				hoehe = 364;
			} 
			else {
				breite = 547;
				hoehe = 368;
			}			
		}
		if (Groesse.options[Groesse.selectedIndex].value=="d") {
			if (Druck[(Year-97)*12*4+(Month-1)*4-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"a";
				found=true;
			}
			if (Druck[(Year-97)*12*4+(Month-1)*4+1-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"b";
				found=true;
			}
			if (Druck[(Year-97)*12*4+(Month-1)*4+2-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"c";
				found=true;
			}
			if (Druck[(Year-97)*12*4+(Month-1)*4+3-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"d";
				found=true;
			}
			if (Math.round(Monat.options[Monat.selectedIndex].value)==9904) {
				breite = 600;
				hoehe = 400;
			} 
			if (Math.round(Monat.options[Monat.selectedIndex].value)==9905) {
				breite = 590;
				hoehe = 370;
			}
			if ((Math.round(Monat.options[Monat.selectedIndex].value)>=9906)||(Math.round(Monat.options[Monat.selectedIndex].value)<9904)) {
				breite = 547;
				hoehe = 368;
			}
		}		
		if (Groesse.options[Groesse.selectedIndex].value=="n") {
			if (Regen[(Year-97)*12*4+(Month-1)*4-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"a";
				found=true;
			}
			if (Regen[(Year-97)*12*4+(Month-1)*4+1-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"b";
				found=true;
			}
			if (Regen[(Year-97)*12*4+(Month-1)*4+2-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"c";
				found=true;
			}
			if (Regen[(Year-97)*12*4+(Month-1)*4+3-36].indexOf(Stadt.options[Stadt.selectedIndex].value)!=-1) { 
				fileName=fileName+"d";
				found=true;
			}
			
			breite = 640;
			hoehe = 340;
		
		}		
		
		fileName=imgDir+fileName+".gif";
		//alert(fileName);			
	}
	if (found) {
		diaWin = open(fileName,"Diagramm","width="+breite+",height="+hoehe);
		diaWin.focus();
	}
	else {
		alert("Für den gewählten Zeitraum existiert von der Station kein Diagramm!");
	}
}