// JavaScript Document

function mailingFocus(el){
	
	if(el.value == "email address"){
		
		el.value = '';
	}
}

function mailingBlur(el){
	
	if(el.value == ""){
		
		el.value = 'email address';	
	}
	
}

function submitMailingList(theForm){
	
	if(theForm.mailinglist_email.value == "" || theForm.mailinglist_email.value == "email address"){
		
		alert("Please enter an e-mail address.");
		return false;
			
	}

	sendMailingList(theForm.mailinglist_email.value);
	
	return true;
}

var http = getHTTPObject();

function useHttpResponseMailingList() {
  
	if (http.readyState == 4) {
    	document.getElementById("mailinglistcell").innerHTML=http.responseText;
  	}
}

function sendMailingList(email) {

  var myurl = "/mailinglist_go.php";
  
  http.open("GET", myurl + "?formgo=add&email=" + escape(email), true);
  http.onreadystatechange = useHttpResponseMailingList;
  http.send(null);

}