<?php
session_start
(); 
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
##  Whilst this source code is freely available to view, it is strictly for educational use only. 
##  All the code is written by myself, and most of the astronomical equations are derived from 'Astronomical Algorithms' by Jean Meeus. 
##  The code is therefore copyrighted and no part may be reproduced without permission.
##  David Campbell
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
?>
<head>

  <link rel="stylesheet" type="text/css" href="astrowindow.css" media="screen" />
      <link rel="stylesheet" href="flyout.css" type="text/css" /><link rel="stylesheet" href="dropdown.css" type="text/css" />
<link rel="stylesheet" href="dropdown.css" type="text/css" />
<script type="text/javascript" src="dropdown.js"></script>
<style type="text/css">
#divBg{position:absolute; width:100%; top:0; left:0; visibility:hidden; height:0; padding:0px; z-index: 6;}
#divBgColor{position:absolute; top:0; left:0; width:103%; height:0; clip:rect(0,107%,30,0); z-index: 6; }
DIV.clSub{position:absolute; top:36px; left:-468px; width:596px; visibility:hidden; font-family:arial,helvetica; font-weight:normal; font-size:12px; }
DIV.clTop{position:absolute; visibility:visible; font-family:arial,helvetica; font-weight:bold; font-size:13px; left:400px; top:20px; padding:2px; text-align:center; vertical-align:text-bottom; z-index:6;}
#divTop0{position:absolute; top:195px; left:495px; z-index:6;}
</style>
<script type="text/javascript" src="dropdown2.js"></script>
<STYLE TYPE="text/css">
<!--
table
   {
   color:#666666;
   font-size:100%;
   font-family:verdana, arial, sans-serif;
   }
  -->
</STYLE>
<style>
<!--
.drag {position: relative; cursor: hand;}
-->
</style>
<script language="JavaScript1.2">


var ie=document.all
var ns6=document.getElementById&&!document.all

var dragapproved=false
var z,x,y

function move(e){
if (dragapproved){
z.style.left=ns6? temp1+e.clientX-x: temp1+event.clientX-x
z.style.top=ns6? temp2+e.clientY-y : temp2+event.clientY-y
return false
}
}

function drags(e){
if (!ie&&!ns6)
return
var firedobj=ns6? e.target : event.srcElement
var topelement=ns6? "HTML" : "BODY"

while (firedobj.tagName!=topelement&&firedobj.className!="drag"){
firedobj=ns6? firedobj.parentNode : firedobj.parentElement
}

if (firedobj.className=="drag"){
dragapproved=true
z=firedobj
temp1=parseInt(z.style.left+0)
temp2=parseInt(z.style.top+0)
x=ns6? e.clientX: event.clientX
y=ns6? e.clientY: event.clientY
document.onmousemove=move
return false
}
}
document.onmousedown=drags
document.onmouseup=new Function("dragapproved=false")
//-->
</script>
<style type="text/css">
.hidden {
   display: none;
}
.nonhidden {
   display: block;
}
</style>
<?php 
echo"
<script type=\"text/javascript\">

function enableOther()
{
   if (!document.getElementById) return;
   var s = document.getElementById('barlow');
   if (!s) return;
   if (s.options[s.selectedIndex].value != 'other') return;
   var t = document.getElementById('barlowother');
   if (!t) return;
   t.disabled = false;
   t.className = '';

menuBarInit()
}

function init()
{
   if (!document.getElementById) return;
   var s = document.getElementById('barlow');
   if (!s) return;
   s.onchange = enableOther;
   var t = document.getElementById('barlowother');
   if (!t) return;
   t.disabled = true;
   t.className = 'hidden'

menuBarInit();
;
}

"
;
if ( isset(
$_GET['barlow']) ) { $_SESSION['barlow'] = $_GET['barlow'];}
$barlow $_SESSION['barlow']; 
if(
$barlow=="other"){
echo 
"window.onload = enableOther;
</script>"
;
}else{
echo 
"window.onload = init;
</script>"
;}
?>
</head>
<body>

<div class="wholepage">

<div id="content">
        <div style="position:absolute; top:5px; left:25px; width: 765px; height: 230px; z-index: 4;"><table><tr><td><b>Telescope:</b></td><td></td><td><b>Camera:</b></td></tr><tr><td width="270">
<form name="telescope">
<select name="menu2" onChange="location=document.telescope.menu2.options[document.telescope.menu2.selectedIndex].value;" value="GO">
<option value="fov.php"> -Select a telescope- </option>
<?php

function zero($num){
  return 
trim(trim($num'0'), '.');
}

include(
"database.php");
mysql_connect(localhost,$username,$password);
@
mysql_select_db($database) or die( "Unable to select database");

if ( isset(
$_GET['telescope']) ) { $_SESSION['telescope'] = $_GET['telescope'];}
$telescope $_SESSION['telescope']; 

if ( isset(
$_GET['camera']) ) { $_SESSION['camera'] = $_GET['camera'];}
$camera $_SESSION['camera']; 

function 
telescope($aperture,$flength,$telescope,$telescopeselected){
echo 
"<option value=\"fov.php?aperture=$aperture&flength=$flength&telescope=$telescope\" ";
if (
$telescopeselected == $telescope){
echo 
"selected";}
echo 
">$telescope</option> ";
}

$query1="SELECT * FROM telescopes ORDER BY telescope";
$result1 mysql_query($query1) or die(mysql_error()); 
while(
$row1 mysql_fetch_array($result1)){
$telescope1 $row1['telescope'] ;
$flength1 zero($row1['flength']) ;
$aperture1 zero($row1['aperture']) ;

telescope($aperture1,$flength1,$telescope1,$telescope);
}


echo
"
</select>
</form>
</td><td width=\"100\"></td><td>
<form name=\"camera\">
<select name=\"menu\" onChange=\"location=document.camera.menu.options[document.camera.menu.selectedIndex].value;\" value=\"GO\">
<option value=\"fov.php\"> -Select a camera- </option>"
;


function 
camera($pxsize,$pxwidth,$pxheight,$camera,$cameraselected){
echo 
"<option value=\"fov.php?pxsize=$pxsize&pxwidth=$pxwidth&pxheight=$pxheight&camera=$camera\" ";
if (
$cameraselected == $camera){
echo 
"selected";}
echo 
">$camera</option> ";
}

