var http;
var subs = "false";

function ajaxSendBBApp(emailadd, subscribe, bbtype){
var URL = "sendbbapp.php";

if (subscribe) subs="true";

http = null;
params = "addy="+emailadd+"&bbtype="+bbtype+"&subs="+subs;
        if (window.XMLHttpRequest) {
                http=new XMLHttpRequest();
        }
        else if (window.ActiveXObject) {
                http=new ActiveXObject("Microsoft.XMLHTTP");
        }
    else {
                alert("Your browser does not support XMLHTTP.");
        }

if (http != null) {
	http.open("GET", URL+'?'+params, true);
	http.onreadystatechange = popupSent;
	http.send(null);
}
}

function popupSent() {
        if (http.readyState == 4 && http.status == 200) { // readyState, see below
                // seed = (xmlhttp.responseText);
		//seed = (xmlhttp.responseText);
		//document.getElementById('seed').value = seed;
			alert ('Thank you!\nThe download link has been sent to your e-mail at '+ document.getElementById('dlemail').value +'.\nPlease check your junk email folder if you do not find it in your inbox.\n\nOur monthly newsletter, if you signed up, will also be sent to the e-mail you gave us.');
			document.getElementById('dlemail').value = '';
        }
}

