// JavaScript Document

function erase(com_id){
	if (confirm ("Veux-tu vraiment effacer ton commentaire?")){
	  var url = '../phpScripts/commentsEdit.php';
 	  var myAjax = new Ajax.Request(
      url,
      {
        method: 'get',
        parameters: {command: "delete",
					 id:com_id},
        onComplete: erase_result
      });
	}
}

function erase_result(data){
	//alert(data.responseText);
	window.location.reload();
}

function modify(com_id){
	open("../commentaires/modifyCritique.php?id="+com_id, "com_edit", "width=350, height=230");
}
