﻿function BusyBoxDisableCombos()
{
    var objElements = document.getElementsByTagName("select");
    
    for (var lngIdx=0; lngIdx<objElements.length; lngIdx++)
    {
        //objElements[lngIdx].style.visibility = 'hidden';
    }
}

function BusyBoxAnimate(Idx)
{

    if (document.getElementById('BusyBoxImg' + (  Idx)%4) != null) {
        
        document.getElementById('BusyBoxImg' + (  Idx)%4).style.display = 'none';
        document.getElementById('BusyBoxImg' + (++Idx)%4).style.display = 'inline';
        
	    setTimeout('BusyBoxAnimate(' + (Idx) + ')', 100);
	}
}	

function MostraDvWait()
{
    if ( typeof(Page_IsValid) != 'undefined'){
        if ( Page_IsValid ){
            objBusyBoxOuterLayer = document.getElementById("BusyBoxOuterLayer");
            objBusyBoxInnerLayer = document.getElementById("BusyBoxInnerLayer");
	        if (objBusyBoxOuterLayer != null && objBusyBoxInnerLayer != null){

	            objBusyBoxOuterLayer.style.visibility = 'visible';
	            
                BusyBoxDisableCombos();
                if(document.getElementById('BusyBoxImg0') != null){
                    document.getElementById('BusyBoxImg0').style.display = 'inline';
                    setTimeout("document.getElementById('BusyBoxImg0').src= imgCarregando;",100);
                }
	            //BusyBoxAnimate(0);
	        }
	    }
	}
}


