How can i make this work with Mac?

i have made a js file, its a search thing works fine on pc(opera, ns, and ie i know) but on macs only safari runs it and the others like FF iCab nd Mac:ie crash…


titles = new Array();
titles[0]="The revenge of Nathan who's hot";
titles[1]="Nathan's a dream boat";
creators = new Array();
creators[0] = "Poopie";
creators[1] = "Nathan";
images = new Array();
images[0] = "me.bmp";
images[1] = "you.bmp";
genres = new Array();
genres[0] = "Sexy";
genres[1] = "Nathan";
function src(){
 var val = document.serch.p.value
 for (var i=0; i<titles.length; i++){
  if (titles*.indexOf(val)>-1 || creators*.indexOf(val)>-1){
   titles*.indexOf(val);
   document.write("<table>
");
   document.write("<tr>
");
   document.write("<td>
");
   document.write("<a href=\"http://www.kirupa.com\" target=\"_parent\"><img src=\""+images*+"\" width=\"50\" height=\"50\" /></a>
");
   document.write("</td>
");
   document.write("<td>
");
   document.write("<font size=\"2\" face=\"tahoma\">"+titles*+"
<br />
");
   document.write("<b>"+creators*+"<br /></b></font>
");
   document.write("<font size=\"1\" face=\"tahoma\"><i>"+genres*+"<br /></i></font>
");
   document.write("</td>
");
   document.write("</tr>
");
   document.write("</table>
");
  } 
  
 }
}

any idea why?