function validateSubmit(s) {
    var emailRegEx = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
    if(s.match(emailRegEx)) {
        document.forms[0].submit();
    }
    else {
        alert("Please enter a valid email address.");
    }
}

function SearchRecipes(recipeurl)
{
    window.location = recipeurl + "?keywords=" + document.getElementById('txtRecipeSearch').value;
}

function submitenter(myfield,e, recipeurl)
{
  var keycode;
  if (window.event) keycode = window.event.keyCode;
  else if (e) keycode = e.which;
  else return true;

  if (keycode == 13)
  {
    window.location = recipeurl + "?keywords=" + document.getElementById('txtRecipeSearch').value;
     return false;
   }
   else
     return true;
}

