<!-- ******************************************************************** -->
<!-- phases of the moon script -->
<!-- Original:  James Thiele (mailto:jet@eskimo.com) -->

<!-- Begin

 var moonblack = 'images/black_1x1.gif';
 var moonwhite = 'images/white_1x1.gif';
 
 var moonheight = 1;
 var moonsize = 20;
 var i;
 var currentDate  = new Date();
 var x = currentDate;

 currentDate.setTime(currentDate.getTime() + (currentDate.getTimezoneOffset()*60000));

 var blueMoonDate = new Date(96, 1, 3, 16, 15, 0);
 var lunarPeriod  = 29*(24*3600*1000) + 12*(3600*1000) + 44.05*(60*1000);
 var moonPhaseTime = (currentDate.getTime() - blueMoonDate.getTime()) % lunarPeriod;
 var moontime = Math.round((lunarPeriod-moonPhaseTime)/(24*3600*1000));
 
 document.write('<div id="moonlinkbox">');
 if (moontime ==  0) document.write('  <img class="floatleft noborder v-middle" src="images/moon13_50x50.jpg" height="50" width="50">'); <!-- full -->
 if (moontime ==  1) document.write('  <img class="floatleft noborder v-middle" src="images/moon12_50x50.jpg" height="50" width="50">');
 if (moontime ==  2) document.write('  <img class="floatleft noborder v-middle" src="images/moon11_50x50.jpg" height="50" width="50">');
 if (moontime ==  3) document.write('  <img class="floatleft noborder v-middle" src="images/moon10_50x50.jpg" height="50" width="50">');
 if (moontime ==  4) document.write('  <img class="floatleft noborder v-middle" src="images/moon10_50x50.jpg" height="50" width="50">');
 if (moontime ==  5) document.write('  <img class="floatleft noborder v-middle" src="images/moon09_50x50.jpg" height="50" width="50">');
 if (moontime ==  6) document.write('  <img class="floatleft noborder v-middle" src="images/moon08_50x50.jpg" height="50" width="50">');
 if (moontime ==  7) document.write('  <img class="floatleft noborder v-middle" src="images/moon07_50x50.jpg" height="50" width="50">'); <!-- 1st quarter -->
 if (moontime ==  8) document.write('  <img class="floatleft noborder v-middle" src="images/moon06_50x50.jpg" height="50" width="50">'); <!-- 1st quarter -->
 if (moontime ==  9) document.write('  <img class="floatleft noborder v-middle" src="images/moon05_50x50.jpg" height="50" width="50">');
 if (moontime == 10) document.write('  <img class="floatleft noborder v-middle" src="images/moon04_50x50.jpg" height="50" width="50">');
 if (moontime == 11) document.write('  <img class="floatleft noborder v-middle" src="images/moon03_50x50.jpg" height="50" width="50">');
 if (moontime == 12) document.write('  <img class="floatleft noborder v-middle" src="images/moon02_50x50.jpg" height="50" width="50">');
 if (moontime == 13) document.write('  <img class="floatleft noborder v-middle" src="images/moon01_50x50.jpg" height="50" width="50">');
 if (moontime == 14) document.write('  <img class="floatleft noborder v-middle" src="images/moon00_50x50.jpg" height="50" width="50">'); <!-- new -->
 if (moontime == 15) document.write('  <img class="floatleft noborder v-middle" src="images/moon00_50x50.jpg" height="50" width="50">'); <!-- new -->
 if (moontime == 16) document.write('  <img class="floatleft noborder v-middle" src="images/moon21_50x50.jpg" height="50" width="50">');
 if (moontime == 17) document.write('  <img class="floatleft noborder v-middle" src="images/moon20_50x50.jpg" height="50" width="50">');
 if (moontime == 18) document.write('  <img class="floatleft noborder v-middle" src="images/moon20_50x50.jpg" height="50" width="50">');
 if (moontime == 19) document.write('  <img class="floatleft noborder v-middle" src="images/moon19_50x50.jpg" height="50" width="50">');
 if (moontime == 20) document.write('  <img class="floatleft noborder v-middle" src="images/moon19_50x50.jpg" height="50" width="50">');
 if (moontime == 21) document.write('  <img class="floatleft noborder v-middle" src="images/moon18_50x50.jpg" height="50" width="50">'); 
 if (moontime == 22) document.write('  <img class="floatleft noborder v-middle" src="images/moon18_50x50.jpg" height="50" width="50">'); <!-- 3rd quarter -->
 if (moontime == 23) document.write('  <img class="floatleft noborder v-middle" src="images/moon18_50x50.jpg" height="50" width="50">'); <!-- 3rd quarter -->
 if (moontime == 24) document.write('  <img class="floatleft noborder v-middle" src="images/moon17_50x50.jpg" height="50" width="50">');
 if (moontime == 25) document.write('  <img class="floatleft noborder v-middle" src="images/moon17_50x50.jpg" height="50" width="50">');
 if (moontime == 26) document.write('  <img class="floatleft noborder v-middle" src="images/moon16_50x50.jpg" height="50" width="50">');
 if (moontime == 27) document.write('  <img class="floatleft noborder v-middle" src="images/moon15_50x50.jpg" height="50" width="50">');
 if (moontime == 28) document.write('  <img class="floatleft noborder v-middle" src="images/moon14_50x50.jpg" height="50" width="50">');
 if (moontime == 29) document.write('  <img class="floatleft noborder v-middle" src="images/moon13_50x50.jpg" height="50" width="50">'); <!-- full -->
 if (moontime == 30) document.write('  <img class="floatleft noborder v-middle" src="images/moon13_50x50.jpg" height="50" width="50">'); <!-- full -->
 document.write(' <div id="moonlinkboxtext">');
 if (moontime == 0) document.write('The moon is full today.');
 if (moontime == 1) document.write('The next full moon is in approximately ',moontime,' day.');
 if (moontime >  1) document.write('The next full moon is in approximately ',moontime,' days.');
 document.write(' </div>'); 
 document.write('</div>');
// End -->
<!-- ******************************************************************** -->
