Ciao,

come mai quando fa il new date mi scrive 2006?...non capisco..

<table id='scadenza' width="100%">
<tr>
<td id='30' width="60%">30gg</td>
<td id='40' width='30%'>10gg</td>
<td id='50' WIDTH='10%'>Scaduto</td>
</tr>
</table>
<script>

var data = new Date();
var giorno = data.getDate();
var mese = data.getMonth();
mese = mese +1;
//if(giorno < 10) {
// giorno = 0 + giorno;
//}
var anno = data.getYear();
alert(anno);
var oggi = giorno + "/" + mese + "/" + anno;

var uno="12/1/2005";
var due=oggi;

var prima = new Date(uno);
var seconda = new Date(due);

diff = (seconda - prima) / (1000 * 3600 * 24);

alert(oggi);
alert(uno);
alert(prima);
alert(seconda);
alert(diff);

if (diff <= 30) {
document.getElementById('30').style.backgroundColo r='#00c200';
}
if (diff > 30 && diff < 40) {
document.getElementById('30').style.backgroundColo r='#00c200';
document.getElementById('40').style.backgroundColo r='ffff00';
}
if (diff > 40) {
document.getElementById('30').style.backgroundColo r='#00c200';
document.getElementById('40').style.backgroundColo r='#ffff00';
document.getElementById('50').style.backgroundColo r='#ff0000';
}
</script>


grazie