function ValidateEmail(email)
{
  var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
  if(email.length < 2) return false;
  if(reg.test(email) == false) return false;
  return true;
}

function isValidDate(day, month, year)
{
  var dteDate;
  dteDate = new Date(year,month,day);
  return ((day==dteDate.getDate()) && (month==dteDate.getMonth()) && (year==dteDate.getFullYear()));
}

function PleaseLogin(context)
{
  if(context == "add_favorites") alert('You must be logged in to enable the "Add to favorites" functionality!');
}
