window.onload = function(){ if (window.innerWidth <= 720){ } else { //document.getElementById("totopbutton").style.marginLeft = "350px"; document.getElementById("navbutton").style.marginLeft = "350px"; document.getElementById("mySidenav").style.width = "350px"; } } window.onresize = function(){ if (window.innerWidth <= 720){ closeNav() }; if (window.innerWidth >= 721){ openNav() }; } function toTop() { $('html, body').animate({ scrollTop: 0 }, 'fast'); } function doNav() { var x = document.getElementById("mySidenav").style.width; if (x == "350px") { closeNav(); } else { openNav(); } } function openNav() { document.getElementById("mySidenav").style.width = "350px"; document.getElementById("main").style.marginLeft = "350px"; document.getElementById("navbutton").style.marginLeft = "350px"; //document.getElementById("totopbutton").style.marginLeft = "350px"; } function closeNav() { document.getElementById("mySidenav").style.width = "0"; document.getElementById("main").style.marginLeft= "0"; //document.getElementById("totopbutton").style.marginLeft= "0"; document.getElementById("navbutton").style.marginLeft= "0"; } var f = document.getElementById('toctobj2'); var t = window.location.href; // have to check against all first-level folders if (t.lastIndexOf('flac3d/') > 1){t = t.substring(t.lastIndexOf('flac3d/'))}; if (t.lastIndexOf('common/') > 1){t = t.substring(t.lastIndexOf('common/'))}; if (t.lastIndexOf('pfc/') > 1){t = t.substring(t.lastIndexOf('pfc/'))}; if (t.lastIndexOf('udec/') > 1){t = t.substring(t.lastIndexOf('udec/'))}; if (t.lastIndexOf('3dec/') > 1){t = t.substring(t.lastIndexOf('3dec/'))}; f.src = f.src + '?' + t; //experimental dynamic swap of logo + name per code section; right now just does FLAC3D in PFC docs if (window.location.href.lastIndexOf('/flac3d/') > 0) { f = document.getElementById('cornerlogo').src; document.getElementById('cornerlogo').src = f.substring(0,f.lastIndexOf('/')) + '/flac3d32.png'; document.getElementById('cornercodename').innerHTML = 'FLAC3D'; } document.getElementById("navbutton").onclick = function() { doNav(); } //document.getElementById("totopbutton").onclick = function() { toTop(); }