Strange getMonth/setMonth problem

Ok, the code is attached, and you can use it by adding onfocus=“cal.showCal(this);” to any text input like this:

<input name="demo" type="text" maxlength="10" size="10" **onfocus="cal.showCal(this);"** />

Now, The problem I have it that the month down button doesn’t work, and the month up button goes 2 months at a time…except from Dec to Jan…which it does correctly.

Anyway, It sounds easy, but I tried manually changing the adjustment in the Calendar.prototype.changeMonth function like this:

this.current.setMonth(this.current.getMonth()+1);

And it still goes by 2. So I tried this:

this.current.setMonth(this.current.getMonth());

And it doesn’t change (as expected), so I tried this:

this.current.setMonth(this.current.getMonth()-1);

And it doesn’t change!!! How can this.current.getMonth()-1 == this.current.getMonth()!!!

Anyway, the problem is that creating a test case didn’t seem to work…I couldn’t repeat the glitch. Maybe someone can find my glaring error? I know that this system worked not that long ago…I HAVE made changes, but I have no idea where this went wrong…