/* JavaScript Document
 function to find page userAction.php and return results
 uPasswordNew = Update new password
 rPasswordNew = Register new password 

 Only working in IE
 var new_password1	= document.form.document.getElementById(type).value;
*/
function checkPassword(url,type)
{
req = null;
	if(type == "uPasswordNew"){
		var password	= document.form.new_password1.value;
	}
	if(type == "rPasswordNew"){
		var password	= document.form.password1.value;
	}
		var url 		= url+password


// Find objetives (Mozilla/Safari)
if (window.XMLHttpRequest) {
	req = new XMLHttpRequest();
	req.onreadystatechange = processReqChange;
	req.open("GET",url,true);
	req.send(null);
// Find objetives ActiveX (IE)
 } else if (window.ActiveXObject) {
	req = new ActiveXObject("Microsoft.XMLHTTP");
  if (req) {
	req.onreadystatechange = processReqChange;
	req.open("GET",url,true);
	req.send();
  }
 }
}

function processReqChange()
{
// just when complete process
if (req.readyState == 4) {
// just when return "OK"
if (req.status ==200) {
// find div id="strength" and input value
 document.getElementById('strength').innerHTML = req.responseText;
  } else {
  alert("You have one problem:n" + req.statusText);
  }
 }
}