function init() {
	createExternalLinks();
	createLinksGaleria();
}

function createExternalLinks() {
    if(document.getElementsByTagName) {
        var anchors = document.getElementsByTagName('a');
        for(var i=0; i<anchors.length; i++) {
            var anchor = anchors[i];
            if(anchor.getAttribute("href") && anchor.getAttribute('rel')=='externo') {
                anchor.target = '_blank';
                var title = anchor.title + ' (Este link abre uma nova janela)';
                anchor.title = title;
            }
        }
    }
}

function opa(id){
	document.getElementById(id).style.display='block';
}
function opaa(id){
	document.getElementById(id).style.display='none';
}
function lembraSenha(){
	document.getElementById("cadastro").style.display='none';
	document.getElementById("login").style.display='none';
	document.getElementById("lembrar-senha").style.display='block';
}
function cadastrar(){
	document.getElementById("cadastro").style.display='block';
	document.getElementById("lembrar-senha").style.display='none';
	document.getElementById("login").style.display='none';
}
function promocao(){
	document.getElementById("descricao-promocao").style.display='block';
	document.getElementById("regulamento").style.display='none';
	document.getElementById("form-quero-participar").style.display='none';
	document.getElementById("bt-quero-participar").style.display='block';
	document.getElementById("premiados").style.display='none';
}
function regulamento(){
	document.getElementById("descricao-promocao").style.display='none';
	document.getElementById("regulamento").style.display='block';
	document.getElementById("form-quero-participar").style.display='none';
	document.getElementById("bt-quero-participar").style.display='block';
	document.getElementById("premiados").style.display='none';
}
function participar(){
	document.getElementById("descricao-promocao").style.display='none';
	document.getElementById("regulamento").style.display='none';
	document.getElementById("bt-quero-participar").style.display='none';
	document.getElementById("form-quero-participar").style.display='block';
	document.getElementById("premiados").style.display='none';
}
function premiados(){
	document.getElementById("descricao-promocao").style.display='none';
	document.getElementById("regulamento").style.display='none';
	document.getElementById("bt-quero-participar").style.display='none';
	document.getElementById("form-quero-participar").style.display='none';
	document.getElementById("premiados").style.display='block';
}
function formFotoShow(){
	document.getElementById("anexar-foto").style.display='block';
	document.getElementById("con_sou").style.visibility='hidden';
}
function formFotoHide(){
	document.getElementById("anexar-foto").style.display='none';
	document.getElementById("con_sou").style.visibility='visible';
}

/**
  * Função que valida o e-mail
  * @param String $value e-mail
  * @return boolean
  **/
function validaEmail(value) {
	expressao = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i;
    if(!expressao.test(value)) {
        return false;
    }
    return true;
}

function verificaLogin(){
	
	var flag = false;
	var msg = "";
	
	if(document.getElementById('login').value == ""){
		msg +="* Preencha o campo de Login \n";
		flag = true;
	}
	if(document.getElementById('senha').value == ""){
		msg +="* Preencha o campo de Senha";
		flag = true;
	}
	if(flag){
		alert(msg);
	}	
}

/*function buscarColecao() {
	var flag = false;
	var msg = "";	
	if(document.getElementById('gal_senha').value == "") {
		msg = "Você deve digitar a senha da galeria.";
		flag = true;
	}
	if(flag) {
		alert(msg);
	} else {
		document.getElementById("acao").value = "logar";
		$.ajax( {
			type: "POST",
			url: "lib/acao_colecao_outras.php",
//            data: "acao=" + document.getElementById("acao").value + "&gal_id=" + document.getElementById("gal_senha").value,
            data: "acao=logar&gal_id=" + document.getElementById("gal_senha").value,
			beforeSend: function() {				
			},
			success: function(txt) {
//alert(txt);
				if(txt=='OK'){
//                    window.location.href='index.php?cmd=colecao&col=' + document.getElementById("gal_senha").value;
                    window.location.href='index.php?cmd=colecao&area=restrita';
				} else {
					$('#mensagem').html('<strong>'+txt+'</strong>');
					document.getElementById("form_sel_colecao").reset();
				}
			},
			error: function(txt) {
				alert('Erro: '+txt);
			}
		});
	}
}*/



