divatual = 1;


function openPopUp(linkURL) {
window.open(linkURL,'popup','width=400,height=400') 
}

// slideshow

function sl_ampswf (foto, leg, id, nivel, h, w)
{
	if (id == 0)
	{
		divona = 'fotona';
	}
	else
	{
		divona = 'fotona_'+id;
	}

	   if (parseInt(navigator.appVersion)>3) {
		 if (navigator.appName=="Netscape") {
		  winH = window.innerHeight-16;
		 }
		 if (navigator.appName.indexOf("Microsoft")!=-1) {
		  //winH = document.body.offsetHeight-20;
			winH = document.documentElement.clientHeight-20;
		 }
		}

	var divs = document.getElementsByTagName('object');
		for(var i=0,len=divs.length;i<len;i++) {
			divs[i].style.visibility = "hidden";
		}

	valor = (winH-h)/2;

	var yScroll;
	if (self.pageYOffset) yScroll = self.pageYOffset;
	else if (document.documentElement && document.documentElement.scrollTop) yScroll = document.documentElement.scrollTop;
	else if (document.body) yScroll = document.body.scrollTop;

	yScroll += valor;

	document.getElementById(divona).style.top = yScroll + 'px';
	document.getElementById(divona).style.width = w + 'px';

	document.getElementById('divsombra').style.display = "inline";

	swfHTM = '<div><a href="javascript:pageTracker._trackEvent(\'Video\', \'unexpand\');sl_fech ('+id+')" class="slfech" >Fechar</a></div>';
	swfHTM +='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownloadocument.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'">';
	swfHTM +='<param name="movie" value="'+nivel+'&'+foto+'" /><param name="quality" value="high" /><param name="flashvars" value="" /><param name="AllowScriptAccess" value="always" />';
	swfHTM += '<param name="allowFullScreen" value="true" />';
	swfHTM += '<param name="wmode" value="opaque" />';
	swfHTM +='<embed allowFullScreen="true" mode="opaque" src="'+nivel+'&'+foto+'" flashvars="" AllowScriptAccess="always" quality="high" width="'+w+'" height="'+h+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
	swfHTM += '<p>' + leg + '</p>';

	document.getElementById(divona).innerHTML = swfHTM;
	document.getElementById(divona).style.display = "inline";
}

function sl_amp (foto, leg, id, nivel, h, w, credito)
{

	if(w > 800){
        w = 800;
    }	

	if (id == 0)
	{
		divona = 'fotona';
	}
	else
	{
		divona = 'fotona_'+id;
	}

	   if (parseInt(navigator.appVersion)>3) {
		 if (navigator.appName=="Netscape") {
		  winH = window.innerHeight-16;
		 }
		 if (navigator.appName.indexOf("Microsoft")!=-1) {
		  //winH = document.body.offsetHeight-20;
			winH = document.documentElement.clientHeight-20;
		 }
		}

	var divs = document.getElementsByTagName('object');
		for(var i=0,len=divs.length;i<len;i++) {
			divs[i].style.visibility = "hidden";
		}

	valor = (winH-h)/2;

	var yScroll;
	if (self.pageYOffset) yScroll = self.pageYOffset;
	else if (document.documentElement && document.documentElement.scrollTop) yScroll = document.documentElement.scrollTop;
	else if (document.body) yScroll = document.body.scrollTop;

	yScroll += valor;

	document.getElementById(divona).style.top = yScroll + 'px';
	document.getElementById(divona).style.width = w + 'px';

	document.getElementById('divsombra').style.display = "inline";

	var myKey = 'estabelecimento';
	var myStringVar = foto;
	var myMatch = myStringVar.search(myKey);

	if(myMatch != -1)
	{
		document.getElementById(divona).innerHTML = '<div><a href="javascript:pageTracker._trackEvent(\'Foto\', \'unexpand\');sl_fech ('+id+')" class="slfech">Fechar</a>'+((credito) ? '<p class="cred">Foto: ' + credito + '</p>' : '') +'</div><a href="javascript: pageTracker._trackEvent(\'Foto\', \'unexpand\');sl_fech ('+id+')"><img src="' + nivel + '' + foto + '" alt="' + leg + '" title="' + leg + '" style="width:'+w+'px" /></a><p class="leg">' + leg + '</p>';	
	}else{
		document.getElementById(divona).innerHTML = '<div><a href="javascript:pageTracker._trackEvent(\'Foto\', \'unexpand\');sl_fech ('+id+')" class="slfech">Fechar</a>'+((credito) ? '<p class="cred">Foto: ' + credito + '</p>' : '') +'</div><a href="javascript:pageTracker._trackEvent(\'Foto\', \'unexpand\');sl_fech ('+id+')"><img src="' + nivel + '' + foto + '" alt="' + leg + '" title="' + leg + '" style="width:'+w+'px" /></a><p class="leg">' + leg + '</p><a href="javascript:pageTracker._trackEvent(\'Foto\', \'left\', \'foto maximizada\');MoveToLeft2()" class="aant">Anterior</a><a href="javascript:pageTracker._trackEvent(\'Foto\', \'right\', \'foto maximizada\');MoveToRight2()" class="ppro" >Próxima</a>';
	}
	document.getElementById(divona).style.display = "inline";
}

