
function check_email()
{
	if (document.getElementById("shopper_email").value.indexOf("@")=="-1")
	{
		alert("Please enter a valid email address and try again.");
		return false;
	}
	else
	{
		return true;
	}
}

function email_signup()
{
	if (user_email == "") {
		document.write("<form name=\"surveynew\" method=\"POST\" action=\"" + i_jscript_uu_rootURL + "shopper_new.asp\">");
		document.write("<input type=\"hidden\" name=shopper_country value=\"USA\">");
		document.write("<input type=\"hidden\" name=\"Validate\" value=\"1\">");
	} else {
		var AUTO_email = user_email.substring(0,user_email.lastIndexOf("_"));
		if (AUTO_email=="AUTO"){
			document.write("<form name=\"surveynew\" method=\"POST\" action=\"" + i_jscript_uu_rootURL + "shopper_new.asp\">");
			document.write("<input type=\"hidden\" name=shopper_country value=\"USA\">");
			document.write("<input type=\"hidden\" name=\"Validate\" value=\"1\">");
		}else{
			document.write("<form name=\"surveynew\" method=\"POST\" action=\"" + i_jscript_uu_rootURL + "shopper_unsubscribe.asp\">");
		}
	}
	document.write("<input type=\"hidden\" name=target value=\"text_1.asp?s_id=0&tx_id=61&\">");
	document.write("<input type=\"hidden\" name=s_id value=\"0\">");
	document.write("<input type=\"hidden\" name=\"shopper_pref_1\" value=\"YES\">");
	document.write("<table cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"size:12px; font-weight:bold;\"><br />Sign up for email updates &amp; promotions!</b></td></tr>");
	document.write("<tr><td style='padding-top:3px;'><table cellpadding=\"0\" cellspacing=\"0\"><tr><td><input class=\"email_signup\" name=\"shopper_email\"  id=\"shopper_email\" value=\"your@email.com\" size=\"15\" onfocus=\"if (focname2 == 0) { this.value=''; focname2=1; }\" onblur=\"if (!this.value) { this.value='your@email.com'; focname2=0; }\" type=\"text\"></td>");
	document.write("<td> <input type=\"image\" src=\"assets/images/home_emailgo.gif\" NAME=\"email\" ID=\"email\" alt=\"Subscribe\" align=\"top\" onclick=\"return(check_email())\"></td></tr></table></td></tr></table>");
	document.write("</form>");
}
