// starting the script on page DOM completed
$(document).ready(function(){
    tooltip();
	styleButtons();
	setPrintAction();
	setLoginLinkImage();
	reRenderTables();
	renderProgressDialog();
	setHeaderOptions();
	lightBoxImage(".enable_lightbox");
	renderGrid();
	setFontSize();

    // When update_progress is present update scroll position
    // to keep the lightBox in the right spot
    if ($(".update_progress").length > 0) {
        $(window).scroll(function() {
            renderProgressDialog();
        });
    }
    
    // After Ajax PostBack ReRender buttons
    try {
        var prm = Sys.WebForms.PageRequestManager.getInstance(); 
        if (prm != null) {
            prm.add_endRequest(reDrawButtons);
            prm.add_endRequest(reRenderTables);
        }
    } catch(e) {
        
    }
});
