//<script>
//<!-- Copyright 1999-2003 Alexa Internet, Inc.  All Rights Reserved.
function Logger() {
	var o=new AlxObj();
	o.entries 			= new Array();o.fnLength=0;o.getByEntry=Logger_getByEntry;o.getAll=Logger_getAll;
	o.formatByEntry = Logger_formatByEntry;o.formatAll=Logger_formatAll;o.out=Logger_out;o.clear=Logger_clear; o.fatal = Logger_fatal;
	o.oType="Logger"; o.create();
	if (g_bDebug == true) {
		o.debugWindow = window.open("","debugger","dependent,height=200,width=900");
		o.debugWindow.document.write("<div id=\"debugDiv\"></div>");
	}
	return o;
	function Logger_getByEntry(iEntry) { return this.entries[iEntry]; }
	function Logger_getAll() { return this.entries; }
	function Logger_formatByEntry(iEntry) {
		var rVal = new String();
		rVal += this.entries[iEntry].date+" : Object "+this.entries[iEntry].object+" (("+this.entries[iEntry].type;
		if (this.fnLength > this.entries[iEntry].type.length) { for (i=0; i<(this.fnLength - this.entries[iEntry].type.length); i++) { rVal += '&#160;'; } }
		rVal += ")) - "+this.entries[iEntry].msg;
		return rVal;
	}
	function Logger_formatAll() {	var rVal = new String(); for (var si in this.entries) { rVal += this.formatByEntry(si); } return rVal; }
	function Logger_out(oObject, sMsg) {
		// define locals
		var i = this.entries.length;var d = new Date();
		this.entries[i]=new Array();
		try {
			if (oObject.oID) {
				this.entries[i].object=oObject.oID;
				this.entries[i].type=oObject.oType;
			} else {
				this.entries[i].object="000000-000000-000000-000000-0000-00";
				this.entries[i].type="Error";
			}
			this.fnLength = (this.entries[i].type.length > this.fnLength) ? this.entries[i].type.length : this.fnLength;
			this.entries[i].date = d.toString();
			this.entries[i].msg = sMsg;
			if (this.debugWindow && (g_bDebug == true) ) {
				if ( ( (listenonlyto!='') && array_contains(listenonlyto,oObject.oType) ) || (listenonlyto == '') ) {
					this.debugWindow.document.write("<span style=\"font-size:6.5pt;font-family:courier new;\">"+this.formatByEntry(i)+"</span><br/>");
					this.debugWindow.document.all.tags("SPAN")[this.debugWindow.document.all.tags("SPAN").length-1].scrollIntoView(false);
				} else if (typeof(listenonlyto)=="object") {
					if (array_contains(listenonlyto, oObject.oType)) {
						this.debugWindow.document.write("<span style=\"font-size:6.5pt;font-family:courier new;\">"+this.formatByEntry(i)+"</span><br/>");
						this.debugWindow.document.all.tags("SPAN")[this.debugWindow.document.all.tags("SPAN").length-1].scrollIntoView(false);
					}
				}
			}
		} catch(ex) { }
	}
	function Logger_fatal(oObject, sMsg) {
		try {
			this.out(oObject,sMsg);
			window_onerror(oObject.oID+" - "+sMsg, '', 0);
		} catch (ex) {
			g_oLogger.out(et,"call to logger.fatal occurred.");
			window_onerror("call to logger.fatal occurred.",'',0);
		} finally {
		}
	}
	function Logger_clear(iEntry) { if (iEntry) { this.entries[iEntry] = null; } else { this.entries = null; } }
}
if ( typeof(oScriptReport) == 'object' )
	oScriptReport.load('log.class.js');
