﻿// JScript File
//Update Progress Animation
function onUpdating(){
        // get the update progress div
        var updateProgressDiv = $get("updateProgressDiv"); 
        // make it visible
        updateProgressDiv.style.display = '';

        //  get the gridview element        
        var gridView = $get("<%= this.GridView1.ClientID %>");
        
        // get the bounds of both the gridview and the progress div
        var gridViewBounds = Sys.UI.DomElement.getBounds(gridView);
        var updateProgressDivBounds = Sys.UI.DomElement.getBounds(updateProgressDiv);
        
        //    do the math to figure out where to position the element (the center of the gridview)
        var x = gridViewBounds.x;
        var y = gridViewBounds.y;
        
        //    set the progress element to this position
        Sys.UI.DomElement.setLocation (updateProgressDiv, x, y);        
    }

    function onUpdated() {
        // get the update progress div
        var updateProgressDiv = $get("updateProgressDiv"); 
        // make it invisible
        updateProgressDiv.style.display = "none";
    }
   
     function beginRequest(){
                // show the popup
                $find('mdlPopup').show();        
            }

            function endRequest() {
                //  hide the popup
                $find('mdlPopup').hide();
            } 
            
     function beginRequest2(){
                // show the popup
                $find('mdlPopup2').show();        
            }

            function endRequest2() {
                //  hide the popup
                $find('mdlPopup2').hide();
            } 
   

