Index: schedule/Module/calendar.php
===================================================================
--- schedule/Module/calendar.php	(revision 16494)
+++ schedule/Module/calendar.php	(revision 16496)
@@ -97,52 +97,51 @@
 				var xmlhttp = new Array();
 				var source = ['Mrk 421','Mrk 501'];
-				var sourceData = [];
+				//var sourceData;
 				var day;
 				var year;
 				var month;
 				function getXML() 
+				{
+					if (window.XMLHttpRequest)
+						 {// code for IE7+, Firefox, Chrome, Opera, Safari
+						 xmlhttp.push(new XMLHttpRequest());
+						 }
+					else
+						 {// code for IE6, IE5
+						 xmlhttp.push(new ActiveXObject("Microsoft.XMLHTTP"));
+						 }
+
+					index = xmlhttp.length - 1;
+				}
+
+				function getXMLData()
+				{
+					getXML();
+					xmlhttp[index].onreadystatechange=function()
+					{
+					 if (xmlhttp[index].readyState==4 && xmlhttp.status==200)
 						{
-							if (window.XMLHttpRequest)
-								 {// code for IE7+, Firefox, Chrome, Opera, Safari
-								 xmlhttp.push(new XMLHttpRequest());
-								 }
-							else
-								 {// code for IE6, IE5
-								 xmlhttp.push(new ActiveXObject("Microsoft.XMLHTTP"));
-								 }
+						var sourceData[index]= new Array(); //--> remove this if you use sourceData[[]]
+						line=xmlhttp[index].responseText.split('\n');
+							for(row=0;row<line.length;row++)
+							{
+							rows=line[row].split(',');
+							sourceData[index].push(rows[4]);
+							}
+						}
+					}
+					xmlhttp[index].open("GET","http://www.fact-project.org/smartfact/index.php?source="+escape(source[index])+"&time="+year+"-"+month+"-"+day,true);
+					xmlhttp[index].send();
+				}
 
-							index = xmlhttp.length - 1;
-						}
-
-						function getXMLData()
-						{
-							getXML();
-							xmlhttp[index].onreadystatechange=function()
-							{
-							 if (xmlhttp[index].readyState==4 && xmlhttp.status==200)
-								{
-								sourceData[index]= new Array(); //--> remove this if you use sourceData[[]]
-								line=xmlhttp[index].responseText.split('\n');
-									for(row=0;row<line.length;row++)
-									{
-									rows=line[row].split(',');
-									sourceData[index].push(rows[4]);
-									}
-								}
-							}
-							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
-						{
-							for (i=0; i<source.length; i++)
-							{
-							getXMLData();
-							//display source data here sourceData[i]
-							document.getElementById('data').innerHTML=sourceData;
-							}	
-						}
+				function displayData() //--> you can use the content of this function in the event listener
+				{
+					for (i=0; i<source.length; i++)
+					{
+					getXMLData();
+					//display source data here sourceData[i]
+					document.getElementById('data').innerHTML=sourceData[i];
+					}	
+				}
                  CAL.addEventListener("onSelect", function(){
 							 day =this.selection.print("%d").join("\n");
