function VerificaDados() {
with (document.dados){
	if (nome.value.length==0) {
		alert("Por favor, digite seu nome.");
		nome.focus();
		return false;
	}
	if (email.value.length==0) {
		alert("Por favor, digite seu email.");
		email.focus();
		return false;
	}
    if (email.value.indexOf('@' , 0) == -1){
		alert("E-mail inválido.");
		email.focus();
		return false;		
		}
    if (email.value.indexOf('.' , 0) == -1){
		alert("E-mail inválido.");
		email.focus();
		return false;		
		}
   if (email.value.length<5) {
		alert("E-mail inválido.");
		email.focus();
		return false;
      }
}
}

function Mascara(formato, objeto)

{
	campo = eval(objeto);
	
	//TELEFONE
	if(formato=='TELEFONE'){
		var padrao = /[0-9]/;
		var tecla = window.event.keyCode;
		tecla = String.fromCharCode(tecla);
		padraoT = padrao.exec(tecla);
		if(padraoT == null){
			window.event.keyCode = 0;
		}
		if(campo.value.length == 0)
			campo.value += "(";
		else if(campo.value.length == 3)
			campo.value += ") ";
		else if(campo.value.length == 9)
			campo.value += ".";
	}
	
	//CEP
	if(formato=='CEP'){
		var padrao = /[0-9]/;
		var tecla = window.event.keyCode;
		tecla = String.fromCharCode(tecla);
		padraoT = padrao.exec(tecla);
		if(padraoT == null){
			window.event.keyCode = 0;
		}
		if(campo.value.length == 5)
			campo.value += ".";
	}
}

//
function data(nomeCamada){
	if (dados.agendar.checked){
		document.getElementById('data').style.visibility="visible"; 
	}
	else {document.getElementById('data').style.visibility="hidden"; 
}
}

function popup(imageName,imageWidth,imageHeight,alt,posLeft,posTop,desc) {
	newWindow = window.open("","newWindow","width="+350+",height="+385+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<p align="center"><img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>'); 
	newWindow.document.write('<div style="font-family:Arial, Helvetica, sans-serif; font-size:x-small">'+desc+'</div></p>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}
//-->
function imagem(arquivo,legenda) {
	document.getElementById("imagem").src=arquivo;
	document.getElementById("legenda").innerHTML=legenda;

}
function Fechar(nomeCamada){
	document.getElementById(nomeCamada).style.visibility="hidden"
}//