/* FILE ARCHIVED ON 11:57:44 May 7, 2009 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 2:48:11 Jun 5, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ // /prod/webdocs/htdocs/amednews/scripts/amn.js // amednews js scripts (ehs ad processing is separate) // vars for login/logout routines // NOTE these shd be should be changed to the appropriate // domain for use on the staging site var ssoURLBase = "https://webarchive.library.unt.edu/eot2008/20090507115744/https://ssl3.ama-assn.org/apps"; var amnewsHomeURL = "https://webarchive.library.unt.edu/eot2008/20090507115744/http://www.ama-assn.org/amednews/"; // PRINTME functionality - now handled in R-bar SSIs //function print_page() {window.print();} //function prt() {var p=1;} // generic AMA logout-link writer // copied w/mods from "https://webarchive.library.unt.edu/eot2008/20090507115744/http://www.ama-assn.org/ama1/js/ama-default.js" function logoutLink(sessionTitle) { var ldap = document.cookie.indexOf("AMAHTTPSESSIONID"); if (ldap != -1) { //document.write('LOG OUT'); //document.write('LOG OUT'); document.write(' Log out '); } } // logIN link writer (analogous to logoutLink) // allows us to have an explicit login link, not just folks will click on content function loginLink(sessionTitle) { var ldap = document.cookie.indexOf("AMAHTTPSESSIONID"); if (ldap == -1) { var loginUrl = ssoURLBase + "/xsite/x-amnews/xsite.cgi?site=" + escape(document.location); document.write(' Log in '); } } // same but just writes the link itself // does not check for logged in state, as going only to Limited pages function loginLim(sessionTitle) { var loginUrl = ssoURLBase + "/xsite/x-amnews/xsite.cgi?site=" + escape(document.location); document.write(' Log in '); } // generic AMA cookie grabber function getCookie(cookieName) { var cookieStr = "" + document.cookie; var index1 = cookieStr.indexOf(cookieName); if (index1 == -1 || !cookieName) { return ""; } var index2 = cookieStr.indexOf(";", index1); if (index2 == -1) { index2 = cookieStr.length; } return(unescape(cookieStr.substring(index1 + cookieName.length + 1, index2))); }