function showPopup(id) 
{
	var popup = document.getElementById(id);
    popup.style.display = 'block';
}

function hidePopup(id) 
{
	var popup = document.getElementById(id);
    popup.style.display = 'none';
}

function onlyNumbers(evt)
{
	var e = event || evt; // for trans-browser compatibility
	var charCode = e.which || e.keyCode;

	if (charCode > 31 && (charCode < 48 || charCode > 57))
		return false;

	return true;

}

function sendSMS()
{
	var mobile=document.forms["mobile"].value;
	var bank=document.forms["bank"].value;
	
	if(mobile!='')
	{
		if((mobile.length)==10)
		{
			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(xmlhttp.responseText);	
					window.location = "index.php"	
				}
			}
			xmlhttp.open("GET","send_sms.php?mobile="+mobile+"&bank="+bank,true);
			xmlhttp.send();
			document.forms["mobile"].value='';
		}
		else
		alert("Please enter 10 digit mobile number.");
	}
	else
	alert("Please enter mobile number.")
}


