function  validarForm (campo , enviarNome) { //campo tem as IDs dos campos obrigatorios

    tamanho =  campo.length;
    var camp = campo;
	
    for(i=0;i<camp.length ; i++) {            
        if(document.getElementById(camp[i]).value=='' || document.getElementById(camp[i]).value==null) {			
            window.alert("Preencha o campo "+ camp[i].toUpperCase() );
            document.getElementById(enviarNome).value = "Confirmar Correções";
            document.getElementById(camp[i]).style.border = "1px solid #C75F4E";
            document.getElementById(camp[i]).focus();			
            return false;		
        }
    } 	
	
    document.getElementById(enviarNome).disabled = true;
    document.getElementById(enviarNome).value = "Processando dados... "	
    document.getElementById(enviarNome).style.backgroundColor = "#F1F2F1";
    document.getElementById(enviarNome).style.border = "1px solid #F1F2F1";
    return true;
}

function listaOver (elemento , cor) {
    elemento.style.backgroundColor = cor;
    elemento.style.color = "#1A7BA8";
	
}

function listaOut (elemento , cor) {
    elemento.style.backgroundColor = cor;
    elemento.style.color = "";
}

function aguarde () {
    document.getElementById("enviar").disabled = true;
    document.getElementById("enviar").value = "Aguarde..."	
}

function excluir() {
    var x = confirm("Você realmente deseja excluir ?");  return x;
}

function rollOver (elemento) {
    elemento.style.backgroundColor='#e2e2e2';
    elemento.className = "nomeClass";
}

function rollOut (elemento) {
    elemento.style.backgroundColor='';
}

function ampliarImagem (arquivo , legenda) {
    var divId = 'exibeImg';
    document.getElementById(divId).innerHTML = "<img src='img.php?img="+
        arquivo+
        "&l=390&a=300' alt='Ampliada' /><br /><span class='obs'>"+
        legenda+
        "</span>";
    return false;
}

function voltar () {
    history.go(-1);
}

function showHidden(id) {

    var div = document.getElementById(id);
    
    if(div.style.display=="none")
        div.style.display = "block";
    else 
        div.style.display = "none";
    
     return false;

}

