		function Move()
        {
            if (event != "undefined" && event != null)
            {   
                window.status=event.clientX + ": " + event.clientY;
            }
        }
        
        function CloseErrorMessage()
        {
            $get("ErrorPopUp").style.display = "none";
        }
        
        function CloseSuccessMessage()
        {
            $get("SuccessPopUp").style.display = "none";
        }
        
        function CloseInfoMessage()
        {
            $get("InfoPopUp").style.display = "none";
                                   
        }
        
       
             
       //Gets the width and height of the browser client window (excluding scrollbars)     
       function GetClientBounds()
       {
         var clientWidth;
         var clientHeight;
        switch(Sys.Browser.agent) {
            case Sys.Browser.InternetExplorer:
                clientWidth = document.documentElement.clientWidth;
                clientHeight = document.documentElement.clientHeight;
                break;
            case Sys.Browser.Safari:
                clientWidth = window.innerWidth;
                clientHeight = window.innerHeight;
                break;
            case Sys.Browser.Opera:
                clientWidth = Math.min(window.innerWidth, document.body.clientWidth);
                clientHeight = Math.min(window.innerHeight, document.body.clientHeight);
                break;
            default:  // Sys.Browser.Firefox, etc.
                clientWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
                clientHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
                break;
        }
        return new Sys.UI.Bounds(0, 0, clientWidth, clientHeight);
       }      
               
       function LayoutErrorPopUp()
       {
        var scrollLeft = getScrollXY().X;
        var scrollTop  =  getScrollXY().Y;
        var clientWidth = GetClientBounds().width;
        var clientHeight = GetClientBounds().height;
        var element = $get("ErrorPopUp");
            element.style.position = "absolute";
            element.style.left = scrollLeft+((clientWidth-element.offsetWidth)/2)+'px';
            element.style.top = scrollTop+((clientHeight-element.offsetHeight)/2)+'px';
        
       }
       
       function LayoutInfoPopUp(msg)
       {                       
            document.getElementById("GenericInfoPopUpMsg").innerHTML = msg;
            var scrollLeft = getScrollXY().X;
            var scrollTop  =  getScrollXY().Y;
            var clientWidth = GetClientBounds().width;
            var clientHeight = GetClientBounds().height;
            var element = $get("InfoPopUp");
            element.style.position = "absolute";
            element.style.left = scrollLeft+((clientWidth-element.offsetWidth)/2)+'px';
            element.style.top = scrollTop+((clientHeight-element.offsetHeight)/2)+'px';                                              
           
       }
       
       function LayoutSuceessPopUp()
       {
            var scrollLeft = getScrollXY().X;
        var scrollTop  =  getScrollXY().Y;
        var clientWidth = GetClientBounds().width;
        var clientHeight = GetClientBounds().height;
        var element = $get("SuccessPopUp");
            element.style.position = "absolute";
            element.style.left = scrollLeft+((clientWidth-element.offsetWidth)/2)+'px';
            element.style.top = scrollTop+((clientHeight-element.offsetHeight)/2)+'px';
       }
        
        
        var urlrefresh = '';
                           
            
             Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
             Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);
                                             
                function beginRequest(sender, e)
                {                                                                                                                                                 
                }
                                                
                function endRequest( sender, e ) {  
                                     
                    var errorMessage;
                    var info = e.get_dataItems();                                     
                    if (e.get_error() != undefined)
                    {
                         if ( e.get_response().get_statusCode() != 0 )
                         {     
                               if (e.get_response().get_statusCode() == '200') {
                                   errorMessage = e.get_error().message;
                                   var re = new RegExp("Sys.*:", "g");
                                   errorMessage = errorMessage.replace(re, "");
                               }
                               else
                               {
                                   // Error occurred somewhere other than the server page.
                                   errorMessage = ErrorMessageResource;
                               }                             
                               $get("ErrorPopUp").style.display = "block";
                               $get("ErrorPopUpMsg").innerHTML = errorMessage;                          
                               LayoutErrorPopUp();                         
                          }
                          e.set_errorHandled(true);
                          
                   }
				    setMaxLength();				    
                                       
               }                             