// JavaScript Document
function horizontal() {

   var navItems = document.getElementById("barra").getElementsByTagName("li")
   maior = navItems.length
   for (var i=0; i< navItems.length; i++) {
       if((navItems[i].className == "menuvertical") || (navItems[i].className == "submenu")){

           if(navItems[i].getElementsByTagName('ul')[0] != null){
		   
               navItems[i].onmouseover=function() {this.getElementsByTagName('ul')[0].style.display="block";this.style.backgroundColor = "#3477B8";}
               navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";this.style.backgroundColor = "#3477B8";}
			   
           }
       }
   }

}

/* só numero*/
function somente_numero(campo){  
 var digits="0123456789"  
 var campo_temp   
     for (var i=0;i<campo.value.length;i++){  
         campo_temp=campo.value.substring(i,i+1)   
         if (digits.indexOf(campo_temp)==-1){  
            campo.value = campo.value.substring(0,i);  
         }  
     }  
 } 

/* só numero*/

/*
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
				FUNÇÃO PARA VERIFICAR SE O NAVEGADOR É COMPATIVEL
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
*/

function ajaxInit(){

var xmlhttp ;

try{
xmlhttp = new XMLHttpRequest();
}catch(ee){
try {
xmlhttp = new ActiveXObject ("Msxml2.XMLHTTP");
}catch(e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}catch(E) {
xmlhttp=false ;
}
}
}

 return xmlhttp ;
}



/*
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
				FUNÇÃO PARA EXIBIR AS A TELAS SENDO COM DOIS PARAMETROS
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
*/


function Exibe_telas(fpagina,fdiv){
	ajax = ajaxInit();

	if(ajax){
		ajax.open('GET',fpagina,true);
		ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1")
		ajax.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
		ajax.setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
		ajax.setRequestHeader("Pragma", "no-cache");
		ajax.onreadystatechange = function(){
			
			if(ajax.readyState==1){
					document.getElementById(fdiv).innerHTML="<div align='center'><img src='imagens/icones/loading.gif'/></div>"
	 		}			
			if(ajax.readyState==2){
					document.getElementById(fdiv).innerHTML="<div align='center'><img src='imagens/icones/loading.gif'/></div>"
	 		}
			if(ajax.readyState==3){
					document.getElementById(fdiv).innerHTML="<div align='center'><img src='imagens/icones/loading.gif'/></div>"
	 		}			
			if(ajax.readyState==4){
				
				
				document.getElementById(fdiv).innerHTML=ajax.responseText
				
	 		}
	 	}
	 }
 ajax.send(null)
}



/*
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
									FUNÇÃO PARA ENVIAR CAMPOS
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
*/



function SubmitCampos(fpagina,fcampos,fdiv, mensagem, SET ){
	if(fcampos!=''){
		
		var formCampoAntigo = ''
		spl = fcampos.split('/')
		tamanho = spl.length

		for(i=0;i<tamanho;i++){
				
			formCampo = spl[i]+"="+document.getElementById(spl[i]).value
			
			formCampoAntigo = formCampo+"&"+formCampoAntigo
		}

	}
	ajax = ajaxInit();

	if(ajax){
		ajax.open('GET',fpagina,true);
		ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1")
		ajax.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
		ajax.setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
		ajax.setRequestHeader("Pragma", "no-cache");
		ajax.onreadystatechange = function(){
			if(ajax.readyState==1){
				
				document.getElementById(fdiv).innerHTML=mensagem
					
	 		}			
			if(ajax.readyState==2){
				
				document.getElementById(fdiv).innerHTML=mensagem

	 		}
			if(ajax.readyState==3){
				
				document.getElementById(fdiv).innerHTML=mensagem

	 		}			
			if(ajax.readyState==4){
				
				document.getElementById(fdiv).innerHTML=ajax.responseText
				if(SET=='S'){
					setTimeout("limparInner('"+fdiv+"')",4000)
				}
				
				if(fcampos!=''){
					
					var formCampoAntigo = ''
					spl = fcampos.split('/')
					tamanho = spl.length
			
					for(i=0;i<tamanho;i++){
						
						document.getElementById(spl[i]).value = ''						
						
					}
			
				}
	 		}
	 	}
	 }
 ajax.send(formCampoAntigo)
}


function limparInner(idInner){
	document.getElementById(idInner).innerHTML = ''
}










