Index: schedule/Module/calendar.php
===================================================================
--- schedule/Module/calendar.php	(revision 16578)
+++ schedule/Module/calendar.php	(revision 16580)
@@ -14,6 +14,7 @@
 	<script src="js/chart.js"></script>
     <script src="Module/src/js/lang/en.js"></script>
-    <script src="../js/xmlrequest.js"></script>
-<style type="text/css">
+   <!-- <script src="js/xmlrequest.js"></script>
+-->
+   <style type="text/css">
       .highlight { color: #0f0 !important; font-weight: bold; }
       .highlight2 { color: #0f0 !important; font-weight: bold; }
@@ -96,4 +97,46 @@
                 <script type="text/javascript">//<![CDATA[
 				
+				function testData() 
+				{
+					//calls the xml request in a loop based on the current sources                
+					var source = ['Mrk 421','Mrk 501'];
+					for (i = 0; i<source.length; i++) {
+						testXMLData(i, source);
+					}
+				}
+
+				function testXMLData(index, source) 
+				{
+					var testXML;
+					testXML = new XMLHttpRequest();
+					//NOTE: previous errors on the request was caused by appending "http://www.fact-project.org"
+					testXML.open("GET","/smartfact/index.php?source="+escape(source[index])+"&time="+year+"-"+month+"-"+day,true);
+					dataSource = new Array();
+					testXML.onload=function() {
+						if (testXML.status==200)
+						{
+							line=testXML.responseText.split('\n');
+							dataSource.push(line);
+							if (dataSource.length == source.length)
+								displayXMLData(dataSource, source); //this will be called when the last data from the list is read
+						}
+					testXML.send();
+				}
+
+				function displayXMLData(dataSource, source)
+				{
+					//This function splits the lines of data per data source
+					var dataGraph = new Array(source.length); 
+					for (i=0; i<source.length; i++) {
+						dataGraph[i] = new Array(); //dataGraph contains the individual points for each source i
+						for(row=0;row<dataSource[i].length;row++)
+						{
+							rows=line[row].split(',');
+							dataGraph[i].push(rows[4]);
+							$('#data').append(i + ' GRAPH DATA ' + dataGraph[i]);
+						}
+					}
+				}
+
                  CAL.addEventListener("onSelect", function(){
 							 day =this.selection.print("%d").join("\n");