$query2="SELECT * FROM cameras ORDER BY camera";
$result2 mysql_query($query2) or die(mysql_error()); 
while(
$row2 mysql_fetch_array($result2)){
$camera1 $row2['camera'] ;
$pxsize1 zero($row2['pxsize']) ;
$pixw1 $row2['pixw'];
$pixh1 $row2['pixh'];

camera($pxsize1,$pixw1,$pixh1,$camera1,$camera);
}

?>
</select>
</form>

 </tr></td></table></div>


 <?php
 
 
 
$dm
[1]=31;
$dm[2]=28;
$dm[3]=31;
$dm[4]=30;
$dm[5]=31;
$dm[6]=30;;
$dm[7]=31;
$dm[8]=31;
$dm[9]=30;
$dm[10]=31;
$dm[11]=30;
$dm[12]=31;


$nowday=date('j');
$nowyear=date('Y');
$nowmonth=date('n');

include(
"functions.php");

if ( isset(
$_GET['day']) ) { $_SESSION['day'] = $_GET['day'];}
$day $_SESSION['day']; 
if (
$day == "")
{
$day $nowday; }

if ( isset(
$_GET['month']) ) { $_SESSION['month'] = $_GET['month'];}
$month $_SESSION['month']; 
if (
$month == "")
{
$month $nowmonth; }

if ( isset(
$_GET['year']) ) { $_SESSION['year'] = $_GET['year'];}
$year $_SESSION['year']; 
if (
$year == "")
{
$year $nowyear; }

if ( isset(
$_GET['object']) ) { $_SESSION['object'] = $_GET['object'];}
$object $_SESSION['object']; 


if(
$object 0){

$query="SELECT * FROM messier WHERE messier_number='$object'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while (
$i $num) {
$messier_number=mysql_result($result,$i,"messier_number");
$image_cred=mysql_result($result,$i,"image_cred");
$mfov mysql_result($result,$i,"image_fov");
$i++;
}
$
$messier_number $mfov;
}else{

$query="SELECT * FROM fovobjects WHERE object='$object'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while (
$i $num) {
$object=mysql_result($result,$i,"object");
$image_cred=mysql_result($result,$i,"image_cred");
$
$object mysql_result($result,$i,"image_fov");
$i++;
}
$
$messier_number $mfov;
}



if (
$month 12){
$month = ($month -12);
$year = ($year +1);
}
if (
$month 1){
$month = ($month +12);
$year = ($year 1);
}
$dmonth$dm[$month];
$monthb4 = ($month -1);
$dmonthb4 $dm[$monthb4];
if (
$day $dmonth){
$month = ($month +1);
$day = ($day $dmonth);
}
if (
$day 1){
$month = ($month 1);
$day $dmonthb4;
}
if (
$day == ""){
$day 31;
}
if (
$month 1){
$month = ($month +12);
$year = ($year 1);
}
if (
$month 12){
$month = ($month -12);
$year = ($year +1);
}
$_SESSION['year'] = $year;
$_SESSION['month'] = $month;
$_SESSION['day'] = $day;

$aul=149597870.691;
$au=0.08522*2;
$au2=0.0043*2;

if (
$month 2){
$M2 $month;
$Y $year;
}else{
$M2 = ($month +12);
$Y = ($year 1);
}
$A floor($Y/100);
$B $A floor($A/4);
$y $year + (($month 0.5)/12);
$ty $y 2000;
$deltaT 62.92 + (0.32217 $ty) + (0.005589 $ty $ty);
$JDE = (floor(365.25 * ($Y 4716))) + (floor(30.6001*($M2+1))) + $day $B 1524.5 + ($deltaT/86400);
$t = ($JDE 2451545)/365250;
$T 10 $t;

//////////////earth Data
$planet 'earth';
$R=r($planet,$t);
$l=l($planet,$t);
$B=b($planet,$t);
$ldegs rad2deg($l);
$l1quad($ldegs);
$Slon$l pi();

$Ldeg2rad($l1);

$x- ($R * (sin($L)));
$y$R * (cos($L));
$xearth= ($x/$au2)+570-2;
$yearth168.5-($y/$au2)-2;
$rearth=  round($R,9);
$r2earth number_format($R*$aul);
$Bdegs rad2deg($B);
$Slat $B;

$epsilon epsilon($T);
$Sra = (atan2((  ((cos(deg2rad($epsilon)))*(sin($Slon)))-((tan($Slat))*(sin(deg2rad($epsilon))))),(cos($Slon))));
$Sdec asin(((sin($Slat))*(cos(deg2rad($epsilon))))+((cos($Slat))*(sin(deg2rad($epsilon)))*(sin($Slon))));

//////////////mercury Data
if ($object == "mercury"){
$planet 'mercury';
$r=r($planet,$t);
$l=l($planet,$t);
$b=b($planet,$t);
$ldegs rad2deg($l);
$l1quad($ldegs);
$ldeg2rad($l1);
$x- ($r * (sin($l)));
$y$r * (cos($l));
$xmercury= ($x/$au2)+570-2;
$ymercury168.5-($y/$au2)-2;
$rmercury=  round($r,6);
$r2mercury number_format($r*$aul);
$deltamercury delta($r$b$l$R$Slon$Slat);
$delta2mercury number_format($deltamercury*$aul);
$delta3mercury =round($deltamercury,6);
$mercurydec dec($r$b$l$R$B$L$deltamercury$t$planet);
$mercuryra ra($r$b$l$R$B$L$deltamercury$t$planet);
$dmercuryra d($mercuryra);
$mmercuryra m($mercuryra);
$smercuryra s($mercuryra);
$dmercurydec d($mercurydec);
$mmercurydec m($mercurydec);
$smercurydec s($mercurydec);
$cosi cosi($R,$r,$b,$L,$l,$deltamercury);
$k = (1$cosi)/2;
$i rad2deg(acos($cosi));
$kmercury round((100*$k),1);
$kmercury2 $k;
$magmercury number_format(-0.42 + (5*(log10($r*$deltamercury))) +(0.0380*$i)-(0.000273*$i*$i)+(0.000002*$i*$i*$i),1);
$mercury6.72/$deltamercury;
$ra1 deg2rad($mercuryra*15);
$dec1 deg2rad($mercurydec);
$xmercury quad(rad2deg(atan2(cos($Sdec)*sin($Sra-$ra1),(sin($Sdec)*cos($dec1))-(cos($Sdec)*sin($dec1)*cos($Sra-$ra1)))));}


