
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function (evt, args) {
    try {

        if ($("#ctl00_MainContent_txtSliderPosition").val() == 1) {
            $("#ctl00_MainContent_PENav").removeClass("rightNav");
            $("#ctl00_MainContent_PENav").removeClass("leftNav");
            $("#ctl00_MainContent_PENav").toggleClass("rightNav");
        }
        else {
            $("#ctl00_MainContent_PENav").removeClass("rightNav");
            $("#ctl00_MainContent_PENav").removeClass("leftNav");
            $("#ctl00_MainContent_PENav").toggleClass("leftNav");
        }
    }
    catch (e) {
        throw (e);
    }
});

function ToggleNAVClass(control) {
    $("#" + control.id).removeClass("leftNav");
    $("#" + control.id).toggleClass("rightNav");

    $("#ctl00_MainContent_txtSliderPosition").val(1);

    if ($("#" + control.id).attr('class') == "rightNav") {
        $(".MainFilters").hide(700);
    }
    else {
        $("#" + control.id).toggleClass("leftNav");
        $("#ctl00_MainContent_txtSliderPosition").val(0);
        $("#" + control.id).removeClass("rightNav");
        $(".MainFilters").show(700);
    }
}

function HideFilters() {
    $(".MainFilters").hide();
}

function ShowFilter() {
    $(".MainFilters").show();
}

function OnTextChanged(cntrl) {
    try {
        key = window.event.keyCode;
        if (key == 9 || key == 13) {
            __doPostBack("ctl00_MainContent_txtRowsPerPage", "TextChanged");
            return true;
        }
        else
            return false;
    } catch (e) {
        throw (e);
    }
}