problemas en el llamado a funciones

alvedder
12 de Diciembre del 2007
Hola, no se porque no funciona este codigo, es decir, se genera el ícono .gif, pero al presionarlo, no ejecuta la funcion, agradecería a quien le pueda hechar una miradita saludos.
<td>
<input name="fecha" value="<?php print $mysql_date = date("d-m-Y"); ?>" size="8" readonly />
<img src="modules/mod_rendiciones_cli/images/cal.gif" border="0"
onClick="ShowCalendar('document.frmvencido.fecha',<?php print (date('Y')-1).",".(date('Y')); ?>,
'dd/mm/yyyy')"
style="cursor:pointer" title="Cambiar Fecha" />

</td>

y la función:

function ShowCalendar(CONTROL,START_YEAR,END_YEAR,FORMAT,DAYSFROM) {
ControlToSet = eval(CONTROL);
if ( ControlToSet.value != "" ) {
ShowDate.setDate( ControlToSet.value.substring( 0 , 2 ) );
ShowDate.setMonth( ControlToSet.value.substring( 3 , 5 )-1 );
ShowDate.setYear( ControlToSet.value.substring( 6 , 10 ) );
} else {
if ( DAYSFROM != null ) {
ShowDate = new Date;
ShowDate.setDate( ShowDate.getDate() + DAYSFROM );
}
}
StartYear = START_YEAR;
EndYear = END_YEAR;
FormatAs = FORMAT;
var strFeatures = "width=" + CalWidth + ",height=140" + ",left=" + LEFT + ",top=" + TOP;
var CalWindow = window.open("modules/mod_vencidos/cale.sys.php","Calendario", strFeatures)
CalWindow.focus();
}