Index: trunk/webapps/GTEC/js/vdsLayer.js
===================================================================
--- trunk/webapps/GTEC/js/vdsLayer.js	(revision 568)
+++ trunk/webapps/GTEC/js/vdsLayer.js	(revision 570)
@@ -58,4 +58,10 @@
         //var color_arr = []; 
         var white_arr = []; //stores all white dots
+        // Initialize the current time to zero
+        var currentTime = new Date(0);
+        currentTime.setHours(0);
+        currentTime.setMinutes(0);
+        currentTime.setSeconds(0);
+
         map.data.addListener('click', function(event) 
         {
@@ -101,6 +107,6 @@
                 });
                 //color_arr.push(clicked_dots);
-                console.log(clicked_dots);
-                console.log(range);
+                //console.log(clicked_dots);
+                //console.log(range);
                 // extracts ids for all the white dots
                 var white_arr_ids = white_arr.map(function (marker) {
@@ -113,5 +119,5 @@
                 // computes difference between the white dots and clicked dots to find the unused dots
                 var unused_ids = white_arr_ids.diff(clicked_dots_ids);
-                console.log("Unused: ",unused_ids, "White: ",white_arr_ids);
+                //console.log("Unused: ",unused_ids, "White: ",white_arr_ids);
                 // change the dot color of all the unused white dots back to their previous color
                 unused_ids.forEach(function (id){
@@ -130,8 +136,15 @@
                     });
                 }
+                // Increment the time by one-half minute (30 seconds)
+                var millisecs = currentTime.getTime();
+                millisecs += 30000;  
+                currentTime = new Date(millisecs);
+
+                // Create a printable string for the time (HH:MM:SS)
+                var printableTime = currentTime.toLocaleTimeString('it-IT');
 
                 // Assemble the line to be written to the events file
-                var lineOut = "181   00:00:00    " + first[0] + "       " + 
-                first[1] + "            " + first[2] + "        " + range.toFixed(3) + "         " 
+                var lineOut = "101   " + printableTime + "\t" + first[0] + "\t" + 
+                first[1] + "\t" + first[2] + "\t" + range.toFixed(3) + "\t" 
                 + getColorAbbr(chosenColor);
                 console.log(lineOut);
@@ -156,5 +169,5 @@
                 var direction = postmileList[curr].charAt(firstBlank+1); // extract direction
                 target = event.feature.getId().substring(0,secondBlank); // extract target string
-                console.log("making white dots from " + selectedID + " in direction "+direction)
+                //console.log("making white dots from " + selectedID + " in direction "+direction)
                 // Decide whether to increment or decrement based on direction of hwy;
                 //  N and E increment,  S and W decrement 
@@ -328,3 +341,5 @@
         greenColor.style.background = "gray";     
     });
+        // set default button on
+    yellowColor.style.background = "yellow";    
 }
