﻿
var eccOldSetTimeout;

function eccSetTimeoutNoScroll(a, b) {
    if (a.toString().indexOf('document.getElementById("s4-workspace").scrollTop = ') != 0) {
        eccOldSetTimeout(a, b);
    }
}

jQuery(document).ready(function () {

    if (typeof (_InfoPath) == 'function') {
        eccOldSetTimeout = window.setTimeout;
        window.setTimeout = eccSetTimeoutNoScroll;

        var scrollElem = document.getElementById("_maintainWorkspaceScrollPosition");
        scrollElem.value = '0';
    }

});