function validarLogin() {
	var flag = false;
	var msg = "";	
	if(document.getElementById("log_email").value == "") {
		msg += "Campo E-mail não está preenchido.\n";
		flag = true;
	} else {
		if(!validaEmail(document.getElementById("log_email").value)) {
			msg += "Campo E-mail inválido.\n";
			flag = true;
		}
	}
	if(document.getElementById("log_senha").value == "") {
		msg += "Campo Senha não está preenchido.\n";
		flag = true;
	}
	if(flag) {
		alert(msg);
	} else {
/*
		var elemento=document.getElementById("form_colecao");
		elemento.setAttribute("action","lib/acao_colecao.php");
*/
/*
		document.getElementById("form_colecao").setAttribute("action","lib/acao_colecao.php");

		document.getElementById("acao").value = "logar";
		document.getElementById("form_colecao").submit();
		document.getElementById("form_colecao").reset();
*/
		document.getElementById("acao").value = "logar";
		$.ajax( {
			type: "POST",
			url: "lib/acao_colecao.php",
			data: "acao=" + document.getElementById("acao").value + "&log_email=" + document.getElementById("log_email").value + "&log_senha=" + document.getElementById("log_senha").value,
			beforeSend: function() {				
			},
			success: function(txt) {
				if(txt=='reload'){
					location.reload(true);
				}else{
					$('#mensagem_login').html('<h3>'+txt+'</h3>');
					document.getElementById("form_colecao").reset();
				}
			},
			error: function(txt) {
				alert('Erro: '+txt);
			}
		});
	}
}

function validarLembrarSenha() {
	var flag = false;
	var msg = "";	
	if(document.getElementById("lem_email").value == "") {
		msg += "Campo E-mail não está preenchido.\n";
		flag = true;
	} else {
		if(!validaEmail(document.getElementById("lem_email").value)) {
			msg += "Campo E-mail inválido.\n";
			flag = true;
		}
	}	
	if(flag) {
		alert(msg);
	} else {
/*
		var elemento=document.getElementById("form_colecao");
		elemento.setAttribute("action","lib/acao_colecao.php");
*/
/*
		document.getElementById("form_colecao").setAttribute("action","lib/acao_colecao.php");
		
		document.getElementById("acao").value = "lembrar";
		document.getElementById("form_colecao").submit();
		document.getElementById("form_colecao").reset();
*/
		document.getElementById("acao").value = "lembrar";
		$.ajax( {
			type: "POST",
			url: "lib/acao_colecao.php",
			data: "acao=" + document.getElementById("acao").value + "&lem_email=" + document.getElementById("lem_email").value,
			beforeSend: function() {				
			},
			success: function(txt) {
//				alert(txt);
				$('#mensagem_lembrar').html(txt);
				document.getElementById("form_colecao").reset();
//				location.reload(true);
			},
			error: function(txt) {
				alert('Erro: '+txt);
			}
		});



	}
}

function validarCadastro() {
	var flag = false;
	var msg = "";	
	if(document.getElementById("cad_nome").value == "") {
		msg += "Campo Nome não está preenchido.\n";
		flag = true;
	}
	if(document.getElementById("cad_email").value == "") {
		msg += "Campo E-mail não está preenchido.\n";
		flag = true;
	} else {
		if(!validaEmail(document.getElementById("cad_email").value)) {
			msg += "Campo E-mail inválido.\n";
			flag = true;
		}
	}
	if(document.getElementById("cad_sou").value == "") {
		msg += "Campo Eu sou não está preenchido.\n";
		flag = true;
	}
	if(document.getElementById("cad_senha").value == "") {
		msg += "Campo Senha não está preenchido.\n";
		flag = true;
	}
	if(document.getElementById("cad_confirma_senha").value == "") {
		msg += "Campo Confirma Senha não está preenchido.\n";
		flag = true;
	}
	
	if(document.getElementById("cad_confirma_senha").value != "" && document.getElementById("cad_senha").value != "" && document.getElementById("cad_senha").value != document.getElementById("cad_confirma_senha").value != "") {
	}

	if(flag) {
		alert(msg);
	} else {
/*
		document.getElementById("acao").value = "cadastrar";
		document.getElementById("form_colecao").submit();
		document.getElementById("form_colecao").reset();
*/
		document.getElementById("acao").value = "cadastrar";
		$.ajax( {
			type: "POST",
			url: "lib/acao_colecao.php",
			data: "acao=" + document.getElementById("acao").value + "&cad_nome=" + document.getElementById("cad_nome").value + "&cad_email=" + document.getElementById("cad_email").value + "&cad_telefone=" + document.getElementById("cad_telefone").value + "&cad_sou=" + document.getElementById("cad_sou").value + "&cad_senha=" + document.getElementById("cad_senha").value + document.getElementById("cad_sou").value + "&cad_senha=" + document.getElementById("cad_senha").value + "&cad_confirma_senha=" + document.getElementById("cad_confirma_senha").value,
			beforeSend: function() {				
			},
			success: function(txt) {
//				alert(txt);
				$('#mensagem_cadastro').html('<h3>'+txt+'</h3>');
				document.getElementById("form_colecao").reset();
				location.reload(true);
/*
	document.getElementById("cadastro").style.display='none';
	document.getElementById("lembrar-senha").style.display='none';
	document.getElementById("login").style.display='block';
*/

			},
			error: function(txt) {
				alert('Erro: '+txt);
			}
		});


	}
}

