var Debug = new Class( {
	
	addMessage: function ( msg ) {
		if( !$defined( window.debugWindow ) )
			this.initializeDebug();
		
		window.debugWindow.innerHTML += msg + "<br />";
	},
	
	initializeDebug: function () {
		window.debugWindow = new Element( 'div' ).setStyles( {
			'position': 'absolute',
			'top': window.getScrollTop().toInt() + 5 +  'px',
			'left': '5px',
			'overflow': 'auto',
			'width': '200px',
			'height': '200px',
			'border': '1px solid #000',
			'background': '#eee',
			'padding': '3px',
			'font-family': 'Tahoma',
			'font-size': '11px',
			'z-index': 2000
		} ).injectInside( document.body );
		window.debugWindow.makeResizable();
		window.addEvent( 'scroll', function () {
			window.debugWindow.setStyle( 'top', window.getScrollTop().toInt() + 5 +  'px' );
		} );
	}
	
} );
