// $Header: /usr/local/cvsroot/district/web/lib/cmecf.js,v 4.4 2006/10/19 19:29:05 jpd Exp $// CMECF object creator.window.CMECF = window.CMECF || {};CMECF.namespace = function(ns) {    if (!ns || !ns.length) {        return null;    }    var levels = ns.split(".");    var nsobj = CMECF;    // CMECF is implied, so it is ignored if it is included    for (var i=(levels[0] == "CMECF") ? 1 : 0; i<levels.length; ++i) {        nsobj[levels[i]] = nsobj[levels[i]] || {};        nsobj = nsobj[levels[i]];    }    return nsobj;};CMECF.namespace("util");CMECF.namespace("widget");// Debugging code for IE.  Use FireBug for FireFox.if ( ! window.console) {	window.console = {		timers: {},		values: { open : false },		openwin: function() {			window.top.debugWindow =					window.open("",											"Debug",											"left=0,top=530,width=1000,height=50,scrollbars=yes,"											+"status=yes,resizable=yes");			window.top.debugWindow.opener = self;			window.top.debugWindow.document.open();			window.top.debugWindow.document.write('<html><head><title>debug window</title></head><body><pre>');			window.console.values[open] = true;		},		log: function(entry) {			if ( ! window.console.values[open]) {				window.console.openwin();			}			window.top.debugWindow.document.write(entry+"\n");			window.top.debugWindow.scroll(0, window.top.debugWindow.document.body.scrollHeight);		},		time: function(title) {			window.console.timers[title] = new Date().getTime();		},		timeEnd: function(title) {			var time = new Date().getTime() - window.console.timers[title];			console.log(['<strong>', title, '</strong>: ', time, 'ms'].join(''));		}	};}
