Qualcuno potrebbe modificare il codice ke dopo posto in modo che visualizzi un'img diversa per ogni fare lunare?

Grazie!

codice:

<!-- Begin
// Save the two necessary images from our example page at:
// http://messages.javascriptsource.com/moon-phases.html

var black = "../grafica/Layout/black.gif";
var white = "../grafica/Layout/yellow.gif";
var height=1;
var size = 18;
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 percentRaw = (moonPhaseTime / lunarPeriod);
var percent    = Math.round(100*percentRaw) / 100;
var percentBy2 = Math.round(200*percentRaw);
var left  = (percentRaw >= 0.5) ? black : white;
var right = (percentRaw >= 0.5) ? white : black;
var time = Math.round((lunarPeriod-moonPhaseTime)/(24*3600*1000));

document.write("<center>");

if (percentBy2 > 100) {
	percentBy2 = percentBy2 - 100;
}
for (i = -(size-1); i < size; ++i) {
	var wid=2*parseFloat(Math.sqrt((size*size)-(i*i)));
	if (percentBy2 != 100)
		document.write ("[img]+left +[/img]");
	if (percentBy2 != 0)
		document.write("[img]+right+[/img]");
		document.write("
");
	}
		
		if (time > 1) {
			document.write("<font size='1'>Luna piena fra ",time," giorni.</font>");
		}
		if (time == 1) {
			document.write("<font size='1'>Domani luna piena.</font>");
		}
		if (time == 0) {
			document.write("<font size='1'>Luna piena.</font>");
		}


//  End -->