function enterPromotion(textboxId, resultsDivId, promotionId) {
	
	
    var email = document.getElementById(textboxId);
    
    //alert(email);
    
    if (isValidEmail(email.value)) {
        // Register for promotion
        //alert(".");
        
        $("#" + resultsDivId).load("/scripts/register_for_promotion.asp", "e=" + email.value + "&p=" + promotionId + "&r=" + Math.random());
    }
    else {
        alert("Invalid email address.");
        email.focus();
    }
}

function isValidEmail(val) {
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(val)) {
		return true;
	} else {
		return false;
	}
}