Stay informed on novel pharmacotherapies for sleep apnea. Log in or register now to access our full quick reference guide, explore the latest drug developments, and expand your clinical knowledge.
If you're already logged in and still cannot access this content, you may need to renew your membership.
// Registration button redirect
function register() {
window.location.href = 'https://my.aasm.org/register?_ga=2.16207284.320455735.1538144335-1391125712.1530032080';
}
// Ensure the DOM is fully loaded
document.addEventListener('DOMContentLoaded', function () {
var loginButton = document.getElementById('lnkMemberLoginRedirect');
// Check if loginButton exists
if (!loginButton) {
console.error('Login button not found');
return;
}
// Get the current URL
var currentUrl = window.location.href;
var relayStateUrl;
// Determine the relayStateUrl
if (currentUrl.indexOf('?') > -1) {
var queryString = getUrlParameter('url');
relayStateUrl = queryString ? queryString : encodeURIComponent(currentUrl);
} else {
relayStateUrl = encodeURIComponent(currentUrl);
}
// Assign the onclick handler directly
loginButton.onclick = function () {
window.location.href = 'https://sso.aasm.org/saml/84691709-2d5a-4bd9-bfb0-7008e00bbbc8/init?relaystate=' + relayStateUrl;
};
});
// Helper function to get URL parameters
function getUrlParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
var regex = new RegExp('[\\?&]' + name + '=([^]*)');
var results = regex.exec(window.location.href);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
}