// JavaScript Document

function showUser()
{
//alert("");	
var verif_box = document.getElementById('verif_box');
var zipvalid = /^[0-9]+$/;
var usr = "17979";
var pwd= "hanuman123";
var mobilenum = document.getElementById("mobilenum").value;
var sndr = "Ishika";
var johndoe = document.getElementById("johndoe").value;
var randd = document.getElementById("randd").value;


	if(!mobilenum.match(zipvalid))
	{
	alert("Please enter valid contact numbers.");
	document.getElementById("mobilenum").focus();
	return false;
	}
	else if((verif_box.value=="") || (verif_box.value=="Verification code"))
	{
	alert("Please enter Verification code.");
	verif_box.focus();
	return false;
	} else if(verif_box.value!=randd){
	alert("Please enter only correct Verification code!");
	verif_box.focus();
	return false;	
	}

	
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		//alert("");
		document.getElementById("mobilenum").value="";
		//document.getElementById("johndoe").value="";
		document.getElementById('verif_box').style.color="#999999";
		document.getElementById("verif_box").value="Verification code";
		
    document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
	
    }
  }
 
  
 xmlhttp.open("GET","ajax_sms.php?usr="+usr+"&pwd="+pwd+"&mobilenum="+mobilenum+"&sndr="+sndr+"&johndoe="+johndoe+"",true);

xmlhttp.send();
}
