You did a lot of fux0ring about when you were trying to get the year. Maybe this might help.
Code:
<script language="JavaScript">
var time = new Date();
var year = time.getFullYear();
alert(year);
</script>
Just a thought.