<!--
function isEmpty(s)
{ return ((s == null) || (s.length == 0)); }

function isChar(c)
{ return (((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z"))); }

function isDigit(c)
{ return ((c >= "0") && (c <= "9")); }

function isCharDigit(c)
{ return (isChar(c) || isDigit(c)); }

function isSpace(c)
{ return ((c == "") || (c == " ") || (c == "\b") || (c == "\t")); }

function isDash(c)
{  return (c == "-"); }

function isAtsign(c)
{  return (c == "@"); }

function isPeriod(c)
{  return (c == "."); }

function isUnderLine(c)
{  return (c == "_"); }

function isCharDigitAtsignPeriod(c)
{  return (isChar(c) || isDigit(c) || isAtsign(c) || isUnderLine(c)|| isDash(c)|| isPeriod(c)); }
function isCharDigitDash(c)
{  return (isChar(c) || isDigit(c) ||  isDash(c)); }

function isStrSpace(s)
{
  if(isEmpty(s)) return true;
  for(i=0; i<s.length; i++)
    if(!isSpace(s.charAt(i))) return false;
  return true;
}

function isAlpha(s)
{
  if(isEmpty(s)) return false;
  for(i=0; i<s.length; i++)
    if(!isChar(s.charAt(i))) return false;
  return true;
}

function isAlphaNum(s)
{
  if(isEmpty(s)) return false;
  for(i=0; i<s.length; i++)
    if((!isChar(s.charAt(i))) || (!isDigit(s.charAt(i)))) return false;
  return true;
}

function isEmail(s)
{
  var i, l, atPos, periodPos;
  l = s.length;
  if(l == 1) return false;
  for(i=0; i<l; i++)
    if(!isCharDigitAtsignPeriod(s.charAt(i))) return false;
  
  atPos = s.indexOf("@",1);
  if(atPos == -1) { return false; }
  
  if(s.indexOf("@",atPos+1) > -1) { return false; }
  
  periodPos = s.indexOf(".",atPos);
  if(periodPos == -1) { return false; }

  if(periodPos+3 > l) { return false; }

  return true;
}

function isPassword(s)
{
  var i, l;
  l = s.length;
  if(l < 4) return false;
  for(i=0; i<l; i++)
    if(!isCharDigitAtsignPeriod(s.charAt(i))) return false;
  return true;
}
function isDomainName(s)
{
  var i, l, m;
  l = s.length;
  m = l - 1;
  if(l < 3 || l > 53) return false;
  if(s.charAt(0) == "-") return false;
  if(s.charAt(m) == "-") return false;
  //if(isDigit(s.charAt(0))) return false;
  for(i=0; i<l; i++)
    if(!isCharDigitDash(s.charAt(i))) return false;
  return true;
}

function isGoodDomainName(s)
{
  var i, l, BadName;

BadName = new Array(2)
BadName[0] = "fuck"
BadName[1] = "fuckme"

  for(i=0; i<1; i++)
    if(s == BadName[i]) return false;
  return true;
}
function warning(f,s)
{
  f.focus();
  f.select();
  alert(s);
  return false;
}
function isValid(fm)
{
  var TheFirst, TheLast, TheEmail, ThePassword, TheAddress, TheCity, TheCountry,  ThePhone;
  var TheFirst2, TheLast2, TheEmail2,  TheAddress2, TheCity2, TheCountry2,  ThePhone2;
  var TheFirst3, TheLast3, TheEmail3,  TheAddress3, TheCity3, TheCountry3,  ThePhone3;
  TheFirst = fm.FirstName.value;
  TheLast = fm.LastName.value;
  TheEmail = fm.Email.value;
  TheAddress = fm.Address.value;
  TheCity = fm.City.value;
  ThePhone = fm.Telephone.value;

  if(isStrSpace(TheFirst)) { return warning(fm.FirstName,"Please enter first name"); }
  if(isStrSpace(TheLast)) { return warning(fm.LastName,"Please enter last name"); }
  if(!isEmail(TheEmail)) { return warning(fm.Email,"Invalid email.  Please enter again"); }
  if(isStrSpace(TheAddress)) { return warning(fm.Address,"Please enter your address"); }
  if(isStrSpace(TheCity)) { return warning(fm.City,"Please enter city"); }
  if(isStrSpace(ThePhone)) { return warning(fm.Telephone,"Please enter your phone number"); }
  
  TheFirst2 = fm.FirstName2.value;
  TheLast2 = fm.LastName2.value;
  TheEmail2 = fm.Email2.value;
  TheAddress2 = fm.Address2.value;
  TheCity2 = fm.City2.value;
  ThePhone2 = fm.Telephone2.value;
  if(isStrSpace(TheFirst2)) { return warning(fm.FirstName2,"Please enter first name"); }
  if(isStrSpace(TheLast2)) { return warning(fm.LastName2,"Please enter last name"); }
  if(isStrSpace(TheAddress2)) { return warning(fm.Address2,"Please enter your address"); }
  if(isStrSpace(TheEmail2)) { return warning(fm.Email2,"Please enter your Email address"); }
  if(!isEmail(TheEmail2)) { return warning(fm.Email2,"Invalid email.  Please enter again"); }
  if(isStrSpace(TheCity2)) { return warning(fm.City2,"Please enter city"); }
  if(isStrSpace(ThePhone2)) { return warning(fm.Telephone2,"Please enter your phone number"); }

  TheFirst3 = fm.FirstName3.value;
  TheLast3 = fm.LastName3.value;
  TheEmail3 = fm.Email3.value;
  TheAddress3 = fm.Address3.value;
  TheCity3 = fm.City3.value;
  ThePhone3 = fm.Telephone3.value;
  if(isStrSpace(TheFirst3)) { return warning(fm.FirstName3,"Please enter first name"); }
  if(isStrSpace(TheLast3)) { return warning(fm.LastName3,"Please enter last name"); }
  if(isStrSpace(TheAddress3)) { return warning(fm.Address3,"Please enter your address"); }
  if(isStrSpace(TheEmail3)) { return warning(fm.Email3,"Please enter your Email address"); }
  if(!isEmail(TheEmail3)) { return warning(fm.Email3,"Invalid email.  Please enter again"); }
  if(isStrSpace(TheCity3)) { return warning(fm.City3,"Please enter city"); }
  if(isStrSpace(ThePhone3)) { return warning(fm.Telephone3,"Please enter your phone number"); }
  return true;
}
//-->