	var debugwin;

	function debug_openwin()
	{	
		debugwin = window.open('','debugwin');
		if(!debugwin.content)
		{
			debugwin.location.href = '../../lib/debug/debugger.asp';
		}
	}
	
	function debug_msg(sMsg)
	{
		if(debug_level > 0)
		{
			if((!debugwin) || (debugwin.closed) || (!debugwin.content))
			{
				debug_openwin();
			}
			debugwin.content.AddContent('<TR><TD nowrap>' + Date() + '</TD><TD>-</TD><TD>' + window.location.href + '</TD><TD>' + sMsg + '</TD></TR>');
		}
	}
