
// -- Modify here
// -- /##/
function btnSubmitLogon_onclick() {
	var sCheckEmail = document.thisForm.EMail.value;
	var sCheckPassword = document.thisForm.Password.value;
	if (sCheckPassword.length == 0 || sCheckEmail.length == 0) {
		window.alert("Please enter both your EMail address and password in order to logon.");
		return;
	}
	//setCookie("EMail", sCheckEmail);
	//setCookie("Password", sCheckPassword);
	//debugger;
	//Login.navigate.NavToLogon(sCheckEmail, false);
	// -- Note -- need to add FormValidation.
	thisPage._fireEvent('btnSubmitForm','onclick');
}

function btnSubmitLogoff_onclick() {

	thisPage._fireEvent('btnSubmitForm','onclick');

}

function checkLogon() {
	if (sSessionID == "GUEST" || isblank(sSessionID)) {
		sFromPage = "application/home.asp"
		setCookie("FROMPAGE", sFromPage);
		sMsg = "";
		sMsg += "The page you requested requires that you logon.";
		setCookie("MSG", sMsg)
		window.location.href = "login.asp";
	}
}

function emailPassword() {
	// debugger;
	var sCheckEmail = document.thisForm.EMail.value;
	if (sCheckEmail.length == 0 && sSessionID == "GUEST") {
		if (isblank(sEMail)) {
			window.alert("Please enter your EMail so that we can look up your password in our files.");
			return;
		}
		else {
			Login.navigate.NavEMailPassword();			
		}
	}	
	else {
		if (sSessionID == "GUEST") {
			// -- We only get here if there is something in the
			//    password field and the user is not logged on
			setCookie("EMAIL", sCheckEmail);			
			Login.navigate.NavEMailPassword();
		}
		else {
			Login.navigate.NavEMailPassword();	
		}
	}
	return;
}

function client_logon() {
	
	// ** Debug code
	if (typeof(sServer) == "undefined") var sServer = ""
	if (sServer != null) {
		sServer = sServer.toUpperCase();
		if (sServer.indexOf("INSPIRON") != -1 || sServer.indexOf("LOCALHOST") != -1) {
			document.thisForm.EMail.value = "Gordon@GoRose.com";
			document.thisForm.Password.value = "Gor!don";
		}
	}	
	return;
	
}

function subscribeCertTIPS(sAction) {

	if (isblank(document.thisForm.CertTIPS.value) || document.thisForm.CertTIPS.value == "Your email here") {
		window.alert("Please enter your email in order to subscribe or unsubscribe to CertTIPS.");
		document.thisForm.CertTIPS.focus();
		document.thisForm.CertTIPS.select();
		return;
	}
	else {
	
		document.thisForm.CertTIPSAction.value = sAction;
	}
	thisPage._fireEvent('btnSubmitForm','onclick');
}