


function login() {
	//var ahaUserID = readCookie("cn");
	//alert(ahaUserID);

// 	if (ahaUserID) {
// 		if (ahaUserID.length != 0) {
// 			var ahaloginLinks = document.getElementById("loginLinks")
// 			ahaloginLinks.style.display="none";
// 			var ahalogoutName = document.getElementById("logoutName")
// 			ahalogoutName.innerHTML = "Welcome "+ ahaUserID;
// 			var ahalogoutLinks = document.getElementById("logoutLinks")
// 			ahalogoutLinks.style.display="inline";
// 			var ahaloginLinksFooter = document.getElementById("loginLinksFooter")
// 			ahaloginLinksFooter.style.display="none";
// 			var ahalogoutLinksFooter = document.getElementById("logoutLinksFooter")
// 			ahalogoutLinksFooter.style.display="inline";
// 		} else {
// 			var ahaloginLinks = document.getElementById("loginLinks")
// 			ahaloginLinks.style.display="inline";
// 			var ahalogoutLinks = document.getElementById("logoutLinks")
// 			ahalogoutLinks.style.display="inline";
// 			var ahaloginLinksFooter = document.getElementById("loginLinksFooter")
// 			ahaloginLinksFooter.style.display="inline";
// 			var ahalogoutLinksFooter = document.getElementById("logoutLinksFooter")
// 			ahalogoutLinksFooter.style.display="inline";
// 			
// 		}
// 	}

	if (!window.location.href.match(new RegExp("login\.jsp", "i"))) {
		createCookie('currPage',window.location.href,0);
	}
	
}


/*
addEventToObject(window,'onload',fixTopMenuForIe);
addEventToObject(window,'onload',ahaMenuSelection);
createCookie('currPage',window.location.href,0)
*/

function init() {
	// quit if this function has already been called
	if (arguments.callee.done) return;
	// flag this function so we don't do the same thing twice
	arguments.callee.done = true;

	//fixTopMenuForIe();
	ahaMenuSelection();
	//login();
	//createCookie('currPage',window.location.href,0);
};

/* LOAD SCRIPTS */
	/* for Mozilla */
//		if (document.addEventListener) {
//			document.addEventListener("DOMContentLoaded", init, null);
//		};
//		
//	/* for Internet Explorer */
//		/*@cc_on @*/
//		/*@if (@_win32)
//			document.write("<script defer src=/aha/scripts/ie_onload.js><"+"/script>");
//		/*@end @*/
//		
//	/* for other browsers */
//		/*mapMaker.addEvt( window, 'load', init);*/
//		addEventToObject(window,'onload',init);
//		
//		
//		
/*
 * To use, add code like the following in any js block,
 *   addLoadEvent(nameOfSomeFunctionToRunOnPageLoad);
 *   addLoadEvent(function() {
 *     // more code to run on page load
 *   });
*/
 
//Behaviour.addLoadEvent(login);