// JavaScript Document
var xmlHttp

function showSMSForm()					//From site SMS3
{ 
	xmlHttp = GetXmlHttpObject();
	if (xmlHttp == null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	
	var url="sendSMS.asp";
	xmlHttp.onreadystatechange = stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4){ 		
		document.getElementById("smsSend").innerHTML = xmlHttp.responseText;
	}
}

function updateSendStatistic(value,c1)					
{ 
	xmlHttp = GetXmlHttpObject();
	if (xmlHttp == null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	
	status1 = value
	country = c1
	var url = "ajax/sendStatistics.asp"
		url = url + "?status=" + status1;
		url = url + "&country=" + country;
	xmlHttp.onreadystatechange = stateChanged2;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChanged2() 
{ 	
	if (xmlHttp.readyState == 4){ 		
		if (xmlHttp.status == 200){ 		
			document.getElementById("statisticSend").innerHTML = xmlHttp.responseText;			
		}
	}
}

function GetXmlHttpObject(){
	var xmlHttp = null;
	try
	  {
	  // Firefox, Opera 8.0+, Safari
	  xmlHttp = new XMLHttpRequest();
	  }
	catch (e)
	  {
	  // Internet Explorer
	  try
	    {
	    xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	    }
	  catch (e)
	    {
	    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	    }
	  }
	return xmlHttp;
}





















