/**
 * @author iowens with help from michael schwartz
 * @license http://weblogs.asp.net/mschwarz/archive/2005/08/26/423699.aspx
 */
/* global register namespaces function, make sure to load first */

// register namespace

function registerNS(ns)
{
 	var nsParts = ns.split(".");
 	var root = window;

 	for(var i=0; i<nsParts.length; i++)
 	{
  		if(typeof root[nsParts[i]] == "undefined"){
   			root[nsParts[i]] = new Object();
		}
  		root = root[nsParts[i]];
 	}
}
