// *******************************************************************************************
// ** Javascript P.O.D.                                                                			**
// ** (c) 1996-2008 DCR Team , Luzz y AcenTiLLo, http://dcrteam.sourceforge.net				 			**
// ** Free Sodtware under AFFERO GENERAL PUBLIC LICENSE , http://www.affero.org/oagpl.html	**
// *******************************************************************************************

var todayDate=new Date(); // inicializamos el objeto Date
var dia=todayDate.getDate(); // obtenemos la propiedad del mismo referida al día
var mes=todayDate.getMonth(); // ídem pero referida al mes
var anio=todayDate.getUTCFullYear(); // obtenemos el año

++mes;                    // incrementamos el número de mes porque empieza en 0 == 'enero'

// imponemos condición de que si el día o mes están comprendidos entre 1 y 9 lleven delante un 0

if (dia < 10) { dia = "0"+dia; }
if (mes < 10) { mes = "0"+mes; }
anio -= 2000;  // solución más sencilla , aunque se pueden implementar otras a voluntad de cada cual.
if (anio < 10) { anio = "0"+anio; }

// imprimimos resultados

document.write('<center><a rel="external nofollow" href="http://antwrp.gsfc.nasa.gov/apod/astropix.html"><img src="http://antwrp.gsfc.nasa.gov/apod/calendar/S_'+ anio + mes + dia + '.jpg" alt="NASA P.O.D." title="NASA P.O.D."></a></center>\n');
document.write("<center><li>Astronom&iacute;a P.O.D.</li></center>\n"); 