/// valida senha
function comprovarSenha(){ 
    senha1 = document.form1.senha1.value 
    senha2 = document.form1.senha2.value 

    if (senha1 == senha2) {
      return true;
	} else {
       alert(" Senhas diferentes! \nFavor inserir senhas iguais nos campos.") ;
	   return false;
}
}
//////////////VALIDA CAMPO/////////////////
function formCheck(formobj){
	// Nomes das caixas
	var fieldRequired = Array("municipio", "bairro", "logradouro", "denunciante", "DENUN_FONE", "numero", "LOCAL_PROPAGANDA", "TIPO_PROPAGANDA", "NOME_CANDIDATO", "PARTIDO_COLIGA_CANDIDATO","denuncia","RECEB_POR","TEXT_DENUNCIA","SITU_DENUNCIA");
	// Entrar com o nome para observação
	var fieldDescription = Array("Município", "Bairro", "Logradouro", "NOME DO DENUNCIANTE", "TELEFONE DO DENUNCIANTE", "Número", "Local da Propaganda", "Tipo da Propaganda", "Nome do Candidato", "Partido Coligação","Sua Denúncia","Atendente da Denuncia","Comentário da Denúncia","Situação final da denúncia");
	// mensagem
	var alertMsg = "FAVOR COMPLETAR OS CAMPOS OBRIGATÓRIOS:\n-------------------------------------------\n";
	// Configuração de Alerta interno
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == 0 || obj.options[obj.selectedIndex].text == "0"){
					alertMsg += " »  " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " »  " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " »  " + fieldDescription[i] + "\n";
				}
				break;
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
		var alertMsg2 = "-------------------------------------------\n";
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg+alertMsg2);
		return false;
	}
}
///////////////////// submit uma vez /////////

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}


/////////////////////////////////////////////////////////////////////////
/*function gettheDate() {

               Todays = new Date();
               TheDate = "" + Todays.getDate() +"/"+ (Todays.getMonth() + 1) + "/" + Todays.getYear() 
               //Chamado.Aberto_Data.value = TheDate;
			   form1.data.value = TheDate;	   

}
var timerID = null;
var timerRunning = false;
function stopclock (){
        if(timerRunning);
                clearTimeout(timerID);
        timerRunning = false;
    }

//  - - - - - - - - Inicializa o Clock-->

function startclock () {
        stopclock();
        gettheDate()
        showtime();

    }

//  - - - - - - - -  Mostra a Hora-->

function showtime () {
        var now = new Date();
        var hours = now.getHours();
        var minutes = now.getMinutes();
        var seconds = now.getSeconds()
        var timeValue = "" + ((hours >24) ? hours -24 :hours)
        timeValue += ((minutes < 10) ? ":0" : ":") + minutes
        timeValue += ((seconds < 10) ? ":0" : ":") + seconds
        // timeValue += (hours >= 12) ? " P.M." : " A.M."
		form1.hora.value = timeValue;
		//relogio.HORA.value = timeValue;


        // and have a clock on the status bar:
 		//saida.HOR_APONT_SAIDA.value = timeValue;
        //window.status = timeValue;

        timerID = setTimeout("showtime()",1000);

        timerRunning = true;

    }
*/
// - - - - - - - -   Final do código JavaScript --->
///////////////////////////////////////////////////////
var description=new Array()
description[0]='This is tool-tip description 1'
description[1]='<b>This is tool-tip descrition 2'
description[2]='<i>This is tool-tip description 3'

//Do not edit below here

iens6=document.all||document.getElementById
ns4=document.layers

<!--GLOBAL VARIABLES-->
var thename
var theobj
var thetext
var winHeight
var winPositionFromTop
var winWidth
var startH=2
var openTimer
<!--END GLOBAL VARIABLES-->

<!--GLOBAL FUNCTIONS-->

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function setObj(text,theswitch,inwidth,inheight) {
	thetext=text
	if(iens6){
		thename = "viewer"
		theobj=document.getElementById? document.getElementById(thename):document.all.thename
		winHeight=100
			if(iens6&&document.all) {
				winPositionFromTop=!window.opera? ietruebody().clientHeight : document.body.clientHeight
				winWidth=(ietruebody().clientWidth-ietruebody().leftMargin)
			}
			if(iens6&&!document.all) {
				winPositionFromTop=window.innerHeight
				winWidth=(window.innerWidth-(ietruebody().offsetLeft+30))
			}
			if(theswitch=="override") {
				winWidth=inwidth
				winHeight=inheight
			}
		theobj.style.width=winWidth+"px"
		theobj.style.height=startH+"px"
			if(iens6&&document.all) {
				theobj.style.top=ietruebody().scrollTop+winPositionFromTop+"px"
				//window.status=winPositionFromTop
				theobj.innerHTML = ""
				theobj.insertAdjacentHTML("BeforeEnd","<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=middle><font type='verdana' size='3' style='color:white;font-weight:normal'><strong>&nbsp;&nbsp;"+thetext+"</strong></font></td></tr></table>")
			}
			if(iens6&&!document.all) {
				theobj.style.top=window.pageYOffset+winPositionFromTop+"px"
				theobj.innerHTML = ""
				theobj.innerHTML="<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=middle><font type='verdana' size='2' style='color:white;font-weight:normal'><strong>&nbsp;&nbsp;"+thetext+"</strong></font></td></tr></table>"
			}
	}
	if(ns4){
		thename = "nsviewer"
		theobj = eval("document."+thename)
		winPositionFromTop=window.innerHeight
		winWidth=window.innerWidth
		winHeight=100
			if(theswitch=="override") {
				winWidth=inwidth
				winHeight=inheight
			}
		theobj.moveTo(0,eval(window.pageYOffset+winPositionFromTop))
		theobj.width=winWidth
		theobj.clip.width=winWidth
		theobj.document.write("<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=middle><font type='verdana' size='2' style='color:white;font-weight:normal'><strong>&nbsp;&nbsp;"+thetext+"</strong></font></td></tr></table>")
		theobj.document.close()
	}
	viewIt()
}

function viewIt() {
	if(startH<=winHeight) {
		if(iens6) {
			theobj.style.visibility="visible"
				if(iens6&&document.all) {
					theobj.style.top=(ietruebody().scrollTop+winPositionFromTop)-startH+"px"
				}
				if(iens6&&!document.all) {
					theobj.style.top=(window.pageYOffset+winPositionFromTop)-startH+"px"
				}
			theobj.style.height=startH+"px"
			startH+=2
			openTimer=setTimeout("viewIt()",10)
		}
		if(ns4) {
			theobj.visibility = "visible"
			theobj.moveTo(0,(eval(window.pageYOffset+winPositionFromTop)-startH))
			theobj.height=startH
			theobj.clip.height=(startH)
			startH+=2
			openTimer=setTimeout("viewIt()",10)
		}
	}else{
		clearTimeout(openTimer)
	}
}

function stopIt() {
	if(iens6) {
		theobj.innerHTML = ""
		theobj.style.visibility="hidden"
		startH=2
	}
	if(ns4) {
		theobj.document.write("")
		theobj.document.close()
		theobj.visibility="hidden"
		theobj.width=0
		theobj.height=0
		theobj.clip.width=0
		theobj.clip.height=0
		startH=2
	}
}
<!--END GLOBAL FUNCTIONS-->
function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}      