function dialog(fpagina, fnome, fscroll, ftitle, fdiretories, flocation, fstatus, fmenubar, ftoolbar, fresizable, flargura, faltura, fidValidacao){
	
	var flag = true
	if(fidValidacao!=''){
		if(document.getElementById(fidValidacao).value!=''){
			if(fnome.toUpperCase()=='CNPJ'){
				if(!validaCNPJ(fidValidacao)){
					document.getElementById(fidValidacao).focus()
					
					flag = false				
				}			
			}else if(fnome.toUpperCase()=='CPF'){
				
				if(!validacaoCPF(fidValidacao)){
					document.getElementById(fidValidacao).focus()
					flag = false				
				}			
			}else if(fnome.toUpperCase()=='DATA'){
		
				if(!validarData(document.getElementById(fidValidacao))){
					document.getElementById(fidValidacao).focus()
					flag = false				
				}			
			}			
		}
	}
	if(flag==true){

		x=screen.width
		y=screen.height
		larg = flargura
		altu = faltura
		cima = (y-altu)/2
		lado = (x-larg)/2
		window.open(fpagina, fnome,"scrollbars="+fscroll+", title="+ftitle+", diretories="+fdiretories+", location="+flocation+", status="+fstatus+", menubar="+fmenubar+", toolbar="+ftoolbar+", resizable="+fresizable+", left="+lado+", top="+cima+", height="+altu+", width="+larg)
		
	}
}






function Login(usuario,senha){
	var flag = true
	if(document.form.login.value==''){
		alert('Usuario não pode ser nulo!')
		document.form.login.focus()
		flag = false
	}
	else
	if(document.form.senha.value==''){
		alert('Senha não pode ser nula!')
		document.form.senha.focus()
		flag = false
	}
	else
	if(document.form.login.value!=usuario){
		alert('Usuario incorreto!')
		document.form.login.focus()
		flag = false
	}
	else
	if(document.form.senha.value!=senha){
		alert('Senha incorreta!')
		document.form.senha.focus()
		flag = false
	}
	
	if(flag == true){
		document.form.submit()	
	}	
}
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////FUNÇÃO DE ABRIR DIALOG DA TELA DE LOCALIZAÇÃO//////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

