/*Script para botão mouseover*/function MM_findObj(n, d) { 	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}		if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];		for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);		if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_swapImage() { 	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)	if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}function MM_swapImgRestore() { 	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_preloadImages() {	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}/*Fim do script para o botão mouseover*/function writeFlash(id, src, w, h) {	document.getElementById(id).innerHTML = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='"+w+"' height='"+h+"' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='wmode' value='transparent'><param name='movie' value='"+src+"' /><param name='quality' value='high' /><embed src='"+src+"' quality='high' width='"+w+"' height='"+h+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' /></object>";}function abrepop(nome_pop, path, w, h, scroll){	var janela = window.open(path,"_blank","height="+ Number(h) +",width="+ Number(w) +",status=no,toolbar=no,menubar=no,location=no, resizable=no, titlebar=no, scrollbars="+scroll);	/*Jogando a janela no meio da tela*/	var sWidth  = (screen.width / 2) - (Number(w) / 2);	var sHeight = (screen.height / 2) - (Number(h) / 2);	/*movendo*/	janela.moveTo(sWidth, sHeight) ;	janela.focus();}function abrepopdiv(nome_pop, path, path_return, w, h, lang){	/*Criando o elemento DIV de fundo*/	document.getElementById('bodyID').innerHTML += '<div id="'+nome_pop+'" style="border-style:solid; border-width:0px; position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:#333333">&nbsp;</div>';	w3Opacity.set(nome_pop,70);		/*Tirando a barra de rolagem da página*/	document.getElementById('bodyID').style.overflow = 'hidden';		/*Criando o elemento que abre a página*/	var conteinerPage = document.getElementById('bodyID').innerHTML += '<div id="abrepagina" style="background-color:#000000; padding:9px; border-style:dotted; border-width:2px;"></div>';		/*Atribuindo o objeto a uma variável*/	conteinerID = document.getElementById('abrepagina');		conteinerID.style.borderStyle = 'solid';	conteinerID.style.borderWidth = '1px';	conteinerID.style.borderColor = '#000000';	conteinerID.style.position = 'absolute';	conteinerID.style.left = "50%";	conteinerID.style.top = "50%";	conteinerID.style.marginLeft = "-"+Number(w)/2+"px";	conteinerID.style.marginTop = "-"+Number(h)/2+"px";		conteinerID.style.width = w;	conteinerID.style.height = h;	conteinerID.style.backgroundColor = '#333333';		conteinerID.innerHTML = "<p align='left' style='line-height:0px; margin:0px'><img src='imagens/"+lang+"_btn_fechar.jpg' align='absmiddle' onMouseOut='MM_swapImgRestore();' onmouseover='this.style.cursor=\"pointer\"; MM_swapImage(\"btn_fechar\",\"\",\"imagens/"+lang+"_btn_fechar_over.jpg\",1);' id='btn_fechar' onclick='location.replace(\""+path_return+"\")'></p><iframe src='"+path+"' frameborder='0'  marginheight='0' marginwidth='0'' scrolling='no' width='"+w+"' height='"+h+"'></iframe>";}function trocaidioma(idioma){	document.getElementById('idtrocaidioma').value = idioma;	document.getElementById('formidioma').submit();}function mostra_ocultaDIV(div){	div = document.getElementById(div);	if(div.style.display == 'none'){		div.style.display = 'block';	}else{		div.style.display = 'none';	}}function div_mana(){	var div_manaT      = document.getElementById('div_manaT');	if(div_manaT.style.display == 'none'){		div_manaT.style.display = 'block';		mana_top    = document.getElementById('mana_topT');		mana_body   = document.getElementById('mana_bodyT');		mana_bottom = document.getElementById('mana_bottomT');		var Numero = Math.floor(Math.random()*5);		if(Numero == 0){			cor = 'amarelo';		}		if(Numero == 1){			cor = 'azul';		}		if(Numero == 2){			cor = 'verm';		}		if(Numero == 3){			cor = 'verde';		}		if(Numero == 4){			cor = 'rosa';		}		mana_top.className = 'mana_top_'+cor;		mana_body.className = 'mana_body_'+cor;		mana_bottom.className = 'mana_bottom_'+cor;		w3Opacity.set('div_manaT',0);		w3Opacity.fading('div_manaT',0,100,800);		ajaxpage('acao/ajax_versiculo.php', 'showvers');	}else{		div_manaT.style.display == 'none';	}}function sizeFont (elem, acao){	conteudo = document.getElementById(elem);		/* tamanho inicial da fonte (em px)*/	var tamInic = 16;	/* Tamanho mínimo da [b]fonte (em px)*/	var tamMin = 4;	/* Tamanho máximo da fonte (em px)*/	var tamMax = 40;	/* Pega o tamanho da fonte. Se não foi setada ainda (primeira vez que a função é executada) terá como tamanho padrão 'tamInic'.*/	if (document.getElementById(elem).style.fontSize == "") {		var tamFonte = tamInic;	}else{		var tamFonte = parseInt(document.getElementById(elem).style.fontSize);	}		switch (acao){                /* Aumenta o tamanho, enquanto foi menor que 'tamMax'*/		case '+':		if (tamFonte < tamMax)		document.getElementById(elem).style.fontSize = (tamFonte + 2) + "px";		break;		/* Diminui o tamanbo, enquanto for maior que 'tamMin'*/		case '-':		if (tamFonte > tamMin)		document.getElementById(elem).style.fontSize = (tamFonte - 2) + "px";		break;	}}function selectPublicacao(tipo){	if(tipo == 'livro'){		document.getElementById('livro').style.borderStyle = 'inset';		document.getElementById('livro').style.backgroundColor = '#FFFFFF';				document.getElementById('cd').style.backgroundColor = '';		document.getElementById('dvd').style.backgroundColor = '';				document.getElementById('cd').style.borderStyle = 'outset';		document.getElementById('dvd').style.borderStyle = 'outset';	}	if(tipo == 'cd'){		document.getElementById('cd').style.borderStyle = 'inset';		document.getElementById('cd').style.backgroundColor = '#FFFFFF';				document.getElementById('livro').style.backgroundColor = '';		document.getElementById('dvd').style.backgroundColor = '';				document.getElementById('livro').style.borderStyle = 'outset';		document.getElementById('dvd').style.borderStyle = 'outset';	}	if(tipo == 'dvd'){		document.getElementById('dvd').style.borderStyle = 'inset';		document.getElementById('dvd').style.backgroundColor = '#FFFFFF';				document.getElementById('cd').style.backgroundColor = '';		document.getElementById('livro').style.backgroundColor = '';				document.getElementById('cd').style.borderStyle = 'outset';		document.getElementById('livro').style.borderStyle = 'outset';	}}function contaCaracteres(campo, maxChars, cmpDigitado, cmpMaximo){	campo 	    = document.getElementById(campo);	cmpDigitado = document.getElementById(cmpDigitado);	cmpMaximo   = document.getElementById(cmpMaximo);		cmpMaximo.innerHTML = maxChars;		if (campo.value.length > maxChars) {		campo.value = campo.value.substr(0,(campo.value.length - (campo.value.length - maxChars)));	}	else{		cmpDigitado.value = (maxChars - campo.value.length);	}	/*Escrevendo o quanto já foi digitado*/	cmpDigitado.innerHTML = campo.value.length;}function MM_jumpMenu(targ,selObj,restore){ /*v3.0*/  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");  if (restore) selObj.selectedIndex=0;}
