I have a question about modifying a javascript form. I plan to use this form on my website: <http://www.capullo.com/widgettest.html>

The form is a commercial flight search widget with "From", "To", and "Date" fields. I would like to modify the form, pre-populating the "To" field with a static, particular destination, to allow visitors to search for flights from their city of choice to our vacation destination. Also, is it possible to insert target="_blank" to open the submitted search in a new window?

Many thanks in advance for any help.

The code for the widget is as follows:

<script language="JavaScript">
<!--
var LSclickURL = 'http://click.linksynergy.com/fs-bin/click?id=11O18viT*xg&offerid=184477.7440&type=13&subid=0&tmpid=3647&RD_PARM1=';
//-->
</script>
<link rel="stylesheet" href="http://www.cheapoair.com/travel/travel_resources/remotesearch/linkshare/160x600-1/css/widget.css" type="text/css" />
<div style="position: relative;">
<table cellpadding="0" cellspacing="0" class="widget" width="160px" height="600px">
<tr>
<td valign="top">
<img src="http://www.cheapoair.com/travel/travel_resources/remotesearch/linkshare/160x600-1/images/160-600-img1.jpg" /> </td>
</tr>

<tr>
<td>
<table cellpadding="0" cellspacing="0" class="widget_160_600">
<tr>
<td><span>From/span></td>
<td><input type="text" class="dest" id="tbFrom" name="tbFrom" onFocus="this.value=''" onblur="javascript:this.value = this.value.toUpperCase(); " value="city name"/></td>
</tr>
<tr>

<td><span>Date/span></td>
<td><input type="text" class="date" id="tbDTime" value="mm/dd/yyyy" onClick="dispCalendar('tbDTime','tbDTime','tbRTime')" /><img src="http://www.cheapoair.com/travel/travel_resources/remotesearch/linkshare/160x600-1/images/cal.gif" alt="Click here for calendar" width="19" height="19" hspace="5" border="0" align="absmiddle" class="cal" onclick="dispCalendar('tbDTime','tbDTime','tbRTime')" style="cursorointer" /></td>
</tr>
<tr>
<td width="35px"><span>To/span></td>
<td><input type="text" class="dest" id="tbTo" onFocus="this.value=''" onblur=" javascript:this.value = this.value.toUpperCase();" value="city name" name="tbTo"/></td>
</tr>
<tr>

<td><span>Date/span></td>
<td><input type="text" class="date" id="tbRTime" value="mm/dd/yyyy" onclick="dispCalendar('tbRTime','tbDTime','tbRTime')" /><img src="http://www.cheapoair.com/travel/travel_resources/remotesearch/linkshare/160x600-1/images/cal.gif" alt="Click here for calendar" hspace="5" border="0" align="absmiddle" class="cal" onclick="dispCalendar('tbRTime','tbDTime','tbRTime')" style="cursorointer" /></td>
</tr>
<tr>
<td colspan="2">
<img src="http://www.cheapoair.com/travel/travel_resources/remotesearch/linkshare/160x600-1/images/btn-search.gif" alt="" onClick="SearchNow()" onMouseOver="this.src='http://www.cheapoair.com/travel/travel_resources/remotesearch/linkshare/160x600-1/images/btn-search-o.gif'" onMouseOut="this.src='http://www.cheapoair.com/travel/travel_resources/remotesearch/linkshare/160x600-1/images/btn-search.gif'" style="cursorointer" /> </td>
</tr>
</table> </td>

</tr>
</table>
</div>
<input id="hdnLocFrom" type="hidden" runat="server" />
<input id="hdnLocTo" type="hidden" runat="server" />
<iframe id='maskBox' frameborder="no" width="150" height="177" style='display: none; z-index: 500' src="about:blank"></iframe>
<div id='calBox' style='display: none; width: 150px; height: 177px; z-index: 999;left: 15px ! important; top: 420px ! important'>
</div>
<script language="JavaScript" src="http://www.cheapoair.com/travel/travel_resources/remotesearch/linkshare/160x600-1/script/SearchForm.js" type="text/javascript"></script>
<script language="javascript" src="http://www.cheapoair.com/travel/travel_resources/remotesearch/linkshare/160x600-1/script/calendarBuilder.js"></script>
<script language="JavaScript" type="text/javascript">
<!--

function setSearchDatafromQueryString()
{
var from
var to
from = ''
to = ''
if(from != '')
{
document.getElementById("tbFrom").value = from;
from.setDate(curDt.getDate()+7);
}
if(to !='')
{
document.getElementById("tbTo").value = to;
}


}

function dispCalendar(elm,dt1,dt2)
{
var mindt;
if(elm==dt1)//case of from date
{
mindt = new Date();
mindt = mindt.toDateString(); //mindate will be to date
}
else //case of to date
{
mindt= GetTag(dt1).value; //mindate will be from date
}
showCalendar(elm,GetTag(dt1).value + "," + GetTag(dt2).value,mindt);
}
-->

</script>
<script src="http://www.cheapoair.com/travel/travel_resources/TrackcheapoairAds.js" language="javascript" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
window.onload = function windowLoaded()
{

InitPage();

}
-->
</script>


<IMG border="0" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=11O18viT*xg&bids=184477.7440&type=13&subid=0">