/****************************************************************** ** ** ** Variable WebPage JavaScript ** ** Version 1.0 ** ** Web: http://www.bookvo.ru/~webdesign ** ** E-mail: bookvo@mail.ru ** ** Copyright © 2001 T-3 ** ** All Rights Reserved. ** ** ** ******************************************************************/ Keyword = new Object(); Address = new Object(); Keyword[0] = 50 Keyword[1] = "купить книгу, дом книги в Москве, книжный магазин, где купить книгу, купить книги недорого, купить недорогие книги интернет магазине, купить книги недорого в москве." Address[1] = "http://www.bookvo.ru" Keyword[2] = "Алексеев Сергей Петрович, исторические повести купить, исторические повести, алексеев, сергей петрович." Address[2] = "http://www.bookvo.ru/historypovesti.html" 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('
Результаты поиска: all found
'); 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('