function objXMLHttp() { if (window.XMLHttpRequest) { var objetoXMLHttp = new XMLHttpRequest(); return objetoXMLHttp; }else if (window.ActiveXObject) { var versoes = ["MSXML2.XMLHttp.6.0", "MSXML2.XMLHttp.5.0", "MSXML2.XMLHttp.4.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp", "Microsoft.XMLHttp"]; for (var i = 0; i < versoes.length; i++) { try { var objetoXMLHttp = new ActiveXObject(versoes[i]); return objetoXMLHttp; }catch (ex) { // nada } } } return false; }; function acentuacao(s) { s = s.replace(/á/gi,"\u00e1"); s = s.replace(/á/gi,"\u00e1"); s = s.replace(/á/gi,"\u00e1"); s = s.replace(/à/gi,"\u00e0"); s = s.replace(/â/gi,"\u00e2"); s = s.replace(/ã/gi,"\u00e3"); s = s.replace(/ä/gi,"\u00e4"); s = s.replace(/Á/gi,"\u00c1"); s = s.replace(/À/gi,"\u00c0"); s = s.replace(/Â/gi,"\u00c2"); s = s.replace(/Ã/gi,"\u00c3"); s = s.replace(/Ä/gi,"\u00c4"); s = s.replace(/é/gi,"\u00e9"); s = s.replace(/è/gi,"\u00e8"); s = s.replace(/ê/gi,"\u00ea"); s = s.replace(/ê/gi,"\u00ea"); s = s.replace(/É/gi,"\u00c9"); s = s.replace(/È/gi,"\u00c8"); s = s.replace(/Ê/gi,"\u00ca"); s = s.replace(/Ë/gi,"\u00cb"); s = s.replace(/í/gi,"\u00ed"); s = s.replace(/ì/gi,"\u00ec"); s = s.replace(/î/gi,"\u00ee"); s = s.replace(/ï/gi,"\u00ef"); s = s.replace(/Í/gi,"\u00cd"); s = s.replace(/Ì/gi,"\u00cc"); s = s.replace(/Î/gi,"\u00ce"); s = s.replace(/Ï/gi,"\u00cf"); s = s.replace(/ó/gi,"\u00f3"); s = s.replace(/ò/gi,"\u00f2"); s = s.replace(/ô/gi,"\u00f4"); s = s.replace(/õ/gi,"\u00f5"); s = s.replace(/ö/gi,"\u00f6"); s = s.replace(/Ó/gi,"\u00d3"); s = s.replace(/Ò/gi,"\u00d2"); s = s.replace(/Ô/gi,"\u00d4"); s = s.replace(/Õ/gi,"\u00d5"); s = s.replace(/Ö/gi,"\u00d6"); s = s.replace(/ú/gi,"\u00fa"); s = s.replace(/ù/gi,"\u00f9"); s = s.replace(/û/gi,"\u00fb"); s = s.replace(/ü/gi,"\u00fc"); s = s.replace(/Ú/gi,"\u00da"); s = s.replace(/Ù/gi,"\u00d9"); s = s.replace(/Û/gi,"\u00db"); s = s.replace(/ç/gi,"\u00e7"); s = s.replace(/Ç/gi,"\u00c7"); s = s.replace(/ñ/gi,"\u00f1"); s = s.replace(/Ñ/gi,"\u00d1"); s = s.replace(/&/gi,"\u0026"); s = s.replace(/'/gi,"\u0027"); return s; } function ReinitializeAddThis(pag){ if (window.addthis){ if (pag == 1) { window.addthis.toolbox("#mthis"); }else if (pag == 2) { window.addthis.toolbox("#mthism"); }else if (pag == 3) { window.addthis.toolbox("#mthis1"); } }else { var script = 'http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4fcd323364cd71fc'; if (window.addthis){ window.addthis = null; } $.getScript(script); } } function Trim(str) { return str.replace(/^\s+|\s+$/g,""); } function isEmailValid(email) { var regex = /^[a-z0-9!$'*+\-_]+(\.[a-z0-9!$'*+\-_]+)*@([a-z0-9]+(-+[a-z0-9]+)*\.)+([a-z]{2}|aero|arpa|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|msp|name|net|org|pro|travel|br)$/; return regex.test(email.toLowerCase()); }; function pagina(pag, item, qtd, nump, idi, pes, mapa) { document.getElementById('mostra_produto').innerHTML = ''; var m = 'conteudo'; if (pag == 8) { if (document.getElementById("abreidi") != null) { m = 'abreidi'; } } document.getElementById(m).innerHTML = '

 


Processando Solicitação...
Aguarde o retorno das informações

 

'; if (pag == 0) { if (item == 13) { window.location='index.php?nump=' + nump + '&abre=13'; }else { window.location='index.php?nump=' + nump; } }else { var dados = "opx=1&pag=" + pag + "&item=" + item + "&qtd=" + qtd + "&nump=" + nump + "&idi=" + idi + "&pes=" + pes + "&m=" + m; var oXMLHttp = objXMLHttp(); oXMLHttp.open("POST","my_controle.php", true); oXMLHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); oXMLHttp.onreadystatechange = function() { if (oXMLHttp.readyState == 4) { if (oXMLHttp.status == 200) { document.getElementById(m).innerHTML = oXMLHttp.responseText; if (pag == 0) { $('html,body').animate({scrollTop: $('#topo').offset().top}, 1000); }else { $('html,body').animate({scrollTop: $('#menusup').offset().top}, 1000); } if (pag == 5) { $('.boxgrid.caption').hover(function(){ $(".cover", this).stop().animate({top:'130px'},{queue:false,duration:160}); }, function() { $(".cover", this).stop().animate({top:'190px'},{queue:false,duration:160}); }); } if ((pag == 7) && (idi > 0)) { abremapa2(3,idi,nump,mapa); }else if (pag == 15) { $("#fone").mask("(99)9999-9999"); $("#celular").mask("(99)99999-9999"); $("#cep").mask("99999-999"); } $(".mfoto1").colorbox({rel:'mfoto1', slideshow:true}); if (document.getElementById('mf2') != null) { $(".mfoto2").colorbox({rel:'mfoto2', slideshow:true}); } if (document.getElementById('mf3') != null) { $(".mfoto3").colorbox({rel:'mfoto3', slideshow:true}); } if (document.getElementById('mf4') != null) { $(".mfoto4").colorbox({rel:'mfoto4', slideshow:true}); } if (document.getElementById('mf5') != null) { $(".mfoto5").colorbox({rel:'mfoto5', slideshow:true}); } if (document.getElementById('mf6') != null) { $(".mfoto6").colorbox({rel:'mfoto6', slideshow:true}); } if (document.getElementById('mf7') != null) { $(".mfoto7").colorbox({rel:'mfoto7', slideshow:true}); } if (document.getElementById('mf8') != null) { $(".mfoto8").colorbox({rel:'mfoto8', slideshow:true}); } if (document.getElementById('mf9') != null) { $(".mfoto9").colorbox({rel:'mfoto9', slideshow:true}); } if (document.getElementById('mf10') != null) { $(".mfoto10").colorbox({rel:'mfoto10', slideshow:true}); } Shadowbox.clearCache(); Shadowbox.setup(); }else { alert("Ocorreu um Erro" + oXMLHttp.statusText); } } } oXMLHttp.send(dados); return false; } } function valida_cnpj(cnpj) { cnpj = cnpj.replace('-', ''); cnpj = cnpj.replace('.', ''); cnpj = cnpj.replace('/', ''); cnpj = cnpj.replace('.', ''); var numeros, digitos, soma, i, resultado, pos, tamanho, digitos_iguais; digitos_iguais = 1; if (cnpj.length < 14 && cnpj.length < 15) return false; for (i = 0; i < cnpj.length - 1; i++) if (cnpj.charAt(i) != cnpj.charAt(i + 1)) { digitos_iguais = 0; break; } if (!digitos_iguais) { tamanho = cnpj.length - 2 numeros = cnpj.substring(0,tamanho); digitos = cnpj.substring(tamanho); soma = 0; pos = tamanho - 7; for (i = tamanho; i >= 1; i--) { soma += numeros.charAt(tamanho - i) * pos--; if (pos < 2) pos = 9; } resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; if (resultado != digitos.charAt(0)) return false; tamanho = tamanho + 1; numeros = cnpj.substring(0,tamanho); soma = 0; pos = tamanho - 7; for (i = tamanho; i >= 1; i--) { soma += numeros.charAt(tamanho - i) * pos--; if (pos < 2) pos = 9; } resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; if (resultado != digitos.charAt(1)) return false; return true; } else return false; } function verifica_cadastro(pag, nump, dados) { if (pag == 1) { if (dados.nome.value.length < 1) { window.alert("O campo [ Nome ] deve ser preenchido."); dados.nome.focus(); return false; }else if (!isEmailValid(dados.email.value)) { window.alert("O E-mail parece invalido, favor verificar."); dados.email.focus(); return false; }else if (dados.email.value.length < 1) { window.alert("O campo [ E-mail ] deve ser preenchido."); dados.email.focus(); return false; } document.getElementById('mload').innerHTML = 'Aguarde...'; }else if (pag == 2) { if (dados.nome.value.length < 1) { window.alert("O campo [ Nome ] deve ser preenchido."); dados.nome.focus(); return false; }else if (!isEmailValid(dados.email.value)) { window.alert("O E-mail parece invalido, favor verificar."); dados.email.focus(); return false; }else if (dados.email.value.length < 1) { window.alert("O campo [ E-mail ] deve ser preenchido."); dados.email.focus(); return false; }else if (dados.msg.value.length < 10) { window.alert("Sua mensagem e muito curta, favor complementar."); dados.msg.focus(); return false; } if (confirm('Voce confirma o envio desta mensagem?')) { document.getElementById('menvia').innerHTML = 'Aguarde...'; }else { return false; } }else if (pag == 3) { var servico2 = ''; for (var x = 0; x < dados.servico.length; x++) { if (dados.servico[x].checked) { servico2 += dados.servico[x].value + ';'; } } if (dados.nome.value.length < 1) { window.alert("O campo [ Nome ] deve ser preenchido."); dados.nome.focus(); return false; }else if (!isEmailValid(dados.email.value)) { window.alert("O E-mail parece inválido, favor verificar."); dados.email.focus(); return false; }else if (dados.email.value.length < 1) { window.alert("O campo [ E-mail ] deve ser preenchido."); dados.email.focus(); return false; } if (confirm(acentuacao('Você confirma o envio destas Informações?'))) { document.getElementById('menvia').innerHTML = 'Aguarde...'; }else { return false; } }else if (pag == 4) { if (dados.nome.value.length < 1) { window.alert("O campo [ Nome ] deve ser preenchido."); dados.nome.focus(); return false; }else if (!isEmailValid(dados.email.value)) { window.alert("O E-mail parece invalido, favor verificar."); dados.email.focus(); return false; }else if (dados.email.value.length < 1) { window.alert("O campo [ E-mail ] deve ser preenchido."); dados.email.focus(); return false; }else if (dados.msg.value.length < 10) { window.alert("Sua mensagem e muito curta, favor complementar."); dados.msg.focus(); return false; } if (confirm('Voce confirma o envio desta mensagem?')) { document.getElementById('menvia').innerHTML = 'Aguarde...'; }else { return false; } } if (pag == 3) { var dados1 = 'opx=5&pag=' + pag + '&nump=' + nump + '&' + getFormValues(dados) + '&servico2=' + escape(servico2); }else { var dados1 = "opx=5&pag=" + pag + "&nump=" + nump + "&" + getFormValues(dados); } var oXMLHttp = objXMLHttp(); oXMLHttp.open("POST","my_controle.php", true); oXMLHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); oXMLHttp.onreadystatechange = function() { if (oXMLHttp.readyState == 4) { if (oXMLHttp.status == 200) { if (pag == 1) { document.getElementById('mload').innerHTML = ''; document.fsenha.nome.value = ''; document.fsenha.email.value = ''; }else if (pag == 2) { alert(acentuacao(oXMLHttp.responseText)); document.getElementById('conteudo').innerHTML = '
'; }else if (pag == 3) { alert(acentuacao(oXMLHttp.responseText)); document.getElementById('conteudo').innerHTML = '
'; } if ((pag != 2) && (pag != 3)) { alert(oXMLHttp.responseText); } $('html,body').animate({scrollTop: $('#topo').offset().top}, 1000); }else { alert("Ocorreu um Erro" + oXMLHttp.statusText); } } }; oXMLHttp.send(dados1); return dados; } function abre(pag, item, nump, msg) { if (document.getElementById(msg) == null) { msg = 'conteudo'; } document.getElementById(msg).innerHTML = '

 


Processando Solicitações...
Caso a página demore muito para carregar clique aqui

 

'; var dados = "opx=4&pag=" + pag + "&item=" + item + "&nump=" + nump + "&msg=" + msg; var oXMLHttp = objXMLHttp(); oXMLHttp.open("POST","my_controle.php", true); oXMLHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); oXMLHttp.onreadystatechange = function() { if (oXMLHttp.readyState == 4) { if (oXMLHttp.status == 200) { document.getElementById(msg).innerHTML = oXMLHttp.responseText; if ((pag == 10)) { $.ajax({ url: "http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4fcd323364cd71fc", dataType: 'script', success: function(){ ReinitializeAddThis(1); } }); }else if ((pag == 1) || (pag == 2) || (pag == 3) || (pag == 4)) { $.ajax({ url: "http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4fcd323364cd71fc", dataType: 'script', success: function(){ ReinitializeAddThis(2); } }); } $('html,body').animate({scrollTop: $('#menusup').offset().top}, 1000); if ((pag == 1) || (pag == 1)) { //comentario(3); }else if (pag == 4) { //comentario(4); }else if ((pag == 3) || (pag == 6)) { if (msg == '') { document.getElementById('mapContent').style.display = "none"; }else { getLatLong({ endereco: msg, zoom: 15, dom: 'mapContent' }); } } $(".mfoto1").colorbox({rel:'mfoto1', slideshow:true}); Shadowbox.clearCache(); Shadowbox.setup(); }else { alert("Ocorreu um Erro" + oXMLHttp.statusText); } } } oXMLHttp.send(dados); return false; } function downloadfile(pag, nump, idr) { var c = 'download.php?pag=' + pag + '&nump=' + nump + '&idr=' + idr; window.open(c,'_blank'); } function verifica_proposta(dados, nump) { if (dados.nome.value.length < 1) { window.alert("O campo [ Nome ] deve ser preenchido."); dados.nome.focus(); return false; }else if (!isEmailValid(dados.email.value)) { window.alert("O E-mail parece invalido, favor verificar."); dados.email.focus(); return false; }else if (dados.cidade.value.length < 1) { window.alert("O campo [ Cidade ] deve ser preenchido."); dados.cidade.focus(); return false; }else { var dados1 = "opx=5&pag=6&nump=" + nump + "&" + getFormValues(dados); var passa = 0; if (confirm ("Confirma o envio desta mensagem?")) { passa = 1; } if (passa == 1) { document.getElementById('envia').innerHTML = '

Processando Solicitação, Aguarde...
'; var oXMLHttp = objXMLHttp(); oXMLHttp.open("POST","my_controle.php", true); oXMLHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); oXMLHttp.onreadystatechange = function() { if (oXMLHttp.readyState == 4) { if (oXMLHttp.status == 200) { alert(acentuacao(oXMLHttp.responseText)); fechar(1,'promo'); }else { alert("Ocorreu um Erro" + oXMLHttp.statusText); } } } oXMLHttp.send(dados1); return false; } } }; function abremapa(pag, item, nump, msg) { document.getElementById('mmapa').innerHTML = '

 


Processando Solicitações...
'; var dados = "opx=2&pag=" + pag + "&item=" + item + "&nump=" + nump; var oXMLHttp = objXMLHttp(); oXMLHttp.open("POST","my_controle.php", true); oXMLHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); oXMLHttp.onreadystatechange = function() { if (oXMLHttp.readyState == 4) { if (oXMLHttp.status == 200) { if (msg == '') { document.getElementById('mmapa').style.display = "none"; }else { document.getElementById('mmapa').innerHTML = ''; getLatLong({ endereco: msg, zoom: 15, dom: 'mapContent' }); } }else { alert("Ocorreu um Erro" + oXMLHttp.statusText); } } } oXMLHttp.send(dados); return false; } function abremapa2(pag, item, nump, msg) { document.getElementById('mmapa' + item).innerHTML = '

 


Processando Solicitação...
'; var dados = "opx=2&pag=" + pag + "&item=" + item + "&nump=" + nump; var oXMLHttp = objXMLHttp(); oXMLHttp.open("POST","my_controle.php", true); oXMLHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); oXMLHttp.onreadystatechange = function() { if (oXMLHttp.readyState == 4) { if (oXMLHttp.status == 200) { if (msg == '') { document.getElementById('mmapa' + item).style.display = "none"; }else { document.getElementById('mapContent' + item).style.display = "block"; document.getElementById('mmapa' + item).innerHTML = ''; getLatLong({ endereco: msg, zoom: 15, dom: 'mapContent' + item }); } }else { alert("Ocorreu um Erro" + oXMLHttp.statusText); } } } oXMLHttp.send(dados); return false; } function listagem(pag, qtd, nump, pes, item) { if (document.getElementById('promo') != null) { document.getElementById('promo').innerHTML = ''; } document.getElementById('navega').innerHTML = '

 


Processando Solicitações...
Caso a página demore muito para carregar clique aqui

 

'; var dados = "opx=3&pag=" + pag + "&qtd=" + qtd + "&nump=" + nump + "&pes=" + escape(pes) + "&item=" + item; var oXMLHttp = objXMLHttp(); oXMLHttp.open("POST","my_controle.php", true); oXMLHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); oXMLHttp.onreadystatechange = function() { if (oXMLHttp.readyState == 4) { if (oXMLHttp.status == 200) { document.getElementById('navega').innerHTML = oXMLHttp.responseText; if (document.getElementById("abreidi") != null) { document.getElementById('abreidi').innerHTML = ''; } $('.boxgrid.caption').hover(function(){ $(".cover", this).stop().animate({top:'130px'},{queue:false,duration:160}); }, function() { $(".cover", this).stop().animate({top:'190px'},{queue:false,duration:160}); }); $('html,body').animate({scrollTop: $('#menusup').offset().top}, 1000); }else { alert("Ocorreu um Erro" + oXMLHttp.statusText); } } }; oXMLHttp.send(dados); return dados; }; function getLatLong($opcao) { var $geo = new google.maps.Geocoder(); $geo.geocode({ address: $opcao.endereco }, function($resultado, $status){ if($status == google.maps.GeocoderStatus.OK) { // Criamos nossas latitude e longitude var $coords = $resultado[0].geometry.location; // Opcoes do mapa var $opcoes = { zoom: $opcao.zoom, center: $coords, mapTypeId: google.maps.MapTypeId.ROADMAP } // Criamos o mapa var $mapDom = document.getElementById($opcao.dom); var $map = new google.maps.Map($mapDom, $opcoes); // Adicionamos o "marker" aquele ponto vermelho var $mark = new google.maps.Marker({ position: $coords, map: $map }); } }); } function fpesquisa(dados, nump, op) { if (op == 0) { if (dados.pesquisa.value.length < 1) { window.alert("Informe o que deseja Pesquisar."); dados.pesquisa.focus(); return false; } pagina(5, 0, 0, nump, 0, dados.pesquisa.value, ''); document.searchform.pesquisa.value = ''; }else if (op == 1) { pagina(5, 0, 0, nump, op, dados, ''); } } function fechar(pag, nome) { if (pag == 1) { if (document.getElementById(nome) == null) { document.getElementById('conteudo').innerHTML = '
'; }else { if (nome == 'conteudo') { document.getElementById('conteudo').innerHTML = '
'; }else { document.getElementById(nome).innerHTML = ''; } } $('html,body').animate({scrollTop: $('#topo').offset().top}, 1000); }else if (pag == 0) { document.getElementById('conteudo').innerHTML = '
'; $('html,body').animate({scrollTop: $('#topo').offset().top}, 1000); }else if (pag == 2) { document.getElementById(nome).innerHTML = ''; } } function VerificaCPF(cpf) { if (vercpf(cpf)) { return true; }else { return false; } } function vercpf (cpf) { cpf = cpf.replace('.',''); cpf = cpf.replace('.',''); cpf = cpf.replace('.',''); cpf = cpf.replace('-',''); if (cpf.length != 11 || cpf == "00000000000" || cpf == "11111111111" || cpf == "22222222222" || cpf == "33333333333" || cpf == "44444444444" || cpf == "55555555555" || cpf == "66666666666" || cpf == "77777777777" || cpf == "88888888888" || cpf == "99999999999") return false; add = 0; for (i=0; i < 9; i ++) add += parseInt(cpf.charAt(i)) * (10 - i); rev = 11 - (add % 11); if (rev == 10 || rev == 11) rev = 0; if (rev != parseInt(cpf.charAt(9))) return false; add = 0; for (i = 0; i < 10; i ++) add += parseInt(cpf.charAt(i)) * (11 - i); rev = 11 - (add % 11); if (rev == 10 || rev == 11) rev = 0; if (rev != parseInt(cpf.charAt(10))) return false; return true; } function SomenteNumeros(e){ var tecla=(window.event)?event.keyCode:e.which; if((tecla > 47 && tecla < 58)) return true; else{ if (tecla != 8) return false; else return true; } } function SomenteLetras(e){ var tecla=(window.event)?event.keyCode:e.which; if((tecla > 65 && tecla < 90)||(tecla > 97 && tecla < 122)) return true; else{ if (tecla != 8) return false; else return true; } } function SomenteLetrasNumeros(e){ var tecla=(window.event)?event.keyCode:e.which; if((tecla >= 97 && tecla <= 122) || (tecla > 47 && tecla < 58)) return true; else{ if (tecla != 8) return false; else return true; } } function getFormValues(fobj){ var str=''; var str1 = ''; for (var i=0;i< fobj.elements.length;i++){ //alert(fobj.elements[i].type + '-' + fobj.elements[i].name); if (fobj.elements[i].type != 'submit') { if (fobj.elements[i].type == 'checkbox') { if (fobj.elements[i].checked == true) { str1 = escape(fobj.elements[i].value); str1 = str1.replace(/\%27/g, ''); str1 = str1.replace(/\%22/g, ''); str+=fobj.elements[i].name+'='+ str1 +'&'; }else { //str+=fobj.elements[i].name+'=&'; } }else { if (fobj.elements[i].name != '') { str1 = escape(fobj.elements[i].value); str1 = str1.replace(/\%27/g, ''); str1 = str1.replace(/\%22/g, ''); str+=fobj.elements[i].name+'='+ str1 +'&'; } } } } str=str.substr(0,(str.length-1)); return str; } function expande(pag, largura, altura) { document.getElementById('exp' + pag).style.clip = 'rect(0px ' + largura + 'px ' + altura + 'px 0px)'; } function ativa_imagem(idb, img) { if (document.getElementById('b' + idb) != null) { document['b' + idb].src = img; } } function retrai(pag, largura, altura) { if (pag == 0) { if (document.getElementById('exp1') != null) { document.getElementById('exp1').style.clip = 'rect(0px ' + largura + 'px ' + altura + 'px 0px)'; } if (document.getElementById('exp2') != null) { document.getElementById('exp2').style.clip = 'rect(0px ' + largura + 'px ' + altura + 'px 0px)'; } if (document.getElementById('exp3') != null) { document.getElementById('exp3').style.clip = 'rect(0px ' + largura + 'px ' + altura + 'px 0px)'; } if (document.getElementById('exp4') != null) { document.getElementById('exp4').style.clip = 'rect(0px ' + largura + 'px ' + altura + 'px 0px)'; } if (document.getElementById('exp5') != null) { document.getElementById('exp5').style.clip = 'rect(0px ' + largura + 'px ' + altura + 'px 0px)'; } if (document.getElementById('exp6') != null) { document.getElementById('exp6').style.clip = 'rect(0px ' + largura + 'px ' + altura + 'px 0px)'; } }else { document.getElementById('exp' + pag).style.clip = 'rect(0px ' + largura + 'px ' + altura + 'px 0px)'; } } function expande2(pag, largura, altura) { document.getElementById('exp2' + pag).style.clip = 'rect(0px ' + largura + 'px ' + altura + 'px 0px)'; } function retrai2(pag, largura, altura) { document.getElementById('exp2' + pag).style.clip = 'rect(0px ' + largura + 'px ' + altura + 'px 0px)'; } function verifica_pesquisa(pag, dados, nump) { if (pag == 1) { var n = dados.tipo.value; if((parseFloat(n) == parseInt(n)) && !isNaN(n)) { if (dados.tipo.value == 0) { alert('Aguarde a atualizacao deste site.'); }else { var i = document.fpesquisa1.tipo.selectedIndex; abre(1,dados.tipo.value, nump, 'promo'); } } else { window.open(dados.tipo.value, '_blank'); }; } } $(document).ready(function(){ // }); function countChars(form) { var text1 = form.obs.value form.totalChars.value = text1.length form.msg_total.value = text1 form.totalCounter.value = 600 - text1.length; if (form.totalCounter.value <= 0) { alert ("Sua Mensagem nao pode ter mais de 600 caracteres.\nPor favor, verifique o que pode ser removido.") } }