function validarPromocao() {
	var flag = false;
	var msg = "";	
	if(document.getElementById("pro_nome").value == "") {
		msg += "Campo Nome não está preenchido.\n";
		flag = true;
	}
	if(document.getElementById("pro_email").value == "") {
		msg += "Campo E-mail não está preenchido.\n";
		flag = true;
	} else {
		if(!validaEmail(document.getElementById("pro_email").value)) {
			msg += "Campo E-mail inválido.\n";
			flag = true;
		}
	}		
	if(document.getElementById("pro_estado").value == "") {
		msg += "Campo Estado não está preenchido.\n";
		flag = true;
	}
	if(document.getElementById("pro_sou").value == "") {
		msg += "Campo Eu sou não está preenchido.\n";
		flag = true;
	}
	if(flag) {
		alert(msg);
	} else {		
/*
		document.getElementById("form_promocao").submit();
		document.getElementById("form_promocao").reset();
*/

	if (document.getElementById("fk_promocao").value == "aaa") {
		document.getElementById("form_promocao").setAttribute("action","lib/acao_promocao.php");
		document.getElementById("form_promocao").submit();
		document.getElementById("form_promocao").reset();
	}
	else {
		$.ajax({
			type: "POST",
			url: "lib/acao_promocao.php",
			data: "fk_promocao=" + document.getElementById("fk_promocao").value + "&pro_nome=" + document.getElementById("pro_nome").value + "&pro_email=" + document.getElementById("pro_email").value + "&pro_estado=" + document.getElementById("pro_estado").value + "&pro_sou=" + document.getElementById("pro_sou").value,
			beforeSend: function(){
			},
			success: function(txt){
				document.getElementById("mensagem").setAttribute("align","center");
				$('#mensagem').html(txt);
				document.getElementById("form_promocao").reset();
/*
				if(txt=='reload'){
					location.reload(true);
				}else{
					$('#mensagem').html('<h3>'+txt+'</h3>');
					document.getElementById("form_promocao").reset();
				}
*/
			},
			error: function(txt){
				alert('Erro: ' + txt);
			}
		});
	}



	}
}

