Leaving pages where calendar is initiated in IE9 get error

I have this code working perfectly prior IE9, however i noticed there is a common javascript error when i leaving a page that had calendar object(s) initiated:-

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; BRI/2; .NET4.0C)
Timestamp: Tue, 3 Jul 2012 09:42:23 UTC

Message: Object doesn’t support this action
Line: 1
Char: 1
Code: 0
URI: localhost/setup/employeenew.php

This is how normally the object is initiated at body onload.

myCalendar = new dhtmlXCalendarObject([“calendar”,“calendar2”]);
myCalendar.setDateFormat(“%d-%m-%Y”);
myCalendar.hideTime();

Any idea?

Are you using the latest Calendar version ? If the problem occurs with the latest one, please attached a complete demo.