I have question about how to add correctly future date to date field.

I noticed, that I can easily add current time with:
var d=new Date();
form.setValues(targetfield1, form.dateToString(d));

But when I am trying to form expiration date for example 10 years from this
expirationdate.setYear(expirationdate.getYear()+10 );
form.setValues(targetfield2, form.dateToString(expirationdate));

With IE
It gives me correct date to datepicker field - Great - (I though that I am
great java script guru)...

BUT when date value has been saved to eDirectory - it is shown..
Sun Oct 22 07:11:36 EET 1911

And With Firefox
It shows incorrect value in datepicker field
And this cannot be saved in MM/DD/YYYY format..

I suppose my code adding 10 years is not correct... ( And I am not so good
typing javascript )