function sl_amp1(foto, leg, id, nivel, h, w, credito)
{

    if(w > 800){
        w = 800;
    }

    if (id == 0)
    {
        divona = 'fotona';
    }
    else
    {
        divona = 'fotona_'+id;
    }

       if (parseInt(navigator.appVersion)>3) {
         if (navigator.appName=="Netscape") {
          winH = window.innerHeight-16;
         }
         if (navigator.appName.indexOf("Microsoft")!=-1) {
          //winH = document.body.offsetHeight-20;
            winH = document.documentElement.clientHeight-20;
         }
        }

    var divs = document.getElementsByTagName('object');
        for(var i=0,len=divs.length;i<len;i++) {
            divs[i].style.visibility = "hidden";
        }

    valor = (winH-h)/2;

    var yScroll;
    if (self.pageYOffset) yScroll = self.pageYOffset;
    else if (document.documentElement && document.documentElement.scrollTop) yScroll = document.documentElement.scrollTop;
    else if (document.body) yScroll = document.body.scrollTop;

    yScroll += valor;

    document.getElementById(divona).style.top = yScroll + 'px';
    document.getElementById(divona).style.width = w + 'px';

    document.getElementById('divsombra').style.display = "inline";

	document.getElementById(divona).innerHTML = '<div><a href="javascript:pageTracker._trackEvent(\'Foto\', \'unexpand\');sl_fech ('+id+')" class="slfech">Fechar</a>'+((credito) ? '<p class="cred">Foto: ' + credito + '</p>' : '') +'</div><a href="javascript:pageTracker._trackEvent(\'Foto\', \'unexpand\');sl_fech ('+id+')"><img src="' + nivel + '' + foto + '" alt="' + leg + '" title="' + leg + '" style="width:'+w+'px" /></a><p class="leg">' + leg + '</p>';
    document.getElementById(divona).style.display = "inline";
}

function sl_fech (id)
{
	if (id == 0)
	{
		divona = 'fotona';
	}
	else
	{
		divona = 'fotona_'+id;
	}

	document.getElementById("divsombra").style.display = "none";
	document.getElementById(divona).style.display = "none";

	var divs = document.getElementsByTagName('object');
		for(var i=0,len=divs.length;i<len;i++) {
			divs[i].style.visibility = "visible";
		}
	document.getElementById(divona).innerHTML = "";
}

function sl_pag (pag, leg, id, nivel, h, w)
{
    if (id == 0)
    {
        divona = 'fotona';
    }
    else
    {
        divona = 'fotona_'+id;
    }

       if (parseInt(navigator.appVersion)>3) {
         if (navigator.appName=="Netscape") {
          winH = window.innerHeight-16;
         }
         if (navigator.appName.indexOf("Microsoft")!=-1) {
          //winH = document.body.offsetHeight-20;
            winH = document.documentElement.clientHeight-20;
         }
        }

    var divs = document.getElementsByTagName('object');
        for(var i=0,len=divs.length;i<len;i++) {
            divs[i].style.visibility = "hidden";
        }

    valor = (winH-h)/2;

    var yScroll;
    if (self.pageYOffset) yScroll = self.pageYOffset;
    else if (document.documentElement && document.documentElement.scrollTop) yScroll = document.documentElement.scrollTop;
    else if (document.body) yScroll = document.body.scrollTop;

    yScroll += valor;

    document.getElementById(divona).style.top = yScroll + 'px';
    document.getElementById(divona).style.width = w + 'px';

    document.getElementById('divsombra').style.display = "inline";

//    document.getElementById(divona).innerHTML = '<a href="javascript: sl_fech ('+id+')" class="slfech">Fechar</a><a href="javascript: sl_fech ('+id+')"><iframe src="' + pag + '" alt="' + leg + '" title="' + leg + '" frameborder="0" width="'+ (w+20) +'" height="'+ (h) +'" /><p>' + leg + '</p>';
    document.getElementById(divona).innerHTML = '<a href="javascript: sl_fech ('+id+')"><iframe src="' + pag + '" alt="' + leg + '" title="' + leg + '" frameborder="0" width="'+ w +'" height="'+ h +'" /><p>' + leg + '</p>';
    document.getElementById(divona).style.display = "inline";
}

