Index: schedule/Module/calendar.php
===================================================================
--- schedule/Module/calendar.php	(revision 16521)
+++ schedule/Module/calendar.php	(revision 16522)
@@ -119,4 +119,15 @@
 				}
 
+				function getXMLData()
+				{
+					getXML();
+					xmlhttp[index].onreadystatechange=xmlStateChange();
+					$('#data').append('XML data were taken');
+					//document.getElementById('data').innerHTML="XML data were taken! ";
+
+					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()
 				{
@@ -143,15 +154,4 @@
 				}
 
-				function getXMLData()
-				{
-					getXML();
-					xmlhttp[index].onreadystatechange=xmlStateChange();
-					$('#data').append('XML data were taken');
-					//document.getElementById('data').innerHTML="XML data were taken! ";
-
-					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 displayData() //--> you can use the content of this function in the event listener
