/* VARIABLES */
var c, ch;

function add_text(id_div, text_name, text_style) {

	c = document.getElementById(id_div);
	c2 = c.getElementsByTagName('input');
	ch = document.createElement('input');

	ch.setAttribute('type', 'text');
	ch.setAttribute('name', text_name);
	ch.setAttribute('style', text_style);

	c.appendChild(ch);

	document.getElementById('sup').style.display = 'inline';
}

function del_text(id_button){

	if(c2.length>0) {
		c.removeChild(c2[c2.length-1]);
	}
	if(c2.length == 0) {
		document.getElementById(id_button).style.display = 'none';
	}
}