function validarContato() {
	var flag = false;
	var msg = "";	
	if(document.getElementById("con_nome").value == "") {
		msg += "Campo Nome não está preenchido.\n";
		flag = true;
	}
	if(document.getElementById("con_email").value == "") {
		msg += "Campo E-mail não está preenchido.\n";
		flag = true;
	} else {
		if(!validaEmail(document.getElementById("con_email").value)) {
			msg += "Campo E-mail inválido.\n";
			flag = true;
		}
	}
	if((document.getElementById("con_email").value)!=(document.getElementById("conf_email").value)){
			msg += "Campo E-mail não confere.\n";
			flag = true;
	}
	
	if(document.getElementById("con_estado").value == "") {
		msg += "Campo Estado não está preenchido.\n";
		flag = true;
	}
	if(document.getElementById("con_assunto").value == "") {
		msg += "Campo Assunto não está preenchido.\n";
		flag = true;
	}
	if(document.getElementById("con_comentario").value == "") {
		msg += "Campo Comentário não está preenchido.\n";
		flag = true;
	}
	if(document.getElementById("con_sou").value == "") {
		msg += "Campo Eu sou não está preenchido.\n";
		flag = true;
	}
	if(flag) {
		alert(msg);
	} else {		

/*
		document.getElementById("form_contato").setAttribute("action","lib/acao_contato.php");

		document.getElementById("form_contato").submit();
		document.getElementById("form_contato").reset();
*/
		$.ajax( {
			type: "POST",
			url: "lib/acao_contato.php",
			data: "con_nome=" + document.getElementById("con_nome").value + 
					(document.getElementById("con_telefone").value?"&con_telefone=" + document.getElementById("con_telefone").value:'') + 
					"&con_email=" + document.getElementById("con_email").value + 
					"&con_estado=" + document.getElementById("con_estado").value + 
					"&con_assunto=" + document.getElementById("con_assunto").value + 
					"&con_comentario=" + document.getElementById("con_comentario").value + 
					"&con_sou=" + document.getElementById("con_sou").value + 
					(document.getElementById("con_foto").value?"&con_foto=" + document.getElementById("con_foto").value:'') + 
					(document.getElementById("con_nome_crianca").value?"&con_nome_crianca=" + document.getElementById("con_nome_crianca").value:'') + 
					(document.getElementById("con_idade").value?"&con_idade=" + document.getElementById("con_idade").value:'') + 
					(document.getElementById("con_cidade").value?"&con_cidade=" + document.getElementById("con_cidade").value:''),
			beforeSend: function() {				
			},
			success: function(txt) {
				document.getElementById("form_contato").reset();
				$('#internas').html('<h3>'+txt+'</h3>');
			},
			error: function(txt) {
				alert('Erro: '+txt);
			}
		});
	}
}

function is_cnpj(str) {
	if (!(str = /^\d?(\d{2})\.?(\d{3})\.?(\d{3})\/?(\d{4})\-?(\d{2})/.exec(str)))
		return false;

	var sum1 = 0, sum2 = 0, sum3 = 0, calc1 = 5, calc2 = 6;

	str.shift();
	str = str.join("");

	for (var i=0; i <= 12; i++) {
			calc1 = (calc1 < 2) ? 9 : calc1;
			calc2 = (calc2 < 2) ? 9 : calc2;

		if (i <= 11)
			sum1 += str[i] * calc1;
			sum2 += str[i] * calc2;
			sum3 += str[i];
			calc1--;
			calc2--;
	}

	sum1 %= 11;
	sum2 %= 11;

	return (sum3 && str[12] == (sum1 < 2 ? 0 : 11 - sum1) && str[13] == (sum2 < 2 ? 0 : 11 - sum2)) ? str : false;
}

function v_NR(tecla){

	if(typeof(tecla) == 'undefined')
	
		var tecla = window.event;	
		var codigo = (tecla.which ? tecla.which : tecla.keyCode ? tecla.keyCode : tecla.charCode);

	// permite números, 8=backspace, 46=del e 9=tab
	
	if ( (codigo >= 48 && codigo <= 57) || (codigo >= 96 && codigo <= 105) || codigo == 8 || codigo == 46 || codigo == 9 ){
		return true; }
	else{
	 	alert("Apenas números são permitidos !"); return false; }

}

function m_CNPJ(campo,tammax) {

		var vr = campo.value;		
		vr = vr.replace( "-", "" );		
		vr = vr.replace( "/", "" );		
		vr = vr.replace( ".", "" );		
		vr = vr.replace( ".", "" );
		
		var tam = vr.length;		
		if (tam < tammax) { tam = vr.length + 1 ; }			
			tam = tam - 1;		
		if ( (tam > 2) && (tam <= 5) ) {		
			vr = vr.substr( 0, tam - 1 ) + '-' + vr.substr( tam - 1, tam ) ; }		
		if ( (tam >= 6) && (tam <= 8) ) {		
			vr = vr.substr( 0, tam - 5 ) + '/' + vr.substr( tam - 5, 4 ) + '-' + vr.substr( tam - 1, tam ) ; }		
		if ( (tam >= 9) && (tam <= 11) ) {		
			vr = vr.substr( 0, tam - 8 ) + '.' + vr.substr( tam - 8, 3 ) + '/' + vr.substr( tam - 5, 4 ) + '-' + vr.substr( tam - 1, tam ) ; }		
		if ( (tam >= 12) && (tam < 14) ) {		
			vr = vr.substr( 0, tam - 11 ) + '.' + vr.substr( tam - 11, 3 ) + '.' + vr.substr( tam - 8, 3 ) + '/' + vr.substr( tam - 5, 4 ) + '-' + vr.substr( tam - 1, tam ) ; }		
		campo.value = vr;
}

