<webpage id="contact"
 	 xmlns:html="http://www.w3.org/1999/xhtml">
  <config param="rcsdate" value="$Date: 2009-03-23 17:47:36 +0100 (Mon, 23 Mar 2009) $"/>
  <head>
    <title>Contact Me</title>
    <summary>How to reach me</summary>
    <keywords>Javad Khakbaz Contact information</keywords>
  </head>
  <para>
    Please send me suggestions, comments, typos, and bug reports. I answer all
    emails, but please be patient; it is sometimes a few days before I am able
    to respond.
  </para>
  <?php if ((@$_GET["komail"]==1) OR (@$_GET["notext"]==1) OR (@$_GET["ko"]==1)) {
    $msg='<div class="error"><strong>ERROR: </strong>';
    $msg.='Please correct the following errors and re-submit your message.<ol>';
    if (@$_GET["komail"]==1)
    $msg.='<li>Invalid <em>Email</em> address.</li>' ;
    if (@$_GET["notext"]==1)
    $msg.='<li>Invalid <em>Name</em>, <em>topic</em>, <em>Subject</em> or <em>Comment</em>.</li>' ;
    if (@$_GET["ko"]==1)
    $msg.='<li>Failed to send your message. Please try later.</li>' ;
    $msg.='</ol></div>' ;
    echo $msg;
    }
  ??>
  <html:form action="/site/contact-send.php" method="post" id="contactForm">

    <html:fieldset>
      <html:legend>Contact Form</html:legend>
      <html:p class="name">
	<html:label for="contactForm-name" accesskey="9">Name: </html:label>
	<html:em>*</html:em><html:br/>
	<html:input id="contactForm-name" 
	       name="name" 
	       type="text" 
	       size="40" 
	       tabindex="1"/>
      </html:p>

      <html:p class="email">
	<html:label for="contactForm-email">Email: </html:label> 
	<html:em>*</html:em><html:br/>
	<html:input name="email" 
	       type="text" 
	       id="contactForm-email" 
	       size="40" 
	       tabindex="2"/>
      </html:p>
      <html:p class="topic">
	<html:label for="contactForm-topic">Topic: </html:label><html:br/>
	<html:select name="topic" 
		id="contactForm-topic" 
		tabindex="4">
	  <html:option value="topic-none">Please select a topic</html:option>
	  <html:option value="topic-bug">Bug Report and Typos</html:option>
	  <html:option value="topic-general">Comments and Suggestions</html:option>
	</html:select>
      </html:p>
      <html:p class="subject">
	<html:label for="contactForm-subject">Subject: </html:label>
	<html:em>*</html:em><html:br/>

	<html:input name="subject" 
	       type="text" 
	       id="contactForm-subject" 
	       size="40" 
	       tabindex="5"/>
      </html:p>
      <html:p class="comment">
	<html:label for="contactForm-comment">Comment: </html:label>
	<html:em>*</html:em><html:br/>
	<html:textarea name="comment" 
		  id="contactForm-comment" 
		  rows="20"
		  cols="60" 
		  tabindex="6"/>
      </html:p>
      <html:p>

	<html:input class="button" type="submit" value="send" tabindex="7"/>
      </html:p>
      <html:p class="note"><html:strong class="alert">Note</html:strong>: 
      Fields marked with a <html:em>*</html:em> are required.</html:p>
    </html:fieldset>
  </html:form>
</webpage>
