function aboft(){ var xmlhttp=false; try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch(E){ xmlhttp = false; } } if(!xmlhttp && typeof XMLHttpRequest!='undefined'){ xmlhttp = new XMLHttpRequest(); } return xmlhttp; } function cima(d) { if(d.className=="baixo") d.className = "cima"; else d.className = "baixo"; } function acao(id,alt,type) { if(type!=3) { olpop = document.getElementById("pop" + id); } oc = document.getElementById("faq_" + id); if(alt==1) { // transparente if(type!=3) { olpop.style.display="none"; } else { oc.style.display="block"; } } else { // ao if(type!=3) { olpop.style.display="block"; } else { oc.style.display="none"; } } } function limp(){ document.getElementById("resp-contato").style.display="none"; } function enviarForm(field){ var conteudo; conteudo = document.getElementById('resp-contato'); ajax_fc=aboft(); ajax_fc.open('POST', 'ajax/result_contato.php?'+field, true); ajax_fc.setRequestHeader("Cache-Control", "no-cache"); ajax_fc.setRequestHeader("Pragma", "no-cache"); ajax_fc.setRequestHeader("Charset", "ISO-8859-1"); conteudo.innerHTML= '
Enviando...
'; ajax_fc.onreadystatechange=function(){ if(ajax_fc.readyState==1){ }else if(ajax_fc.readyState==4){ if(ajax_fc.status==200){ conteudo.innerHTML = ajax_fc.responseText; location.href="#erro"; }else if(ajax_fc.status==404){ conteudo.innerHTML = "Página não encontrada"; }else{ conteudo.innerHTML = "Error:".ajax_fc.status; } } } ajax_fc.send(field); } function setField() { field = "nome="+encodeURI(document.getElementById('no').value).toUpperCase()+"&email="+encodeURI(document.getElementById('em').value)+"&assunto="+encodeURI(document.getElementById('assunto').value)+"&mensagem="+encodeURI(document.getElementById('mensagem').value)+"&acao="+encodeURI(document.getElementById('enviar').value); }