﻿// JScript File

function ItemMouseOver(obj){
 obj.oldbackgroundColor=obj.style.backgroundColor; 
 obj.style.backgroundColor='#d0d0d0'; 
 obj.style.cursor = 'pointer';
}

function ItemMouseOut(obj){
 obj.style.backgroundColor=obj.oldbackgroundColor;
}

//function autoTab(event, input, len) {
    //if (input.value.length >= len) {
        //input.value += String.fromCharCode(event.keyCode);
        //event.keyCode = 15;
        //alert(document.forms.item(0).nextSibling.nodeName);
        //'document.forms.item(0).nextSibling.nodeName;
        //return true;
    //}
//}


function CalculaValor(saida,obj1,obj2,obj3,obj4){
 value = parseFloat(obj1.value.replace(",",".")*100) + parseFloat(obj2.value.replace(",",".")*100) - parseFloat(obj3.value.replace(",",".")*100);
 span = document.getElementById(saida);
//alert(saida.id);
//alert(saida.innerText);
 value=value/100;
 saida.innerText = value.toFixed(2).replace(".",",");
 
}

function MudaPagina()
{
 return window.confirm("Você será redirecionado para outra página e PERDERÁ AS INFORMAÇÕES QUE NÃO FORAM SALVAS. Deseja continuar?")
}

function MostraListTipo(objPai,objNome){
 var obj = document.getElementById(objPai+"_"+objNome);

 document.getElementById(objPai+"_LISTDespesas").style.display = "none";
 document.getElementById(objPai + "_LISTReceitas").style.display = "none";
 if (document.getElementById(objPai + "_ListOutros") != null) {
     document.getElementById(objPai + "_ListOutros").style.display = "none";
 }
 document.getElementById(objPai + "_ListBancos").style.display = "none";
 document.getElementById(objPai+"_HLNovaCat").style.display = "block";

 obj.style.display = "block";
}

function ConfirmarTodos(){  
  return(window.confirm("Confirma a exclusão de todos os registros?"))
} 
function ConfirmarBaixaTodos(){  
  return(window.confirm("Confirma a baixa de todos os registros?"))
} 

function MudouData(objDrop){
 objDrop.value = "P";
}

