Index: schedule/Module/calendar.php
===================================================================
--- schedule/Module/calendar.php	(revision 16395)
+++ schedule/Module/calendar.php	(revision 16396)
@@ -110,7 +110,4 @@
 							var T = [];
 							var src = 0;
-							
-							do
-							{							
 								if (window.XMLHttpRequest)
 								  {// code for IE7+, Firefox, Chrome, Opera, Safari
@@ -121,27 +118,30 @@
 								  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
 								  }
-								xmlhttp.onreadystatechange=function()
-								  {
-								  if (xmlhttp.readyState==4 && xmlhttp.status==200)
-									{
-													
-											Data[src]= new Array();
-											line=xmlhttp.responseText.split('\n');
-											for(row=0;row<line.length;row++)
-											{
-												rows=line[row].split(',');
-												Data[src].push(rows[4]);
-											}
-											
-											GraphData(Data,src);
-											//document.getElementById('data').innerHTML=Data[src];
+							
+								do
+								{							
+									xmlhttp.onreadystatechange=function()
+									  {
+									  if (xmlhttp.readyState==4 && xmlhttp.status==200)
+										{
+														
+												Data[src]= new Array();
+												line=xmlhttp.responseText.split('\n');
+												for(row=0;row<line.length;row++)
+												{
+													rows=line[row].split(',');
+													Data[0].push(rows[4]);
+												}
+												
+												GraphData(Data,src);
+												//document.getElementById('data').innerHTML=Data[src];
+										}
 									}
-								}
-								
-								xmlhttp.open("GET","http://www.fact-project.org/smartfact/index.php?source="+escape(source[src])+"&time="+year+"-"+month+"-"+day,true);
-								xmlhttp.send();
-								document.getElementById('data').innerHTML=source.length+""+src;
-								src++;
-							}while(src<source.length);
+									
+									xmlhttp.open("GET","http://www.fact-project.org/smartfact/index.php?source="+escape(source[src])+"&time="+year+"-"+month+"-"+day,true);
+									xmlhttp.send();
+									document.getElementById('data').innerHTML=source.length+""+src;
+									src++;
+								}while(src<source.length);
 							function GraphData(array,index)
 							{
