
/////////////////////////////////////////////
// e-mail-results.js
// Copyright 2006, 1995 Sustainable By Design
/////////////////////////////////////////////


	/////////////////////////////////////////////////////////
	//
	//  FUNCTION:  ShowMailingListForm
	//
	/////////////////////////////////////////////////////////
	
 		function ShowMailingListForm () {
 		
 			ShowDiv ('mailingListForm');
 		}
 		
 		
 
	/////////////////////////////////////////////////////////
	//
	//  FUNCTION:  JoinMailingList
	//
	/////////////////////////////////////////////////////////
	
		function JoinMailingList () {

		// ---------------------------------------------
		// get e-mail address
		// ---------------------------------------------
 
			var f = document.theMailingListForm;

			var eMail = Trim (f.eMail.value);
			
		// ---------------------------------------------
		// validate e-mail address
		// ---------------------------------------------
 			
			if (Validate_Email_Address (eMail)) {
				
				var processingScript = "/scripts/join_mailing_list.php3";
				
				var ajaxRequestString = processingScript + "?eMail=" + escape (eMail);
	
				AJAX_Make_Request (ajaxRequestString);
			}

		// ---------------------------------------------
		// if bad e-mail address
		// ---------------------------------------------
 			
			else {
			
				alert ("Please enter a valid e-mail address before clicking the 'JOIN' button");
			}
		}
		
