toggleFull: function(panel) { if (panel.className == 'full') { panel.className = panel.fullSizeOrig.className; window.scrollTo(panel.fullSizeOrig.scrollX, panel.fullSizeOrig.scrollY); document.body.style.overflow = 'auto'; panel.fullSizeOrig = null; } else { panel.fullSizeOrig = { className: panel.className, scrollX: window.scrollX, scrollY: window.scrollY }; panel.className = 'full'; document.body.style.overflow = 'hidden'; window.scrollTo(0, 0); } }