<title>Half Birthday Calculator</title>

<style type="text/css">
<!--
body, tr, td, p {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	color: #D43C27;
	text-align:center;
}
-->
</style>
</head>

<body>
<form name="form1" method="post" action="">
<table width="308" border="2" align="center" cellpadding="6" cellspacing="0" bordercolor="#999999">
<tr>
<td align="center">
  Birthday 
    <select name="birthMo" id="birthMo">
      <option value="1">Jan</option>
      <option value="2">Feb</option>
      <option value="3">Mar</option>
      <option value="4">Apr</option>
      <option value="5">May</option>
      <option value="6">Jun</option>
      <option value="7">Jul</option>
      <option value="8">Aug</option>
      <option value="9">Sep</option>
      <option value="10">Oct</option>
      <option value="11">Nov</option>
      <option value="12">Dec</option>
    </select>

    <select name="birthday" id="birthday">
	  <% for x=1 to 31 %>
      <option value="<%=x%>"><%=x%></option>
	  <% Next %>
    </select>
    <input type="submit" name="Submit" value="Calculate">
</td>
</tr>
</table>
</form>
<% 
if request.form("birthmo")<>"" Then 
birthMo=request.form("birthMo")
birthday=request.form("birthday")
birthyear=year(now)
bdate=birthMo & "/" & birthday & "/" & birthyear

	if isDate(bdate)=False Then %>
	Not a real date, please try again. 
<% Else

	halfbdate=dateAdd("d", 183, bdate)
%>
<strong>The half birthday of <%=MonthName(birthmo)%>&nbsp;<%=birthday%> is: <%=MonthName(Month(halfbdate))%>&nbsp;<%=day(halfbdate)%></strong>
<% End If 
End If %>

</body>
</html>
