Index: schedule/function/SplitDelete.php
===================================================================
--- schedule/function/SplitDelete.php	(revision 16276)
+++ schedule/function/SplitDelete.php	(revision 16345)
@@ -1,4 +1,7 @@
 <script type="text/javascript">
  $(document).ready(function(){
+ var timeValue;
+var meas;
+var meas2;
 	var cnt=2;
  	var table = document.createElement("table");
@@ -14,5 +17,6 @@
 					input.setAttribute("max","24"),
 					input.setAttribute("min","1"),
-					input.setAttribute("required")
+					input.setAttribute("required",true)
+				
 		)
 	var td=document.createElement('td');
@@ -69,4 +73,5 @@
 			input.setAttribute('type','text'),
 			input.setAttribute('id','txtData1')
+			
 			
 		);
@@ -80,5 +85,9 @@
 			button.onclick= function()
 			{
+			  meas = "name"; meas2 = "time";
+				timeValue = "";
 				split1();
+				 
+				
 			}
 		);
@@ -90,4 +99,14 @@
 			button.onclick=function(){
 				$('#table2').remove();
+			}
+		);
+			td4.appendChild(
+			button=document.createElement('input'),
+			button.setAttribute('type','button'),
+			button.setAttribute('value','+Measurement'),
+			button.setAttribute('id','btnMeasurement'),
+			button.onclick=function(){
+			
+				if($('#Time1').val() != ""){ timeValue = $('#Time1').val();  meas = "disabled"; meas2 = true;    split1();    }else{   alert("please enter value for time to add measurement");   }				 
 			}
 		);
@@ -116,5 +135,5 @@
 					input.setAttribute("max","24"),
 					input.setAttribute("min","1"),
-					input.setAttribute("required")
+					input.setAttribute("required",true)
 		)
 	var td=document.createElement('td');
@@ -179,5 +198,8 @@
 			button.onclick= function()
 			{
+				 meas = "name"; meas2 = "time";
+				timeValue = "";
 				split();
+				 
 			}
 		);
@@ -190,4 +212,17 @@
 				$('#table1').remove();
 
+			}
+		);
+		td4.appendChild(
+			button=document.createElement('input'),
+			button.setAttribute('type','button'),
+			button.setAttribute('value','+Measurement'),
+			button.setAttribute('id','btnMeasurement'),
+			button.onclick=function(){
+			
+			
+			
+					if($('#Time2').val() != ""){ timeValue = $('#Time2').val();  meas = "disabled"; meas2 = true;    split();    }else{   alert("please enter value for time to add measurement");   }		
+				
 			}
 		);
@@ -200,7 +235,10 @@
 		table.appendChild(tr);
 		$('#TableH').append(table);
+		var meas;
+		var timeValue;
 	
 	function split()
 	{
+	if(cnt <= 10){
 		cnt++;
 		var table = document.createElement("table");
@@ -210,4 +248,5 @@
 			tr.setAttribute('id','');
 			tr.setAttribute('class','');
+		
 		var td3=document.createElement('td');
 			td3.setAttribute('style','border:1px solid white; color:#37DFB1; font-size:14px; text-align:center;');
@@ -218,6 +257,10 @@
 						input.setAttribute("max","24"),
 						input.setAttribute("min","1"),
-						input.setAttribute("required")
-			)
+						input.setAttribute("required",true),
+						input.setAttribute(meas,meas2),
+						input.setAttribute("value",timeValue)
+						
+			);
+			
 		var td=document.createElement('td');
 			td.setAttribute("style","border:1px solid white; color:#37DFB1; font-size:14px;text-align:center;");
@@ -280,4 +323,6 @@
 				button.setAttribute('value','Split'),
 				button.onclick=function(){
+				timeValue = "";
+				meas = "name"; meas2 = "time";
 					split();
 				}
@@ -293,4 +338,13 @@
 				}
 			);
+			td4.appendChild(
+			button=document.createElement('input'),
+			button.setAttribute('type','button'),
+			button.setAttribute('value','+Measurement'),
+			button.setAttribute('id','btnMeasurement'),
+			button.onclick=function(){
+					if($('#Time'+cnt).val() != ""){ timeValue = $('#Time'+cnt).val();  meas = "disabled"; meas2 = true;    split();    }else{   alert("please enter value for time to add measurement");   }
+			}
+		);
 			tr.appendChild(td3);
 			tr.appendChild(td1);
@@ -300,8 +354,15 @@
 			tr.appendChild(td4);
 			table.appendChild(tr);
-			$('#TableH1').append(table);
+			$('#TableH').append(table);
+	}else{
+	
+	alert("  only 10 sources are allowed!   ");
+	
+	}
+	
 	}
 	function split1()
 	{
+	if(cnt <= 10){
 		cnt++;
 		var table = document.createElement("table");
@@ -311,4 +372,5 @@
 			tr.setAttribute('id','');
 			tr.setAttribute('class','');
+				
 		var td3=document.createElement('td');
 			td3.setAttribute('style','border:1px solid white; color:#37DFB1; font-size:14px; text-align:center;');
@@ -319,6 +381,9 @@
 						input.setAttribute("max","24"),
 						input.setAttribute("min","1"),
-						input.setAttribute("required")
-			)
+						input.setAttribute("required",true),
+						input.setAttribute(meas,meas2),
+						input.setAttribute("value",timeValue)
+			);
+			
 		var td=document.createElement('td');
 			td.setAttribute("style","border:1px solid white; color:#37DFB1; font-size:14px;text-align:center;");
@@ -381,5 +446,7 @@
 				button.setAttribute('value','Split'),
 				button.onclick=function(){
-					split();
+				timeValue = "";
+				meas = "name"; meas2 = "time";
+					split1();
 				}
 			);
@@ -393,4 +460,15 @@
 					cnt--;
 			});
+			td4.appendChild(
+			button=document.createElement('input'),
+			button.setAttribute('type','button'),
+			button.setAttribute('value','+Measurement'),
+			button.setAttribute('id','btnMeasurement'),
+			button.onclick=function(){
+			if($('#Time'+cnt).val() != ""){ timeValue = $('#Time'+cnt).val();  meas = "disabled"; meas2 = true;    split1();    }else{   alert("please enter value for time to add measurement");   }
+
+				
+			}
+		);
 			tr.appendChild(td3);
 			tr.appendChild(td1);
@@ -401,5 +479,10 @@
 			table.appendChild(tr);
 			$('#TableH1').append(table);
+			}else{
+	
+	alert("  only 10 sources are allowed!   ");
 	}
+	}
+	
  });
  </script>
