function objetoAjax(){
	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 ComentarioNuevo(form){
	divResultado = document.getElementById('div_form_comentario');
	
	id_nota			= form.com_id_nota.value;
	nombre			= form.com_nombre.value;
	email			= form.com_email.value;
	if( form.com_publicaremail.checked ){ publicar_email=1 }else{ publicar_email=0 }
	comentario		= form.com_comentario.value;
	
	ajax=objetoAjax();
	ajax.open("GET", "includes/comentarios_nuevo.php?id_nota="+id_nota+"&nombre="+nombre+"&email="+email+"&publicar_email="+publicar_email+"&comentario="+comentario);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			divResultado.innerHTML = ajax.responseText;
		}
	}
	ajax.send(null);
}