/*
 * Adds events to execute javascript needed for menu navigation on window load
 */

if(window.addEventListener) {
	 window.addEventListener('load', sfFocus, false); // gecko, safari, konqueror and standard
	 window.addEventListener('load', sfHover, false);
	 window.addEventListener('load', sfActive, false);
	 window.addEventListener('load', colorTables, false);
} else if(document.addEventListener) {
	document.addEventListener('load', sfFocus, false); // opera 7
	document.addEventListener('load', sfHover, false);
	document.addEventListener('load', sfActive, false);
	document.addEventListener('load', colorTables, false);
} else if(window.attachEvent) { // win/ie
	window.attachEvent('onload', sfHover);
	window.attachEvent('onload', sfFocus);
	window.attachEvent('onload', sfActive);
	window.attachEvent('onload', colorTables);
} else { // mac/ie5
	if(typeof window.onload == 'function') {
		var existing = onload;
		window.onload = function() {
			existing();
			sfHover();
			sfFocus();
			sfActive();
			colorTables();
		}
	} else {
		window.onload = function() {
			sfHover();
			sfFocus();
			sfActive();
			colorTables();
		}
	}
}
