
function search(frm) {
win = window.open("","","toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=1,resizable=yes,width=785,height=400");
win.document.write('<html>');
win.document.write('<head>');
win.document.write('<title> Search Results </title><style>body {background-color: #CAE1FF; font-family: Verdana,Arial,sans-serif; color: #000088;}.navbar {background-color: #990066; font-family: Verdana, sans-serif; text-decoration: none; text-align: left; text-indent: 10px; font-size: 1em; color: #CAE1FF; margin-top: 0; margin-left: -10; padding-left: 0; padding-top: 0; line-height: 23px; width: 761px; z-index: 1; visibility: visible;}.banner {text-align: left; position: relative; left: -10; margin-bottom: 0; padding-bottom: 0; border: 0;}A.nav:link { text-decoration: none; color: #CAE1FF;}A.nav:visited { text-decoration: none; color: #CAE1FF;}A.nav:active { text-decoration: none; color: #CAE1FF;}A.nav:hover { text-decoration: none; color: #FFFFFF;}</style>');
win.document.write('</head>');
win.document.write('<BODY>');
win.document.write('<table cellpadding=0 cellspacing=0 width=754 style="margin-left: -10px;"><tr><td nowrap align="left"><img class="banner" src="../Images/name.bmp"><a href="http://www.abramsoncenter.org"><img class="banner" src="../Images/CenterlogoB.bmp" border="0" alt="Our parent institution, the Madlyn and Leonard Abramson Center for Jewish Life"></a><img class="banner" border="0" height=89 width=187 src="../Images/entrance.jpg"></td></tr></table>');
win.document.write("<p class=navbar style='background-color: #990066; color: #CAE1FF;'> <a href='../about.htm' class='nav'>&nbsp;&nbsp;&nbsp;About Us</font>&nbsp;&nbsp;&nbsp;</a>|&nbsp;&nbsp;&nbsp;<a href='../research.htm' class='nav'>Research</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href='../applications.htm' class='nav'>Applications</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href='../library.htm' class='nav'>Library</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href='../LawtonAward.htm' class='nav'>Lawton Award</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href='../jobs.htm' class='nav'>Jobs</a>&nbsp;&nbsp;&nbsp;</p>");
win.document.write("<center><table border=0 cellspacing=10 width=80%>");
win.document.write('<h2> Search Results </h2>');    
txt = frm.srchval.value.split(" ");
for(m=0;m<txt.length;m++)
txt[m]=txt[m].toLowerCase();
win.document.write("<p align='left'>You searched for ...<b> "+ txt + "</b></p>");
fnd = new Array(); total=0;
for (i = 0; i < item.length; i++) {
fnd[i] = 0; order = new Array(0, 4, 2, 3);
for (j = 0; j < order.length; j++)
for (k = 0; k < txt.length; k++)
if (item[i][order[j]].toLowerCase().indexOf(txt[k]) > -1 && txt[k] != "")
fnd[i] += (j+1);
}
for (i = 0; i < fnd.length; i++) {
n = 0; w = -1;
for (j = 0;j < fnd.length; j++)
if (fnd[j] > n) { n = fnd[j]; w = j; };
if (w > -1) total += show(w, win, n);
fnd[w] = 0;
}
win.document.write("<br>Total found: "+total+"<br></body></html>");
win.document.close();
}
function show(which,wind,num) {
link = item[which][1] + item[which][0]; 
line = "<tr><td><a href='"+link+"'>"+item[which][2]+"</a> Score: "+num+"<br>";
line += item[which][4] + "<br>"+link+"</td></tr>";
wind.document.write(line);
return 1;
}
