//<-- moon phase javascript
//requires moonphaseheader.js to be included in the header to work
//simpy include this script where you wish the moons phase to be displayed

theDate = new Date();
theYear = theDate.getYear();
theMonth = theDate.getMonth()+1;theDay = theDate.getDate();
theMoonAge = getMoonAge(theYear, theMonth, theDay);
theMoonPhase = getMoonPhase(theMoonAge);
theMoonPhase = getMoonPhaseImg(theMoonAge);
theNextFullMoon = getNextFull(theMoonAge);
theNextNewMoon = getNextNew(theMoonAge);
document.write('<strong>The moon is '+theMoonPhase+'');
document.write('<br><img src=http://www.mysticminds.co.uk/images/moonage/age_'+escape(Math.round(theMoonAge))+'d.gif><br>');
document.write('Next full moon: ');
document.write(getLongDate( getNextFull(theMoonAge)));
document.write('<br>');
document.write('Next new moon: ');
document.write(getLongDate( getNextNew(theMoonAge) )+' ');

//-->