function ver_caps_lock(ev) {
	var e = ev || window.event;
	ct = e.keyCode?e.keyCode:e.which;
	ts = e.shiftKey?e.shiftKey:((ct == 16)?true:false);
	if(((ct >= 65 && ct <= 90) && !ts) || ((ct >= 97 && ct <= 122) && ts)) {
		capsMsg('Caps-Lock está ativado.')
	}
	else {
		capsMsg('')
	}
}

function capsMsg(msg) {
	if(msg.length==0) {
		document.getElementById("capsMsgDiv").innerHTML = '';
		document.getElementById("capsMsgDiv").style.display = "none";
	}
	else {
		document.getElementById("capsMsgDiv").innerHTML = msg;
		document.getElementById("capsMsgDiv").style.display = "block";
	}
}






// ************* Funções Administrativas *************
function gerBuscarUsuario(results) {
	showSaida(results);
	showMsg("Busca efetuada com sucesso.");
}

function gerAtivarCadastro(results){
showSaida('');
var saida = results.getElementsByTagName("resposta").item(0).firstChild.nodeValue;
showMsg(saida)
}
function showMsgCAPS(msg) {
	if(msg.length==0) {
		document.getElementById("msgCAPSdiv").innerHTML = '';
		document.getElementById("msgCAPSdiv").style.display = "none";
	}
	else {
		document.getElementById("msgCAPSdiv").innerHTML = msg;
		document.getElementById("msgCAPSdiv").style.display = "block";
	}
}
function checar_caps_lock(ev) {
	// onkeypress="checar_caps_lock(event)"
	var e = ev || window.event;
	codigo_tecla = e.keyCode?e.keyCode:e.which;
	tecla_shift = e.shiftKey?e.shiftKey:((codigo_tecla == 16)?true:false);
	if(((codigo_tecla >= 65 && codigo_tecla <= 90) && !tecla_shift) || ((codigo_tecla >= 97 && codigo_tecla <= 122) && tecla_shift)) {
		showMsgCAPS('<b>Caps Lock ativado.</b>')
	}
	else {
		showMsgCAPS('')
	}
}

function gerFrequentador(results){
var freq = results.getElementsByTagName("frequentador").item(0).firstChild.nodeValue;
var id = results.getElementsByTagName("id").item(0).firstChild.nodeValue;
st='';
if (freq=="1") st="_silver"
document.getElementById("freq"+id).innerHTML='<img src="../imagens/star'+st+'.gif" width="16" height="16" border="0" onclick="sendGetData(\''+id+'\',\'gerFrequentador\')">';
showMsg("Operação realizada com sucesso.")
}

function gerExcUsuario(results){
var id = results.getElementsByTagName("id").item(0).firstChild.nodeValue;
document.getElementById("usu"+id).style.display='none';
showMsg("Operação realizada com sucesso.")
}

function gerUsuDesi(results){
var id = results.getElementsByTagName("id").item(0).firstChild.nodeValue;
document.getElementById("freq"+id).innerHTML='<img src="../imagens/star_desi.gif" width="16" height="16" border="0" onclick="sendGetData(\''+id+'\',\'gerFrequentador\')">';
showMsg("Operação realizada com sucesso.")
}

// ******************** Normais *************************


