The code below is from a ".js" file and I am having problems with figuring out how to concatenate the value from the TEXT FIELD within this code.

I'm trying to pass an item a person is searching for to another script (like the following):

http://www.domainname.com/search_result.php?find=dog

I'm trying to do this in the following line:

document.write('<form name="form" method="post" action="/search_results.php?find=" + document.getElementById(searchtext).value">');




<!-- Begin

if (showsearch == "yes") {

document.write('<form name="form" method="post" action="/search_results.php?find=" + document.getElementById(searchingtext).value">');

document.write('<table cellpadding="0" cellspacing="0" border="0" class="sidebartext"><tr><td valign="center">');

document.write('<font size="2">Search: </font>');

document.write('<input name="searchtext" id="searchtext" type="text" size="15" value="" class="searchsiteform">');

document.write('</td><td valign="center">');

document.write('<input type="hidden" name="searching" value="yes" />');

document.write('<INPUT TYPE="image" SRC="/assets/images/search-off.gif" name="search" border="0" onmouseover="this.src=\'/assets/images/search-on.gif\'" onmouseout="this.src=\'/assets/images/search-off.gif\'" alt="Search" hspace="3"><br>')

document.write('</td></tr></TABLE>');

document.write('</form>');

}

// End -->