﻿
  
    function createFund()
    {
        if (document.getElementById("fundBr") == null)
	    {
	        var ieMat = document.createElement("<div id='fundBr' style='filter: alpha(opacity=40); left: 0px; Z-Index:100; width: 1px; position: absolute;top: 0px; height: 1px; background-color: silver; visibility: hidden;'><div style='background-color: white; text-align: center; vertical-align:middle ; position: relative; top: 120px;'>&nbsp;<img src='images/wait28.gif' />&nbsp; <span style='color: darkblue; font-family: Verdana'> <strong>Aguarde</strong></span></div></div>");		
	        document.body.insertBefore(ieMat);
	    }
    	
       if (document.getElementById("fundBr") != null)
	    {
			    document.getElementById("fundBr").style.visibility = "visible";
			    document.getElementById("fundBr").style.top = document.getElementById("divBase").offsetTop - 20;
			    document.getElementById("fundBr").style.left= document.getElementById("divBase").offsetLeft;
			    document.getElementById("fundBr").style.width =document.getElementById("divBase").offsetWidth; //document.body.offsetWidth;
			    document.getElementById("fundBr").style.height= document.getElementById("divBase").offsetHeight + 20;//document.body.clientHeight;						
			   
	    }
    }

    function setClose()
    {   
        if (document.getElementById("fundBr") != null)
	    {
		        document.getElementById("fundBr").style.visibility = "hidden";
	    }   
    }

    function beginRequest(sender, args)
	{
//	   
		    window.status = "Por favor aguarde...";
		    document.body.style.cursor = "wait";
		    createFund();	
	}

	function pageLoaded(sender, args)
	{	    
	    window.status = "";
	    document.body.style.cursor = "default";
	    setClose();		
	}
	


			Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
			Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoaded);	


