/**
 * JavaScript by Jeffrey Ouma.
 * Copyright© 2008 artkenya.net Ltd.
 * All rights reserved.
 * 
 * Script name: main.js
 * Purpose: Defines namespaces and common functions that are executed by every page.
 */
//Create the Bleez namespace
Bleez = {};

// Create the utilities namespace
Bleez.util = {};

Bleez.util.Scrub = function(obj){
	if (obj.blur) {
		obj.blur();
	}
	// End of Bleez.util.Scrub
};

/** Site Namespace
 * 	Purpose: Defines functions that are specific to this website, but used widely.
 */
Site = {};

Site.main = {};

/**
 * Function name: Copyright
 * Purpose: Keeps the copyright year current, e.g. 2007 - 2008
 */
Site.main.Copyright = function(){
	var d = new Date();
	yr = d.getFullYear();
	
	if (yr > 2008)
		return " - " + yr;
	
	else 
		return;
};


/**
 * Function name: Init
 * Purpose: Executes when the page loads after the DOM is ready. Performs initialization of any
 * elements or values to their default.
 */
Site.main.Init = function() {
	var c = Site.main.Copyright();
	if(c) {
		var elm = YAHOO.util.Dom.get("copyrightyear");
		elm.innerHTML = c;
	}
};

YAHOO.util.Event.onDOMReady(Site.main.Init);
