Remove the
Java code from your
JSP and use JSTL and EL. Java scriptlets have been obsolete for over 13 years.
Do not use Hungarian notation for naming things in JavaScript. That's not the convention and makes your code hard to read (and makes you look foolish).
Use jQuery to keep the JavaScript tidy and make sure that it works correctly across all browsers.
Submit buttons should be of type "submit", why is it not?
Why do you want to close the window? That seems really unfriendly.