export var APIGlobal = function() { }; APIGlobal.pre_login_data = getPreLoginData() );?>; //Convert getPreLoginData() array to JS. window.need_load_pre_login_data = false; var alternate_session_data = decodeURIComponent( getCookie( 'AlternateSessionData' ) ); if ( alternate_session_data ) { alternate_session_data = JSON.parse( alternate_session_data ); if ( alternate_session_data && alternate_session_data.new_session_id ) { setCookie( 'SessionID', alternate_session_data.new_session_id, 30, APIGlobal.pre_login_data.cookie_base_url ); alternate_session_data.new_session_id = null; //Allow NewSessionID cookie to be accessible from one level higher subdomain. var host = window.location.hostname; host = host.substring( ( host.indexOf( '.' ) + 1 ) ); setCookie( 'AlternateSessionData', JSON.stringify( alternate_session_data ), 1, APIGlobal.pre_login_data.cookie_base_url, host ); //was NewSessionID need_load_pre_login_data = true; // need load it again since APIGlobal.pre_login_data.is_logged_in will be false when first load } } //delete alternate_session_data; // Invalid in strict mode. Should not be needed anyway as they are not global now? //delete host; // Invalid in strict mode. Should not be needed anyway as they are not global now? alternate_session_data = null; host = null;