/****************************\
 Abstraction functions
\****************************/

/* Returns an element given the id */
function getEl(el){
	if(document.all && document.all[el]) return document.all[el];
	else if(document.getElementById && document.getElementById(el)) return document.getElementById(el);
	return false;
	}

/* Sets the innerHTML of an element given the element id */
function draw(layer, html){
	getEl(layer).innerHTML=html;
	}

/* Sets the innerText of an element given the element id. */
function drawText(layer, text){
	getEl(layer).innerText=text;
	}

/* Removes all child nodes from an element given the element id. */
function clearChildNodes(id){
	var obj=document.getElementById(id);
	while(obj.hasChildNodes()==true){
		obj.removeChild(obj.childNodes[0]);
		}
	}
