function clearEl(el) {
	while (el.lastChild != null)
		el.removeChild(el.lastChild);
};

function appendText(el,text) {
	el.appendChild(document.createTextNode(text));
}

function newEl(name) {
	return document.createElement(name);
}

function newInput(name) {
	var inp = newEl('input');
	inp.setAttribute('type', name);
	return inp;
}
