thanks for the reply pradeep,

the code is working, but I have a doubt

what is ActiveXObject ? does it comes automatically or embedded with IE,

and if this is an ActiveX Object then the code is not pure JavaScript I think?