function habilitaTipoPessoa(id){
  var div = document.getElementById(id);
  div.className='visivel';
}


function desabilitaTipoPessoa(id){
  var div = document.getElementById(id);
  div.className='invisivel';
  document.getElementById('con_cnpj').value="";
}


function validarNews() {
	var flag = false;
	var msg = "";	
	if(document.getElementById("con_nome").value == "") {
		msg += "Campo Nome não está preenchido.\n";
		flag = true;
	}

	if(document.getElementById("con_email").value == "") {
		msg += "Campo E-mail não está preenchido.\n";
		flag = true;
	} else {
		if(!validaEmail(document.getElementById("con_email").value)) {
			msg += "Campo E-mail inválido.\n";
			flag = true;
		}
	}
	
	if((document.getElementById("con_email").value) != (document.getElementById("conf_email").value)){
		msg += "Campo E-mail não confere.\n";
		flag = true;
	}
	
	
	if ((document.getElementById("con_cnpj").value == "") && (document.form_contato.tipo_pessoa[1].checked)) {
			msg += "Campo CNPJ não está preenchido.\n";
			flag = true;
	}else if ((document.getElementById("con_cnpj").value != "") && (document.form_contato.tipo_pessoa[1].checked)) {
		
		var cnpj = document.getElementById("con_cnpj").value;		
		if (is_cnpj(cnpj)) {
			// CNPJ válido
			//msg +=" CNPJ válido.\n";
			//flag=true
			
		}else {
			// CNPJ inválido
			msg +=" CNPJ inválido.\n";
			flag=true
		}
	}
	
	if(flag) {
		alert(msg);
	} else {		

		$.ajax( {
			type: "POST",
			url: "lib/acao_news.php",
			data: "con_nome=" + document.getElementById("con_nome").value + "&con_email=" + document.getElementById("con_email").value + 
					"&tipo_pessoa=" + document.getElementById("tipo_pessoa").value + "&cnpj=" + document.getElementById("con_cnpj").value,
			beforeSend: function() {				
			},
			success: function(txt) {
				document.getElementById("form_contato").reset();
				$('#form_newsletter').html('<h3 style="text-align:center;">'+txt+'</h3>');
			},
			error: function(txt) {
				alert('Erro: '+txt);
			}
		});
	}
}


function opc(nomecampo){
	var elements = document.getElementsByTagName('input');
	for(i = 0; i<elements.length; i++){
		if(elements[i].type == 'radio' && elements[i].id.indexOf(nomecampo) != -1)	{
			if(elements[i].checked == 'checked'){
				return true;
			}		
		}
	}
	return false;
}

function validarVotoPromocao(campos){
	contador=0;
	if((document.getElementById("field_01").checked) || (document.getElementById("field_02").checked) || (document.getElementById("field_03").checked)){
		contador++;
	}
	if((document.getElementById("field_04").checked) || (document.getElementById("field_05").checked) || (document.getElementById("field_06").checked)){
		contador++;
	}
	if((document.getElementById("field_07").checked) || (document.getElementById("field_08").checked) || (document.getElementById("field_09").checked)){
		contador++;
	}
	if((document.getElementById("field_10").checked) || (document.getElementById("field_11").checked) || (document.getElementById("field_12").checked)){
		contador++;
	}
	if((document.getElementById("field_13").checked) || (document.getElementById("field_14").checked) || (document.getElementById("field_15").checked)){
		contador++;
	}
	if (contador==5){
		document.getElementById("form_nome_personagem").submit();
	}else{
		alert('Faltou marcar escolher '+(5-contador)+' nome(s).');
	}

/*	
	var contador=0;
	var registros=campos.lenght;
	for(i=0;i<registros;i++){
		if(!opc(campos[i])){
			contador++;
		}
	}
	if (contador>0){
		alert('Faltou marcar '+(registros-contador)+'.');
	}else{
		alert('Faltou marcar '+(registros)+'.');
		alert('Faltou marcar '+(contador)+'.');
		document.getElementById("form_nome_personagem").submit();
	}
*/
}


/**
  * Formata telefone (Mascara)
  * @param $campo Int id
  * @param $event Evento
  * @return String telefone formatado
  **/
  

 
