// something to do with Yahoo partnership -- blair
if (document.cookie.indexOf("ref=yahoo") > 0 || document.referrer.indexOf("yahoo.com") > 0 || window.location.search.indexOf("force=yahoo") > 0) {
    $("#yahooPartner").show();
    document.cookie = "ref=yahoo; path=/";
}

function clearForm (id, value) {
   if ($(id).val() == value) {
        $(id).val('');
   };
}

function validateEmail(email) {

    $(".error").hide();

    var hasError = false;
    var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;

    if( (email == '') || (email == 'your email address')) {
        //alert('error!');
        $("#newsLetterBtn").after('<div class="error">You forgot to enter the email address.</span>');
        hasError = true;
    } else if(!emailReg.test(email)) {
        $("#newsLetterBtn").after('<div class="error">Please enter a valid email address</span>');
        hasError = true;
    }
    //alert(hasError);
    return false;
}


