// function for synchronizing the login status between application and CAS function get_login_status_change_url(sync_type) { var curr_url = self.location.href; var currURL = encodeURIComponent(window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search); if (sync_type == "login") { var new_url = login_url + '?action=LOGIN&sync_with_cas=1&redirect_to=' + currURL; } else { var new_url = login_url + '?action=LOGOUT&redirect_to=' + currURL; } return new_url; } // function to login application function get_login_app_url() { var currURL = encodeURIComponent(window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search); var new_url = login_url + '?action=LOGIN&redirect_to=' + currURL; return new_url; } // function to logout application function get_logout_app_url() { var currURL = encodeURIComponent(window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search); var new_url = login_url + '?action=LOGOUT&redirect_to=' + currURL; return new_url; } // function to change application language function changeLang_app(lang, locale) { var currURL = encodeURIComponent(window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search); var new_url = login_url + '?action=CHANGE_LANG&redirect_to=' + currURL +'&lang=' + lang + '&locale=' + locale; this.location.href = new_url; return; }