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



  var arrInputValue = new Array(0);
  var arrInputValue1 = new Array(0);
    


function addInput() {
  arrInput.push(arrInput.length);
  arrInput1.push(arrInput1.length);
  

  
  arrInputValue.push("");
  arrInputValue1.push("");
  
  
  document.getElementById('hidden1').value=parseInt(document.getElementById('hidden1').value)+1;

  display();
}


function display() {
  document.getElementById('parah1').innerHTML="";
  cnt=2;
  for (intI=0;intI<arrInput.length;intI++) {
	 
    document.getElementById('parah1').innerHTML+=createInput(arrInput[intI], arrInputValue[intI]);
	document.getElementById('parah1').innerHTML+=createInput1(arrInput1[intI], arrInputValue1[intI]);
	
	
	
	 cnt++;
	 
  }
}


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



function createInput(id,value) {

   return "Qty : <input type='text'  id='qty1"+ id +"' onChange='javascript:saveValue("+ id +",this.value);' value='"+ value +"' name='qty1[]' size='5' onkeyup='return validatephone(this);'>&nbsp;";
}
function createInput1(id,value) {
	
	
   return "Price : $ <input type='text'  id='price1"+ id +"' onChange='javascript:saveValue1("+ id +",this.value)' value='"+ value +"' name='price1[]' size='5'><br><br>";
}


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