/* Standard Javascript library */

function val_login()
{
  if (document.login.login.value=="")
  {
    alert("Please enter your username and try again.");
    document.login.login.focus();
    return false;
  }
  if (document.login.pass.value=="")
  {
    alert("Please enter your password and try again.");
    document.login.pass.focus();
    return false;
  }
}

function val_newsletter()
{
  if (document.ezine.email.value=="")
  {
    alert("You have not entered an email address. Please check the details you have entered and try again.");
    document.ezine.email.focus();
    return false;
  }
  if (document.ezine.email.value.indexOf("@")==-1)
  {
    alert("The email address you entered does not appear to be valid (expected @). Please check the details you have entered and try again.");
    document.ezine.email.focus();
    return false;
  }
  if (document.ezine.email.value.indexOf(".")==-1)
  {
    alert("The email address you entered does not appear to be valid (expected .com etc). Please check the details you have entered and try again.");
    document.ezine.email.focus();
    return false;
  }
}

function val_std()
{
  if (document.std.std.value=="")
  {
    alert("Please enter a UK dialling code and try again.");
    document.std.std.focus();
    return false;
  }
}

function getpage(url)
{
  var new_location=url.options[url.selectedIndex].value
  if (new_location!="")
  {
    top.location.href=new_location
  }
}
