adding Javascript form to wordpress widget

Hello folks.
I'm trying to insert a small iframe as a widget.
It is a javascript search form.
The question is how to open the results in a new page.

It uses window.location = , but I cannot manage to change the script to use window.open( in stead.

The whole html page is this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>CFF widget</title>
<script type="text/javascript">
        window.onload = function(){
            var form = document.getElementById("form1");
            form.onsubmit = function(){
                var searchText = document.getElementById("searchText");
                window.location = "http://domain.com/search/" + searchText.value;
                return false;
            };
        };
    </script>
<style type="text/css">
<!--
.widget{
 -webkit-box-shadow: 3px 3px 6px 2px #a9a9a9;
 -moz-box-shadow:3px 3px 6px 2px #a9a9a9;
 box-shadow:3px 3px 6px 2px #a9a9a9;
 }

</style></head>

<body>

<div id="BoxShadowCodePreview" style="display: block; width: 180px; margin-left: 0%; border: 1px solid rgb(255, 255, 255); text-align: center; vertical-align: bottom; font-family: Arial, Helvetica, sans-serif; background-image: url(fondo_widget.jpg);" class="widget"> <form id="form1" method="post" action="">
    <div>
      <p><img src="logo_widget.png" alt="xxxx" width="180" height="39" style="max-width:100%;height:auto;"></p>
      <p>Encuentra los oce como acceder a ellos.</p>
      <p>
        <input type="text" id="searchText" name="searchText" />
        <input type="submit" value="Buscar" />
        <br />
<br />
      </p>
</div>
    </form></div>
</body>
</html>

I hope some javascript guru can help me.

Thanks a lot!