Index: branches/realtime_VDS/cptms/js/vdsLayer.js
===================================================================
--- branches/realtime_VDS/cptms/js/vdsLayer.js	(revision 588)
+++ branches/realtime_VDS/cptms/js/vdsLayer.js	(revision 606)
@@ -162,25 +162,20 @@
 //initialize live indicator icon
 function initLiveIcon(success) {
-    //create new img tags for live and not-live indicators
-    var live = document.createElement('img');
-    var notLive = document.createElement('img');
-    live.src ="images/live.svg";
-    live.width = 50 ;
-    live.height= 40 ;
-    notLive.src ="images/offline.jpg";
     // if fetch is a success, display live img
-    if (success) {
-        //console.log(live);
-        if (map.controls[google.maps.ControlPosition.TOP_RIGHT].getLength() > 0)
+    var indicator = document.createElement('img');
+    if (success) 
+    {
+        //create new img tags for live and not-live indicators
+        indicator.src ="images/live.svg";
+        indicator.width = 50 ;
+        indicator.height= 40 ;
+    }
+    else
+    {
+        indicator.src ="images/offline.jpg";
+    }
+    if (map.controls[google.maps.ControlPosition.TOP_RIGHT].getLength() > 0)
             map.controls[google.maps.ControlPosition.TOP_RIGHT].pop();
-        map.controls[google.maps.ControlPosition.TOP_RIGHT].push(live);
-    }
-    // if error, display sad smiley image
-    else {
-        //console.log(notLive);
-        if (map.controls[google.maps.ControlPosition.TOP_RIGHT].getLength() > 0)
-            map.controls[google.maps.ControlPosition.TOP_RIGHT].pop();
-        map.controls[google.maps.ControlPosition.TOP_RIGHT].push(notLive);
-    }
+    map.controls[google.maps.ControlPosition.TOP_RIGHT].push(indicator);
 }
 
@@ -202,4 +197,5 @@
                 var now = new Date();
                 // calculate time difference
+                var timeDiff = new Date(now - lastFetch);
                 var msec = now - lastFetch;
                 var days = Math.floor(msec / 1000 / 60 / (60 * 24));
@@ -216,5 +212,5 @@
                 else 
                     initLiveIcon(0)
-                //console.log(days + " Days "+ hh + " Hours " + mm + " Minutes " + ss + " Seconds");
+                //console.log(days + " Days "+ hh + " Hours " + mm + " Minutes " + ss + " Seconds ");
             }
         }
