I am new to javascript and I tried to change the type of a input using js.My work works well with Firefox and Chrome but not with IE.IE javascript debug mode says:

(SCRIPT256: Could not get the type property. This command is not supported. ).

This is the code I used to change the type.

Code:
var email_type=document.getElementById("email");
    email_type.type='text';

Please help me to debug this.
Thanx.