function sl_open (div,nopri)
{
	ddiv = 'ft_sl_'+div;
	ddivatual = 'ft_sl_'+divatual;

	leg = 'sl_leg_'+div;
	legatual = 'sl_leg_'+divatual;

	link = 'sl_link_'+div;
	linkatual = 'sl_link_'+divatual;

   	document.getElementById(ddivatual).style.display = "none";
	document.getElementById(ddiv).style.display = "block";

	document.getElementById(linkatual).className = "";
	document.getElementById(link).className = "ativo";

	if (document.getElementById(legatual))
	{
	   	document.getElementById(legatual).style.display = "none";
		document.getElementById(leg).style.display = "block";
	}

	divatual = div;

	if (divatual > 1)
	{
		if (nopri != 1)
		{
			document.getElementById('sl_pri').style.visibility = "visible";
		}
		document.getElementById('sl_ant').style.visibility = "visible";
	}
	else
	{	
		if (nopri != 1)
		{
			document.getElementById('sl_pri').style.visibility = "hidden";
		}
		document.getElementById('sl_ant').style.visibility = "hidden";
	}

	if (divatual < ultima)
	{
		if (nopri != 1)
		{
			document.getElementById('sl_ult').style.visibility = "visible";
		}
		document.getElementById('sl_pro').style.visibility = "visible";
	}
	else
	{	
		if (nopri != 1)
		{
			document.getElementById('sl_ult').style.visibility = "hidden";
		}
		document.getElementById('sl_pro').style.visibility = "hidden";
	}
}

function sl_pri (nopri)
{
	sl_open (1,nopri);
}

function sl_ult (nopri)
{
	sl_open (ultima,nopri);
}

function sl_pro (nopri)
{
	sl_open (divatual + 1,nopri);
}

function sl_ant (nopri)
{
	sl_open (divatual - 1,nopri);
}

// validação do formulário


function valida_CPF(s){
        var i;
        s = limpa_string(s);
        var c = s.substr(0,9);
        var dv = s.substr(9,2);
        var d1 = 0;
        for (i = 0; i < 9; i++){
                d1 += c.charAt(i)*(10-i);
        }
        if (d1 == 0) return false;
                d1 = 11 - (d1 % 11);

        if (d1 > 9) d1 = 0;
        if (dv.charAt(0) != d1){
                return false;
        }

        d1 *= 2;
        for (i = 0; i < 9; i++){
                d1 += c.charAt(i)*(11-i);
        }
        d1 = 11 - (d1 % 11);
        if (d1 > 9) d1 = 0;

        if (dv.charAt(1) != d1){
                return false;
        }

        return true;
}

function limpa_string(S){
        // Deixa so' os digitos no numero
        var Digitos = "0123456789";
        var temp = "";
        var digito = "";

        for (var i=0; i<S.length; i++)  {
                digito = S.charAt(i);
                if (Digitos.indexOf(digito)>=0) {
                        temp=temp+digito        }
        } //for

        return temp
}


