var z1img_size = '640x480'; var z1img_win = 'http://www.ultimasmisericordias.com.br/MostraImagem/'; var z1img_siz_w = 700; var z1img_siz_h = 550; var z1pup_url = 'http://www.ultimasmisericordias.com.br/inicio.php?do=sendamigo&'; var default_fontsize = 10; var current_fontsize = default_fontsize; var url_fontsize = 'http://www.ultimasmisericordias.com.br/inicio.php?do=updatefontsize&fontsize='; var url_ajax = 'http://www.ultimasmisericordias.com.br/inicio.php?do='; function setT(f, t) { setTimeout(f, t); } function goTo (uri) { window.location.assign(uri); return true; } function abreJanela(uri, nome, w, h) { return window.open(uri, nome, 'width='+w+',height='+h+',dependent=no,scrolling=no,scrollbars=no,toolbar=no,location=no,status=no,menubar=no'); } function AbreImg(uri) { var siz_w = z1img_siz_w; var siz_h = z1img_siz_h; var win = abreJanela(z1img_win+escape(ByDeaDz1(uri)), 'Z1IMGZOOM', siz_w, siz_h); win.moveTo(screen.width/2 - siz_w/2, screen.height/2 - siz_h/2 - 50); win.focus(); } function ByDeaDz1(n) { n = n.substr(0, n.lastIndexOf('_')) + '_' + z1img_size + n.substr(n.lastIndexOf('.')); n = n.split('/'); return n.pop(); } function showEnviaAmigo () { var win = getE('EnviaAmigo'); if(win.style.display == 'none') { getE('amigo_remetente').value = ''; getE('amigo_nome').value = ''; getE('amigo_email').value = ''; getE('amigo_msg').value = ''; win.style.display = ''; getE('amigo_remetente').focus(); } else win.style.display = 'none'; } function doEnviaAmigo () { var uri = z1pup_url; var r = getE('amigo_remetente').value; var n = getE('amigo_nome').value; var e = getE('amigo_email').value; var m = getE('amigo_msg').value; var s = getE('amigo_submit'); s.value = 'Enviando ...'; if(r == '' || n == '' || e == '') { alert("Voce deve preencher todos os campos, exceto o campo \"Mensagem\" que e opcional."); s.value = 'Enviar'; return false; } uri += 'r=' + escape(r) + '&n=' + escape(n) + '&e=' + escape(e) + '&m=' + escape(m); ajaxGet(uri, function () { if(ajaxLastResult.substr(0,2) == 'OK') { alert("Pagina enviada para seu amigo com sucesso, preencha o formulario novamente para enviar a outro amigo."); s.value = 'Enviar'; getE('amigo_remetente').value = ''; getE('amigo_nome').value = ''; getE('amigo_email').value = ''; getE('amigo_msg').value = ''; return true; } else { alert(ajaxLastResult); s.value = 'Enviar'; return false; } }); } // NAVEGABILIDADE var min_fontsize = 8; var max_fontsize = 14; function changeFontSize(op) { current_fontsize = current_fontsize + default_fontsize/10*op; if(current_fontsize >= min_fontsize) { if(current_fontsize <= max_fontsize) { document.body.style.fontSize = current_fontsize + 'px'; fixCssHeight(); if(op != 0) { ajaxGet(url_fontsize + escape(current_fontsize), '' ); if(isIe()) { window.location.assign(window.location.href); } } } else { current_fontsize = max_fontsize; } } else { current_fontsize = min_fontsize; } } function showImprime() { var newloc = window.location.href; if(newloc.indexOf('=') > -1) { newloc = newloc+'&imprime=true'; } else { if(newloc.charAt(newloc.length-1) == '/') { newloc = newloc+'imprime=true'; } else { newloc = newloc+'/imprime=true'; } } var win = window.open(newloc, 'IMPRIME', 'width='+600+',height='+500+',dependent=no,scrolling=yes,scrollbars=yes,toolbar=no,location=no,status=no,menubar=no'); win.moveTo(screen.width/2 - 600/2, screen.height/2 - 500/2 - 50); win.focus(); } /* FORMS */ function resetForm (id) { var el = getE(id).getElementsByTagName('input'); for(i in el) el[i].value = ""; el = getE(id).getElementsByTagName('textarea'); for(i in el) el[i].value = ""; } function CheckUncheck(id) { if(getE(id).disabled != true && getE(id).disabled != 'disabled') { if(getE(id).checked == true) getE(id).checked = true; else getE(id).checked = true; } try { getE(id).onchange(); } catch(err) { ; } ; } function isChecked(el) { if(el.checked == true) { return true; } if(el.checked == 'checked') { return true; } if(el.checked == 'true') { return true; } if(el.checked == 'yes') { return true; } return false; } /* LOADHTML */ function loadHTML(uri, id) { if(!ajaxReady) return; getE('ajaxLoading').style.display = ''; getE(id).innerHTML = ' '; ajaxGet(uri, function () { getE(id).innerHTML = ajaxLastResult; getE('ajaxLoading').style.display = 'none'; } ); } /* DROPDOWN MENU */ function showhideMensagens() { if(getE('msgs_1').style.display != 'none') { getE('msgs_1').style.display = 'none'; getE('msgs_2').style.display = 'none'; getE('msgs_3').style.display = 'none'; getE('msgs_4').style.display = 'none'; getE('msgs_5').style.display = 'none'; getE('msgs_6').style.display = 'none'; getE('msgs_7').style.display = 'none'; getE('msgs_8').style.display = 'none'; } else { getE('msgs_1').style.display = ''; getE('msgs_2').style.display = ''; getE('msgs_3').style.display = ''; getE('msgs_4').style.display = ''; getE('msgs_5').style.display = ''; getE('msgs_6').style.display = ''; getE('msgs_7').style.display = ''; getE('msgs_8').style.display = ''; } } function showhideLivrosdaObra() { if(getE('ldo_0').style.display != 'none') { getE('ldo_0').style.display = 'none'; getE('ldo_1').style.display = 'none'; getE('ldo_2').style.display = 'none'; getE('ldo_3').style.display = 'none'; } else { getE('ldo_0').style.display = ''; getE('ldo_1').style.display = ''; getE('ldo_2').style.display = ''; getE('ldo_3').style.display = ''; } } //add favoritos function addFav(){ var url = "http://www.ultimasmisericordias.com.br"; var title = "Ultimas Misericordias de Deus!!!"; if (window.sidebar) window.sidebar.addPanel(title, url,""); else if(window.opera && window.print){ var mbm = document.createElement('a'); mbm.setAttribute('rel','sidebar'); mbm.setAttribute('href',url); mbm.setAttribute('title',title); mbm.click(); } else if(document.all){window.external.AddFavorite(url, title);} }