#include <infodrom.style>
#include <addresses.inc>

<page title="Infodrom Fortune Cookies">

<style type="text/css">
label {
  display: block;
  font-weight: bold;
  font-size: 13px;
  width: 70px;
  text-align: left;
  padding-left: 5px;
  padding-top: 0px;
  padding-bottom: 0px;
  background-color: #1aa2fe;
  color: white;
}
input {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid #aaaaaa;
}
input.button {
  width: auto;
  display: inline;
  font-size: 13px;
  font-weight: bold;
  padding: 2px;
  background-color: #d7d7d7;
}
input.button:hover {
  border: 1px solid black;
  background-color: #bfbfbf;
}
textarea {
  width: 100%;
  margin-top: -2px;
  margin-bottom: 10px;
  border: 1px solid #aaaaaa;
}
div.outer {
  padding-left: 10%;
  padding-right: 10%;
}
div.inner {
  background: #bbddff;
  border: 1px solid #aaaaaa;
  padding: 20px;
}
</style>

<script style="text/javascript">
function info(bug)
{
  window.alert (bug + "  You'll have to provide at least\na fortune cookie and an origin.  " +
		"Your name\nand mail address are optional.");
  return false;
}

function check()
{
  var form = document.forms[0];

  if (!form.fortune.value.length)
    return info ("No fortune cookie supplied.");

  if (!form.origin.value.length) {
    var origin;
    origin = prompt ("You forgot to specify the origin of this fortune cookie.  " +
		     "Please provide it now.");
    if (!origin.length)
      return info ("No fortune origin supplied.");
    else {
      form.origin.value = origin;
    }
  }

  return true;
}
</script>

<div style="padding-top: 25px;"></div>

<div class=outer>
<div class=inner>
<p style="margin-top: -5px;">If you want to submit new fortunes,
please use electronic mail.  Send your fortune cookies to <joey mail>.</p>

<p>However, since mail seems to be too difficult for too many people,
here is a web form that only converts your input into a mail.</p>

<form method="post" action="send.php" onsubmit="return check()">
<label for="name">Name</label>
<input type="text" size="48" maxlength="100" id="name" name="name"><br class=none>
<label for="email">E-Mail</label>
<input type="text" size="48" maxlength="100" id="email" name="email"><br class=none>
<label for="fortune">Fortune</label>
<textarea name=fortune id=fortune rows=5>
</textarea><br class=none>
<label for="origin">Origin</label>
<input type="text" size="48" maxlength="100" id="origin" name="origin"><br class=none>
<div align="center" style="margin-bottom: -30px;">
<input type="submit" class=button value="Send"> &nbsp; <input type="reset" class=button value="Reset">
</div>
</form>
</div>
</div>

<br>

</page>

# Local variables:
# mode: html
# mode: auto-fill
# mode: iso-accents
# end:
