///
function progressBar(enable) {
	if(enable) {
		setElementText('progress','Loading');
	} else {
		progressBarReset();
	}
}
/// 
function progressBarReset() {
	setElementText('progress','');
}
///
function progressBarUpdate() {
	addElementText('progress','.');	
}
///
function getElementText(objid) {
	if(document.getElementById(objid)) {
		var elem = document.getElementById(objid);
		if(elem && elem.firstChild){
			return elem.firstChild.nodeValue;
		}
	}
}
///
function setElementText(objid,newtext) {	
	if(document.getElementById(objid)) {
		var elem = document.getElementById(objid);	
		if(elem.firstChild){		
			elem.firstChild.nodeValue=newtext;
		}
		else{		
			elem.appendChild(document.createTextNode(newtext));
		}	
	}
}
///
function addElementText(objid,appendtext) {
	setElementText(objid,getElementText(objid) + appendtext);
}