function abrir(URL) {

   var width = 610;
   var height = 490;

   var left = 99;
   var top = 99;

   window.open(URL,'Mapa', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=yes, toolbar=no, location=no, directories=no, menubar=no, resizable=yes, fullscreen=no');

}

function valida(id){
	
	
var caminho=document.getElementById(id).value;
var ext;
ext = caminho.split("/");
ext = ext[ (ext.length-1) ].split(".")
ext = ext[ (ext.length-1) ];

if(document.getElementById(id).value!=""){
if(ext.toUpperCase()=="JPG"){
	
	return true;
	
	                        }
else{
	
	alert("Extensão da Imagem Inválida");
	document.getElementById(id).focus();
	return false;
	
   }
							
                                        }
else{
	
	return true;
	
	
	}

	
	
	                }
					
					
<!------------------------------------enviar ajax------------------------------------------------!>	

var xmlhttp = null;
function enviar(fpagina,fdiv,campo){ 
	
	
	    try { 
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
    } catch (e) { 
        try { 
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
        } catch (E) { 
            xmlhttp = false; 
        } 
    } 

    if  (!xmlhttp && typeof  XMLHttpRequest != 'undefined' ) { 
        try  { 
            xmlhttp = new  XMLHttpRequest(); 
        } catch  (e) { 
            xmlhttp = false ; 
        } 
    }

	if(xmlhttp){
		xmlhttp.open('POST',fpagina,true);
		xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1")
		xmlhttp.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
		xmlhttp.setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
		xmlhttp.setRequestHeader("Pragma", "no-cache");
		xmlhttp.onreadystatechange = function(){
			
				
			
			if(xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3){
				
				
				
				                                                                        }			
			else if(xmlhttp.readyState==4){
					document.getElementById(fdiv).innerHTML=xmlhttp.responseText;
	 		}
	 	}
	 }
 xmlhttp.send(campo)
}

function setarCampos() {
	
	
		campos = "id="+encodeURI(document.getElementById("index").value);
	     enviar('cadastra.php','exibePaginas',campos);
  	                     
						 }
						 
						 
						 
						 
function ExcluirProduto(pagina){
	
	if(confirm('Deseja Excluir o Produto?')){
	
		location.href = pagina
		
	}
	
}

function dialog(variavel,largura,altura)
{

window.open('open.php?va='+variavel,'popup','width='+largura+',height='+altura+',scrolling=auto,top=0,left=0','status=yes','insize=yes','resizable=auto');

}

function dialogmapa(variavel,largura,altura)
{

window.open('openmapa.php?va='+variavel,'popup','width='+largura+',height='+altura+',scrolling=auto,top=0,left=0','status=yes','insize=yes','resizable=auto');

}

function dialogcalculo(fpagina, fnome, fscroll, ftitle, fdiretories, flocation, fstatus, fmenubar, ftoolbar, fresizable, flargura, faltura){
	
		x=screen.width
		y=screen.height
		larg = flargura
		altu = faltura
		cima = (y-altu)/2
		lado = (x-larg)/2
		window.open(fpagina, fnome,"scrollbars="+fscroll+", title="+ftitle+", diretories="+fdiretories+", location="+flocation+", status="+fstatus+", menubar="+fmenubar+", toolbar="+ftoolbar+", resizable="+fresizable+", left="+lado+", top="+cima+", height="+altu+", width="+larg)
		
}


var xmlhttp = null;
function enviar(fpagina,fdiv,campo){
	
	 
	
	
	    try { 
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
    } catch (e) { 
        try { 
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
        } catch (E) { 
            xmlhttp = false; 
        } 
    } 

    if  (!xmlhttp && typeof  XMLHttpRequest != 'undefined' ) { 
        try  { 
            xmlhttp = new  XMLHttpRequest(); 
        } catch  (e) { 
            xmlhttp = false ; 
        } 
    }

	if(xmlhttp){
		xmlhttp.open('POST',fpagina,true);
		xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1")
		xmlhttp.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
		xmlhttp.setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
		xmlhttp.setRequestHeader("Pragma", "no-cache");
		xmlhttp.onreadystatechange = function(){
			
				
			
			if(xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3){
				
				document.getElementById(fdiv).innerHTML='Enviando....'
				
				                                                                        }			
			else if(xmlhttp.readyState==4){
					document.getElementById(fdiv).innerHTML=xmlhttp.responseText;
				
					setTimeout("document.getElementById('"+fdiv+"').innerHTML=''",30000);
					
					
					
						}
	 	}
	 }
 xmlhttp.send(campo)
}

function setarCampos() {
	
		campos = "nome="+encodeURI(document.getElementById('nome').value)+"&email="+encodeURI(document.getElementById('email').value)+"&telefone="+encodeURI(document.getElementById('telefone').value)+"&mensagem="+encodeURI(document.getElementById('mensagem').value);
  	                     
						 }
function validaform(){


 if(document.getElementById('nome').value==""){
	
	
	alert("Campo NOME não pode ser nulo!");
	document.getElementById('nome').focus();
	return false;
	
	                             }else if(document.getElementById('mensagem').value==""){
									 
									 
									 alert("Campo MENSAGEM não pode ser nulo!");
									 document.getElementById('mensagem').focus();
									 return false;
									 
									 
									 
									 
									                                       }else{
														
													setarCampos();
													enviar('enviar.php','div',campos);	

																		         }
																				 
}




function refreshe(valor){
	
	
// setTimeout("window.location.href='fotos.php?va="+valor+"'",1000);

setTimeout(Exibe_telas('fotos.php','exibePaginas'),2000);


                                                          
                         
						 }
function vai(pagina){
	
	
	window.location.href=pagina;
	          
			  
			  }


function newTag() 
{    
    // Pegando a div que recebrá o JavaScript
    var conteudo = document.getElementById("teste");
    
    // Declarando a criação de uma nova tag <script>
    var newElement = document.createElement("script");
    
    // Pegando os valores das Tags <script> que estão na página carregada pelo AJAX
    var scripts = login.getElementsByTagName("script");
        
    // Aki, vamos inserir o conteúdo da tag <script> que pegamos na linha acima    
        for(i = 0; i < scripts.length; i++)
       {
            newElement.text = scripts[i].innerHTML;
       }
       
       // Agora, inserimos a nova tag <script> dentro da div na página inicial
       conteudo.appendChild(newElement);
}



function ExibirPaginas(){

if(document.getElementById('campoqtd')!=null){
	if(document.getElementById('campoqtd').value!=""){
		
		Exibe_telas('fotosLoop.php?va='+document.getElementById('campoqtd').value,'exibeFotosLoop')
		
	}
}
	LoadPagina()
}
function LoadPagina(){
	
	setTimeout("ExibirPaginas()",6000)
	
}

function carregarDiv(){
	
	setTimeout("scrollnormal()",1000)
	
}

function scrollnormal(){
	document.getElementById("scroller").direction ='up';
	document.getElementById("scroller").scrollDelay = 200;
	document.getElementById("scroller").start();
}
function scrollup(){
	document.getElementById("scroller").direction='up';
	document.getElementById("scroller").scrollDelay = 100;
	document.getElementById("scroller").start();
}
function scrolldown(){
	document.getElementById("scroller").direction='down';
	document.getElementById("scroller").scrollDelay = 100;
	document.getElementById("scroller").start();
}
function scrollstop(){
	document.getElementById("scroller").stop();
}

/*function scrollnormal(){
	document.all.scroller.direction ='up';
	document.all.scroller.scrollDelay = 200;
	document.all.scroller.start();
}
function scrollup(){
	document.scroller.direction='up';
	document.all.scroller.scrollDelay = 100;
	document.all.scroller.start();
}
function scrolldown(){
	document.all.scroller.direction='down';
	document.all.scroller.scrollDelay = 100;
	document.all.scroller.start();
}
function scrollstop(){
	document.all.scroller.stop();
}

function setarCampos() {
	
	
		campos = "id="+encodeURI(document.getElementById("index").value);
	     enviar('cadastra.php','exibePaginas',campos);
  	                     
						 }
*/

function validar_login(){
	
	if(document.form1.logar.value==""){
	
	 alert("Campo Nome não pode ser nulo!");
	 document.form1.logar.focus();
	 return false;
	
	                                 }
	else
	if(document.form1.senha.value==""){
		
		
	  alert("Campo Senha não pode ser nulo!");
	 document.form1.senha.focus();
	 return false;	
		
		                              }else{
								

	  
login('login',"acao.php?logar="+document.getElementById("logar").value+"&senha="+document.getElementById("senha").value+"");

										  
										
										  
										  
										  }
	
	
	 
                         }
						 
var xmlhttp = null;
function login(fdiv,pagina){
	
	 
	
	
	    try { 
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
    } catch (e) { 
        try { 
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
        } catch (E) { 
            xmlhttp = false; 
        } 
    } 

    if  (!xmlhttp && typeof  XMLHttpRequest != 'undefined' ) { 
        try  { 
            xmlhttp = new  XMLHttpRequest(); 
        } catch  (e) { 
            xmlhttp = false ; 
        } 
    }

	if(xmlhttp){
		xmlhttp.open('GET',pagina,true);
		xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1")
		xmlhttp.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
		xmlhttp.setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
		xmlhttp.setRequestHeader("Pragma", "no-cache");
		xmlhttp.onreadystatechange = function(){
			
				
			
			if(xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3){
				
				document.getElementById(fdiv).innerHTML='carregando....'
				
				                                                                        }
		else if(xmlhttp.readyState==4){
				
				
              
			  if(xmlhttp.responseText=="valido"){
				  
				  alert("Usuário Válido");
				  setTimeout("Exibe_telas('menucadastro.php?valido=1','login')",10);
				  document.getElementById("restrita").innerHTML='';
				  
				                     }
			 else if(xmlhttp.responseText=="invalido"){
				 
				 alert("Usuário Inválido");
				 document.getElementById(fdiv).innerHTML='';
				 
				                            }
	
            
				
						
			
					
					
						                  }
	 	}
	 }
 xmlhttp.send(pagina)
}

function limpaform(){
	
	document.form.nome.value="";
	document.form.senha.value="";
	
	
	
                    }
					
	var xmlhttp = null;
function logincarrega(pagina){
	
	
	    try { 
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
    } catch (e) { 
        try { 
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
        } catch (E) { 
            xmlhttp = false; 
        } 
    } 

    if  (!xmlhttp && typeof  XMLHttpRequest != 'undefined' ) { 
        try  { 
            xmlhttp = new  XMLHttpRequest(); 
        } catch  (e) { 
            xmlhttp = false ; 
        } 
    }

	if(xmlhttp){
		xmlhttp.open('GET',pagina,true);
		xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1")
		xmlhttp.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
		xmlhttp.setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
		xmlhttp.setRequestHeader("Pragma", "no-cache");
		xmlhttp.onreadystatechange = function(){
			
				
			
			if(xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3){
				
				document.getElementById("login").innerHTML='Enviando....'
				
				                                                                        }			
			else if(xmlhttp.readyState==4){
				
            document.getElementById("login").innerHTML=xmlhttp.responseText	
			
						
			
					
					
						                  }
	 	}
	 }
 xmlhttp.send(pagina)
}

function none(div,valor){
	
	document.getElementById(div).style.display=valor;
	

                             }
function refresher(){
	
	
	setTimeout("window.location.href='index.php'",10);
	
	                }
					
function branco(id,obj){

	
 valor = document.getElementById(id).value;
 pri = (valor.substring(0,1));
 var s = pri.indexOf(" ");
 
 if (s != -1) {
 
  
  var espaco = /\s/g;
  obj.value = obj.value.replace(espaco, "");
  alert("Campo "+id.toUpperCase()+" Não pode Conter Espaço no Inicio do texto")
  document.getElementById(id).focus();
  
  
	 
  
               }
			   
			   
			   
                      }
					  
function validadica(){
	
	
	
	if(document.form.titulo.value==""){
		
		
		alert("Título não pode ser Nulo!");
		document.form.titulo.focus();
		return false;
		
		
		                               }
				else if(document.form.descricao.value==""){
					
					
						alert("Dica descricao texto não pode ser Nulo!");
						document.form.descricao.focus();
						return false;
					
					
					
					 
					                                     }

						else{
							
							
							document.form.submit();
							
							
							}
	
	
	                  }
					  
function confirma(pagina){
	
               var resposta=confirm('Tem certeza que deseja excluir a dica de saúde?');
               if (resposta==true) {
				   
				   location.href=pagina;
              
                                   } else {
						return false;
						 }
						 
}

function excluir(variavel){
	
	var resposta=confirm("Deseja excluir a dica de saúde?");
	
	if(resposta==true){
		
		
		location.href="excluircadastro.php?id="+variavel+"";
		
		             }else{
						 
						 
						 
						 
						 
						 
						   }
	
	
	
	              }
				  
function dialog(variavel,largura,altura)
{

window.open('open.php?va='+variavel,'popup','width='+largura+',height='+altura+',scrollbars = yes,top=0,left=0,status=no,location = no,resizable=no,titlebar=no');



}

function bloquear(){
	
	
	
	alert("Botão bloqueado! Selecione um Cadastro")
	
	
	              }
				  
	function validasaude(idImagem){
	

     
	 var id= idImagem.split("/"); 	
	 
	 
		
		 
	 var caminho=document.getElementById(id[0]).value;
     var ext;
	 ext = caminho.split("/");
     ext = ext[ (ext.length-1) ].split(".")
     ext = ext[ (ext.length-1) ];
	 
	 	 
	 
	 var caminho1=document.getElementById(id[1]).value;
     var ext1;
     ext1 = caminho1.split("/");
     ext1 = ext1[ (ext1.length-1) ].split(".")
     ext1 = ext1[ (ext1.length-1) ];
	 
	 
	 var caminho2=document.getElementById(id[2]).value;
     var ext2;
     ext2 = caminho2.split("/");
     ext2 = ext2[ (ext2.length-1) ].split(".")
     ext2 = ext2[ (ext2.length-1) ];
	 


if(ext.toUpperCase()=="JPG" || ext1.toUpperCase()=="JPG" || ext2.toUpperCase()=="JPG"){
		   
                    document.form.submit();


				
				                                                                     }

	else{
		
		
		         alert("Extensão inválida de imagem");
				 document.form.foto3.focus();
				 return false;
		
		
		}
																					  
}

					
function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}
					
					
function LoginRestrito(){
	
	var flag = true
	if(trim(document.form.login.value)==''){

		alert('Login Não pode ser Nulo!')
		flag = false
		document.form.login.focus()
		
	}
	else
	if(trim(document.form.senha.value)==''){

		alert('Senha Não pode ser Nula!')
		flag = false
		document.form.senha.focus()
		
	}
	else
	if(document.form.login_padrao.value!=document.form.login.value){
		
		alert('Login Incorreta!')
		flag = false
		document.form.login.focus()
		
	}	
	else
	if(document.form.senha_padrao.value!=document.form.senha.value){
		
		alert('Senha Incorreta!')
		flag = false
		document.form.senha.focus()
		
	}
	
	
	if(flag == true){
			
			document.form.action = 'logar.php'
			document.form.submit()
	
	}	
}
	