
function initPage() {
    resizeParentIframe('documentAttachPage', window);
    scrollParentToTop();
}

// Ready function to trigger simplePagination.js plugin
$(function () {

    var currentPag = parseInt($('#CurrentPageValue').val());
    if (currentPag <= 0)
        currentPag = 1;
    var totalPages = parseInt($('#TotalPagesValue').val());
    //if (totalPages > 1) {                                       // Only show when there is more than one page
    $('.pagination-page').pagination({  // simplePagination.js plugin
        pages: totalPages,
        currentPage: currentPag,
        cssStyle: 'light-theme',
        onPageClick: function (pageNumber) {                // When page button is clicked
            $('#CurrentPageValue').val(pageNumber);         // Set current page for server side changes
            $("#PageClickButton").trigger('click');	        // AX-24898.24919.2 $("#PageClickButton").click();                  // Trigger click buttom
        }
    });
    //}
});