<script language="javascript">
//function to handle enter on keyboard
function txtWildPeopleFinder_KeyDown(e)
{
  if (e.keyCode == 13 || e.keyCode==10)
  {
    e.returnValue=false;
    DoWildPeopleSearch();
    return false;
  }
  else
    return true;
}
//escape apostrophes in search strings
function escapestr(str)
{
 return str.replace("'","%22");
}

//search function
function DoWildPeopleSearch()
{
var firstname = escapestr(document.all["firstname"].value);
var lastname =  escapestr(document.all["lastname"].value);
var url;

//search on last name
if(firstname == "")
{
 url = "/searchcenter/Pages/peopleresults.aspx?k=LastName%3A" + lastname;
 window.location=url;
 return;
}
 
//search on first name
if(lastname == "")
{
 url = "/searchcenter/Pages/peopleresults.aspx?k=FirstName%3A" + firstname;
 window.location=url;
 return;
}

//first and last
 url = "/searchcenter/Pages/peopleresults.aspx?k=lastname%3A" + lastname +  "%20FirstName%3A" + firstname;
 window.location=url;
 return;
}
</script>

<table cellpadding="3" cellspacing="0" border="0" width="100%" ID="Table3">
 <tr>
  <td width="80" nowrap>
   First Name:
  </td>
  <td width="100%">
   <input size="20" maxlength="100" id="firstname" name="firstname" type="text" onkeydown="txtWildPeopleFinder_KeyDown(event)">
  </td>
 </tr>
 <tr>
  <td width="80" nowrap>
   Last Name:
  </td>
  <td>
   <input size="20" maxlength="100" id="lastname" name="lastname" type="text" onkeydown="txtWildPeopleFinder_KeyDown(event)">
  </td>
 </tr>
 <tr>
  <td> &nbsp; </td>
  <td>
   <input type="button" onclick="DoWildPeopleSearch()" value="Search">
  </td>
 </tr>
</table>