New to Kirupa and Flash.Need to convert this JS to AS

we have purchased a template from template monster.
The header flash is having a text box and a button for the site search.
I want to add a site search script for the button click.
I mean, the user will enter the search text in the text box and click the search button.
then i want to write the below script (Note:here i have JavaScript i want this script to be converted to Action Script)

<script type="text/javascript">
var domainroot=""
function Gsitesearch(curobj){
curobj.q.value="site:"+domainroot+" "+curobj.qfront.value
<form action="" method="get" onSubmit="Gsitesearch(this)">
<p>Site Search :<br />
<input name="q" type="hidden" />
<input name="qfront" type="text" style="width: 180px" /> <input type="submit" value="Search" /></p>

Currently i have written in flash file’s button click

on (release, keyPress "<Enter>") {
address = "";

but, the above one is just bringing the google search. i want, google to search my textbox.
what i have to write in the button release?

Thanks & Regards