//---------------------------------------------------
// isEmpty
//---------------------------------------------------
function isEmpty(aTextField) 
{
    if ( (aTextField.length == 0) || (aTextField == null) ) {
        return true;
    }
    return false;
}       

//---------------------------------------------------
// isNumeric
//---------------------------------------------------
function isNumeric(sText)
{
    var c, dots = 0, isNumber=true, validChars = "0123456789.";

    if (sText.length == 0) { isNumber = false; }
    for (i = 0; i < sText.length && isNumber == true; i++) { 
	c = sText.charAt(i); 
	if (c == ".") { dots++; }
	if (dots > 1) { isNumber = false; }
	if (validChars.indexOf(c) == -1) { isNumber = false; }
    }
    return isNumber;
}


//---------------------------------------------------
// isValid
//---------------------------------------------------
function isValid() {
  var email=document.form.t3.value;
  if ( document.form.t1.value == "" ) {
    alert ( "Please fill in the 'Username' box." );
    return false;
  }

  if ( document.form.t2.value == "" ) {
    alert ( "Please fill in the 'Paswword' box." );
    return false;
  }
  if ( ( email.indexOf(' ') == -1 ) && 
       ( 0 < email.indexOf('\@') ) &&
       ( email.indexOf('\@') + 1 < email.length ) ) {
    return true;
  }
  else {
    alert ('Invalid e-mail address.')
    return false;
  }
}

//---------------------------------------------------
//---------------------------------------------------
