	var urlstorephone = "check_availability_storephone.php?param="; 
	var http_phone = getHTTPObjectPhoneVal();	
	function check_storephone()
	{	
		
		if(!isWhitespace(document.getElementById("store_phone").value) == true)
		{			
			/* Print the message to use while checking the database: */
			document.getElementById("checkedstorephone").innerHTML = "Checking..."; 
			/* We\'re assuming your username input ID is "username" */ 
			var name = document.getElementById("store_phone").value;			 
			http_phone.open("GET", urlstorephone + escape(name), true);
			http_phone.onreadystatechange = handleHttpResponsePhoneVal; 
			http_phone.send(null); 
		}
	}
	
	
	 
	function handleHttpResponsePhoneVal() 
	{ 
		if (http_phone.readyState == 4 || http_phone.readyState=="complete") 
		{ 
			results = http_phone.responseText; 
			/* Again, we\'re assuming your email  input ID is "email" */
			var name = document.getElementById("store_phone").value;
			/* If the username is available, Print this message: */ 
			if(results == "") 
			results = "<font color=\'#d65400\'><i>"+name+"</i> Is Available!</font>";
			document.getElementById("checkedstorephone").innerHTML = results; 
			var filename = results;
			var filelength = parseInt(results.length) - 14;
			var fileext = filename.substring(filelength,filelength + 14);
			if (fileext.toLowerCase() == "taken!<strong>")
			{
				//alert ("Select Another Username ");
				document.getElementById("store_phone").value = "";
				document.getElementById("store_phone").focus();
				return false;
			}
		}
	 }
	
	function getHTTPObjectPhoneVal()
	{
		var xmlHttps=null;
		try
		{
			// Firefox, Opera 8.0+, Safari
			xmlHttps=new XMLHttpRequest();
		}
		catch (e)
		{
			// Internet Explorer
			try
			{
				xmlHttps=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				xmlHttps=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		return xmlHttps; 
	} 	
