<!-- 

FirstPart = '<img src="images/access/access';
LastPart = '.jpg" height="50" width="150">';
FirstInput = '<input type="hidden" name="imageid" value="';
LastInput = '" />';
r = Math.ceil(Math.random() * 6);


function printImage() {
document.write(FirstPart + r + LastPart);
}

function printInput() {
document.write(FirstInput + r + LastInput);
}

function validEmail(email_from)
{
  invalidChars = " /:,;"  
  
  domain = email_from.substring(email_from.indexOf("@") + 1, email_from.length)
  
  if (domain == "CanadiansRule.com")
  {
    return false
  }
  
  if (email_from == "")
  {
    return false
  }

  for (i=0; i<invalidChars.length; i++)
  {
    badChar = invalidChars.charAt(i)
    if(email_from.indexOf(badChar,0) > -1)
    {
      return false
    }
  }

  atPos = email_from.indexOf("@",1)
  if (atPos == -1)
  {
    return false
  }

  if (email_from.indexOf("@",atPos+1) > -1)
  {
    return false
  }

  periodPos = email_from.indexOf(".",atPos)
  if (periodPos == -1)
  {
    return false
  }

  if (periodPos+3 > email_from.length)
  {
    return false
  }
  return true
}


function Validate(membershipForm)
{
  if( document.forms.membershipForm.firstname.value == "" )
  {
    alert("Please enter your first name.")
    membershipForm.firstname.focus()
    membershipForm.firstname.select()
    return false
  }

  else
  {
    if( document.forms.membershipForm.lastname.value == "" )
    {
      alert("Please enter your last name.")
      membershipForm.lastname.focus()
      membershipForm.lastname.select()
      return false
    }

    else
    {
      if(!validEmail(membershipForm.email_from.value))
      {
        alert("Missing or invalid e-mail address.")
        membershipForm.email_from.focus()
        membershipForm.email_from.select()
        return false
      }
	  
      else
      {
        document.forms.membershipForm.submit();
      }
    }
  }
}
//-->