var sub_op;
function send_data(){
data = "email="+sub.email.value;
send_info (data);
}
function send_data1(){
data = "email="+subun.email.value+"&sub="+sub_op;
send_info (data);
}
function send_info (data) {
		document.getElementById("ajax-loader").style.display = 'inline';
var http = false; 
 
if(window.XMLHttpRequest){
 http = new XMLHttpRequest();
  } else if(window.ActiveXObject){
http = new ActiveXObject("Microsoft.XMLHTTP");
  } else {
      return;
  }
 
http.open("POST", '/email_send/sub.php', true);
 

http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

 
http.onreadystatechange = function() {//Call a function when the state changes.
	if(http.readyState == 4 && http.status == 200) {
		document.getElementById("response-output").innerHTML = http.responseText;
		document.getElementById("ajax-loader").style.display = 'none';
	}
}

http.send(data);
}
