Redirect to external URL using JavaScript on Visualforce page

<div class="col-md-4 col-sm-4 col-xs-12 loginBox" >                
    <div>
        <h3 style="text-transform:uppercase;">Customers</h3>
    </div>
    <div>
        <h2 class="loginH2">I have a login</h2>
    </div>
    <div id="div1" class="div1">
        <p1>You are a customer submitting a claim for your vehicle or property.</p1> 
    </div>
    <div class="loginButton">
        <input type="submit" value="login"  onclick="toMyWeb(); return false;"/>
    </div>
    <script>
        function toMyWeb(){
            window.location.href="http://www.MyWeb.com";
        }
    </script>
</div>