﻿var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(EndRequest);

function EndRequest(sender, args) {
    switch (sender._postBackSettings.sourceElement.id) {
        case 'ctl00_MainContent_fvwPhoto_Comments1_lvwComments_pager_ctl00_pageNavigation':
            Utilities.focus($get('comments'));
            break;
        case 'ctl00_MainContent_fvwPhoto_Comments1_fvwComment_btnInsert':
            Miscellaneous.setFCKEditorValue('ctl00_MainContent_fvwPhoto_Comments1_fvwComment_txtComment', '');
            Utilities.focus($get('postComment'));
            break;
    }
}
