Keyword = new Object(); Address = new Object(); Keyword[0] = 6 Keyword[1] = "Гайды." Address[1] = "http://dota-zone2008.narod.ru/gaid.htm" Keyword[2] = "Обои для рабочего стола." Address[2] = "http://dota-zone2008.narod.ru/galerej.htm" Keyword[3] = "FanArt. Творчество посетителей сайта." Address[3] = "http://dota-zone2008.narod.ru/fan_art.htm" Keyword[4] = "Реплэи игр" Address[4] = "http://dota-zone2008.narod.ru/repleys.htm" Keyword[5] = "карты Dota all stars" Address[5] = "http://dota-zone2008.narod.ru/maps.htm" Keyword[6] = "Видео" Address[6] = "http://dota-zone2008.narod.ru/video.htm" function contains(sub,s){ strlen1=sub.length strlen2=s.length istrue=false for(i=0;i<=strlen2;i++) { comp=s.substring(i-1,strlen2) comp=comp.substring(0,strlen1) if(comp==sub){ istrue=true break } } return istrue } function dolt() { loopCount=0; var Found=false var Item=document.forms[0].sub.value.toLowerCase(); stats='toolbar=no,location=no,scrollbars=yes,directories=no,status=yes,menubar=no,height=500,width=790,top=0,left=0' stats += 'scrollbars=yes,resizable=yes' MsgBox = window.open ("","msgWindow",stats) MsgBox.opener = window; MsgBox.opener.name = "opener"; MsgBox.document.write("Результаты поиска по запросу: "+Item+""); if(document.form1.sub.value=="") MsgBox.document.write('
Результаты поиска по запросу:
'); else MsgBox.document.write('
Результаты поиска по запросу: '+Item+'
'); for(var i=1; i<=Keyword[0]; i++){ contains(Item,Keyword[i].toLowerCase()) if(comp==Item){ loopCount++; Found=true; MsgBox.document.write('
'+loopCount+'.
'+Keyword[i]+'
Открыть станицу
') MsgBox.document.write('