//////////////venus Data
if ($object == "venus"){
$planet 'venus';
$r=r($planet,$t);
$l=l($planet,$t);
$b=b($planet,$t);
$ldegs rad2deg($l);
$l1quad($ldegs);
$ldeg2rad($l1);
$x- ($r * (sin($l)));
$y$r * (cos($l));
$xvenus= ($x/$au2)+570-2;
$yvenus168.5-($y/$au2)-2;
$rvenus=  round($r,6);
$r2venus number_format($r*$aul);
$deltavenus delta($r$b$l$R$Slon$Slat);
$delta2venus number_format($deltavenus*$aul);
$delta3venus =round($deltavenus,6);
$venusdec dec($r$b$l$R$B$L$deltavenus$t$planet);
$venusra ra($r$b$l$R$B$L$deltavenus$t$planet);
$dvenusra d($venusra);
$mvenusra m($venusra);
$svenusra s($venusra);
$dvenusdec d($venusdec);
$mvenusdec m($venusdec);
$svenusdec s($venusdec);
$cosi cosi($R,$r,$b,$L,$l,$deltavenus);
$k = (1$cosi)/2;
$i rad2deg(acos($cosi));
$kvenus2 $k;
$kvenus number_format((100*$k),1);
$magvenus =number_format(-4.40 + (5*(log10($r*$deltavenus))) +(0.0009*$i)+(0.000239*$i*$i)-(0.00000065*$i*$i*$i),1);
$cosivenus=$cosi;
$ivenus=$i;
$V=261.51+(22518.443*$T);
$M 177.52+(35999.050*$T);
$N50.42+(58517.881*$T);
$W $V + (1.91*sin(deg2rad($M)))+(0.78*sin(deg2rad($N)));
$deltasqrd1.52321+(1.44666*cos(deg2rad($W)));
$delta sqrt($deltasqrd);
$k2venus = (((0.72333+$delta)*(0.72333+$delta))-1)/(2.89332*$delta);
$velong rad2deg(acos(($deltasqrd+0.4768)/(2*$delta)));
$ra1 deg2rad($venusra*15);
$dec1 deg2rad($venusdec);
$xvenus quad(rad2deg(atan2(cos($Sdec)*sin($Sra-$ra1),(sin($Sdec)*cos($dec1))-(cos($Sdec)*sin($dec1)*cos($Sra-$ra1)))));
$venus16.82/$deltavenus;}


//////////////mars Data
if ($object == "mars"){
$planet 'mars';
$r=r($planet,$t);
$l=l($planet,$t);
$b=b($planet,$t);
$ldegs rad2deg($l);
$l1quad($ldegs);
$ldeg2rad($l1);
$x- ($r * (sin($l)));
$y$r * (cos($l));
$xmars= ($x/$au2)+570-2;
$ymars168.5-($y/$au2)-2;
$rmars=  round($r,6);
$r2mars number_format($r*$aul);
$deltamars delta($r$b$l$R$Slon$Slat);
$delta2mars number_format($deltamars*$aul);
$delta3mars =round($deltamars,6);
$marsdec dec($r$b$l$R$B$L$deltamars$t$planet);
$marsra ra($r$b$l$R$B$L$deltamars$t$planet);
$dmarsra d($marsra);
$mmarsra m($marsra);
$smarsra s($marsra);
$dmarsdec d($marsdec);
$mmarsdec m($marsdec);
$smarsdec s($marsdec);
$cosi cosi($R,$r,$b,$L,$l,$deltamars);
$k = (1$cosi)/2;
$i rad2deg(acos($cosi));
$kmars2 $k;
$kmars number_format((100*$k),1);
$magmars =number_format(-1.52 + (5*(log10($r*$deltamars))) +(0.016*$i),1);
$diamarsnumber_format(9.36/$deltamars,1);
$ra1 deg2rad($marsra*15);
$dec1 deg2rad($marsdec);
$xmars quad(rad2deg(atan2(cos($Sdec)*sin($Sra-$ra1),(sin($Sdec)*cos($dec1))-(cos($Sdec)*sin($dec1)*cos($Sra-$ra1)))));
$mars9.36/$deltamars;}






//////////////jupiter Data
if ($object == "jupiter"){
$planet 'jupiter';
$r=r($planet,$t);
$l=l($planet,$t);
$b=b($planet,$t);
$ldegs rad2deg($l);
$l1quad($ldegs);
$ldeg2rad($l1);
$deltajupiter delta($r$b$l$R$Slon$Slat);
$jupiter196.88/$deltajupiter;}

if (
$object == "jupitermoons"){
$planet 'jupiter';
$r=r($planet,$t);
$l=l($planet,$t);
$b=b($planet,$t);
$ldegs rad2deg($l);
$l1quad($ldegs);
$ldeg2rad($l1);
$deltajupiter delta($r$b$l$R$Slon$Slat);
$jupitermoons196.88/$deltajupiter;}


//////////////Saturn Data
if ($object == "saturn"){
$planet 'saturn';
$r=r($planet,$t);
$l=l($planet,$t);
$b=b($planet,$t);
$ldegs rad2deg($l);
$l1quad($ldegs);
$ldeg2rad($l1);
$deltasaturn delta($r$b$l$R$Slon$Slat);
$saturn165.46/$deltasaturn;}

//////////////uranus Data
if ($object == "uranus"){
$planet 'uranus';
$r=r($planet,$t);
$l=l($planet,$t);

$b=b($planet,$t);
$ldegs rad2deg($l);
$l1quad($ldegs);
$ldeg2rad($l1);
$deltauranus delta($r$b$l$R$Slon$Slat);
$uranus70.04/$deltauranus;}

//////////////neptune Data
if ($object == "neptune"){
$planet 'neptune';
$r=r($planet,$t);
$l=l($planet,$t);
$b=b($planet,$t);
$ldegs rad2deg($l);
$l1quad($ldegs);
$ldeg2rad($l1);
$deltaneptune delta($r$b$l$R$Slon$Slat);
$neptune67/$deltaneptune;}

