/*
The Humanities Project Script

*/


/* Creates the namespace HP */
if (typeof HP == "undefined") { var HP = {}; }


/* Creates new namespaces under HP */
HP.namespace = function()
{
	var rootNS = "HP";
	var rootObj = HP;
	var obj = null;
	var i = arguments.length;
	var j,namespaces;
	
	while (i--)
	{
        namespaces = arguments[i].split(".");
        obj = rootObj;			

        // The root namespace is implied, so it is ignored if it is included
        for (j = (namespaces[0] == rootNS)? 1:0; j < namespaces.length; j = j + 1)
		{
            obj[namespaces[j]] = obj[namespaces[j]] || {};
            obj = obj[namespaces[j]];
        }
    }
    return obj;
};
