function LogOutput(elmId) {
	Log.addObserver(Proxy.create(this, this.log_message));
	this.container = document.getElementById(elmId);
	var titleDiv = document.createElement("div");
	titleDiv.style.width = "100%";
	titleDiv.style.borderBottom = "1px solid #666666";
	titleDiv.innerHTML = "Log: ";
	this.container.appendChild(titleDiv);
	var a = document.createElement("a");
	a.href = "#";
	a.onclick = Proxy.create(this, this.clearLog);
	a.innerHTML = "clear";
	titleDiv.appendChild(a);
	var outputDiv = document.createElement("div");
	outputDiv.style.overflow = "auto";
	outputDiv.style.width = "100%";
	// TODO Determine why offsetHeight is retuning 0 in IE
	if (this.container.offsetHeight == 0 && a.offsetHeight == 0) {
		outputDiv.style.height = "90%";
	} else {
		outputDiv.style.height = Math.floor(this.container.offsetHeight - a.offsetHeight - 6) + "px";
	}
	//alert(outputDiv);
	this.container.appendChild(outputDiv);
	this._div = outputDiv;
}

LogOutput.prototype.log_message = function(s) {
	//alert("LogOutput.log_message");
	this._div.innerHTML += s + "<br />";
	this._div.scrollTop = this._div.scrollHeight;
};

LogOutput.prototype.clearLog = function() {
	//alert("LogOutput.clearLog");
	this._div.innerHTML = "";
	this._div.scrollTop = 0;
};