function formataTelefone(campo, e) {
	t = typeof window.event != "undefined" ? window.event.keyCode : e.which;
	if((isNaN(String.fromCharCode(t)) || (t == 32)) && (t != 8 && t != 0)){
		return false;
	}
	campo = typeof(campo) == "object" ? campo : document.getElementById(campo);
	if(campo.value.charAt(0) != "(" && !isNaN(String.fromCharCode(t)))
		campo.value = "("+campo.value;
	if( typeof window.event != "undefined" ) {
		if(window.event.keyCode != 40) {
			if(campo.value.length == 0) {
				campo.value += '(';
			}
		}
		if(window.event.keyCode != 41) {
			if(campo.value.length == 3) {
				campo.value += ')';
			}
		}
		if(window.event.keyCode != 45) {
			if(campo.value.length == 8) {
				campo.value += '-';
			}
		}
	} else {
		if (e.which != 8) {
			if(e.which != 0) {
				if(e.which != 40) {
					if(campo.value.length == 0) {
						campo.value += '(';
					}
				}
			}
			if(e.which != 41) {
				if(campo.value.length == 3) {
					campo.value += ')';
				}
			}
			if(e.which != 45) {
				if(campo.value.length == 8) {
					campo.value += '-';
				}
			}
		}
	}
}



function login_representante(url, metodo, modo)
{
	var login = document.getElementById('form_login').login.value;
	var senha = document.getElementById('form_login').senha.value;
	remoto = new ajax();
	xmlhttp = remoto.enviar(url + "?login=" + login + "&senha=" + senha, metodo, modo );
	
	if(xmlhttp) {
//		document.getElementById('login').className = 'erro';
//		document.getElementById('alerta').className = 'alerta2';
//		document.getElementById("alerta").innerHTML = 'Esse usuario ja esta cadastrado';
//		alert("Senha Correta");
		return true;
	} else {
//		document.getElementById('login').className = 'texto';
///		document.getElementById('alerta').className = '';
//		document.getElementById("alerta").innerHTML = '';
		alert("Senha Errada");		
		return false;
	} 
}


function validarCadastroSite() {
	var flag = false;
	var msg = "";	
	
	
	if (document.getElementById('nome_cadastro').value == "") {
		msg += "Campo Nome não está preenchido.\n";
		flag = true;
	}
	if (document.getElementById('login_cadastro').value == "") {
		msg += "Campo Login não está preenchido.\n";
		flag = true;
	}
	if (document.getElementById('senha_cadastro').value == "") {
		msg += "Campo Senha não está preenchido.\n";
		flag = true;
	}	
	if ((document.getElementById('login_cadastro').value)!=(document.getElementById('conf_email_cadastro').value)) {
		msg += "Campo Email não confere.\n";
		flag = true;
	}	
	if (flag) {
	   alert (msg);
	} else {
		cadastro_representante('usuario/act_salvar.php', 'POST', false);
	}
	
}

function cadastro_representante(url, metodo, modo)
{
	var nome = document.getElementById('nome_cadastro').value;
	var login = document.getElementById('login_cadastro').value;
	var senha = document.getElementById('senha_cadastro').value;
	remoto = new ajax();
	xmlhttp = remoto.enviar(url + "?login=" + login + "&senha=" + senha + "&nome=" + nome, metodo, modo );
	
	if(xmlhttp) {
		alert("Cadastro efetuado com sucesso.\nSeu cadastro será validado por nossos administradores.\nAguarde sua aprovação por e-mail.");
		closeMessage();//função está no Index
		
	} else {
 		alert("Este e-mail já está cadastrado!!!");			
		return false;
	} 
}

function valida_esqueci_senha()
{
	var flag = false;
	var msg = "";	
	
	if (document.getElementById('email_esqueci').value == "") {
		msg += "Campo Email não está preenchido.\n";
		flag = true;
	}	
	if (flag) {
	   alert (msg);
	} else {
		esqueci_senha('usuario/act_enviar.php', 'POST', false);
	}
	
	
}


function esqueci_senha(url, metodo, modo)
{
	var email = document.getElementById('email_esqueci').value;
	remoto = new ajax();
	xmlhttp = remoto.enviar(url + "?email=" + email, metodo, modo );
	
	if(xmlhttp) {
		alert("Sua senha foi enviada para o e-mail indicado.");
		closeMessage();//função está no Index		
	} else {
 		alert("Este e-mail não está cadastrado!!!");			
	} 
}