//************************************************************************ ajax functions [start]
function createRequestObject() {
   var req;
   if(window.XMLHttpRequest){
      req = new XMLHttpRequest();
   } else if(window.ActiveXObject) {
      req = new ActiveXObject("Microsoft.XMLHTTP");
   } else {
      alert('noData');
   }
   return req;
}

var http = createRequestObject();

function sendRequestGet(email,country) {
   http.open('get', 'subscribe.php?email='+email+'&country='+country, true);
   http.onreadystatechange = handleResponse;
   http.send(null);
}

function sendRequestGet2(c_name,c_email,c_phone,c_country,theUnit) {
	//alert(c_name+" - "+c_email+" - "+c_phone+" - "+c_country+" - "+theUnit)
   http.open('get','send_mail/send_submition.php?c_name='+c_name+'&c_email='+c_email+'&c_phone='+c_phone+'&c_country='+c_country+'&unit='+theUnit, true);
   http.onreadystatechange = handleResponse;
   http.send(null);
}

function handleResponse() {
   var ajaxTest = document.getElementById("myBody");
   ajaxTest.innerHTML = '.';
   if(http.readyState == 4 && http.status == 200){
      var response = http.responseText;
      if(response) {
         ajaxTest.innerHTML = response;
		 thankyou();
      }
   }
}
//************************************************************************ajax functions [end]