/////////////Moon
if ($object == "moon"){
$Ld218.3164477 + (481267.88123421*$T) - (0.0015786*$T*$T)+(($T*$T*$T)/538841)-(($T*$T*$T*$T)/65194000);
$Ld quad($Ld);

$D =297.8501921 + (445267.1114034*$T) - (0.0018819*$T*$T)+(($T*$T*$T)/545868)-(($T*$T*$T*$T)/113065000);
$D quad($D);

$M  357.5291092 + (35999.0502909*$T) - (0.0001536*$T*$T)+(($T*$T*$T)/24490000);
$M quad($M);

$Md  134.9633964 + (477198.8675055*$T) + (0.0087414*$T*$T)+(($T*$T*$T)/69699)-(($T*$T*$T*$T)/14712000);
$Md quad($Md);

$F 93.2720950 + (483202.0175233*$T) - (0.0036539*$T*$T)+(($T*$T*$T)/3526000)-(($T*$T*$T*$T)/863310000);
$F quad($F);


$A1=119.75+(131.849*$T);
$A1 quad($A1);
$A2=53.09+(479264.290*$T);
$A2 quad($A2);
$A3=313.45+(481266.484*$T);
$A3 quad($A3);
$E=1- (0.002516*$T)-(0.0000074*$T*$T);


//longitude
$long=
+
6288774*sin(deg2rad($Md))
+
1274027*sin(deg2rad((2*$D)-$Md))
+
658314*sin(deg2rad((2*$D)))
+
213618*sin(deg2rad((2*$Md)))
-
185116*sin(deg2rad($M))
-
114332*sin(deg2rad((2*$F)))
+
58793*sin(deg2rad((2*$D)-(2*$Md)))
+
57066*$E*sin(deg2rad((2*$D)-$M-$Md))
+
53322*sin(deg2rad((2*$D)-$Md))
+
45758*$E*sin(deg2rad((2*$D)-$M))
-
40923*$E*sin(deg2rad($M+$Md))
-
34720*sin(deg2rad($D))
-
30383*$E*sin(deg2rad($M+$Md))
+
15327*sin(deg2rad((2*$D)-(2*$F)))
-
12528*sin(deg2rad($Md+(2*$F)))
+
10980*sin(deg2rad($Md-(2*$F)))
+
10675*sin(deg2rad((4*$D)-$Md))
+
10034*sin(deg2rad((3*$Md)))
+
8548*sin(deg2rad((4*$D)-(2*$Md)))
-
7888*$E*sin(deg2rad((2*$D)+$M-$Md))
-
6766*$E*sin(deg2rad((2*$D)+$M))
-
5163*sin(deg2rad($D-$Md))
+
4987*$E*sin(deg2rad($D-$M))
+
4036*$E*sin(deg2rad((2*$D)+$M+$Md))
+
3994*sin(deg2rad((2*$D)+(2*$Md)))
+
3861*sin(deg2rad((4*$D)))
+
3665*sin(deg2rad((2*$D)-(3*$Md)))
-
2689*sin(deg2rad($M-(2*$Md)))
-
2602*sin(deg2rad((2*$D)-$Md+(2*$F)))
+
2390*$E*sin(deg2rad((2*$D)-$M-(2*$Md)))
-
2348*sin(deg2rad($D+$Md))
+
2236*$E*$E*sin(deg2rad((2*$D)-(2*$M)))
-
2120*$E*sin(deg2rad($M+(2*$Md)))
-
2069*$E*$E*sin(deg2rad((2*$M)))
+
2048*$E*sin(deg2rad((2*$D)-(2*$M)-$Md))
-
1773*sin(deg2rad((2*$D)+$Md-(2*$F)))
-
1595*sin(deg2rad((2*$D)+(2*$F)))
+
1215*$E*sin(deg2rad((4*$D)-$M-$Md))
-
1110*sin(deg2rad((2*$Md)-(2*$F)))
-
892*sin(deg2rad((3*$D)-$Md))
-
810*sin(deg2rad((2*$D)+$M+$Md))
+
759*$E*sin(deg2rad((4*$D)-$M-(2*$Md)))
-
713*$E*$E*sin(deg2rad((2*$M)-$Md))
-
700*$E*$E*sin(deg2rad((2*$D)+(2*$M)-$Md))
+
691*$E*sin(deg2rad((2*$D)+$M-(2*$Md)))
+
596*$E*sin(deg2rad((2*$D)-$M-(2*$F)))
+
549*sin(deg2rad((4*$D)+$Md))
+
537*sin(deg2rad((4*$Md)))
+
520*$E*sin(deg2rad((4*$D)-$M))
-
487*sin(deg2rad($D-(2*$Md)))
-
399*$E*sin(deg2rad((2*$D)+$M-(2*$F)))
-
381*sin(deg2rad((2*$Md)-(2*$F)))
+
351*$E*sin(deg2rad($D+$M+$Md))
-
340*sin(deg2rad((3*$D)-(2*$Md)))
+
330*sin(deg2rad((4*$D)-(3*$Md)))
+
327*$E*sin(deg2rad((2*$D)-$M+(2*$Md)))
-
323*$E*$E*sin(deg2rad((2*$M)+$Md))
+
299*$E*sin(deg2rad($D+$M-$Md))
+
294*sin(deg2rad((2*$D)+(3*$Md)))
+
3958*sin(deg2rad($A1))
+
1962*sin(deg2rad($Ld-$F))
+
318*sin(deg2rad($A2));


//latitude
$lat=
+
5128122*sin(deg2rad($F))
+
280602*sin(deg2rad($Md+$F))
+
277692*sin(deg2rad($Md-$F))
+
173237*sin(deg2rad((2*$D)-$F))
+
55413*sin(deg2rad((2*$D)-$Md+$F))
+
46271*sin(deg2rad((2*$D)-$Md-$F))
+
32573*sin(deg2rad((2*$D)+$F))
+
17198*sin(deg2rad((2*$Md)+$F))
+
9266*sin(deg2rad((2*$D)+$Md-$F))
+
8822*sin(deg2rad((2*$Md)-$F))
+
8216*$E*sin(deg2rad((2*$D)-$M-$F))
+
4324*sin(deg2rad((2*$D)-(2*$Md)-$F))
+
4200*sin(deg2rad((2*$D)+$Md+$F))
-
3359*$E*sin(deg2rad((2*$D)+$M-$F))
+
2463*$E*sin(deg2rad((2*$D)-$M-$Md+$F))
+
2211*$E*sin(deg2rad((2*$D)-$M+$F))
+
2065*$E*sin(deg2rad((2*$D)-$M-$Md-$F))
-
1870*E*sin(deg2rad($M-$Md-$F))
+
1828*sin(deg2rad((4*$D)-$Md-$F))
-
1794*$E*sin(deg2rad($M+$F))
-
1749*sin(deg2rad((3*$F)))
-
1565*$E*sin(deg2rad($M-$Md+$F))
-
1491*sin(deg2rad($D+$F))
-
1475*$E*sin(deg2rad($M+$Md+$F))
-
1410*$E*sin(deg2rad($M+$Md-$F))
-
1344*$E*sin(deg2rad($M-$F))
-
1335*sin(deg2rad($D-$F))
+
1107*sin(deg2rad((3*$Md)+$F))
+
1021*sin(deg2rad((4*$D)-$F))
+
833*sin(deg2rad((4*$D)-$Md+$F))
+
777*sin(deg2rad($Md-(3*$F)))
+
671*sin(deg2rad((4*$D)-(2*$Md)+$F))
+
607*sin(deg2rad((2*$D)-(3*$F)))
+
596*sin(deg2rad((2*$D)+(2*$Md)-$F))
+
491*sin(deg2rad((2*$D)-$M+$Md-$F))
-
451*sin(deg2rad((2*$D)-(2*$Md)+$F))
+
439*sin(deg2rad((3*$Md)-$F))
+
422*sin(deg2rad((2*$D)+(2*$Md)+$F))
+
421*sin(deg2rad((2*$D)-(3*$Md)-$F))
-
366*$E*sin(deg2rad((2*$D)+$M-$Md+$F))
-
351*$E*sin(deg2rad((2*$D)+$M+$F))
+
331*sin(deg2rad((4*$D)+$F))
+
315*$E*sin(deg2rad((2*$D)-$M+$Md+$F))
+
302*$E*$E*sin(deg2rad((2*$D)-(2*$M)-$F))
-
283*sin(deg2rad($Md+(3*$F)))
-
229*$E*sin(deg2rad((2*$D)+$M+$Md-$F))
+
223*$E*sin(deg2rad($D+$M-$F))
+
223*$E*sin(deg2rad($D+$M+$F))
-
220*$E*sin(deg2rad($M-(2*$Md)-$F))
-
220*$E*sin(deg2rad((2*$D)+$M-$Md-$F))
-
185*sin(deg2rad($D+$Md+$F))
+
181*$E*sin(deg2rad((2*$D)-$M-(2*$Md)-$F))
-
177*$E*sin(deg2rad($M+(2*$Md)+$F))
+
176*sin(deg2rad((4*$D)-(2*$Md)+$F))
+
166*$E*sin(deg2rad((4*$D)-$M-$Md-$F))
-
164*sin(deg2rad($D+$Md-$F))
+
132*sin(deg2rad((4*$D)+$Md-$F))
-
119*sin(deg2rad($D-$Md-$F))
+
115*$E*sin(deg2rad((4*$D)-$M-$F))
+
107*$E*sin(deg2rad((2*$D)-(2*$M)+$F))
-
2235*sin(deg2rad($Ld))
+
382*sin(deg2rad($A3))
+
175*sin(deg2rad($A1-$F))
+
175*sin(deg2rad($A1+$F))
+
127*sin(deg2rad($Ld-$Md))
-
115*sin(deg2rad($Ld+$Md));



//Distance
$dist=
-
20905355*cos(deg2rad($Md))
-
3699111*cos(deg2rad((2*$D)-$Md)
-
2955968*cos(deg2rad((2*$D))))
-
569925*cos(deg2rad((2*$Md)))
+
48888*cos(deg2rad($M))
+
3149*cos(deg2rad((2*$F)))
+
246158*cos(deg2rad((2*$D)-(2*$Md)))
-
152138*$E*cos(deg2rad((2*$D)-$M-$Md))
-
170733*cos(deg2rad((2*$D)-$Md))
-
204586*$E*cos(deg2rad((2*$D)-$M))
-
129620*$E*cos(deg2rad($M+$Md))
+
108743*cos(deg2rad($D))
+
104755*$E*cos(deg2rad($M+$Md))
+
10321*cos(deg2rad((2*$D)-(2*$F)))
+
79661*cos(deg2rad($Md-(2*$F)))
-
34782*cos(deg2rad((4*$D)-$Md))
-
21210*cos(deg2rad((3*$Md)))
-
21636*cos(deg2rad((4*$D)-(2*$Md)))
+
2428*$E*cos(deg2rad((2*$D)+$M-$Md))
+
30824*$E*cos(deg2rad((2*$D)+$M))
-
8379*cos(deg2rad($D-$Md))
-
16675*$E*cos(deg2rad($D-$M))
-
12831*$E*cos(deg2rad((2*$D)+$M+$Md))
-
10445*cos(deg2rad((2*$D)+(2*$Md)))
-
11650*cos(deg2rad((4*$D)))
+
14403*cos(deg2rad((2*$D)-(3*$Md)))
-
7003*cos(deg2rad($M-(2*$Md)))
+
10056*$E*cos(deg2rad((2*$D)-$M-(2*$Md)))
+
6322*cos(deg2rad($D+$Md))
-
9884*$E*$E*cos(deg2rad((2*$D)-(2*$M)))
+
5751*$E*cos(deg2rad($M+(2*$Md)))
-
4950*$E*cos(deg2rad((2*$D)-(2*$M)-$Md))
+
4130*cos(deg2rad((2*$D)+$Md-(2*$F)))
-
3958*$E*cos(deg2rad((4*$D)-$M-$Md))
+
3258*cos(deg2rad((3*$D)-$Md))
+
2616*cos(deg2rad((2*$D)+$M+$Md))
-
1897*$E*cos(deg2rad((4*$D)-$M-(2*$Md)))
-
2117*$E*$E*cos(deg2rad((2*$M)-$Md))
+
2354*$E*$E*cos(deg2rad((2*$D)+(2*$M)-$Md))
-
1423*cos(deg2rad((4*$D)+$Md))
-
1117*cos(deg2rad((4*$Md)))
-
1571*$E*cos(deg2rad((4*$D)-$M))
-
1739*cos(deg2rad($D-(2*$Md)))
-
4421*cos(deg2rad((2*$Md)-(2*$F)))
+
1165*$E*$E*cos(deg2rad((2*$M)+$Md))
+
8752*cos(deg2rad((2*$D)-$Md-(2*$F)));
$lambda $Ld + ($long/1000000);
$betadeg2rad($lat/1000000);
$delta=385000.56+($dist/1000);
$omega 125.04452 - (1934.136261*$T) + (0.0020708 *$T $T) + (($T*$T*$T)/450000);
$L 280.4665 + (36000.7698 $T);
$Ldash 218.3165 + (481267.8813 $T);
$psi = (((-17.20/3600)*(sin(deg2rad($omega))))-((1.32/3600)*(sin(deg2rad(2*$L))))-((0.23/3600)*(sin(deg2rad(2*$Ldash))))-((0.21/3600)*(sin(deg2rad(2*$omega)))));
$lambda deg2rad($lambda $psi);
$ra = (quad(rad2deg(atan2((  ((cos(deg2rad($epsilon)))*(sin($lambda)))-((tan($beta))*(sin(deg2rad($epsilon))))),(cos($lambda))))))/15;
$dec rad2deg(asin(((sin($beta))*(cos(deg2rad($epsilon))))+((cos($beta))*(sin(deg2rad($epsilon)))*(sin($lambda)))));
$dra d($ra);
$mra m($ra);
$sra s($ra);
$ddec d($dec);
$mdec m($dec);
$sdec s($dec);
$pi asin(6378.14/$delta);
$k=0.272481;
$moon= (rad2deg(asin($k*sin($pi))))*120*60;
$deltaau $delta/149597870.691;
$Psi acos((cos($beta))*(cos($lambda-$Slon)));
$i rad2deg(atan2($R*sin($Psi),$deltaau-($R*cos($Psi))));
$kmoon= (1+(cos(deg2rad(($i)))))/2;
$ra1 deg2rad($ra*15);
$dec1 deg2rad($dec);
$xmoon quad(rad2deg(atan2(cos($Sdec)*sin($Sra-$ra1),(sin($Sdec)*cos($dec1))-(cos($Sdec)*sin($dec1)*cos($Sra-$ra1)))));

}