function menuLogin(tmp) {
	if(tmp==0) {
		document.getElementById("menuAcao").innerHTML = '';
		document.getElementById("menuAcao").style.display = "none";
		document.getElementById("menuLogin").style.display = "block";
	}
	else {
		document.getElementById("menuLogin").style.display = "none";
		document.getElementById("menuAcao").style.display = "block";
	}
}
function altPerfilForm(results) {
menuLogin(1)
showSaida("");
document.getElementById("menuAcao").innerHTML = results;

if (results.indexOf("Sua tentativa de acesso foi registrada.")>0) showMsg("ATEN&Ccedil;&Atilde;O: Sua tentativa de acesso foi registrada.")
else {
	showMsg("Atualize o perfil p&uacute;blico e clique em CONFIRMA.")
	perfilValidaCampos()
	}
}
function altPerfilFinal(results){
var msg = results.getElementsByTagName("msg").item(0).firstChild.nodeValue;
if (msg=='1') {
	showMsg("Opera&ccedil;&atilde;o realizada com sucesso.")
	try	{
		document.getElementById("infoAlerta").style.display='none'
	} 
	catch (e) {}
	
	document.getElementById("statusPerfil1").innerHTML='completo'
	}
else if (msg=='2') showMsg("<b>Aten&ccedil;&atilde;o:</b> &Eacute; vetado o uso de express&otilde;es que indiquem p&aacute;ginas web, email ou qualquer outra forma de contato no cadastro.<br> No caso de tentativas de burlar essas regras, o cadastro ser&aacute; removido.")
else showMsg("Houve algum erro durante o procedimento. Tente novamente em alguns minutos.")
menuLogin(0)
}

