function divReplace(nodeId, contents) {
	var theNode = document.getElementById(nodeId);
	while (theNode.childNodes.length > 0) {
		theNode.removeChild(theNode.childNodes[0]);
	}
	var nextText = document.createTextNode(contents);
	theNode.appendChild(nextText);
}
