if (typeof ILR == "undefined") {
    /**
	 * Code from YAHOO yui
     * The ILR global namespace object.  If ILR is already defined, the
     * existing ILR object will not be overwritten so that defined
     * namespaces are preserved.
     * @class ILR
     * @static
     */
    var ILR = {};
}

ILR.js = {};
ILR.js.root = "/codelib/js/";
ILR.js.yui = ILR.js.root + "yui-2.3.0/yui/build/";
ILR.js.ilr = ILR.js.root + "ilr/";

/**
 * Code adapted from YAHOO yui
 * Returns the namespace specified and creates it if it doesn't exist
 * <pre>
 * ILR.namespace("property.package");
 * ILR.namespace("ILR.property.package");
 * </pre>
 * Either of the above would create ILR.property, then
 * ILR.property.package
 *
 * Be careful when naming packages. Reserved words may work in some browsers
 * and not others. For instance, the following will fail in Safari:
 * <pre>
 * ILR.namespace("really.long.nested.namespace");
 * </pre>
 * This fails because "long" is a future reserved word in ECMAScript
 *
 * @method namespace
 * @static
 * @param  {String*} arguments 1-n namespaces to create 
 * @return {Object}  A reference to the last namespace object created
 */
ILR.namespace = function() {
    var a=arguments, o=null, i, j, d;
    for (i=0; i<a.length; i++) {
        d=a[i].split(".");
        o=ILR;

        // ILR is implied, so it is ignored if it is included
        for (j=(d[0] == "ILR") ? 1 : 0; j<d.length; j++) {
            o[d[j]]=o[d[j]] || {};
            o=o[d[j]];
        }
    }

    return o;
};

