
/* ----------------------------------------------------------- */

/* argh - $ used by jQuery, so could cause problems - please rewrite me!! */

//var $ = function(n) {
var KDS_getElementById = function(n) {
	return document.getElementById(n);
};

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}

addLoadEvent(function() {
	KDS_INIT();
});



/* ----------------------------------------------------------- */

function KDS_INIT() {
		
	// initialize the P7 PMM menus
	P7_initPM(1, 0, 1, -20, 10);
	
	// on all pages except the homepage, make the masthead clickable!
	if (!KDS_getElementById('homepage')) {
		KDS_getElementById('header').onclick = function() { window.location='/index.asp'; };
		KDS_getElementById('header').style.cursor='pointer';
		KDS_getElementById('header').title='Return to Homepage';
	}
	
};











/* ----------------------------------------------------------- */
// OPTIONAL KDS PROGRAMMING SECTION:

// Create our namespace! and provide common function references!
//var KDS = KDS || { $E : YAHOO.util.Event , $D : YAHOO.util.Dom , $G : YAHOO.util.Dom.get , $ : YAHOO.util.Dom.get };
var KDS = KDS || { $ : document.getElementById };


// Declare individual apps as "inline" functions and invoke!
KDS.Page = function() {
	// privates?
	//
	//
	// public return!
	return {
		
		init : function() {
			//
			//
		}

	};

}();


