Index: /schedule/Transaction/insert.php
===================================================================
--- /schedule/Transaction/insert.php	(revision 16534)
+++ /schedule/Transaction/insert.php	(revision 16535)
@@ -52,5 +52,5 @@
 						$dateTime=new DateTime($date." ".$Times[$i]);
 						 $parsed_date =  $dateTime->format('Y-m-d H:i:s');
-						
+						$new = 0;
 					
 			$select = mysql_query("SELECT * FROM schedule WHERE fLastUpdate = '$parsed_date'");
Index: /schedule/function/SplitDelete.php
===================================================================
--- /schedule/function/SplitDelete.php	(revision 16534)
+++ /schedule/function/SplitDelete.php	(revision 16535)
@@ -4,4 +4,5 @@
 var meas;
 var meas2;
+var getTableId;
  window.cnt=2;
  	var table = document.createElement("table");
@@ -26,4 +27,7 @@
 			button.setAttribute('id','btnAddTime'),
 			button.onclick=function(){
+			
+			
+			
 			if($('#Time1').val() != ""){  var splitting = $('#Time1').val().split(':'); var add = 01;   
 
@@ -41,5 +45,5 @@
 						}
 
-			 meas = "name"; meas2 = "time";    split1();    }else{   alert("please enter value for time to add measurement");   }
+			 meas = "name"; meas2 = "time";   getTableId = '#table2';  split1();    }else{   alert("please enter value for time to add measurement");   }
 
 				
@@ -99,5 +103,5 @@
 			button.setAttribute('id','btnAddTime'),
 			button.onclick=function(){
-			if($('#Time1').val() != ""){ timeValue = $('#Time1').val();  meas = "hidden"; meas2 = true;    split1();    }else{   alert("please enter value for time to add measurement");   }
+			if($('#Time1').val() != ""){ timeValue = $('#Time1').val();  meas = "hidden"; meas2 = true; getTableId = '#table2'; split1();    }else{   alert("please enter value for time to add measurement");   }
 
 				
@@ -122,5 +126,7 @@
 			button.onclick= function()
 			{
-			 if($('#Time1').val() != ""){  var splitting = $('#Time1').val().split(':'); var add = 30;   
+
+			if($('#Time1').val() != ""){  var splitting = $('#Time1').val().split(':'); var add = 30;   
+
 
 			timeValue =pad(splitting[0],2)+':'+ pad((Number(splitting[1]) + Number(add)),2); 
@@ -137,5 +143,5 @@
 						}
 
-			 meas = "name"; meas2 = "time";    split1();    }else{   alert("please enter value for time to add measurement");   }
+			 meas = "name"; meas2 = "time";  getTableId = '#table2';  split1();    }else{   alert("please enter value for time to add measurement");   }
 
 				 
@@ -160,5 +166,7 @@
 		tr.appendChild(td4);
 		table.appendChild(tr);
-		$('#TableH1').append(table);
+	
+			$('#TableH1').append(table);
+	
 		
 		
@@ -198,5 +206,5 @@
 						return str;
 
-						}  meas = "name"; meas2 = "time";   split();    }else{   alert("please enter value for time to add measurement");   }
+						}  meas = "name"; meas2 = "time";  getTableId = '#table1';  split();    }else{   alert("please enter value for time to add measurement");   }
 
 				
@@ -253,5 +261,5 @@
 			button.setAttribute('id','btnAddTime'),
 			button.onclick=function(){
-			if($('#Time2').val() != ""){ timeValue = $('#Time2').val();  meas = "hidden"; meas2 = true;    split();    }else{   alert("please enter value for time to add measurement");   }
+			if($('#Time2').val() != ""){ timeValue = $('#Time2').val();  meas = "hidden"; meas2 = true;  getTableId = '#table1';  split();    }else{   alert("please enter value for time to add measurement");   }
 
 				
@@ -290,5 +298,5 @@
 						}
 