if ( isset(
$_GET['aperture']) ) { $_SESSION['aperture'] = $_GET['aperture'];}
$aperture $_SESSION['aperture']; 

if ( isset(
$_GET['flength']) ) { $_SESSION['flength'] = $_GET['flength'];}
$flength $_SESSION['flength']; 

if ( isset(
$_GET['pxsize']) ) { $_SESSION['pxsize'] = $_GET['pxsize'];}
$pxsize $_SESSION['pxsize']; 

if ( isset(
$_GET['pxwidth']) ) { $_SESSION['pxwidth'] = $_GET['pxwidth'];}
$pxwidth $_SESSION['pxwidth']; 

if ( isset(
$_GET['pxheight']) ) { $_SESSION['pxheight'] = $_GET['pxheight'];}
$pxheight $_SESSION['pxheight']; 

if ( isset(
$_GET['binningw']) ) { $_SESSION['binningw'] = $_GET['binningw'];}
$binningw $_SESSION['binningw']; 
if (
$binningw==""){
$binningw 1;}
if ( isset(
$_GET['binningh']) ) { $_SESSION['binningh'] = $_GET['binningh'];}
$binningh $_SESSION['binningh']; 
if (
$binningh==""){
$binningh 1;}


if (
$barlow==""){
$barlow 1;}
$barlow1 $barlow;
if ( isset(
$_GET['barlowother']) ) { $_SESSION['barlowother'] = $_GET['barlowother'];}
$barlowother $_SESSION['barlowother']; 
if (
$barlow=="other"){
$barlow $barlowother;}

