function alloc() {
	
		var month = "";
		
		for (var i = 1; i <= 101; i++) {
		
			for (var j = 1; j  < 32; j++) {
				
				if(document.getElementById("start_" + i + ":" + j) !== null)	{
				
					if(document.getElementById("start_" + i + ":" + j).previousSibling !== null)	{
					
						// Hintergrund: grün - Vordergrund: rot 
						if(document.getElementById("start_" + i + ":" + j).previousSibling.className == "free" && document.getElementById("start_" + i + ":" + j).className == "startTaken")	{
							document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#94d1af";
						}
						
						// Hintergrund: rot - Vordergrund: grün
						if(document.getElementById("start_" + i + ":" + j).previousSibling.className == "taken" && document.getElementById("start_" + i + ":" + j).className == "startFree")	{
							document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#e8cac5";
						}
						
						// Hintergrund: rot - Vordergrund: blau
						if(document.getElementById("start_" + i + ":" + j).previousSibling.className == "taken" && document.getElementById("start_" + i + ":" + j).className == "startOnDemand")	{
							document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#e8cac5";
						}
						
						// Hintergrund: rot - Vordergrund: rot
						if(document.getElementById("start_" + i + ":" + j).previousSibling.className == "taken" && document.getElementById("start_" + i + ":" + j).className == "startTaken")	{
							document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#e8cac5";
						}
						
						// Hintergrund: grün - Vordergrund: blau
						if(document.getElementById("start_" + i + ":" + j).previousSibling.className == "free" && document.getElementById("start_" + i + ":" + j).className == "startOnDemand")	{
							document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#94d1af";
						}
						
						// Hintergrund: grün - Vordergrund: grün
						if(document.getElementById("start_" + i + ":" + j).previousSibling.className == "free" && document.getElementById("start_" + i + ":" + j).className == "startFree")	{
							document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#94d1af";
						}
						
						// Hintergrund: blau - Vordergrund: grün
						if(document.getElementById("start_" + i + ":" + j).previousSibling.className == "onDemand" && document.getElementById("start_" + i + ":" + j).className == "startFree")	{
							document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
						}
						
						// Hintergrund: blau - Vordergrund: rot
						if(document.getElementById("start_" + i + ":" + j).previousSibling.className == "onDemand" && document.getElementById("start_" + i + ":" + j).className == "startTaken")	{
							document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
						}
						
						// Hintergrund: blau - Vordergrund: blau
						if(document.getElementById("start_" + i + ":" + j).previousSibling.className == "onDemand" && document.getElementById("start_" + i + ":" + j).className == "startOnDemand")	{
							document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
						}
						
						// Vorheriges Feld ist ein	Startfeld
						
						// Hintergrund: rot - Vordergrund: rot
						if(document.getElementById("start_" + i + ":" + j).previousSibling.className == "startTaken" && document.getElementById("start_" + i + ":" + j).className == "startTaken")	{
							document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#e8cac5";
						}
					
					}else	{
					
						month = (i-1);
					
						//sumOfChildNotes = document.getElementById(month).childNodes.length;
						if(month != "0")	{
							
							if(document.getElementById(month).lastChild.className == "free"){
								document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#94d1af";
							}
							if(document.getElementById(month).lastChild.className == "taken"){
								document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#e8cac5";
							}
							if(document.getElementById(month).lastChild.className == "onDemand"){
								document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
							}
							
							// Letzes Feld ist ein Start-Feld
							if(document.getElementById(month).lastChild.className == "startFree"){
								document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#94d1af";
							}
							if(document.getElementById(month).lastChild.className == "startTaken"){
								document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#e8cac5";
							}
							if(document.getElementById(month).lastChild.className == "startOnDemand"){
								document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
							}
							
							// Letzes Feld ist ein Ende-Feld
							if(document.getElementById(month).lastChild.className == "endFree"){
								document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#94d1af";
							}
							if(document.getElementById(month).lastChild.className == "endTaken"){
								document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#e8cac5";
							}
							if(document.getElementById(month).lastChild.className == "endOnDemand"){
								document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
							}
							//Ausgabe[i + ":" + j] = document.getElementById(month).lastChild.className;
							//document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
						}else 	{
							
							//Ausgabe[i + ":" + j] = 	"onDemand"
							document.getElementById("start_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
						}
						
					}
					
				}
				
				// Ende
				if(document.getElementById("end_" + i + ":" + j) !== null)	{
				
					if(document.getElementById("end_" + i + ":" + j).nextSibling !== null)	{
					
						// Hintergrund: grün - Vordergrund: rot 
						if(document.getElementById("end_" + i + ":" + j).nextSibling.className == "free" && document.getElementById("end_" + i + ":" + j).className == "endTaken")	{
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#94d1af";
						}
						
						// Hintergrund: rot - Vordergrund: grün
						if(document.getElementById("end_" + i + ":" + j).nextSibling.className == "taken" && document.getElementById("end_" + i + ":" + j).className == "endFree")	{
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#e8cac5";
						}
						
						// Hintergrund: rot - Vordergrund: blau
						if(document.getElementById("end_" + i + ":" + j).nextSibling.className == "taken" && document.getElementById("end_" + i + ":" + j).className == "endOnDemand")	{
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#e8cac5";
						}
						
						// Hintergrund: rot - Vordergrund: rot
						if(document.getElementById("end_" + i + ":" + j).nextSibling.className == "taken" && document.getElementById("end_" + i + ":" + j).className == "endTaken")	{
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#e8cac5";
						}
						
						// Hintergrund: grün - Vordergrund: blau
						if(document.getElementById("end_" + i + ":" + j).nextSibling.className == "free" && document.getElementById("end_" + i + ":" + j).className == "endOnDemand")	{
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#94d1af";
						}
						
						// Hintergrund: blau - Vordergrund: grün
						if(document.getElementById("end_" + i + ":" + j).nextSibling.className == "onDemand" && document.getElementById("end_" + i + ":" + j).className == "endFree")	{
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
						}
						
						// Hintergrund: blau - Vordergrund: rot
						if(document.getElementById("end_" + i + ":" + j).nextSibling.className == "onDemand" && document.getElementById("end_" + i + ":" + j).className == "endTaken")	{
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
						}
						
						// Hintergrund: blau - Vordergrund: blau
						if(document.getElementById("end_" + i + ":" + j).nextSibling.className == "onDemand" && document.getElementById("end_" + i + ":" + j).className == "endOnDemand")	{
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
						}
						
						
						// Nächstes Feld ist ein Endfeld	
						
						// Hintergrund: grün - Vordergrund: rot 
						if(document.getElementById("end_" + i + ":" + j).nextSibling.className == "endFree" && document.getElementById("end_" + i + ":" + j).className == "endTaken")	{
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#94d1af";
						}	
						
						// Hintergrund: grün - Vordergrund: blau 
						if(document.getElementById("end_" + i + ":" + j).nextSibling.className == "endFree" && document.getElementById("end_" + i + ":" + j).className == "endOnDemand")	{
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#94d1af";
						}
						
						// Hintergrund: grün - Vordergrund: grün 
						if(document.getElementById("end_" + i + ":" + j).nextSibling.className == "endFree" && document.getElementById("end_" + i + ":" + j).className == "endFree")	{
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#94d1af";
						}	
						
					}else	{
					
						month = (i+1);
						//sumOfChildNotes = document.getElementById(month).childNodes.length;
						if(month != "13")	{

							if(document.getElementById(month).firstChild.className == "free"){
								document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#94d1af";
							}
							if(document.getElementById(month).firstChild.className == "taken"){
								document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#e8cac5";
							}
							if(document.getElementById(month).firstChild.className == "onDemand"){
								document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
							}
							
							// Erstes Feld ist ein Start-Feld
							if(document.getElementById(month).firstChild.className == "startFree"){
								document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#94d1af";
							}
							if(document.getElementById(month).firstChild.className == "startTaken"){
								document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#e8cac5";
							}
							if(document.getElementById(month).firstChild.className == "startnDemand"){
								document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
							}
							
							// Erstes Feld ist ein Ende-Feld
							if(document.getElementById(month).firstChild.className == "endFree"){
								document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#94d1af";
							}
							if(document.getElementById(month).firstChild.className == "endTaken"){
								document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#e8cac5";
							}
							if(document.getElementById(month).firstChild.className == "endOnDemand"){
								document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
							}
							
						}else 	{
							
							//Ausgabe[i + ":" + j] = 	"onDemand"
							document.getElementById("end_" + i + ":" + j).style.backgroundColor = "#bdd6ef";
						}
						
					}
					
				}
				
			
			}
		
		}
}