function perfilValidaCampos(){
	var erro=0;
	
	if (document.getElementById("altPerfilNick").value!='') {
		document.getElementById("altPerfilNickMSG").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("altPerfilNickMSG").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	if (document.getElementById("altPerfilCidade").value!='') {
		document.getElementById("altPerfilCidadeMSG").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("altPerfilCidadeMSG").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	if (document.getElementById("altPerfilEstado").value!='') {
		document.getElementById("altPerfilEstadoMSG").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("altPerfilEstadoMSG").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	if (document.getElementById("altPerfiloqueprocuro").value!='') {
		document.getElementById("altPerfiloqueprocuroMSG").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("altPerfiloqueprocuroMSG").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	if (document.getElementById("altPerfilTitulo").value!='') {
		document.getElementById("altPerfilTituloMSG").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("altPerfilTituloMSG").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	if (document.getElementById("altPerfilBuscamos1").checked||document.getElementById("altPerfilBuscamos2").checked||document.getElementById("altPerfilBuscamos3").checked) {
		document.getElementById("altPerfilBuscamosMSG").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("altPerfilBuscamosMSG").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	if (document.getElementById("altPerfilFaixa1").checked||document.getElementById("altPerfilFaixa2").checked||document.getElementById("altPerfilFaixa3").checked||document.getElementById("altPerfilFaixa4").checked) {
		document.getElementById("altPerfilFaixaMSG").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("altPerfilFaixaMSG").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	ct=0;
	for (a=1;a<=11;a++){
		if (document.getElementById("formSlt"+a).value=='') ct++;
	}
	if (ct<=2) {
		document.getElementById("altPerfilSltMSG").innerHTML=ct+'&nbsp; <img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("altPerfilSltMSG").innerHTML=ct+'&nbsp; <img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	if (sess_sexo==1) {
		ct=0;
		for (a=1;a<=11;a++){
			if (document.getElementById("formCsl"+a).value=='') ct++;
		}
		if (ct<=2) {
			document.getElementById("altPerfilCslMSG").innerHTML=ct+'&nbsp; <img src="../imagens/ok1.gif" width="16" height="16" alt="">';
		}
		else {  
			erro=1;
			document.getElementById("altPerfilCslMSG").innerHTML=ct+'&nbsp; <img src="../imagens/erro.gif" width="16" height="16" alt="">';
		}
	}
	
	if (erro==0) document.getElementById("finaliza").disabled=false; else document.getElementById("finaliza").disabled=true;
}

/*
function altDadosValidaCampos(op){
	var erro=0;
	
	pwd=document.getElementById("altDadosSenha").value;
	t=pwd.length
	var invalidas = new Array("7890","6789","5678","3456","4568","2345","1234","0123","abcd","qwer","asdf","zxcv","poiu","lkjh","mnbv",".,mn","çlkj");
	for (i=0;i<=16;i++) if (pwd.toLocaleLowerCase().indexOf(invalidas[i])>=0) t=0;
	//document.getElementById("senhaErroMSG").innerHTML="pin";
	
	if (t<4) {  
		erro=1; 
		document.getElementById("altDadosSenhaMsg").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
		document.getElementById("senhaErroMSG").innerHTML='Senha muito simples.';
	}
	else{
		document.getElementById("altDadosSenhaMsg").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	
	if ((document.getElementById("altDadosSenha").value==document.getElementById("altDadosSenhaConf").value)&&(t>=4)) {
		document.getElementById("senhaErroMSG").innerHTML='Senhas conferem.';
		document.getElementById("altDadosSenhaConfMsg").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		if (t>=4) document.getElementById("senhaErroMSG").innerHTML='Senhas diferentes!';
		document.getElementById("altDadosSenhaConfMsg").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	
	if (document.getElementById("altDadosNome").value!='') {
		document.getElementById("altDadosNomeMsg").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("altDadosNomeMsg").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	
	mail=document.getElementById("altDadosEmail").value;
	a=mail.indexOf('@');
	b=mail.lastIndexOf('@');
	strTMO=mail.substring(a,mail.length) 
	c=strTMO.indexOf('.');
	d=strTMO.length-strTMO.lastIndexOf('.');
	k1=mail.indexOf('..');
	k2=mail.indexOf('/');
	k3=mail.indexOf("\\");

	if ((a>=2)&&(a==b)&&(c>=3)&&(d>=3)&&(k1<0)&&(k2<0)&&(k1<3)) {
		document.getElementById("altDadosEmailMsg").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("altDadosEmailMsg").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	
	if ((document.getElementById("altDadosEmail").value==document.getElementById("altDadosConfEmail").value)&&(document.getElementById("altDadosEmail").value!='')) {
		document.getElementById("altDadosConfEmailMsg").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("altDadosConfEmailMsg").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	
	if (op==1){
		if (document.getElementById("altDadosSenhaOld").value!='') {
			document.getElementById("altDadosSenhaOldMsg").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
		}
		else {  
			erro=1;
			document.getElementById("altDadosSenhaOldMsg").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
		}
	}
	else {
		if (document.getElementById("sexo").selectedIndex!=0) {
			document.getElementById("altSexoMsg").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
		}
		else {  
			erro=1;
			document.getElementById("altSexoMsg").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
		}
	}
	if (erro==0) document.getElementById("finaliza").disabled=false; else document.getElementById("finaliza").disabled=true;
}
*/
function altDadosForm(results) {
menuLogin(1)
showSaida("");
document.getElementById("menuAcao").innerHTML = results;
altDadosValidaCampos(1)
if (results.indexOf("Sua tentativa de acesso foi registrada.")>0) showMsg("<b>ATEN&Ccedil;&Atilde;O:</b> Sua tentativa de acesso foi registrada.")
else
showMsg("Atualize seus Dados Pessoais e clique em CONFIRMA. Estas informa&ccedil;&otilde;es n&atilde;o ser&atilde;o divulgadas.");
}

function altDadosFinal(results){
var msg = results.getElementsByTagName("msg").item(0).firstChild.nodeValue;
if (msg=='1') showMsg("Opera&ccedil;&atilde;o realizada com sucesso.");
else if (msg=='2') showMsg("<b>ATEN&Ccedil;&Atilde;O:</b> Opera&ccedil;&atilde;o n&atilde;o executada. A senha digitada n&atilde;o confere!");
else if (msg=='3') showMsg("<b>ATEN&Ccedil;&Atilde;O:</b> Opera&ccedil;&atilde;o n&atilde;o executada. Este email j&aacute; est&aacute; cadastrado em nosso sistema.");
else showMsg("Houve algum erro durante o procedimento. Tente novamente em alguns minutos.");
menuLogin(0)
}

function cadastroFinal(results){
var msg = results.getElementsByTagName("msg").item(0).firstChild.nodeValue;
var cod = results.getElementsByTagName("cod").item(0).firstChild.nodeValue;
if (msg=='0') document.getElementById("cadastroResult1").innerHTML = '<br><div style="color:red;" align="center"><b>Este e-mail já está cadastrado!</b></div><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Este email já se encontra cadastrado em nosso site e apenas um cadastro por conta de e-mail é permitido. No caso de dúvidas sobre seu cadastro, contate o webmaster do site pelo email webmasterdesiree@gmail.com.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>Clique <a href="cadastro.php">aqui</a> para fazer um novo cadastro.<br><br>';
else {
	document.getElementById("cadastroResult1").innerHTML ='<br><div align="center"><b>Seu cadastro foi efetuado com sucesso!</b></div><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Um e-mail com um link para ativação de seu cadatro foi enviado para o email <b>'+msg+'</b>.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Assim que sua conta estiver ativa, você deverá preencher o seu perfil para ter acesso a todas as áreas do site. <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>ATENÇÃO</b>:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;O sistema anti-spam de alguns serviços de email (hotmail, UOL, Terra, BOL...) as vezes deposita a mensagem de ativação no lixo eletrônico ou na pasta Anti-spam e em alguns casos até bloqueia o recebimento. Caso você não receba o email de ativação em alguns minutos, escreva para <i>webmasterdesiree@gmail.com</i> solicitando a ativação manual de sua conta (aproximadamente 24 horas). <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Agradecemos seu interesse e nos colocamos a disposição para eventuais dúvidas.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equipe Desiree.<br><br>';
	window.open('http://www.contatodesiree.com.br/ativar.php?cod='+cod+'&em='+msg,'ativar');
	}
document.getElementById("cadastroResult2").style.display = 'none'
document.getElementById("cadastroResult1").style.display = 'block'
}
function cadastroFinalWait(){
document.getElementById("cadastroResult1").style.display = 'none'
document.getElementById("cadastroResult2").style.display ='block';
}

function altAniversariosForm(results) {
menuLogin(1);
showSaida("");
document.getElementById("menuAcao").innerHTML = results;
if (results.indexOf("Sua tentativa de acesso foi registrada.")>0) showMsg("<b>ATEN&Ccedil;&Atilde;O:</b> Sua tentativa de acesso foi registrada.");
else
showMsg("Atualize os campos e clique em CONFIRMA. Estas informa&ccedil;&otilde;es n&atilde;o ser&atilde;o divulgadas.");
}

function altAniversariosFinal(results){
var msg = results.getElementsByTagName("msg").item(0).firstChild.nodeValue;
if (msg=='1') showMsg("Opera&ccedil;&atilde;o realizada com sucesso.");
else showMsg("<b>ATEN&Ccedil;&Atilde;O:</b> Houve algum erro durante o procedimento, tente novamente em alguns minutos.");
menuLogin(0);
}

function gerImagensForm(results) {
menuLogin(1);
showSaida("");
document.getElementById("menuAcao").innerHTML = results;
if (results.indexOf("Sua tentativa de acesso foi registrada.")>0) showMsg("<b>ATEN&Ccedil;&Atilde;O:</b> Sua tentativa de acesso foi registrada.")
else
showMsg("Atualize os campos e clique em CONFIRMA. Estas informa&ccedil;&otilde;es n&atilde;o ser&atilde;o divulgadas.")
}

function gerImagemPrincipal(results){
var id1 = results.getElementsByTagName("id1").item(0).firstChild.nodeValue;
var id2 = results.getElementsByTagName("id2").item(0).firstChild.nodeValue;
if ((id1!=0)&&(id2!=0)) {
	document.getElementById("imgTMP").innerHTML = document.getElementById("img"+id1).innerHTML;
	document.getElementById("img"+id1).innerHTML = document.getElementById("img"+id2).innerHTML;
	document.getElementById("img"+id2).innerHTML = document.getElementById("imgTMP").innerHTML;
	document.getElementById("imgTMP").innerHTML ='';
	showMsg("Opera&ccedil;&atilde;o executada com sucesso.");
	}
	else
	showMsg("Voc&ecirc; n&atilde;o tem permiss&atilde;o para realizar esta opera&ccedil;&atilde;o.");
}

function gerImagemExcluir(results){
var msg = results.getElementsByTagName("msg").item(0).firstChild.nodeValue;
var prim = results.getElementsByTagName("prim").item(0).firstChild.nodeValue;
if (msg!=0) {
	document.getElementById("img"+msg).style.display ='none'
	if (prim!=0) document.getElementById("img"+prim).style.backgroundColor='#ffffaa';
	document.getElementById('imgUploadForm').disabled=false;
	showMsg("Operação realizada com sucesso.");
	}
	else
	showMsg("Voc&ecirc; n&atilde;o tem permiss&atilde;o para realizar esta opera&ccedil;&atilde;o.");
}

function gerImagensMostraEnviada(results){
	document.getElementById('campoImagens').innerHTML+=results;
	showMsg("Imagem enviada com sucesso.");
}

function gerAlbuns(results) {
menuLogin(1);
showSaida("");
document.getElementById("menuAcao").innerHTML = results;
showMsg("Atualize os campos e clique em CONFIRMA. Estas informa&ccedil;&otilde;es n&atilde;o ser&atilde;o divulgadas.");
}

function albumExc(results){
var id = results.getElementsByTagName("id").item(0).firstChild.nodeValue;
if (id!=0) {
	document.getElementById("albTXT"+id).style.display ='none'
	showMsg("Operação realizada com sucesso.");
	}
	else
	showMsg("Voc&ecirc; n&atilde;o tem permiss&atilde;o para realizar esta opera&ccedil;&atilde;o.");
}

function cadAlbum(results){
document.getElementById("cadAlbum").innerHTML=results;
showMsg("Preencha os campos para criar um novo &aacute;lbum.");
}

function cadAlbumFinal(results){
p1=results.indexOf('<div id="albTXT')
if (p1<0) {
	p1=results.indexOf('sendGetData(')
	p2=results.indexOf(",'", p1)
	TMPid=results.slice(p1+12,p2)
	document.getElementById("albTXT"+TMPid).innerHTML = results
	
	showMsg("Álbum alterado com sucesso.");
	}
	else {
	tmp=document.getElementById("listaAlbuns").innerHTML
	document.getElementById("listaAlbuns").innerHTML = results+tmp;
	showMsg("Álbum criado com sucesso.");
	}
document.getElementById("cadAlbum").innerHTML='';
}

function altAlbum(results){
	p1=results.indexOf('id" value="')
	p2=results.indexOf('">', p1)
	TMPid=results.slice(p1+11,p2)
	document.getElementById("albFotos"+TMPid).innerHTML=results;
	showMsg("Preencha os campos para criar um novo &aacute;lbum.");
}

function albListaImgem(results){
p1=results.indexOf('id_album" value="')
p2=results.indexOf('">', p1)
TMPid=results.slice(p1+17,p2)
document.getElementById("albFotos"+TMPid).innerHTML=results;
showMsg("Operação executada com sucesso.");
}

function albImagemExcluir(results){
id = results.getElementsByTagName("msg").item(0).firstChild.nodeValue;
document.getElementById('AlbImg'+id).innerHTML='';
showMsg("Imagem excluída com sucesso.");
document.getElementById('imgUploadForm').disabled=false;
}
function albMostraEnviada(results){
	p1=results.indexOf('album" value="')
	p2=results.indexOf('">', p1)
	TMPid=results.slice(p1+14,p2)
	document.getElementById("albFotos"+TMPid).innerHTML+=results;
	showMsg("Imagem enviada com sucesso.");
}
function amadEnviar(results){
menuLogin(1)
document.getElementById("menuAcao").innerHTML = results;
showMsg("Selecione a imagem que você deseja enviar.");
}

function amadMostraEnviada(results) {
document.getElementById("fotosMostraEnviada").innerHTML+= results;
showMsg("Imagem enviada com sucesso.");
}

function showGerenciar(results){
menuLogin(1)
document.getElementById("menuAcao").innerHTML = results;
showMsg("Selecione a imagem do Foto Show que você deseja atualizar.");
}
function showSelFoto(results){
document.getElementById("showImg").innerHTML = results;
showMsg("Selecione a imagem que você deseja enviar.");
}

function showAtualiza(results){
p1=results.indexOf('alt="')
TMPid=results.slice(p1+5,p1+6)
document.getElementById("showTH"+TMPid).innerHTML=results;
document.getElementById("showImg").innerHTML='';
showMsg("Imagem atualizada com sucesso.");
}

function showExcluir(results){
qual = results.getElementsByTagName("qual").item(0).firstChild.nodeValue;
document.getElementById("showTH"+qual).innerHTML='<img src="../show/th_foto_ex_'+qual+'.jpg" alt=""><br><br>';
document.getElementById("showImg").innerHTML='';
showMsg("Imagem excluída com sucesso.");
}
function parceriasVip(results) {
menuLogin(1);
showSaida("");
document.getElementById("menuAcao").innerHTML = results;
showMsg("Operação realizada com sucesso!");
}
/*
function planoVip(results) {
menuLogin(1)
showSaida("");
document.getElementById("menuAcao").innerHTML = results;
if (results.indexOf("Sua tentativa de acesso foi registrada.")>0) showMsg("ATEN&Ccedil;&Atilde;O: Sua tentativa de acesso foi registrada.")
else showMsg("Operação realizada com sucesso!");
}
function cadastroVip(results) {
menuLogin(1)
showSaida("");
document.getElementById("menuAcao").innerHTML = results;
checkFormVip();
if (results.indexOf("Sua tentativa de acesso foi registrada.")>0) showMsg("ATEN&Ccedil;&Atilde;O: Sua tentativa de acesso foi registrada.")
else showMsg("Operação realizada com sucesso!");
}

function checkFormVip() {
	erro=0;
	if (document.getElementById("vipFormComo1").checked||document.getElementById("vipFormComo2").checked||document.getElementById("vipFormComo3").checked) {
		document.getElementById("comoVipMsg").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
	}
	else {  
		erro=1;
		document.getElementById("comoVipMsg").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
	}
	if (document.getElementById("vipFormComo3").checked) {
		if (document.getElementById("vipFormBanco1").checked||document.getElementById("vipFormBanco2").checked||document.getElementById("vipFormBanco3").checked) {
			document.getElementById("bancoVipMsg").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
		}
		else {  
			erro=1;
			document.getElementById("bancoVipMsg").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
		}
		if (document.getElementById("vipFormForma1").checked||document.getElementById("vipFormForma2").checked) {
			document.getElementById("formaVipMsg").innerHTML='<img src="../imagens/ok1.gif" width="16" height="16" alt="">';
		}
		else {  
			erro=1;
			document.getElementById("formaVipMsg").innerHTML='<img src="../imagens/erro.gif" width="16" height="16" alt="">';
		}	
	
	}
	if (erro==0) document.getElementById("finaliza").disabled=false; else document.getElementById("finaliza").disabled=true;
}

function cadastroVipConfirma(results) {
menuLogin(1)
showSaida("");
document.getElementById("menuAcao").innerHTML = results;
if (results.indexOf("Sua tentativa de acesso foi registrada.")>0) showMsg("ATEN&Ccedil;&Atilde;O: Sua tentativa de acesso foi registrada.")
else showMsg("Operação realizada com sucesso!");
}

function cancelarVip(results){
var res = results.getElementsByTagName("res").item(0).firstChild.nodeValue;
if (res==1) 
	showMsg("Opera&ccedil;&atilde;o executada com sucesso.");
	else
	showMsg("Tentativa de acesso registrada.");
menuLogin(0);
}

function reenviarComprovanteVip(results){
var res = results.getElementsByTagName("res").item(0).firstChild.nodeValue;
if (res==1) 
	showMsg("Opera&ccedil;&atilde;o executada com sucesso.");
	else
	showMsg("Tentativa de acesso registrada.");
sendGetData(1,'../vip/planoVip','txt');
}
*/