function checa_formulario(verifica){

	if((verifica.reg.checked == false)){
		alert("Você deve concordar com o regulamento da promoção para poder participar.");
		verifica.reg.focus();
		return (false);
	}	


	if (verifica.nome.value == ""){
		alert("O campo nome está vazio. Por favor, verifique seus dados.");
		verifica.nome.focus();
		return (false);
	}
	else{
		if(verifica.nome.value.length<3){
			alert("O nome informado não é valido.");
			return (false);
		}
	}


	if (verifica.email.value == ""){
		alert("O campo e-mail está vazio. Por favor, verifique seus dados.");
		verifica.email.focus();
		return (false);
	}

	var invalid;
	invalid = /^[^.-][a-z0-9_.-]+@([a-z0-9]+\.)+[a-z]{2,4}$/

		if (!invalid.test(verifica.email.value) == true) {
			// caso o teste falhe, para mudar a cor do texto na caixa, mude na linha abaixo
			alert("Seu endereço de e-mail é inválido. Por favor, verifique seus dados.");
			verifica.email.focus();
			return false;

		} 


	if (verifica.cpf.value == ""){
		alert("O campo CPF está vazio. Por favor, verifique seus dados.");
		verifica.cpf.focus();
		return (false);
	}
	else{
		if(!valida_CPF(verifica.cpf.value)){
			alert("O CPF informado não é válido.");
			verifica.cpf.focus();
			return (false);
		}
	}



	
	if (verifica.telefone.value == ""){
		alert("O campo telefone está vazio. Por favor, verifique seus dados.");
		verifica.telefone.focus();
		return (false);
	}
	else{
		if(verifica.telefone.value.length!=8){
			alert("O campo telefone deve ter ao menos 8 digitos");
			verifica.telefone.focus();
			return (false);
		}
	}

	
	if (verifica.ddd.value == ""){
		alert("O campo DDD está vazio. Por favor, verifique seus dados.");
		verifica.ddd.focus();
		return (false);
	}
	else{
		if(verifica.ddd.value.length!=2){
			alert("O campo DDD deve conter dois digitos.");
			verifica.ddd.focus();
			return (false);
		}
	}


	if (verifica.endereco.value == ""){
		alert("O campo endereço está vazio. Por favor, verifique seus dados.");
		verifica.endereco.focus();
		return (false);
	}
	else{
		if(verifica.endereco.value.length<3){
			alert("Endereco invalido.");
			return (false);
		}
	}


	if (verifica.cidade.value == ""){
		alert("O campo cidade está vazio. Por favor, verifique seus dados.");
		verifica.cidade.focus();
		return (false);
	}
	else{
		if(verifica.cidade.value.length<3){
			alert("Cidade invalida.");
			return (false);
		}
	}

	if (verifica.estado.value == "UF"){
		alert("O estado selecionado é inválido. Por favor, verifique seus dados.");
		verifica.cidade.focus();
		return (false);
	}
	
	if (verifica.nome2.value == ""){
		alert("O campo nome está vazio. Por favor, verifique seus dados.");
		verifica.nome2.focus();
		return (false);
	}
	else{
		if(verifica.nome2.value.length<3){
			alert("O nome informado não é valido.");
			return (false);
		}
	}

	
	if (verifica.telefone2.value == ""){
		alert("O campo telefone está vazio. Por favor, verifique seus dados.");
		verifica.telefone2.focus();
		return (false);
	}
	else{
		if(verifica.telefone2.value.length!=8){
			alert("O campo telefone deve ter ao menos 8 digitos");
			verifica.telefone2.focus();
			return (false);
		}
	}

	
	if (verifica.ddd2.value == ""){
		alert("O campo DDD está vazio. Por favor, verifique seus dados.");
		verifica.ddd2.focus();
		return (false);
	}
	else{
		if(verifica.ddd2.value.length!=2){
			alert("O campo DDD deve conter dois digitos.");
			verifica.ddd2.focus();
			return (false);
		}
	}
	
	if (verifica.cidade2.value == ""){
		alert("O campo cidade está vazio. Por favor, verifique seus dados.");
		verifica.cidade2.focus();
		return (false);
	}
	else{
		if(verifica.cidade2.value.length<3){
			alert("Cidade invalida.");
			return (false);
		}
	}

	if (verifica.estado2.value == "UF"){
		alert("O estado selecionado é inválido. Por favor, verifique seus dados.");
		verifica.cidade2.focus();
		return (false);
	}
	
	if (verifica.historia.value == ""){
		alert("Por favor, escreva a história da pessoa indicada.");
		verifica.cidade2.focus();
		return (false);
	}

	if(verifica.campo.value==3){
		if((verifica.nomec1.value==verifica.nomec2.value)||(verifica.nomec1.value==verifica.nomec3.value)||(verifica.nomec2.value==verifica.nomec3.value)){
			alert("Os nomes dos cachorros devem ser diferentes.");
			return (false);
		}
		if((verifica.foto1.value==verifica.foto2.value)||(verifica.foto1.value==verifica.foto3.value)||(verifica.foto2.value==verifica.foto3.value)){
			alert("As fotos informadas devem ser distintas.");
			return (false);
		}
		if(verifica.nomec1.value.length<3){
			alert("Informe um nome para o cachorro com ao menos 3 caracteres.");
			return (false);
		}
		if(verifica.raca1.value.length<3){
			alert("Informe uma raca para o cachorro com ao menos 2 caracteres.");
			return (false);
		}
		if((verifica.idadec1.value=="")||(verifica.idadec1.value<1)){
			alert("Informe uma idade para o cachorro. Ele deve ter pelo menos 1 ano.");
			return (false);
		}
		if(verifica.foto1.value.length<5){
			alert("Informe uma imagem válida.");
			return (false);
		}
		if((verifica.descricao1.value.length<3)||(verifica.descricao1.value.length>255)){
			alert("A descrição deve ter ao menos 3 e no máximo 255 caracteres.");
			return (false);
		}
		if(verifica.nomec2.value.length<3){
			alert("Informe um nome para o segundo cachorro com ao menos 3 caracteres.");
			return (false);
		}
		if(verifica.raca2.value.length<3){
			alert("Informe uma raça para o segundo cachorro com ao menos 2 caracteres.");
			return (false);
		}
		if((verifica.idadec2.value=="")||(verifica.idadec2.value<1)){
			alert("Informe uma idade para o segundo cachorro. Ele deve ter pelo menos 1 ano.");
			return (false);
		}
		if(verifica.foto2.value.length<5){
			alert("Informe uma imagem válida para o segundo cachorro.");
			return (false);
		}
		if((verifica.descricao2.value.length<3)||(verifica.descricao2.value.length>255)){
			alert("A descrição deve ter ao menos 3 e no maximo 255 caracteres para o segundo cachorro.");
			return (false);
		}
		if(verifica.nomec3.value.length<3){
			alert("Informe um nome para o terceiro cachorro com ao menos 3 caracteres.");
			return (false);
		}
		if(verifica.raca3.value.length<3){
			alert("Informe uma raça para o terceiro cachorro com ao menos 2 caracteres.");
			return (false);
		}
		if((verifica.idadec3.value=="")||(verifica.idadec3.value<1)){
			alert("Informe uma idade para o terceiro cachorro. Ele deve ter pelo menos 1 ano.");
			return (false);
		}
		if(verifica.foto3.value.length<5){
			alert("Informe uma imagem válida para o terceiro cachorro.");
			return (false);
		}
		if((verifica.descricao3.value.length<3)||(verifica.descricao3.value.length>255)){
			alert("A descrição deve ter ao menos 3 e no maximo 255 caracteres para o terceiro cachorro.");
			return (false);
		}
	}
	if(verifica.campo.value==2){
		if(verifica.nomec1.value==verifica.nomec2.value){
			alert("Os nomes dos cachorros devem ser diferentes.");
			return (false);
		}
		if(verifica.foto1.value==verifica.foto2.value){
			alert("Voce não pode informar a mesma foto para os 2 cachorros.");
			return (false);
		}
		if(verifica.nomec1.value.length<3){
			alert("Informe um nome para o cachorro com ao menos 3 caracteres.");
			return (false);
		}
		if(verifica.raca1.value.length<3){
			alert("Informe uma raça para o cachorro com ao menos 2 caracteres.");
			return (false);
		}
		if((verifica.idadec1.value=="")||(verifica.idadec1.value<1)){
			alert("Informe uma idade para o cachorro. Ele deve ter pelo menos 1 ano.");
			return (false);
		}
		if(verifica.foto1.value.length<5){
			alert("Informe uma imagem valida.");
			return (false);
		}
		if((verifica.descricao1.value.length<3)||(verifica.descricao1.value.length>255)){
			alert("A descrição deve ter ao menos 3 e no máximo 255 caracteres.");
			return (false);
		}
		if(verifica.nomec2.value.length<3){
			alert("Informe um nome para o segundo cachorro com ao menos 3 caracteres.");
			return (false);
		}
		if(verifica.raca2.value.length<3){
			alert("Informe uma raça para o segundo cachorro com ao menos 2 caracteres.");
			return (false);
		}
		if((verifica.idadec2.value=="")||(verifica.idadec2.value<1)){
			alert("Informe uma idade para o segundo cachorro. Ele deve ter pelo menos 1 ano.");
			return (false);
		}
		if(verifica.foto2.value.length<5){
			alert("Informe uma imagem válida para o segundo cachorro.");
			return (false);
		}
		if((verifica.descricao2.value.length<3)||(verifica.descricao2.value.length>255)){
			alert("A descrição deve ter ao menos 3 e no máximo 255 caracteres para o segundo cachorro.");
			return (false);
		}
	}
	if(verifica.campo.value==1){
		if(verifica.nomec1.value.length<3){
			alert("Informe um nome para o cachorro com ao menos 3 caracteres.");
			return (false);
		}
		if(verifica.raca1.value.length<3){
			alert("Informe uma raça para o cachorro com ao menos 2 caracteres.");
			return (false);
		}
		if((verifica.idadec1.value=="")||(verifica.idadec1.value<1)){
			alert("Informe uma idade para o cachorro. Ele deve ter pelo menos 1 ano.");
			return (false);
		}
		if(verifica.foto1.value.length<5){
			alert("Informe uma imagem válida.");
			return (false);
		}
		if((verifica.descricao1.value.length<3)||(verifica.descricao1.value.length>255)){
			alert("A descrição deve ter ao menos 3 e no máximo 255 caracteres.");
			return (false);
		}
	}


	return (true);
}


