////////////
// LOGOUT //
////////////
function logout() {

	document.masterForm.action = "fgi_invalid_controller.jsp";
	document.masterForm.admin_action.value = "logout";
	document.masterForm.submit();
	
}


/////////////
// CONTENT //
/////////////
function loadDocument(documentID) {
	
	document.masterForm.LOAD_DOCUMENT_ID.value = documentID;
	document.masterForm.admin_action.value = "load_issue";
	document.masterForm.submit();
}

function getMidMonthUpdate(updateID) {
	document.masterForm.FGI_MID_MONTH_UPDATE_ID.value = updateID;
	document.masterForm.admin_action.value = "get_mid_month_update";
	document.masterForm.submit();
}

function showPopUp(name,url,width,height) { 
  window.open(url,name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+width+',height='+height);
}

//////////////
// REGISTER //
//////////////
// Handles redirecting the user to the register form, even if they are "logged in"
function registerError() {
	document.masterForm.action = "fgi_invalid_controller.jsp";
	doAction('register_by_account_number');
}


///////////////
// SUBSCRIBE //
///////////////
// This function calls the subscription page corresponding to the offer code
function subscribe(inCode) {
	document.masterForm.action = "fgi_invalid_controller.jsp";
	document.masterForm.inCode.value = inCode;
	document.masterForm.admin_action.value = "subscribe";
	document.masterForm.submit();
}