function nAjax(){
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 compReg(){
    document.getElementById("cargando").innerHTML   = "<span style='color:#000 !important'>comprobando datos...</span>";
    nombre=document.getElementById("nombre").value;
    pass=document.getElementById("pass1").value;
    pass2=document.getElementById("pass2").value;
	email=document.getElementById("email").value;
	pregunta=document.getElementById("pregunta").value;
	respuesta=document.getElementById("respuesta").value;
	url=document.getElementById("url").value;
 	var params='nombre='+nombre+'&pass='+pass+'&pass2='+pass2+'&email='+email+'&pregunta='+pregunta+'&respuesta='+respuesta;
    ajax=nAjax();
	ajax.open("POST", url,true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4)
		document.getElementById("resultado").innerHTML = ajax.responseText
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajax.send(params)
}
function mostrar(idItem){
    id=document.getElementById(idItem);
	if (id.style.display=='none')
		id.style.display='block';
	else id.style.display='none';
}