$fratio =@(round(($flength*$barlow)/$aperture,2));
$fovw=@(round(((3438 * ($pxwidth*($pxsize/1000)))/($flength*$barlow)),2));
$fovh=@(round(((3438 * ($pxheight*($pxsize/1000)))/($flength*$barlow)),2));
$pixres=@(round(($binningw*(3438 * ($pxsize/1000000)*60)/(($flength*$barlow)/1000)),2));
$efl=round($flength*$barlow,0);


echo 
"<div style=\"position:absolute; top:65px; left:25px; width: 600px; height: 100px; z-index: 4;\">
<table width=\"600\"><tr><td valign=\"top\"><table><tr><td align=\"right\"><form action='fov.php' method='get'>
Aperture:</td><td><input type=\"text\" name=\"aperture\" size=\"4\" value=\"$aperture\"> mm</td></tr><tr><td align=\"right\">
Focal Length:</td><td><input type=\"text\" name=\"flength\" size=\"4\" value=\"$flength\"> mm</td></tr><tr><td align=\"right\">
Barlow: </td><td>
<select id=\"barlow\" name=\"barlow\">
<option value=\"0.33333\" "
;
if (
$barlow=="0.33333"){
echo 
"selected";}
echo 
">0.33x</option>
<option value=\"0.5\" "
;
if (
$barlow=="0.5"){
echo 
"selected";}
echo 
">0.5x</option>
<option value=\"0.66667\" "
;
if (
$barlow=="0.66667"){
echo 
"selected";}
echo 
">0.66x</option>
<option value=\"1\" "
;
if (
$barlow=="1"){
echo 
"selected";}else{
if (
$barlow==""){
echo 
"selected";}}
echo 
">No Barlow</option>
<option value=\"2\" "
;
if (
$barlow=="2"){
echo 
"selected";}
echo 
">2x</option>
<option value=\"3\" "
;
if (
$barlow=="3"){
echo 
"selected";}
echo 
">3x</option>
<option value=\"4\" "
;
if (
$barlow=="4"){
echo 
"selected";}
echo 
">4x</option>
<option value=\"5\" "
;
if (
$barlow=="5"){
echo 
"selected";}
echo 
">5x</option>
<option value=\"other\" "
;
if (
$barlow1=="other"){
echo 
"selected";}
echo 
">Other</option>
</select>
</td></tr><tr><td>&nbsp;</td><td><input type=\"text\" id=\"barlowother\" name=\"barlowother\" size=\"4\" value=\"$barlow\""
;
if (
$barlow1=="other"){
echo 
"class=\"nonhidden\"";}
echo
">
</td></tr></table>

</td><td valign=\"top\" align=\"right\"><table><tr><td align=\"right\">
Pixel Size:</td><td align=\"left\"><input type=\"text\" name=\"pxsize\" size=\"2\" value=\"$pxsize\"> microns</td></tr><tr><td align=\"right\">
Image size:</td><td><input type=\"text\" name=\"pxwidth\" size=\"2\" value=\"$pxwidth\"> x <input type=\"text\" name=\"pxheight\" size=\"2\" value=\"$pxheight\"> pixels
</td></tr>
<tr><td align=\"right\">
Binning:</td><td><input type=\"text\" name=\"binningw\" size=\"2\" value=\"$binningw\"> x <input type=\"text\" name=\"binningh\" size=\"2\" value=\"$binningh\">
</td></tr></table></td></tr></table></div>

