function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

var url;
function abre(url) {
	window.open(url,'comentarios','width='+317+',height='+485+',directories=0,location=0,menubar=0,resizable=1,scrollbars='+1+',status=0,toolbar=0,marginleft=0,margintop=0,left=25,top=25');
}

function Checker(fd) {
(fd.value.length>1000) ? fd.value=fd.value.substring(0,1000) : document.getElementById('sobra').childNodes[0].data=(1000-fd.value.length);
}

function Checker2(fd) {
(fd.value.length>500) ? fd.value=fd.value.substring(0,500) : document.getElementById('sobra2').childNodes[0].data=(500-fd.value.length);
}

function muda(id) {
  var ajax;
  try {
    // Firefox, Opera 8.0+, Safari
    ajax = new XMLHttpRequest();
  } catch (e) {
      // Internet Explorer
      try {
        ajax = new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
        try {
          ajax = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {
          alert("Seu browser não dar suporte ao AJAX!");
          return false;
        }
      }
  }

  // Processa requisição ajax
  ajax.onreadystatechange=function() {
    if(ajax.readyState == 4) {
      document.getElementById('minhadiv').innerHTML = ajax.responseText;
   }
  }
  ajax.open('POST', './palavrasdoleitor.php?id=' + id, true);
  ajax.send(null);
}

function mudap(id) {
  var ajax;
  try {
    // Firefox, Opera 8.0+, Safari
    ajax = new XMLHttpRequest();
  } catch (e) {
      // Internet Explorer
      try {
        ajax = new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
        try {
          ajax = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {
          alert("Seu browser não dar suporte ao AJAX!");
          return false;
        }
      }
  }

  // Processa requisição ajax
  ajax.onreadystatechange=function() {
    if(ajax.readyState == 4) {
      document.getElementById('minhadiv2').innerHTML = ajax.responseText;
   }
  }
  ajax.open('POST', './pararefletir.php?id=' + id, true);
  ajax.send(null);
}

   // Quando o documento for lido
   $(document).ready(function() {
       // quando o formulário for submetido
       $("#fcontato").submit(function() {
           // Aqui exibimos um texto na div #resposta assim que a requisição é iniciada
           $(this).ajaxStart(function() {
               $("#resposta").html("<font face='Trebuchet MS' color='#000000' style='font-size: 9pt'><br>processando...<br><br></font>").show();
           });
           // opções a serem enviadas pela função
           var options = {
               target: "#resposta", // destino: onde será exibida a resposta da página requisitada, no caso a div #resposta
               url: "./fpalavrasdoleitor.php", // aqui a página que será requisitada
               type: "post", // metodo de envio, post ou get
               // caso a função tenha sucesso
               success: function(resposta) {
                   // mostra a resposta na div resposta e exibe a div
                   $("#resposta").html(resposta).show();
               }
           }
          
           // aqui eu envio os dados com as opções
           $(this).ajaxSubmit(options);
           // isso é para que o formulário não envio os dados, pois os mesmos serão enviados por ajax
           return false;
       });
   });