function bgpost(uri,params) {
var xmlHttpReq = false;
var self = this;

	if (window.XMLHttpRequest) {
	self.xmlHttpReq = new XMLHttpRequest();
	}
			
	else if (window.ActiveXObject) {
	self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	
self.xmlHttpReq.open('POST', uri, false);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.send(params);
return self.xmlHttpReq.responseText;
}

function subscribe() {
var email = document.getElementById('subbox').value;
var data = bgpost('sub.php','mail='+email);
alert(data);
}
