//For the First One

var arrInput = new Array(0);
var arrInput1 = new Array(0);
var arrInput2 = new Array(0);

  var arrInputValue = new Array(0);
  var arrInputValue1 = new Array(0);
   var arrInputValue2 = new Array(0);
function addInput() {
  arrInput.push(arrInput.length);
  arrInput1.push(arrInput1.length);
  arrInput2.push(arrInput2.length);
  arrInputValue.push("");
  arrInputValue1.push("");
  arrInputValue2.push("");
  display1();
 
}


function display1() {

  document.getElementById('parah1').innerHTML="";
  cnt=1;
  for (intI1=0;intI1<arrInput.length;intI1++) {
	 
    document.getElementById('parah1').innerHTML+=createInput(arrInput[intI1], arrInputValue[intI1]);
	document.getElementById('parah1').innerHTML+=createInput1(arrInput1[intI1], arrInputValue1[intI1]);
	document.getElementById('parah1').innerHTML+=createInput2(arrInput2[intI1], arrInputValue2[intI1]);
	 cnt++;
	 document.getElementById('firstcnt').value=cnt;
  }
  	
}


function saveValue(intId,strValue) {
  arrInputValue[intId]=strValue;
  
}  
function saveValue1(intId,strValue) {
  arrInputValue1[intId]=strValue;
  
}  

function saveValue2(intId,strValue) {
  arrInputValue2[intId]=strValue;
  
} 

function createInput(id,value) {
	
	
  return "Min Qty :<input type='text'  id='min "+ id +"' onChange='javascript:saveValue("+ id +",this.value);' value='"+ value +"' name='min[]' size=17 onkeyup='javascript:return validatephone(this)'>&nbsp;&nbsp;&nbsp;&nbsp;";
}
function createInput1(id,value) {
	
	
  return "Pieces :<input type='text'  id='max "+ id +"' onChange='javascript:saveValue1("+ id +",this.value);' value='"+ value +"' name='max[]' size=17 onkeyup='javascript:return validatephone(this)'>&nbsp;&nbsp;&nbsp;&nbsp;";
}
function createInput2(id,value) {
	
	
  return "Price:<input type='text'  id='price "+ id +"' onChange='javascript:saveValue2("+ id +",this.value);' value='"+ value +"' name='price[]' size='5' onkeyup='javascript:return validatephone(this)'>&nbsp;$<br><br>";
}

function createInputcheck(id,value) {
 // return "<input type='text' name='text1'>"+"<input type='submit' name='submit1' value='Add'><br>";
  
}
function deleteInput1() {
  if (arrInput.length > 0) { 
     arrInput.pop(); 
     arrInputValue.pop();
  }
  display1(); 
  displaycheck1(); 
}

//End of First One

