function revert() {
window.status="Done"
document.forms.lookfor.SearchText.value=""
}
function FindProfile() {
searchcode = "<html><head><title>Search Results</title></head><body><div id='ResultDiv'>Searching...</div></body></html>"
result=window.open("","result","")
result.document.open()
result.focus()
result.document.write(searchcode);
SearchString = document.forms.lookfor.SearchText.value.toUpperCase();
if (SearchString == "")
{ ResultDiv.innerHTML = "&lt;You must enter text into the search box&gt;";
window.status="Done Searching";
return;
}
whsdirectory.recordset.moveFirst();
ResultHTML = "";
while (!whsdirectory.recordset.EOF)
{
TitleString = whsdirectory.recordset(document.forms.lookfor.type.value.toUpperCase()).value;
if (TitleString.toUpperCase().indexOf(SearchString)>=0) 
ResultHTML += "<table width='50%'><td style='border: #999999; border-style: solid; border-width: 1px; font-family: Geneva, Arial, Helvetica, san-serif; font-size: 12px;'>"
+"<b>First Name: </b>" 
+whsdirectory.recordset("FIRST")
+"<br>"
+"<b>Last Name: </b>"
+whsdirectory.recordset("LAST")
+"<br>"
+"<b>Position: </b>"
+whsdirectory.recordset("POSITION")
+"<br>"
+"<b>Voicemail: </b>"
+whsdirectory.recordset("VOICEMAIL")
+"<br>"
+"<b>E-Mail: </b>"
+"<a href='mailto:" + whsdirectory.recordset("EMAIL") + "'>" + whsdirectory.recordset("EMAIL") + "</a>"
+"<br>"
+"<b>Department: </b>"
+whsdirectory.recordset("DEPARTMENT")
+"</td><br /><br /><br /></table>"
whsdirectory.recordset.moveNext(); 

if (ResultHTML == "") 
result.ResultDiv.innerHTML = "Looking..."

else 
result.ResultDiv.innerHTML = "Results:" + ResultHTML
}
result.window.status="Done Searching"
}
