		function DoCallbackComentario(data)
		{
			// branch for native XMLHttpRequest object
			if (window.XMLHttpRequest) {
				comen = new XMLHttpRequest();
				comen.onreadystatechange = processReqChangeComentario;
				comen.open('POST', urlC, true);
				comen.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
				comen.send(data);
			// branch for IE/Windows ActiveX version
			} else if (window.ActiveXObject) {
				comen = new ActiveXObject('Microsoft.XMLHTTP')
				if (req) {
					comen.onreadystatechange = processReqChangeComentario;
					comen.open('POST', urlC, true);
					comen.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
					comen.send(data);
				}
			}
		}

			function processReqChangeComentario() {
				// only if req shows 'loaded'
			
			if(comen.readyState == 1) { 
				
				
			
				document.getElementById('comentario_result').innerHTML = ' <img src="../img/load.gif" border="0" /> Procesando...';
				document.getElementById('btn_registro').disabled = true;
				document.getElementById('btn_registro').value = 'Comentando...';
			
			} else { 
					
			
			if (comen.readyState == 4) {
			document.getElementById('comentario_result').innerHTML = '';
			document.getElementById('btn_registro').disabled = false;
			// only if 'OK'
					
					
					if (comen.status == 200) {
						eval(whatC);
					} else {
						alert('There was a problem retrieving the XML data: ' +
							comen.responseText);
					}
				}
			}
		
		}


 			var urlC = "../function/EnviarComentario.php";
            var whatC = "ComentarioStatus(comen.responseText)";

            function CheckComentario()
            {
                var id_socio = document.getElementById("post_id_socio").value;
				var nombre   = document.getElementById("post_nombre").value;
				var email    = document.getElementById("post_email").value;
                var texto = document.getElementById("post_texto").value;
				var id   = document.getElementById("post_id").value;
				


                DoCallbackComentario("id_socio="+id_socio+"&nombre="+nombre+"&email="+email+"&texto="+texto+"&id="+id);
            }

            function ComentarioStatus(Status)
            {
				
				
				
                if(Status == 0) { 
				
                     document.getElementById('comentario_result').innerHTML = '<div class="comentario_error"> Ups! Debes ingresar todos los datos para postear su comentario. </div>';
					 document.getElementById('btn_registro').value = 'Comentar';

					
				} 
				
				 if(Status == 1) { 
				
                     document.getElementById('comentario_result').innerHTML = '<div class="comentario_error"> E-mail ingresado es inválido. Prueba con nombre@servidor.com </div>';
					 document.getElementById('btn_registro').value = 'Comentar';

					
				} 
				
				 				
				 if(Status == 2) { 
				

							
								//document.getElementById('btn_registro').disabled = true;
								document.getElementById('post_texto').value = '';
								document.getElementById('post_nombre').value = '';
								document.getElementById('post_email').value = '';
							
								var id =  document.getElementById("post_id").value;
								document.getElementById('btn_registro').value = 'Comentar';
							
							
							
						  CargaContenido("function/verComentarios.php?config=yes&id="+id+"","ver_comentarios");

                           CargaContenido("function/verExitoComentario.php","comentarios");
							
							 

							 
							
					
				}
			
			
            }
