var date=new Date(); 
var y=date.getYear(); 
if (y<2000) {y=y+1900}; 
document.write(y);
//script by Jamie Johnson