Behrang you did a good work but I tried to add it to extjs 2.0 and it seems it is not working.
I am having an Ext.dom.Element null value exception.

Does your project support extjs 2.0?