Index: schedule/Module/calendar.php
===================================================================
--- schedule/Module/calendar.php	(revision 16510)
+++ schedule/Module/calendar.php	(revision 16511)
@@ -119,6 +119,13 @@
 				{
 					getXML();
-					xmlhttp[index].onreadystatechange=function()
-					{
+					xmlhttp[index].onreadystatechange=xmlStateChange()
+					
+					xmlhttp[index].open("GET","http://www.fact-project.org/smartfact/index.php?source="+escape(source[index])+"&time="+year+"-"+month+"-"+day,true);
+					xmlhttp[index].send();
+				}
+				
+				function xmlStateChange()
+				{
+					
 					 if (xmlhttp[index].readyState==4 && xmlhttp.status==200)
 						{
@@ -133,7 +140,5 @@
 						}
 						
-					}
-					xmlhttp[index].open("GET","http://www.fact-project.org/smartfact/index.php?source="+escape(source[index])+"&time="+year+"-"+month+"-"+day,true);
-					xmlhttp[index].send();
+					
 				}
 
