Index: /trunk/FACT++/www/shift/calendar.js
===================================================================
--- /trunk/FACT++/www/shift/calendar.js	(revision 13721)
+++ /trunk/FACT++/www/shift/calendar.js	(revision 13722)
@@ -78,4 +78,5 @@
         this.parEl = document.getElementById( id );
         this.show();
+        this.show();
 
         if (!initDate)
@@ -593,18 +594,23 @@
     }
 
+    var xmlReqAll = null;
     function requestAll(yy, mm)
     {
+        if (xmlReqAll)
+            xmlReqAll.abort();
+
         var uri = "calendar.php?y="+yy+"&m="+mm;
-        var xmlHttp = new XMLHttpRequest();
-        xmlHttp.open('POST', uri, true);
-        xmlHttp.onload = function ()
-        {
-            if (xmlHttp.status!=200)
-            {
-                alert("ERROR - HTTP request: "+xmlHttp.statusText+" ["+xmlHttp.status+"]");
+
+        xmlReqAll = new XMLHttpRequest();
+        xmlReqAll.open('POST', uri, true);
+        xmlReqAll.onload = function ()
+        {
+            if (xmlReqAll.status!=200)
+            {
+                alert("ERROR - HTTP request: "+xmlReqAll.statusText+" ["+xmlReqAll.status+"]");
                 return;
             }
 
-            var lines = xmlHttp.responseText.split('\n');
+            var lines = xmlReqAll.responseText.split('\n');
             if (lines.length==0)
                 return;
@@ -634,30 +640,34 @@
         };
 
-        xmlHttp.send();
+        xmlReqAll.send();
     }
 
+    var xmlReqCom = null;
     function requestAllComments(yy, mm)
     {
+        if (xmlReqCom)
+            xmlReqCom.abort();
+
         var uri = "calendar.php?comment&y="+yy+"&m="+mm;
-        var xmlHttp = new XMLHttpRequest();
-        xmlHttp.open('POST', uri, true);
-        xmlHttp.onload = function ()
-        {
-            if (xmlHttp.status!=200)
-            {
-                alert("ERROR - HTTP request: "+xmlHttp.statusText+" ["+xmlHttp.status+"]");
+        xmlReqCom = new XMLHttpRequest();
+        xmlReqCom.open('POST', uri, true);
+        xmlReqCom.onload = function ()
+        {
+            if (xmlReqCom.status!=200)
+            {
+                alert("ERROR - HTTP request: "+xmlReqCom.statusText+" ["+xmlReqCom.status+"]");
                 return;
             }
 
-            if (xmlHttp.responseText<4)
+            if (xmlReqCom.responseText<4)
                 return;
 
             var pos = 6;
 
-            while (pos<xmlHttp.responseText.length)
-            {
-                var len = parseInt(xmlHttp.responseText.substr(pos-6, 4), 10);
-                var dd  = parseInt(xmlHttp.responseText.substr(pos-2, 2), 10);
-                var com = xmlHttp.responseText.substr(pos, len);
+            while (pos<xmlReqCom.responseText.length)
+            {
+                var len = parseInt(xmlReqCom.responseText.substr(pos-6, 4), 10);
+                var dd  = parseInt(xmlReqCom.responseText.substr(pos-2, 2), 10);
+                var com = xmlReqCom.responseText.substr(pos, len);
                 pos += len+6;
 
@@ -671,5 +681,5 @@
         };
 
-        xmlHttp.send();
+        xmlReqCom.send();
     }
 
