Index: schedule/js/function.js
===================================================================
--- schedule/js/function.js	(revision 17516)
+++ schedule/js/function.js	(revision 17517)
@@ -5,9 +5,12 @@
 var currentDate;
 var transCount;
+var transLoadPrev;
+var Gdate;
 
 function GetDate(d,m,y)
 {
-	currentDate = y+'-'+m+'-'+d;
+        currentDate = y+'-'+m+'-'+d;
 	transCount = 1;
+        transLoadPrev = 1;
 	$('document').ready(function(){
 			$('#save').click(function(){
@@ -19,10 +22,10 @@
 					$('.datalisting').each(function(){
 						var get_seq = 0;
-						get_time = $(this).find(".time").val();
-						countchild = $(this).find(".tr").length;
+						var get_time = $(this).find(".time").val();
+						var countchild = $(this).find(".tr").length;
 							$(this).find(".tr").each(function(){
-								get_measure   = $(this).find(".measure").val();		
-								get_source    = $(this).find(".source").val();		
-								get_selected  = $(this).find(".selected").val();
+								var get_measure   = $(this).find(".measure").val();		
+								var get_source    = $(this).find(".source").val();		
+								var get_selected  = $(this).find(".selected").val();
 								GetSaveData(get_time, get_selected, get_source, get_measure, Gdate,get_seq);
 								get_seq++;
@@ -38,22 +41,19 @@
 					$('.datalisting').each(function(){
 						var get_seq = 0;
-						get_time = $(this).find(".time").val();
-						countchild = $(this).find(".tr").length;
+						var get_time = $(this).find(".time").val();
+						var countchild = $(this).find(".tr").length;
 							$(this).find(".tr").each(function(){
 								
-								get_measure   = $(this).find(".measure").val();		
-								get_source    = $(this).find(".source").val();		
-								get_selected  = $(this).find(".selected").val();
+								var get_measure   = $(this).find(".measure").val();		
+								var get_source    = $(this).find(".source").val();		
+								var get_selected  = $(this).find(".selected").val();
 								GetUpdateData(get_time, get_selected, get_source, get_measure, Gdate, get_seq);
 								get_seq++;
 							});
 					}); 
-				}
+			       }
 
-			
-			
-});	
-
-	function GetSaveData(Time,Data,Source,Measure,date,seq){
+			});	
+        function GetSaveData(Time,Data,Source,Measure,date,seq){
 		//alert("Time:"+Time+" | Measure:"+Measure +" | Source:"+Source+" | Data:"+Data);
 			$.ajax({