<div style=\"position:absolute; top:150px; left:300px; width: 325px;  z-index: 4;\">
<table width=\"325\"><tr><td width=\"100\" align=\"left\">
<input type=\"submit\" value=\"Submit\"></td><td align=\"right\" valign=\"bottom\"><a href=\"foveyepiece.php\">Switch to visual view</a></td></tr></table></div>

<div style=\"position:absolute; top:190px; left:25px; width: 600px;  z-index: 4;\">
<table width=\"600\"><tr><td align=\"left\">
<table width=\"440\" style=\"border-spacing: 0pt;\"><tr><td>
<b>F ratio:</b></td>

<td align=\"center\">
<b>Focal Length:</b>
</td>

<td align=\"center\">

<b>Field of view:</b> </td>
<td align=\"right\">

<b>Resolution:</b></td>
<td>
</tr><tr><td>
f{$fratio}</td>
<td align=\"center\">

{$efl}mm</td>
<td align=\"center\">

{$fovw}' x {$fovh}'</td>
<td align=\"right\">

$pixres \"/pixel  </td>
<td></tr></table>

</td><td width=\"7\">&nbsp;</td><td align=\"right\">&nbsp;</td></tr></table></div>


<div id=\"divBg\">
    <div id=\"divBgColor\"></div>
    <div id=\"divTop0\" class=\"clTop\">
            <table width=\"126\" cellspacing=\"0\" class=\"table2\" ><tr><td onmouseover=\"extract(0)\"><a href=\"#\">Objects menu</a></td></tr></table>
            <div id=\"divSub0\" class=\"clSub\">

  <div class=\"dropdown\"  onmouseover=\"ieShow(0)\" style=\"width:596px; border:1px;\"><table width=\"596\" cellspacing=\"0\" class=\"table1\" ><tr> 

<td id=\"one-ddheader\" onmouseover=\"ddMenu('one',1)\" onmouseout=\"ddMenu('one',-1)\"  class=\"rightborder\">Messier</td>

<td id=\"two-ddheader\" onmouseover=\"ddMenu('two',1)\" onmouseout=\"ddMenu('two',-1)\" class=\"rightborder\">Caldwell</td>
  <div id=\"two-ddcontent\" onmouseover=\"cancelHide('two')\" onmouseout=\"ddMenu('two',-1)\" class=\"hidden\" style=\"left:150px;\">

    <ul>
      <li><a href=\"#\">Coming Soon!</a></li>    </ul>

  </div>

<td id=\"three-ddheader\" onmouseover=\"ddMenu('three',1)\" onmouseout=\"ddMenu('three',-1)\" class=\"rightborder\">Solar System</td>
  <div id=\"three-ddcontent\" onmouseover=\"cancelHide('three')\" onmouseout=\"ddMenu('three',-1)\" class=\"hidden\" style=\"left:300px;\">

    <ul>

      <li><a href=\"fov.php?object=mercury\" class=\"underline\">Mercury</a></li>
      <li><a href=\"fov.php?object=venus\" class=\"underline\">Venus</a></li>
      <li><a href=\"fov.php?object=mars\" class=\"underline\">Mars</a></li>
      <li><a href=\"fov.php?object=jupiter\" class=\"underline\">Jupiter</a></li>
      <li><a href=\"fov.php?object=jupitermoons\" class=\"underline\">Jupiter + Moons</a></li>
      <li><a href=\"fov.php?object=saturn\" class=\"underline\">Saturn</a></li>
      <li><a href=\"fov.php?object=uranus\" class=\"underline\">Uranus</a></li>
      <li><a href=\"fov.php?object=neptune\" class=\"underline\">Neptune</a></li>
      <li><a href=\"fov.php?object=moon\" class=\"underline\">The Moon</a></li>
      <li><a href=\"fov.php?object=sun\">The Sun</a></li>

  </ul>

  </div>


  <td id=\"four-ddheader\" onmouseover=\"ddMenu('four',1)\" onmouseout=\"ddMenu('four',-1)\"  class=\"leftborder\">Other</td></tr></table>
  <div id=\"four-ddcontent\" onmouseover=\"cancelHide('four')\" onmouseout=\"ddMenu('four',-1)\" class=\"hidden\" style=\"left:450px;\">

    <ul>
      <li><a href=\"fov.php?object=iss\" class=\"underline\">The ISS</a></li>
      <li><a href=\"fov.php?object=horsehead\" class=\"underline\">Horsehead Nebula</a></li>
      <li><a href=\"fov.php?object=ngc7000\" class=\"underline\">NGC7000</a></li>
      <li><a href=\"fov.php?object=ngc281\">Pacman Nebula</a></li>
    </ul>

</div>
  <table id=\"one-ddcontent\" onmouseover=\"cancelHide('one')\" onmouseout=\"ddMenu('one',-1)\" class=\"hidden2\" width=\"590\" cellspacing=\"2\">"
;



   
$n=1;
while(
$n<=110)
{
$n2=$n+1;
$n3=$n+2;
$n4=$n+3;
$n5=$n+4;
$n6=$n+5;
$n7=$n+6;
$n8=$n+7;
$n9=$n+8;
$n10=$n+9;
 echo 
"<tr><td><a href=\"fov.php?object=$n";
 echo 
"\" class=\"underline\">M$n</a></td>
<td><a href=\"fov.php?object=$n2"
;
 echo 
"\" class=\"underline\">M$n2</a></td>
<td><a href=\"fov.php?object=$n3"
;
 echo 
"\" class=\"underline\">M$n3</a></td>
<td><a href=\"fov.php?object=$n4"
;
 echo 
"\" class=\"underline\">M$n4</a></td>
<td><a href=\"fov.php?object=$n5"
;
 echo 
"\" class=\"underline\">M$n5</a></td>
<td><a href=\"fov.php?object=$n6"
;
 echo 
"\" class=\"underline\">M$n6</a></td>
<td><a href=\"fov.php?object=$n7"
;
 echo 
"\" class=\"underline\">M$n7</a></td>
<td><a href=\"fov.php?object=$n8"
;
 echo 
"\" class=\"underline\">M$n8</a></td>
<td><a href=\"fov.php?object=$n9"
;
 echo 
"\" class=\"underline\">M$n9</a></td>
<td><a href=\"fov.php?object=$n10"
;
 echo 
"\" class=\"underline\">M$n10</a></td></tr>";
$n=$n+10;
 }
  
