var arrInput = new Array(0);
  var arrInputValue = new Array(0);

function addInput() {
  arrInput.push(arrInput.length);
  arrInputValue.push("");
  display();
}

function display() {
  document.getElementById('parah').innerHTML="";
  for (intI=0;intI<arrInput.length;intI++) {
    document.getElementById('parah').innerHTML+=createInput(arrInput[intI], arrInputValue[intI]);
  }
}

function saveValue(intId,strValue) {
  arrInputValue[intId]=strValue;
}  

function createInput(id,value) {
  	
  return "title: <input type='text' class='frm__submit_ad_title_samples' id='sample_link"+ id +"' onfocus=\"this.style.backgroundColor='#222222';\" onblur=\"this.style.backgroundColor='#070707';\" onChange='javascript:saveValue("+ id +",this.value)' value='"+ value +"'><div style='padding: 4px 0 0 0;'></div>"+
         "link: <input type='text' class='frm__submit_ad_link_samples' id='sample_link"+ id +"' onfocus=\"this.style.backgroundColor='#222222';\" onblur=\"this.style.backgroundColor='#070707';\" onChange='javascript:saveValue("+ id +",this.value)' value='"+ value +"'><br /><br />";
 

}

function deleteInput() {
  if (arrInput.length > 0) { 
     arrInput.pop(); 
     arrInputValue.pop();
  }
  display(); 
}
