﻿function shiftFooter() { var contentElement = document.getElementById("WNColsAll"); var contentBottom = contentElement.offsetTop + contentElement.offsetHeight; var theMostbottom = contentBottom + $("#WNFooter").height(); var clientHeight; if (window.innerHeight) { clientHeight = window.innerHeight } else { clientHeight = document.documentElement.clientHeight; } if (theMostbottom < clientHeight) { var contentHeight = $("#WNColsAll").height(); var newHeight = contentHeight + (clientHeight - theMostbottom); $("#WNColsAll").height(newHeight + 'px'); } } function onDocumentReady() { shiftFooter(); } function sharePostBody() { $(document).ready(onDocumentReady); }; function sharePreBody() { }; function postCategory() { sharePostBody(); } function postStory() { sharePostBody(); } function postStoryPrintable() { sharePostBody(); } function postLinkPlus() { sharePostBody(); } function preCategory() { sharePreBody(); } function preStory() { sharePreBody(); } function preStoryPrintable() { sharePreBody(); } function preLinkPlus() { sharePreBody(); } WnEventsManager = { loadPostBody: function(type) { if (type = 'Category') { postCategory(); } else if (type = 'Story') { postStory(); } else if (type = 'StoryPrintable') { postStoryPrintable(); } else { postLinkPlus(); } }, loadPreBody: function(type) { if (type = 'Category') { preCategory(); } else if (type = 'Story') { preStory(); } else if (type = 'StoryPrintable') { preStoryPrintable(); } else { preLinkPlus(); } } };