function Logout() {
	if(Broadway.processing) return;
	Broadway.setProcessing(this);

	http('GET','/com/Ajax/FormsAjax.cfc?method=Logout',Logout_response);
}
function Logout_response() {
	Broadway.clearProcessing();
	window.location.reload();
}

function ReturntoLogin() {
	if(Broadway.processing) return;
	Broadway.setProcessing(this);

	http('GET','/com/Ajax/FormsAjax.cfc?method=ReturntoLogin',ReturntoLogin_response);
}
function ReturntoLogin_response() {
	Broadway.clearProcessing();
	window.location.reload();
}

function CheckLoginState(obj) {
	if(Broadway.processing) return;
	Broadway.setProcessing(this);

	http('Post','/com/Ajax/FormsAjax.cfx?method=LoginState', CheckLoginState_response, obj);
}

function CheckLoginState_repsonse(obj) {
	Broadway.clearProcessing();

	if(obj) {
		document.getElementById('link').href= '/MyAccount';
	} else {
		ReturntoLogin();
		document.getElementById('link').href= '/MyAccount';
	}
}