// (c) Tale 2004-2005

if (window.ieVersion >= 4.0)
{
  if (!this("from").value)
  {
    alert("You have forgotton to fill in your e-mail address.");
    this("from").focus();      
    return false;
  }
  if ((this("from").value.indexOf("@") < 0) || (this("from").value.indexOf(".") < 0))
  {
    alert("You haven't filled in your e-mail address properly.");
    this("from").focus();      
    return false;
  }
  if (!this("to").value)
  {
    alert("You have forgotton to fill in the recipient's e-mail address.");
    this("to").focus();      
    return false;
  }
  if ((this("to").value.indexOf("@") < 0) || (this("to").value.indexOf(".") < 0))
  {
    alert("You haven't filled in the recipient's e-mail address properly.");
    this("to").focus();      
    return false;
  }
  if ((!this("caption_text").value) && (!this("message_text").value))
  {
    if (!confirm("You haven't filled in any caption, nor have you filled in a personal message.\n\nDo you want to continue anyway? (You can if you want to, you know.)"))
    {
      this("caption_text").focus();      
      return false;
    }
  }
  else
  {
    if (!this("caption_text").value)
      if (!confirm("You haven't filled in any caption.\n\nDo you want to continue anyway? (You can if you want to, you know.)"))
      {
        this("caption_text").focus();      
        return false;
      }
    if (!this("message_text").value)
      if (!confirm("You haven't filled in a personal message.\n\nDo you want to continue anyway? (You can if you want to, you know.)"))
      {
        this("message_text").focus();      
        return false;
      }
  }
}
return true;
