submit_btn = new Image();submit_btn.src = site_root + "images/submit.png";submit_btn_over = new Image();submit_btn_over.src = site_root + "images/submit_over.png";btn_done = new Image();btn_done.src = site_root + "images/done.png";btn_done_over = new Image();btn_done_over.src = site_root + "images/done_over.png";var e = null;var f = null;var l = null;function validateEmail() {	e = $F("email");	f = $F("newsletter_first_name");	l = $F("newsletter_last_name");		if (f == "") {		alert("Please enter a first name in the field provided!");		$("newsletter_first_name").focus();	} else if (l == "") {		alert("Please enter a last name in the field provided!");		$("newsletter_last_name").focus();	} else if (e == "") {		alert("Please enter an email address in the field provided!");		$("email").focus();	} else if (e.indexOf("@") == -1 || e.indexOf(".") == -1) {		alert("Please enter a valid email address in the field provided!");		$("email").focus();	} else {		//$('email').disabled = true;		$('busy_div').style.display = "block";				url = site_root + "mailing/box.php";				// NOTE: Form.serialize isn't working correctly in prototype 1.5 (the 'email' field isn't being included), so build the pars string manually; as a side result, we don't need the hidden fields as we can just add the required values as part of the pars variable		//pars = decodeURIComponent(Form.serialize("form_newsletter"));				pars = "field[1]=" + f + "&field[2]=" + l + "&email=" + e + "&funcml=add&p=1&nlbox[1]=1&field[11]=" + $F("subscribed_from");		//prompt("pars:", pars);		var a = new Ajax.Request(			url, 			{				method: "post", 				parameters: pars, 				onComplete: doSalesforce			});	}	return false;}function doSalesforce() {	url = site_root + "salesforce/subscribe.php";		// NOTE: Form.serialize isn't working correctly in prototype 1.5 (the 'email' field isn't being included), so build the pars string manually; as a side result, we don't need the hidden fields as we can just add the required values as part of the pars variable	//pars = decodeURIComponent(Form.serialize("form_newsletter"));		pars = "fname=" + f + "&lname=" + l + "&email=" + e;	//prompt("pars:", pars);	var a = new Ajax.Request(		url, 		{			method: "post", 			parameters: pars, 			onComplete: signedUp		});}function signedUp(result) {	//$("debug").innerHTML = result.responseText;	new Effect.Fade($("signup_container"), { queue: { position: 'end', scope: "transition_signup" }, duration:0.3 } );	new Effect.Appear($("signup_complete_container"), { queue: { position: 'end', scope: "transition_signup" }, duration:0.3 } );	$('busy_div').style.display = "none";}function done() {	//var e = $("email");	//e.disabled = false;	//e.value = "your email address";	$("newsletter_first_name").value = "";	$("newsletter_last_name").value = "";	$("email").value = "";		new Effect.Fade($("signup_complete_container"), { queue: {position: 'end', scope: "transition_signup" }, duration:0.3 } );	new Effect.Appear($("signup_container"), { queue: {position: 'end', scope: "transition_signup" }, duration:0.3 } );}
