It is clear that it is not your code, as long as you don't even know the difference between Java and JavaScript. Different languages with different scopes.
On the other hand, I see no checkbox there 
Anyway, you have made an HTML error: you have nested a FORM element within another FORM element, which is HTML and JavaScript illegal.
[COLOR="Blue"]<form[/COLOR] action="http://qodeplay.com/opencart_v1.5.1.1/upload/index.php?route=account/register" method="post" enctype="multipart/form-data" id="register">
// ... some code
[COLOR="Red"]<form[/COLOR] name="form1" action="#" method="post">
/...
[COLOR="Red"]</form>[/COLOR]
// ... some code
[COLOR="Blue"]</form>[/COLOR]
You should create your DOM structure in such way, so that the forms should be independent, one from each other. Or use a single form and change dynamically (via JavaScript) the value of the action attribute, according to your needs.