function somente_numero(campo,event){
        var LEFT=37, RIGHT=39, BCK=8, ETR=13, TAB=9, key, tecla;

        if(event.which)
                tecla = event.which;
        else
                tecla = event.keyCode;

        key=String.fromCharCode(tecla);

        if(tecla == ETR)
                return false;
        if(tecla==BCK || tecla==TAB || tecla==LEFT || tecla==RIGHT)
                return true;

        return(/[0-9]/.test(key));
}

function ContaObs(campo, contacampo, total){
    if(campo.value.length > total)
    {
        campo.value = campo.value.substring(0, total);
    }
        contacampo.innerHTML = campo.value.length;
}

function Mascara(objeto, evt, mask) {
		try {
		var LetrasU = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
		var LetrasL = 'abcdefghijklmnopqrstuvwxyz';
		var Letras  = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
		var Numeros = '0123456789';
		var Fixos  = '().-:/ ';
		var Charset = " !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_/`abcdefghijklmnopqrstuvwxyz{|}~";

		evt = (evt) ? evt : (window.event) ? window.event : "";
		var value = objeto.value;
		if (evt) {
			var ntecla = (evt.which ) ? evt.which : evt.keyCode;
			tecla = Charset.substr(ntecla - 32, 1);
			if (ntecla < 32) return true;
			if (ntecla == 46) return true;
			if (ntecla == 37) return true;
			if (ntecla == 39) return true;

			var tamanho = value.length ;
			if (tamanho >= mask.length) return false;

			var pos = mask.substr(tamanho,1);
			while (Fixos.indexOf(pos) != -1) {
				 value += pos;
				 tamanho = value.length;
				 if (tamanho >= mask.length) return false;
				 pos = mask.substr(tamanho,1);
			}

			switch (pos) {
			  case '#' : if (Numeros.indexOf(tecla) == -1) return false; break;
			  case 'A' : if (LetrasU.indexOf(tecla) == -1) return false; break;
			  case 'a' : if (LetrasL.indexOf(tecla) == -1) return false; break;
			  case 'Z' : if (Letras.indexOf(tecla) == -1) return false; break;
			  case '*' : objeto.value = value; return true; break;
			  default : return false; break;
			}
		}
		objeto.value = value;
		}catch(e) { }
		return true;
}

function mudaEufui(id) {
	document.getElementById('eufui75').style.display = "none";
	document.getElementById('eufui76').style.display = "none";
	document.getElementById('eufui77').style.display = "none";
	document.getElementById('eufui78').style.display = "none";
	document.getElementById('eufui66').style.display = "none";
	document.getElementById('eufui1').style.display = "none";
	document.getElementById('eufui65').style.display = "none";
	document.getElementById('eufui64').style.display = "none";
	document.getElementById('eufui67').style.display = "none";

	document.getElementById(id).style.display = "";

	var divs = document.getElementsByName('aeufui');
    for(var i=0,len=divs.length;i<len;i++) {
        divs[i].className = "";
    }

    document.getElementById('a'+id).className = "ativo";
}
