// Layer.js class required.
function Debug(output) {
	this.output = document.getElementById(output);
	this.status = false;
	this.css = {
		position: "relative",
		left: "auto",
		top: "auto",
		width: "200px",
		height: "auto",
		background: "#fff",
		border: "1px dotted #666",
		zIndex: 0
	};
}

Debug.prototype.setStatus = function(obj) {
	var layer = new Layer("status", this.css);
	this.output.appendChild(layer.getLayer());
	this.status = document.getElementById("status");

	var myUl = document.createElement("ul");
	for (prop in obj) {
		var myLi = document.createElement("li");
		myLi.setAttribute("id", prop);
		var text = prop + ": " + obj[prop];
		var textNode = document.createTextNode(text);
		myLi.appendChild(textNode);
		myUl.appendChild(myLi);
	}
	this.status.appendChild(myUl);
}

Debug.prototype.updateStatus = function(obj) {
	for (prop in obj) {
		var text = prop + ": " + obj[prop];
		document.getElementById(prop).firstChild.nodeValue = text;
	}
}
