	function validaCadastro()
	{
						
		if(     (document.getElementById('email').value == null ||
			     document.getElementById('email').value == '') ||
			    (document.getElementById('nome').value == null ||
			     document.getElementById('nome').value == '') ||
			    (document.getElementById('sexo').value == null ||
			     document.getElementById('sexo').value == '') ||
			    (document.getElementById('diaNascimento').value == null ||
			     document.getElementById('diaNascimento').value == ' ') ||
			    (document.getElementById('mesNascimento').value == null ||
			     document.getElementById('mesNascimento').value == ' ') ||
			    (document.getElementById('anoNascimento').value == null ||
			     document.getElementById('anoNascimento').value == ' ') ||
			    (document.getElementById('estado').value == null ||
			     document.getElementById('estado').value == '') ||
			    (document.getElementById('pais').value == null ||
			     document.getElementById('pais').value == '') ||
			    (document.getElementById('cep').value == null ||
			     document.getElementById('cep').value == '') )  
			  {
				
				alert('Preencha todos os campos obrigatórios.');
				return false;
			  }
			  
			  if(document.getElementById('senha').value !=
			     document.getElementById('confirme').value) 
			   {
			   	 alert('Senhas não conferem');
			   	 return false;
			   }
	}
	
	var sHors = "00"; 
	var sMins = "00";
	var sSecs = "15";
			
	function getSecs()
	{
		sSecs--;
			
		if(sSecs == 0) document.getElementById('botao').style.display = 'inline';
		
		if(sSecs<0) { 
		   sSecs=59; sMins--; 
		   if(sMins<=9) { 
		     sMins="0"+sMins;
		   } 
		}
		
		if(sMins=="0-1") {
		   sMins=5;
		   sHors--;
		   if(sHors<=9) {
		     sHors="0"+sHors;
		   } 
		 }

		if(sSecs<=9) sSecs="0"+sSecs;
		
		if(sHors=="0-1")
		{
		  sHors="00";sMins="00";sSecs="00";
	       document.getElementById('clock1').innerHTML= "   " +  sSecs + " segundos";
	    
	    } else {
	    
  			  document.getElementById('clock1').innerHTML= "   " + sSecs + " segundos";
  		 	  setTimeout('getSecs()',1000);
		}
	}
	
	function refreshParent() {
			window.opener.opener.location.href = "index.jsp";
	}
	
	function openAlbumPopup(URL){ 
			if ((URL == "PreDownload.do?id=4") || (URL == "PreDownload.do?id=765708654")) {
			    window.open("PreDownload.do?id=765708654","","width=595,height=575,scrollbars=NO");
			} else if ((URL == "PreDownload.do?id=5") || (URL == "PreDownload.do?id=986543286")) {
			    window.open("PreDownload.do?id=986543286","","width=595,height=575,scrollbars=NO");
			} else if (URL == "/PreDownload.do?id=353245564" || URL == "PreDownload.do?id=353245564") {
			    window.open("PreDownload.do?id=353245564","","width=590,height=580,scrollbars=NO");
			} else {
			    window.open(URL,"","width=590,height=525,scrollbars=NO");
			}
	}

	function openExtraPopup(URL){
			if (URL == "/PreDownloadExtra.do?id=353245564" || URL == "PreDownloadExtra.do?id=353245564") {
			    window.open("PreDownloadExtra.do?id=353245564","","width=590,height=580,scrollbars=NO");
			} else {
				window.open(URL,"","width=590,height=530,scrollbars=NO"); 
			}
	}
	
	function openPopup(URL){ 
			window.open(URL,"","width=660,height=600,scrollbars=YES"); 
	}

	function openDownloadPopup(URL){ 
			window.open(URL,"","top=60,left=20,width=1000,height=590,scrollbars=NO,border=0"); 
	}
	
	function openDownloadPopup2(URL){ 
			window.open(URL,"","top=60,left=20,width=1000,height=600,scrollbars=NO,border=0"); 
	}
	
	function openDownloadPopup3(URL, height) { 
			window.open(URL,"","top=60,left=20,width=990,height=" + height + ",scrollbars=NO,border=0,resizable=0"); 
	}
	
	function fechar() 
	{
			janela = top;
			janela.opener = top;
			janela.close();
	}
	
	function fecharRefreshAv() 
	{
			janela = top;
			janela.opener = top;
			janela.close();
			window.opener.location.href = 'index.jsp'
	}
	
	function validaCheckIn(form)
	{
					
			if( (form.email.value == null ||
				 form.email.value == '') )  
				  {
					alert('O preenchimento do email é obrigatorio');
					return false;
				  }
	}
	
	function FundoBranco(id,marca)
	{
	document.getElementById("topo_esq_"+id).className="FundoBranco";
	document.getElementById("topo_centro_"+id).className="FundoBranco";
	document.getElementById("topo_dir_"+id).className="FundoBranco";
	document.getElementById("centro_esq_"+id).className="FundoBranco";
	document.getElementById("centro_centro_"+id).className="FundoBranco";
	document.getElementById("centro_dir_"+id).className="FundoBranco";
	document.getElementById("topo_esq_"+id).className="FundoBranco";
	document.getElementById("topo_centro_"+id).className="FundoBranco";
	document.getElementById("topo_dir_"+id).className="FundoBranco";
	document.getElementById("cont_esq_"+id).className="FundoBranco";
	document.getElementById("cont_centro_"+id).className="FundoBranco";
	document.getElementById("cont_dir_"+id).className="FundoBranco";
	//document.getElementById("pat_txt_esq_"+id).className="FundoBranco";
	//document.getElementById("pat_txt_centro_"+id).className="FundoBranco";
	//document.getElementById("pat_txt_dir_"+id).className="FundoBranco";
	document.getElementById("span_pat_"+id).className="TextoPreto";
	//document.getElementById("img_esq_"+id).className="FundoBranco";
	document.getElementById("img_centro_"+id).className="FundoBranco";
	document.getElementById("img_dir_"+id).className="FundoBranco";
	document.getElementById("album_desc_"+id).className="l_txt_desc_albuns_b";
	document.getElementById("img_marca_"+id).src="imagens/marcas/"+marca+"_negativo.jpg";
	}
	
	function SemFundoBranco(id,marca)
	{
	document.getElementById("topo_esq_"+id).className="SemFundoBranco";
	document.getElementById("topo_centro_"+id).className="SemFundoBranco";
	document.getElementById("topo_dir_"+id).className="SemFundoBranco";
	document.getElementById("centro_esq_"+id).className="SemFundoBranco";
	document.getElementById("centro_centro_"+id).className="SemFundoBranco";
	document.getElementById("centro_dir_"+id).className="SemFundoBranco";
	document.getElementById("topo_esq_"+id).className="SemFundoBranco";
	document.getElementById("topo_centro_"+id).className="SemFundoBranco";
	document.getElementById("topo_dir_"+id).className="SemFundoBranco";
	document.getElementById("cont_esq_"+id).className="SemFundoBranco";
	document.getElementById("cont_centro_"+id).className="SemFundoBranco";
	document.getElementById("cont_dir_"+id).className="SemFundoBranco";
	//document.getElementById("pat_txt_esq_"+id).className="SemFundoBranco";
	//document.getElementById("pat_txt_centro_"+id).className="SemFundoBranco";
	//document.getElementById("pat_txt_dir_"+id).className="SemFundoBranco";
	document.getElementById("span_pat_"+id).className="TextoBranco";
	//document.getElementById("img_esq_"+id).className="SemFundoBranco";
	document.getElementById("img_centro_"+id).className="SemFundoBranco";
	document.getElementById("img_dir_"+id).className="SemFundoBranco";
	document.getElementById("album_desc_"+id).className="l_txt_desc_albuns";
	document.getElementById("img_marca_"+id).src="imagens/marcas/"+marca+".jpg";
	}