Hi Gourav,
I did get a chance to look into it but since there is no specific error message coming in the UI which is linked to this code its hard for me to figure out from just the plain text code, without the actual system.
Its better to open the same screen in Firefox and use Firebug to debug the javascript code.
Sorry cannot help more.
Regards,
Shobhit