// Debugging
// Hans Dybkjær 2008-06-16
//////////////////////////////////////////////////////////////////////////////////

var Debug = 
{
	// The box for outputting debug messages
	DeBox : null,
	// Initialize debug stuff
	// In: string boxId: Id of an HTML element for which we can set innerHTML.
	Init : function(boxId)
		{
			this.DeBox = document.getElementById(boxId);
		},

	// Display a message in the output box. Messages are displayed in reverse order.
	// In: string msg: The message to display
	Display : function(msg)
		{
			if (this.DeBox)
			{
				this.DeBox.innerHTML = msg + "<br/>" + this.DeBox.innerHTML;
			}
		},
		
	// Clear the message box
	Clear : function()
		{
			this.DeBox.innerHTML = "";
		}
}