

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

function checkDates() {

    var from = document.getElementById("DQ12345");              // 70889342 Change from long to string so now it has DQ instead of only numbers
    var desFrom = document.getElementById("FromDateField");
    if (from != null && desFrom != null)
        desFrom.value = from.value;

    var to = document.getElementById("DQ54321");                // 70889342 Change from long to string so now it has DQ instead of only numbers
    var desTo = document.getElementById("ToDateField");
    if (to != null && desTo != null)
        desTo.value = to.value;
}

$(document).ready(function () {
    // 64861528 Set current pagination and call pagination plugin
    var currentPag = parseInt($('#CurrentPageValue').val());
    if (currentPag <= 0)
        currentPag = 1;
    var totalItems = parseInt($('#hdnTotalRowCount').val());
    //if (totalItems > 10) {                                // Only show when there is more than one page
    $('.pagination-page').pagination({  // 64861528 simplePagination.js plugin
        items: totalItems,
        itemsOnPage: 10,
        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
        }
    });
    //}

	/*
    $('#form1').validate({
        errorPlacement: function (error, element) {
            return true;
        },
        highlight: function (element, errorClass) {
            //disables highlight of each date fields
            //by default, it attaches errorClass to the element
        },
        unhighlight: function (element, errorClass) {
            //disables unhighlight of each date fields.
            //by default, it removes errorClass to the element
        }
    });*/
});
