var oDebug = new Debug (true);

function Debug (bActive) {
	this.bActive = bActive;
	this.bActive = bActive || (window.location.search.indexOf('&Debug=') >= 0 || window.location.search.indexOf('?Debug=') >= 0);
	this.oWin		 = null;
	this.write 	 = Debug_write;
}


function Debug_write (cStr) {
	if (true || this.bActive) {
		cStr = '<font size=1 face="Arial">' + cStr + '</font>';
		if (!this.oWin || this.oWin.closed) {
			this.oWin=window.open("Javascript://", "DebugWindow", "width=210,height=600,scrollbars=true");
			if (this.oWin.focus) this.oWin.focus();
			this.oWin.document.writeln('<html><head><title>debug</title></head><body text="#00ff00" bgcolor="Black">');
			this.oWin.document.writeln(cStr + '<br>');
		} else {
			this.oWin.document.writeln(cStr + '<br>');
		}
		this.oWin.scrollBy(0,100);
	}
}

