function generateNavlinks() { var nl_str = 'x'; nl_str = nl_str + '«»'; return nl_str; }; var initialYear = 2017; var currentYear = 2017; var finalYear = 2016; var previousYearLink = document.getElementById('previousYearLink'); var nextYearLink = document.getElementById('nextYearLink'); function toggleFullYearNav() { var overlay = document.getElementById('full-year-nav'); var link = document.getElementById('allMonths'); if (overlay.style.display == 'block') { overlay.style.display = 'none'; link.style.display = 'block'; } else { overlay.style.display = 'block'; link.style.display = 'none'; } }; function navlinksOnload() { if (!document.getElementById) { return; // this browser can't handle the following code } if (typeof window.clientInformation != 'undefined') { if (window.clientInformation.platform.indexOf('Mac' != -1)) { if (window.clientInformation.appName == 'Microsoft Internet Explorer') { return; // Mac IE can't handle the popup, either } } } var allMonths = document.getElementById("allMonths"); allMonths.innerHTML = ''; allMonths.innerHTML = 'Choose a Month…'; var fullYearNav = document.getElementById('full-year-nav'); fullYearNav.innerHTML = ''; fullYearNav.innerHTML = generateNavlinks(); document.getElementById('previousYearLink').style.display = 'none'; }; function showPreviousYear() { if (initialYear != currentYear) { document.getElementById('currentyear').id = currentYear; currentYear--; document.getElementById(currentYear).id = 'currentyear'; } document.getElementById('nextYearLink').style.display = 'block'; if (initialYear == currentYear) { document.getElementById('previousYearLink').style.display = 'none'; } }; function showNextYear() { if (finalYear != currentYear) { document.getElementById('currentyear').id = currentYear; currentYear++; document.getElementById(currentYear).id = 'currentyear'; } document.getElementById('previousYearLink').style.display = 'block'; if (finalYear == currentYear) { document.getElementById('nextYearLink').style.display = 'none'; } };