<!--
if (document.images)
{
  owner_buttonon = new Image();
  owner_buttonon.src = "images/xowner_button_on.gif";
  
  owner_buttonoff = new Image();
  owner_buttonoff.src = "images/xowner_button_off.gif";
}

function imgOn(imgName)
{
  if (document.images)
  {
    document[imgName].src = eval(imgName + "on.src");
  }
}

function imgOff(imgName)
{
  if (document.images)
  {
    document[imgName].src = eval(imgName + "off.src");
  }
}

function check_email(e) {
ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

for(i=0; i < e.length ;i++){
if(ok.indexOf(e.charAt(i))<0){ 
return (false);
}	
} 

if (document.images) {
re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
if (!e.match(re) && e.match(re_two)) {
return (-1);		
} 

}

}


function FrontPage_Form1_Validator(theForm)
{

  if (theForm.lastname.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.lastname.focus();
    return (false);
  }

  if (theForm.companyname.value == "")
  {
    alert("Please enter a value for the \"Company Name\" field.");
    theForm.companyname.focus();
    return (false);
  }

  if (theForm.companyname.value.length > 60)
  {
    alert("Please enter at most 60 characters in the \"Company Name\" field.");
    theForm.companyname.focus();
    return (false);
  }

  if (theForm.address1.value == "")
  {
    alert("Please enter a value for the \"Address Line 1\" field.");
    theForm.address1.focus();
    return (false);
  }

  if (theForm.address1.value.length > 80)
  {
    alert("Please enter at most 80 characters in the \"Address Line 1\" field.");
    theForm.address1.focus();
    return (false);
  }

  if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.city.focus();
    return (false);
  }

  if (theForm.city.value.length > 40)
  {
    alert("Please enter at most 40 characters in the \"City\" field.");
    theForm.city.focus();
    return (false);
  }

  if (theForm.postcode.value == "")
  {
    alert("Please enter a value for the \"Postcode\" field.");
    theForm.postcode.focus();
    return (false);
  }

  if (theForm.postcode.value.length > 10)
  {
    alert("Please enter at most 10 characters in the \"Postcode\" field.");
    theForm.postcode.focus();
    return (false);
  }

  if (theForm.phone.value == "")
  {
    alert("Please enter a value for the \"Telephone No.\" field.");
    theForm.phone.focus();
    return (false);
  }

  if (theForm.phone.value.length > 30)
  {
    alert("Please enter at most 30 characters in the \"Telephone No.\" field.");
    theForm.phone.focus();
    return (false);
  }

  var checkOK = "0123456789- \t\r\n\f";
  var checkStr = theForm.phone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit and whitespace characters in the \"Telephone No.\" field.");
    theForm.phone.focus();
    return (false);
  }

  var checkOK = "0123456789- \t\r\n\f";
  var checkStr = theForm.fax.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit and whitespace characters in the \"fax\" field.");
    theForm.fax.focus();
    return (false);
  }

  if (theForm.youremail.value == "")
  {
    alert("Please enter a value for the \"Email address\" field.");
    theForm.youremail.focus();
    return (false);
  }
  if (!check_email(theForm.youremail.value))
  {
    alert("Please enter a valid email address in the \"Email address\" field.");
    theForm.youremail.focus();
    return (false);
  }
  if (theForm.youremail.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Email address\" field.");
    theForm.youremail.focus();
    return (false);
  }
  return (true);
}
-->