function deletacomentario(id,fileid){
var pergunta = confirm ("Tem certeza que deseja apagar o comentário ?")
if (pergunta) {
var evento = "newscore.php?&action=deletacomentario&comentario="+id+"&noticiaID="+fileid;
SendEventNoticia('GET', evento);
}else{
//Faz nada
}
}

function editacomentario(id,fileid){

window.location="index.php?s=newscore&action=editacomentario&comentario="+id+"&noticiaID="+fileid+"";

}

function SendEventNoticia(type,event) {

if (window.XMLHttpRequest) {
                xmlhttp = new XMLHttpRequest();
        } else if (window.ActiveXObject) {
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        } else {
            alert("Seu navegador n&atilde;o suporta XMLHttpRequest.");
                return;
        }

  xmlhttp.open(type, event, true);
  xmlhttp.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
  xmlhttp.setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
  xmlhttp.setRequestHeader("Pragma", "no-cache");
  xmlhttp.onreadystatechange = processReqChangeNoticia;
  xmlhttp.send(null);
}

function processReqChangeNoticia() {
    if (xmlhttp.readyState == 4) {
            if (xmlhttp.status == 200) {
                //document.getElementById("texto").innerHTML = xmlhttp.responseText;
                alert(xmlhttp.responseText);
                } else {
                    alert("Problemas ao carregar fonte. Consulte o programador.");
                }
    }
}


