I agree with Philippe, why not just do this in VBScript? Combining multiple scripting languages in the same program is something you should only do if you have to.
However, if you insist on doing this, then at least don't change the default scripting language for <% %> as that may be causing conflicts with the existing VBScript code.
Get rid of this -
<%@Language=JavaScript %>
And enclose your Javascript inside script tags instead, like so -
<script language="Javascript" RUNAT=SERVER>
.
.
.
</script>
or something similar. Then at least you are not causing conflicts with the existing VBScript code, which expects the default language for the <% %> tags to be VBScript!