var myDate = new Date(year,month,day);
myDate.setDate(day + n);
alert(myDate.toLocaleString());