-			 meas = "name"; meas2 = "time";    split();    }else{   alert("please enter value for time to add measurement");   }
+			 meas = "name"; meas2 = "time"; getTableId = '#table1';   split();    }else{   alert("please enter value for time to add measurement");   }
 				 
 			}
@@ -312,5 +320,7 @@
 		tr.appendChild(td4);
 		table.appendChild(tr);
-		$('#TableH').append(table);
+		
+			$('#TableH1').append(table);
+		
 		var meas;
 		var timeValue;
@@ -318,5 +328,5 @@
 	function split()
 	{
-	if(cnt <= 10){
+	
 		cnt++;
 		var table = document.createElement("table");
@@ -362,5 +372,5 @@
 						return str;
 
-						}   meas = "name"; meas2 = "time";    split1();    }else{   alert("please enter value for time to add measurement");   }
+						}   meas = "name"; meas2 = "time";  getTableId = '#table'+cnt;   split1();    }else{   alert("please enter value for time to add measurement");   }
 
 				
@@ -419,5 +429,5 @@
 			button.onclick=function(){
 			
-			if($('#Time'+cnt).val() != ""){ timeValue = $('#Time'+cnt).val();  meas = "hidden"; meas2 = true;    split1();    }else{   alert("please enter value for time to add measurement");   }
+			if($('#Time'+cnt).val() != ""){ timeValue = $('#Time'+cnt).val();  meas = "hidden"; meas2 = true; getTableId = '#table'+cnt;   split1();    }else{   alert("please enter value for time to add measurement");   }
 
 				
@@ -456,5 +466,5 @@
 						}
 
-			 meas = "name"; meas2 = "time";    split();    }else{   alert("please enter value for time to add measurement");   }
+			 meas = "name"; meas2 = "time";  getTableId = '#table'+cnt;  split();    }else{   alert("please enter value for time to add measurement");   }
 				}
 			);
@@ -477,15 +487,13 @@
 			tr.appendChild(td4);
 			table.appendChild(tr);
-			$('#TableH').append(table);
-	}else{
-	
-	alert("  only 10 sources are allowed!   ");
-	
-	}
+	
+			$(table).insertAfter($(getTableId));
+	
+	
 	
 	}
 	function split1()
 	{
-	if(cnt <= 10){
+	
 		cnt++;
 		var table = document.createElement("table");
@@ -529,5 +537,5 @@
 						return str;
 
-						}  meas = "name"; meas2 = "time";   split1();    }else{   alert("please enter value for time to add measurement");   }
+						}  meas = "name"; meas2 = "time";   getTableId = '#table'+cnt; split1();    }else{   alert("please enter value for time to add measurement");   }
 
 				
@@ -587,5 +595,5 @@
 			button.onclick=function(){
 		
-			if($('#Time'+cnt).val() != ""){ timeValue = $('#Time'+cnt).val();  meas = "hidden"; meas2 = true;    split1();    }else{   alert("please enter value for time to add measurement");   }
+			if($('#Time'+cnt).val() != ""){ timeValue = $('#Time'+cnt).val();  meas = "hidden"; meas2 = true; getTableId = '#table'+cnt;   split1();    }else{   alert("please enter value for time to add measurement");   }
 
 				
@@ -623,6 +631,6 @@
 
 						}
-
-			 meas = "name"; meas2 = "time";    split();    }else{   alert("please enter value for time to add measurement");   }
+				
+			 meas = "name"; meas2 = "time"; getTableId = '#table'+cnt;    split();    }else{   alert("please enter value for time to add measurement");   }
 				}
 			);
@@ -644,9 +652,6 @@
 			tr.appendChild(td4);
 			table.appendChild(tr);
-			$('#TableH1').append(table);
-			}else{
-	
-	alert("  only 10 sources are allowed!   ");
-	}
+			
+			$(table).insertAfter($(getTableId));
 	}
 	
