OK, I figured it out and I am going to post the solution in case of someone else bump with the same problem.
Since using a custom <form> tag could cause a conflict with the native <form> tag of the template.master I decided to supress it. The problem is that I forgot that the submit button depends on the "action" value into the <form> tag and when you supress the <form> tag its value will be null and therefore it will force to reload the same page, EVEN IF YOU TRY TO OVERRIDE IT WITH JAVASCRIPT.

The solution to avoid it therefore is to replace this:
<input type="submit" onclick="MyCustomSearch()"/>
WITH this:
<input type="button" value="Search" onclick="MyCustomSearch()"/>
Actually I am ALWAYS forgetting about this issue and repeating the same mistake again and again...
