
function sendSMS()
{

//Getting the XMLHTTPRequest object
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  
  
  
//Setting up the calling back functionality of the XMLHTTPRequest 
xmlhttp.onreadystatechange=function()
  {
  if ((xmlhttp.readyState==4))
    {
    //Displaying the response from the server
    document.getElementById('sendingSMS').style.display='none';
    document.getElementById('sendingSMSResponse').style.display='block';
    document.getElementById('responseContainer').innerHTML=xmlhttp.responseText;
    }
  }



//Displaying the progress indication
document.getElementById('inputNumber').style.display='none';
document.getElementById('sendingSMS').style.display='block';

//Sending the HTTPRequest
var challengeField=document.getElementById("recaptcha_challenge_field");
var responseField=document.getElementById("recaptcha_response_field");
var mobno=document.getElementById("mobno");
var randomValue=Math.floor((Math.random()*1000));
xmlhttp.open("GET","sendSMS.php?mobno=" + mobno.value + "&recaptcha_challenge_field=" + challengeField.value + "&recaptcha_response_field=" + responseField.value + "&rand=" + Math.random(),true);
xmlhttp.send();
}

