<!--
var errorMsg = "";

function subscribe() {
			
		var nameisvalid = true;
		errorMsg = "The entry has some errors:\n";
		themail = document.subscribe.email.value;
		check4invChars(themail);
		
		
			if (document.subscribe.first_name.value == "") {
	 			errorMsg += "The First Name field is empty!\n";
	 		}
	 		
	 		if (document.subscribe.last_name.value == "") {
	 			errorMsg += "The Last Name field is empty!\n";
			}
			
			if (themail == "") {
	 			errorMsg += "The Email field is empty!\n";
			}
			
			if (themail.indexOf("@") == -1 || themail.indexOf(".") == -1) {
	 			errorMsg += "The Email doesn't look valid please check it!\n";
			}
			
			if (errorMsg != "The entry has some errors:\n") {
				//alert("gets here");
				alert(errorMsg);
			} else {
				document.subscribe.submit();
			}
	}
	
	function check4invChars(theField) {
		var validchars = "abcdefghijklmnopqrstuvwxyz0123456789-_.@";
		for (var i=0; i < theField.length; i++) {
    		var letter = theField.charAt(i).toLowerCase();
    		if (validchars.indexOf(letter) != -1)
      				continue;
    				errorMsg += "The email field contains invalid character(s) " + letter +"\n";
    				nameisvalid = false;
    				break;
 			 }
	};
//-->