echo 
"      </table>



  </div>
            </div>
    </div>

</div>

  </div>




</div>








"
;
if (
$fovh==""){
$fovh=40;
$fovw=60;}
$scale=@((598/60)/$fovw);
$vsize=$scale*$fovh*60;

$bottombt $vsize+231;
//border
//top
echo "<div style=\"position:absolute; top:230px; left:25px; z-index: 2;\"><img src=\"images/border.gif\" width=\"600\" height=\"1\"></div>";
//left
echo "<div style=\"position:absolute; top:231px; left:25px; z-index: 2;\"><img src=\"images/border.gif\" width=\"1\" height=\"$vsize";
echo 
"\"></div>";
//right
echo "<div style=\"position:absolute; top:230px; left:624px; z-index: 2;\"><img src=\"images/border.gif\" width=\"1\" height=\"$vsize";
echo 
"\"></div>";
//bottom
echo "<div style=\"position:absolute; top:$bottombt";
echo 
"px; left:25px; z-index: 2;\"><img src=\"images/border.gif\" width=\"600\" height=\"1\"></div>";


$diaobject=$$object;
$objectwidth=$diaobject*$scale;
$left=25+300-($objectwidth/2);
if(
$object 0){
list(
$width$height$type$attr) = getimagesize("images/messier/large/m$messier_number.jpg");
$objectheight= @(($height/$width)*$objectwidth);
}else{
if (
$object == "jupitermoons"){
$width $objectwidth*28;
$height $objectwidth*3.5;
$left=25+300-($width/2);
$objectheight$height;
}else{
if (
$object == "saturn"){
$width $objectwidth*2.4;
$height $objectwidth*1.2;
$left=25+300-($width/2);
$objectheight$height;
}else{
list(
$width$height$type$attr) = getimagesize("images/fov/$object.jpg");
$objectheight= @(($height/$width)*$objectwidth);}}}
$top=230+($vsize/2)-($objectheight/2);
$bbtop 232+$vsize;
$vsize2=$vsize+2;
$credt 310 $vsize;
//blockers
echo"<div style=\"position:absolute; top:230px; left:0px; width: 25px; height: $vsize2";
echo
"px;   background-color: #000000; z-index: 1;\"></div>";
echo
"<div style=\"position:absolute; top:230px; left:625px; width: 145px; height: $vsize2";
echo
"px;   background-color: #000000; z-index: 1;\"></div>";
echo
"<div style=\"position:absolute; top:0px; left:0px; width: 765px; height: 230px; background-color: #000000; z-index: 1;\"></div>";
echo
"<div style=\"position:absolute; top: $bbtop";
echo
"px; left:0px; width: 765px; height: 800px;   background-color: #000000; z-index: 1;\"></div>";



echo
"<img class=\"drag\" style=\"position: absolute; left: $left";
echo 
"px; top: $top";
if(
$object 0){
echo 
"px; z-index: 0;\"  src=\"images/messier/large/m$messier_number";
echo 
".jpg\"  width=\"$objectwidth\">";
}else{
if (
$object == "venus"){
echo 
"px; z-index: 0;\"  src=\"venusellipse.php?x={$xvenus}&k={$kvenus2}&w={$objectwidth}\">";
}else{
if (
$object == "mercury"){
echo 
"px; z-index: 0;\"  src=\"mercuryellipse.php?x={$xmercury}&k={$kmercury2}&w={$objectwidth}\">";
}else{
if (
$object == "mars"){
echo 
"px; z-index: 0;\"  src=\"marsellipse.php?x={$xmars}&k={$kmars2}&w={$objectwidth}\">";
}else{
if (
$object == "moon"){
echo 
"px; z-index: 0;\"  src=\"moonellipse.php?x={$xmoon}&k={$kmoon}&w={$objectwidth}\">";
}else{
if (
$object == "jupitermoons"){
echo 
"px; z-index: 0;\"  src=\"jovianmoonimage.php?JDE={$JDE}&w={$objectwidth}\">";
}else{
if (
$object == "saturn"){
echo 
"px; z-index: 0;\"  src=\"saturnringimage.php?JDE={$JDE}&w={$objectwidth}\">";
}else{
echo 
"px; z-index: 0;\"  src=\"images/fov/{$object}.jpg\"  width=\"$objectwidth\">";
}
}
}
}
}
}
}
echo 
"<div style=\"position:absolute; left:30px; top: $credt";
echo 
"px; z-index: 2; font-size:0.8em;\">Image Credit: $image_cred</div>";

$dayn = ($day 1);
$dayp = ($day 1);
$monthn = ($month 1);
$monthp = ($month 1);
$yearn = ($year 1);
$yearp = ($year 1);
$timepaneltop =245+$vsize;

echo 
"<div style=\"position:absolute; top:$timepaneltop";
echo 
"px;  left:25px; z-index: 2;\">
<form action='fov.php' method='get'><table style=\"border-width:thin; border-color:#333333; border-style:solid\" width=\"600\">

<td align=\"right\"><a href=\"" 
$_SERVER["PHP_SELF"] . "?day=$dayp\">-1 day</a>|<a href=\"" $_SERVER["PHP_SELF"] . "?day=$dayn\">+1 day</a></td>

<td align=\"right\"><a href=\"" 
$_SERVER["PHP_SELF"] . "?month=$monthp\">-1 month</a>|<a href=\"" $_SERVER["PHP_SELF"] . "?month=$monthn\">+1 month</a></td>

<td align=\"right\"><a href=\"" 
$_SERVER["PHP_SELF"] . "?year=$yearp\">-1 year</a>|<a href=\"" $_SERVER["PHP_SELF"] . "?year=$yearn\">+1 year</a></td>


<t ></td><tr><td align=\"right\">Day (1-31):<input type=\"text\" name=\"day\" size=\"2\" value=\"$day\">&nbsp;&nbsp;</td>
<td width=\"170\" align=\"right\">Month (1-12):<input type=\"text\" name=\"month\" size=\"2\" value=\"$month\">&nbsp;&nbsp;</td>
<td width=\"170\" align=\"right\">Year (4-digit):<input type=\"text\" name=\"year\" size=\"4\" value=\"$year\">&nbsp;&nbsp;</td>

<td  align=\"right\"><input type=\"submit\" value=\"Submit\"></td></tr></table>"
;



?><br></p>
    </div>
</div></div>
</body>
</html>