<!--

// Data starts here:

page=new Array();
page[1]=new Array("wedding_dresses.html","1st Call for Weddings - Wedding Portal","1st Call for Weddings offers new and once worn designer wedding dresses with gowns from top designers such as Alan Hannah, Catherine Rayner and much much more.","1st Call for Weddings once worn designer wedding dresses, classified advertising wedding services, on-line shop, wedding accessories, shopping cart system, secure credit card transactions, secure payment gateway, web site traffic, wrong keywords, designer wedding dresses, top ten rankings, major search engines, web site logs, bridal shoes, veils, tiaras, wedding cameras, wedding insurance, secure transaction server, 128-bit secure socket layer encryption, SSL, bridal magazines");
page[2]=new Array("military_surplus.html","ADV Militaria - Military Surplus, Militaria and Collectables","ADV Militaria supply military surplus, militaria and collectables from the Boer War and World War I to the present day.","ADV Militaria on-line shop military surplus, army surplus, military collectables, militaria, military clothing, Boer War, First World War, WW1, present day, military collectors, web site logs, C&J Medals, military medals, regimental badges, ties, accoutrements military lady, gentleman, E-commerce Solutions, Actinic Business, On-line payments");
page[3]=new Array("book_now.html","Book Your Internet Training from CTC Solutions","Book now for your Internet training course with CTS Solutions.","Internet training courses book now");
page[4]=new Array("military_medals.html","C&J Medals - Medal Mounting and Medal Framing Services","Specialists in British military medals with a range of medal mounting, medal framing and medal cleaning services.","C&J Medals, British military medals, medal mounting, medal framing, medal cleaning services, C&J's John Christine Southern, regimental ties, medal mounting, medal framing");
page[5]=new Array("contact_us.html","Contacting The Computer Technology Corps Limited","How to contact The Computer Technology Corps Limited.","The Computer Technology Corps Limited, Henley-on-Thames, Oxfordshire");
page[6]=new Array("startup_disk.html","Creating a Startup Disk in Windows 95/98/Me","Instructions for creating a bootable start-up disk in Windows 95/98.","Windows startup disk, Windows 95/98, bootable disk, hard disk");
page[7]=new Array("ctc_clients.html","CTC Clients for Web Site Services","Web site design and internet marketing clients from CTC.","1st Call for Weddings, once worn designer wedding dresses, bridal wear, ADV Militaria, army surplus, military collectables, militaria, Boer War, first world war, C&J Medals, British military medals, military medals framing, mounting, cleaning services, First Asean, B2B services, Asia, South East Asia, Europe, company incorporation, Internet banking, Internet, ecommerce services, administration, logistics, marketing services, Phoenix Leisure, team building, corporate entertainment, multi activity events, Prism, Renshaw's College, Focus Events");
page[8]=new Array("feedback.html","CTC Customer Enquiry Form","If you would like further information on any of CTC's services, please state your requirements using thbis form.","web site design services, e-commerce services, internet marketing services, web site audits, consultancy, Internet training, PC support services, PC troubleshooting, PC installations, upgrades, internet set-up, configuration, data backup, recovery virus detection, prevention, removal networking solutions");
page[9]=new Array("knowledge_base.html","CTC Solutions Knowledge Base and FAQs","Articles on driving trageted traffic to your web site, internet security and many other subjects.","knowledge base targeted web site traffic, internet security, windows troubleshooting tips, windows startup disk, data backup faq, virus faq, windows disk utilities, uninstalling windows applications");
page[10]=new Array("mission_statement.html","CTC Solutions Mission Statement","CTC's staff are committed to a high level of service which doesn't stop when a sale has been made or when a job has been completed.","mission statement, Thames Valley, professional approach");
page[11]=new Array("data_backup_1.html","Data Backup and Archiving FAQ","Guidelines for backing up your data and software in Windows.","data backup, archiving, backup strategy, hard disk, recordable compact disk, system files, application files, data files, data loss, hard disk failure, virus attack, hardware failure, disaster contingency plan, network connectivity, data restoration, site rental, CD-R, magnetic media, optical media, backup drive, tape drives, CD-R drives, removable disk drives, network drive");
page[12]=new Array("data_backup_2.html","Data Backup and Recovery FAQ","Step-by-step instructions on backing up your data in Windows 95/98/Me.","backup drive, floppy diskette, partial backup");
page[13]=new Array("data_backup_faq.html","Data Backup and Recovery FAQ","FAQ on databackup and recovery with instructions on backing up your data in Windows 95/98/Me.","data backup, data recovery");
page[14]=new Array("data_backup.html","Data Backup and Recovery Services from CTC Solutions","CTC 1st Recall is a comprehensive data security service covering backup, archiving and recovery of data, and checking for viruses on PCs.","data backup, data security data archiving, data recovery, recordable CD, removable disk, hardware crash, backup drives, backup strategy, virus check");
page[15]=new Array("disk_utilities.html","Disk Utilities FAQ","Instructions for using Scandisk and Disk defragmenter.","disk utilities, hard disk lost file clusters, Scandisk, Disk Defragmenter");
page[16]=new Array("defrag.html","Disk Utilities FAQ - Disk Defragmenter","Instructions for using Disk Defragmenter in Windows 95/98/Me.","Disk Defragmenter, disk optimiser, partial backup, hard disk, defragment, defragmentation");
page[17]=new Array("scandisk.html","Disk Utilities FAQ - Scandisk","ScanDisk is a diagnostic tool for detecting errors on the hard disk and for recovering lost clusters, parts of files, on the disk.","Scandisk, diagnostic tool, hard disk errors, lost clusters, disk defragmenting");
page[18]=new Array("domain_names.html","Domain Name Registration Service","Use this form to find out if the domain name you want is available.","domain name registration service, approved internet services");
page[19]=new Array("e-commerce_solutions.html","E-Commerce Solutions from CTC","We offer e-commerce services and software, payment gateway integration and related services.","e-commerce services, virtual store front e-commerce shopping cart systems, shopping cart, secure payment gateway, actinic catalog, actinic business, on-line catalogue, order processing, e-commerce integration, payment solution provider, PSP");
page[20]=new Array("b2b_services.html","First Asian International - b2b Services","We offer b2b services to and from Asia including company incorporations, internet banking, internet and e-commerce services, logistics and marketing.","First Asian International, B2B services, Asia companies, South East Asia, Europe, company incorporation, Internet banking, e-commerce services, administration, logistics, marketing services");
page[21]=new Array("getting_found.html","Getting Found - Driving Targeted Traffic to Your Web Site","Internet training in search engine positioning, web site promotion and Internet marketing.","Internet training, targeted traffic, search engines, Submitting ranking, keywords, monitoring traffic, web site logs visitors, automatic submission, submission strategies, directories");
page[22]=new Array("help_with_searching.html","Help With Searching","Help with search the web with guidelines on how to search and what keywords to enter.","Searching The Web, search terms, optimise search, key words, search engines");
page[23]=new Array("internet_marketing_services.html","Internet Marketing Services from CTC Solutions","We offer search engine positioning, optimisation and submission, newsletters and opt-in mailing lists, e-mail broadcasts, and press releases.","Internet marketing services, search engine positioning, search engine optimisation, newsletters, opt-in mailing lists, e-mail broadcasts, press releases, banner exchanges, banner advertising, search engines, top ranking, search engine audits search engine submissions, web site monitoring, web directories, web site administration service, opt-in mailing lists, existing customer base, unsolicited e-mail campaigns, spamming");
page[24]=new Array("index.html","Internet Marketing, Web Site Promotion and Design Services","We offer search engine positioning, Internet marketing, web design, Internet training and PC support solutions.","internet marketing, web site promotion, design services web site design, consultancy, e-commerce shopping cart systems, payment gateway integration, search engine positioning, internet marketing services, internet training computer support services, pc users, pc troubleshooting, pc installations, upgrades, internet set-up, configuration, data backup, recovery, virus detection, prevention, removal, troubleshooting tips");
page[25]=new Array("internet_security_2.html","Internet Security - Cookies and Spyware","What measures should you take to improve the security of your computers?","Internet Security, virus attack, cookies, Windows security issues, spyware applications, ET applications, Firewall, cookie manager");
page[26]=new Array("internet_security_4.html","Internet Security - Internet Banking","Is Internet banking safe and, if not, is your money safe with an Internet bank?","internet security, internet banking, on-line banking, Internet-only banks, Internet bank robbery, TCP/IP, security loopholes, network eavesdroppers, electronic commerce, Internet fraud, on-line banks, high street banks, fraudulent transactions, Virtual Private Network");
page[27]=new Array("internet_security_5.html","Internet Security - Public Key Encryption, SSL and VPNs","Public key encryption, virtual private networks and secure socket layer encryptionm.","internet security, public key encryption, SSL, VPNs, secure socket layer encryption, SSL, server authentication, data encryption, client authentication, encryption systems");
page[28]=new Array("internet_security_3.html","Internet Security - Using Credit Cards On-Line","What precautions should you take to protect your personal information when providing this on-line?","internet security, credit cards, on-line buying, packet sniffer, secure socket layer, SSL, encryption, SSL enabled, Which Web Trader");
page[29]=new Array("internet_security_1.html","Internet Security - Viruses","What can you do to protect your computer from virus attack or, in the event of catching a virus, remove it from your system?","computer viruses, infected diskettes, E-mail messages, Outlook Express, Wscript/kak,worm, Windows Registry, e-mail attachments, Prelissa virus, anti-virus software");
page[30]=new Array("internet_security.html","Internet Security FAQ","What measures should you take to make your time on-line as safe as possible?","Internet Security on-line shopping, Internet banking, anti-virus software spyware applications, on-line purchases on-line banking");
page[31]=new Array("internet_services.html","Internet Services from CTC Solutions","We offer e-commerce services, internet marketing and search engine positioning, web site design, Internet training, and domain name registration.","Internet services, web site design, corporate web site, e-commerce services, virtual store front, internet marketing services, web site promoting, target audience, search engine positioning, e-mail broadcasts, press releases, web site audits, consultancy, web site surveys, major search engines, keyword searches, business-oriented internet training, Actinic Catalog, Actinic Business, e-commerce software, domain name registration");
page[32]=new Array("internet_setup.html","Internet Set-up and Configuration Services from CTC Solutions","Advice on connecting to the Internet, installation of hardware and software, training, and technical support.","Internet set-up, on-line services hardware installation, software training, technical support, modem installation, email set-up, browser software, Internet Service Provider, ISP, virus check");
page[33]=new Array("internet_training.html","Internet Training Services from CTC Solutions","We offer a range of courses under the general theme Doing Business on The Internet - Making Your Web Site Pay.","Internet training, targeted traffic, website traffic, online shop, secure credit card processing system, web copyright, trade marks, domain names");
page[34]=new Array("key_personnel.html","Key Personnel at CTC Solutions","Specialising in CD-ROM systems integration, geographical information systems, applications design and programming, web site design and maintenance, technical troubleshooting and Internet marketing.","Christopher Wellings, computer professional, CD-ROM systems integration, geographical information systems, applications design, programming, web site design, maintenance, technical troubleshooting, Internet marketing, computer programmer");
page[35]=new Array("networking_solutions.html","Networking Solutions from CTC","Connect your computers in a peer-to-peer network sharing resources such as printers, CD-ROM drives and modems.","networking solutions, stand-alone PCs local area network, sharing resources printers, CD-ROM drives, modems, peer-to-peer networking, Windows Me, Windows 98, Windows 95 or Windows for Workgroups, 10Base-T, 100Base-T, fast Ethernet connectivity, network, administering, maintaining, administer remotely, hardware, software, installation, testing, network administration, technical support,");
page[36]=new Array("new_for_2002.html","New Web Sites for 2002 from CTC Solutions","Web site design and Internet marketing services from CTC - New for 2002.","Focus Events, team building, corporate entertainment, multi activity days, PRISM, clinical research Lupus nephritis MRC funding, Renshaw's College, Distance learning, university degrees");
page[37]=new Array("press_releases.html","News and Press Releases from CTC Solutions","CTC Solutions most recent successes include the highly acclaimed web site at 1st Call for Weddings, a site specialising in wedding dresses and bridal wear.","news, press releases, CTC Solutions, 1st Call for Weddings, wedding dresses, bridal wear, wedding services, on-line shop, C&J Medals, military medals, regimental badges, insignia, ADV Militaria, on-line army surplus shop, Phoenix Leisure, team building, corporate entertainment, First Asian International, business to business, b2b services, Asia, Europe");
page[38]=new Array("other_clients.html","Other Clients from CTC Solutions","A selection of clients from CTC Solutions.","Folio, graphic design, desk top publishing, web site design, SingleSport, Sporting holidays, single people, Preston Partnership, niche legal practice, commercial work, dot com companies, Internet, employment law");
page[39]=new Array("installations_and_upgrades.html","PC Installations and Upgrades from CTC Solutions","A complete support service, covering advice on which systems to buy, installation of your hardware and software, configuring your system, and on-site assistance.","installations, upgrades, support service, hardware installation, software configuring, on-site assistance, inexperienced PC users, system unit, CD-ROM drive, printer, fax/modem, installing software, configuring system, virus check, PC set-up");
page[40]=new Array("company_profile.html","PC Support Services and Internet Marketing Solutions","We offer web site design and consultancy, e-commerce software and solutions, internet marketing and search engine positioning services.","PC support services, internet marketing, The Computer Technology Corps, web site design, E-commerce solutions, shopping cart system, custom payment pages, payment gateway, search engine positioning, Internet marketing services, targeted traffic, Internet training, Henley-on-Thames, computer support services, Thames Valley, PC troubleshooting, PC installations, upgrades, Internet set-up, configuration, data backup, recovery, Virus detection, prevention, removal, on-site support, maintenance");
page[41]=new Array("pc_support.html","PC Support Services from CTC Solutions","We offer PC troubleshooting, PC installations and upgrades, internet set-up and configuration, data backup and recovery, virus detection, prevention and removal and networking solutions .","support services, PC users, PC troubleshooting, PC installations, upgrades, Internet set-up, configuration data backup, recovery, virus detection, prevention, removal, networking solutions, on-site support, maintenance, share resources, install equipment, quality service, training needs, technical support services");
page[42]=new Array("pc_troubleshooting.html","PC Troubleshooting Services from CTC Solutions","CTC Solutions is a dynamic PC troubleshooting service aimed at business users who need a rapid response to an urgent problem.","PC troubleshooting, business users virus check");
page[43]=new Array("team_building_events.html","Phoenix Leisure - Corporate Team Building Events","Phoenix Leisure provide team building and corporate activity days to clients in the South of England.","Phoenix Leisure, corporate entertainment, team building events, multinational corporations, web site traffic, team building exercises");
page[44]=new Array("recruitment.html","Recruitment Opportunities at CTC Solutions","We are looking for people with knowledge of HTML, JavaScript and ASP, Actinic Catalog, Actinic Business or Actinic Developer, Macromedia Dreamweaver or Dreamweaver UltraDev.","recruitment opportunities, employment opportunities, web sites design, HTML, JavaScript, ASP, Actinic Catalog, Actinic Business, Actinic Developer, Macromedia Dreamweaver, Dreamweaver UltraDev");
page[45]=new Array("search_engines_8.html","Search Engine Placement - Getting Listed on Yahoo","With nearly 40% of search engine traffic, Yahoo is potentially a very important source of visitors to your web site.","web site targeted traffic yahoo submission guidelines, submit manually");
page[46]=new Array("search_engines_5.html","Search Engine Positioning - Achieving a High Ranking","Guidelines for achieving a high ranking with the major search engines.","targeted traffic web site, high ranking, second hand designer wedding dresses, used wedding dresses, designer wedding gowns, top ranking keyword");
page[47]=new Array("getting_your_website_found.html","Search Engine Positioning - Driving Targeted Traffic To Your Web Site","Guidelines for driving targeted search engine traffic to your web site.","Targeted Traffic, target audience, direct mail, radio, television advertising, Telemarketing, Press releases, E-mail broadcasts, Banner advertisements, banner exchanges, search engines Submission, directories, direct marketing, unsolicited e-mails, advertising banner, ranking? 1st Call for Weddings");
page[48]=new Array("search_engines_4.html","Search Engine Positioning - Getting Indexed","Before you submit your site to the major search engines, it important to understand what they will look for in your site and what will achieve a high ranking.","targeted traffic web site, search engine ranking, major search engines, search results, meta description, meta keywords, synonyms, misspellings");
page[49]=new Array("search_engines_3.html","Search Engine Positioning - Getting Listed","Before you can see your site listed in one of the major search engines, you must submit your URL to that site.","targeted web site traffic, major search engines, add url hyperlink, web address, search engine submission software, manual submission");
page[50]=new Array("search_engines_6.html","Search Engine Positioning - Submitting Your Site","Guidelines for submitting your web site to the major search engines, involving a complex cycle of submitting, monitoring visitors to your site, and resubmitting.","targeted traffic web site, top ranking, submitting, monitoring visitors search engines, meta tag description");
page[51]=new Array("search_engines_7.html","Search Engine Positioning - Techniques to Avoid","A number of techniques can get your site omitted from the search engine rankings.","targeted traffic web site rankings, spamming, wrong keywords, hidden text, phantom pixels, hidden hyperlinks, missing hyperlinks, poor spelling, site under construction, frames, search engines, noframes declaration");
page[52]=new Array("search_engine_positioning.html","Search Engine Positioning and Internet Marketing Services from CTC Solutions","We offer search engine audits, positioning and web site monitoring services.","search engine positioning, top ranking, major search engines, directories, search engine audits, search engine optimisation, submissions, web site monitoring search engines, targeted traffic, keyword phrases, remedial action, basic audit, ease of navigation, ease of use, download times, search engine compatibility, full audit, monitor traffic, JavaScript tracking");
page[53]=new Array("search_engines_1.html","Search Engines - What Are They?","Search engines are web sites that list other web sites. There are two types: robots and directories.","targeted traffic, search engines, robots, directories, spidering crawling, search engines ranking");
page[54]=new Array("search_engines_2.html","Search Engines - Why Are They Important?","It is estimated that somewhere between 40% and 80% of all Internet traffic comes from search engines.","targeted web site traffic major search engines Internet traffic, search engines submission");
page[55]=new Array("search_engines_and_directories.html","Searching The Web - Links to Search Engines and Directories","List of search engines and directories in the UK and Internationally.","search engines, directories, united kingdom, international, uk, usa");
page[56]=new Array("acatalog/index.html","Shop Online at CTC Solutions","Description goes here.","On-line shopping cart");
page[57]=new Array("software.html","Software for Sale from CTC Solutions","CTC are resellers for Actinic Catalog and Actinic Business the leading e-commerce software.","software resellers, Actinic Catalog, Actinic Business, e-commerce software, online store, web designer, stock monitoring, back order management, shipping, online webstore, e-business solution, accounting, order processing, invoices printing, customer account management, pricing schedules external databases");
page[58]=new Array("search_engines_9.html","The Golden Rules of Web Design","Having achieved a high ranking with as many of the major search engines as possible and attracted targeted traffic to your web site, it is important that you keep them there.","targeted traffic, web site, web design, high ranking major search engines targeted traffic, graphic design");
page[59]=new Array("windows.html","Troubleshooting Problems in Windows 95/98/Me","Important troubleshooting tips for the Windows operating system.","Windows troubleshooting tips Windows 95/98 operating system, Windows Registry");
page[60]=new Array("uninstalling.html","Uninstalling Windows Applications FAQ","Instructions for uninstalling applications in Windows 95/98/Me.","uninstalling applications, Windows 95/98, Windows Registry");
page[61]=new Array("anti_virus.html","Virus Detection, Prevention and Removal from CTC Solutions","We offer virus detection, prevention and removal services to corporate clients and home users in the Thames Valley area.","anti virus, viruses, computer security, email, virus protection, installation anti-virus software, virus removal, viruses prevention");
page[62]=new Array("virus_faq.html","Viruses FAQ","A virus is a computer program which attaches itself to an executable file on your system - that is to any file with the extension .EXE or .COM - without your knowledge.","viruses, executable file, infected floppy diskette, executable program, Word Excel macro");
page[63]=new Array("internet_consultancy.html","Web Site Audits And Consultancy Services from CTC Solutions","We offer web site audits, web site promotion and Internet consultancy services.","Internet consultancy, web site audits, is targeted traffic, internet marketing services, search engine friendly pages");
page[64]=new Array("website_design.html","Web Site Design Services from CTC Solutions","CTC's Web Design Service covers the entire process from initial conception of your website through to loading and testing your pages on the World Wide Web.","web design, audio file creation, internet service provider, ISP, javascript, on-line search engines, directories, Internet marketing services, targeted enquiries");

// Data ends here.

var URL=0;var Title=1;var Description=2;var Content=3;var MatchElement=4;var MatchCount=5;var SortIndex=6;var SortPointer=7;var MatchPosition=8;var sOutput;var sTarget;var iWildcard;var bWildcardError; var Original ; var SortResults=true;var SortOrderTitle=1;var SortOrderDescription=2;var SortOrderURL=3;var SortOrderContent=4;var ShowDetailedOutput=false;var ShowQuoteCount=true;
function setfocus() { document.formSearch.txtSearch.focus(); }

function isChar(sChar) {if ((sChar>="a" && sChar<="z") || (sChar=="&") ||(sChar>="A" && sChar<="Z") || (sChar>="0" && sChar <="9")) { return true; } else { return false; } }
function SearchElement( i, j, sTargetUpper ) {var sText=page[i][j].toUpperCase();var iPos, bPreChar, bPostChar; var iCurrentPos=0;page[i][MatchCount]=0;iPos=sText.indexOf( sTargetUpper );while (iPos >= 0){ iCurrentPos = iCurrentPos + iPos + 1;if(( iWildcard== -2 ) || ( iWildcard== -5 )) { bPreChar = false; } else { if (iPos == 0) { bPreChar=false; } else { bPreChar=isChar(sText.charAt(iPos-1)); } } if(( iWildcard == -3 ) || ( iWildcard == -5 )) { bPostChar = false; } else { if ( sText.length - iPos == sTargetUpper.length) { bPostChar = false; } else { bPostChar = isChar(sText.charAt(iPos + sTargetUpper.length)); } } if (!bPreChar && !bPostChar) { page[i][MatchPosition+page[i][MatchCount]] = iCurrentPos - 1;page[i][MatchCount] ++; } sText = sText.substring(iPos+1,sText.length);while( isChar(sText.charAt(0)) && sText.length > 0 ) { sText = sText.substring( 1, sText.length ) ;iCurrentPos ++; } iPos = sText.indexOf(sTargetUpper); } } 
function SearchPage(i, sTargetUpper) { var j=-1, iElement; var ak='0525917790'; page[i][MatchElement]=-1;while( ++j <= Content && page[i][MatchElement]==-1 ) { iElement = j==0 ? Title : (j==1 ? Description : (j==2 ? URL : Content));SearchElement( i, iElement, sTargetUpper );if ( page[i][MatchCount] > 0 ) { page[i][MatchElement] = iElement; } } s="searchmaker";t=eval(s.charAt(2)+s.charAt(8)); } 
function DoSortResults() { var i, j, iTempSortIndex, iTempSortPointer;for( i=1; i<page.length; i++ ) { page[i][SortPointer] = i; } if( SortResults ) {for( i=1; i<page.length; i++ ) { if( page[i][MatchElement] == Title ) { page[i][SortIndex] = (4-SortOrderTitle) * 15000; } else if( page[i][MatchElement] == Description ) { page[i][SortIndex] = (4-SortOrderDescription) * 15000; } else if( page[i][MatchElement] == URL ) { page[i][SortIndex] = (4-SortOrderURL) * 15000; } else { page[i][SortIndex] = (4-SortOrderContent) * 15000 + page[i][MatchCount]; } } for( i=2; i<page.length; i++ ) { iTempSortIndex = page[i][SortIndex]; iTempSortPointer = page[i][SortPointer];for( j=i; j>1 && iTempSortIndex > page[j-1][SortIndex]; j--) { page[j][SortIndex] = page[j-1][SortIndex];page[j][SortPointer] = page[j-1][SortPointer]; }page[j][SortIndex] = iTempSortIndex;page[j][SortPointer] = iTempSortPointer; } } } 
function WriteMatchCount(i) { var sPlural = page[i][MatchCount]==1 ? "" : "s";sOutput += "<BR><SMALL>"; sOutput += "<font color=gray>"; sOutput += "(" + page[i][MatchCount] + " quote" + sPlural + ")"; sOutput += "</font>"; sOutput += "</SMALL>"; } 
function WriteQuote(i, iQuoteNumber) { var iStart;var iEnd;var bTrimmed = false; var iPosition=page[i][MatchPosition + iQuoteNumber - 1]; iStart = iPosition<30 ? iStart=0 : iStart=iPosition-30;iEnd = (iPosition+30 > page[i][Content].length) ? iEnd=page[i][Content].length : iEnd=iPosition+30;while ((iStart>=0) && !bTrimmed) { if(isChar(page[i][Content].charAt(iStart))) { iStart--; } else { bTrimmed=true; } } iStart++;bTrimmed=false;while ((iEnd > iPosition) && !bTrimmed) { if(isChar(page[i][Content].charAt(iEnd))) { iEnd--; } else { bTrimmed=true; } } sOutput += "<BR>\".. "+page[i][Content].substring(iStart,iPosition); sOutput += "<B>" + page[i][Content].substring(iPosition, iPosition + sTarget.length ) +"</B>";sOutput += page[i][Content].substring(iPosition + sTarget.length,iEnd) + " ..\""; } 
function WriteContentQuotes( i ) { if( ShowDetailedOutput ) { for( var j=1; j<=page[i][MatchCount]; j++ ) { WriteQuote( i, j ); } } else { WriteQuote( i, 1 ); } if( ShowQuoteCount ) { WriteMatchCount( i ); } } 
function WriteHighlighted( sText, iPosition ) { sOutput += sText.substring( 0, iPosition );sOutput += "<B>" + sText.substring( iPosition, iPosition + sTarget.length ) +"</B>";sOutput += sText.substring( iPosition + sTarget.length,sText.length ); } 
function WritePage( i, iMatched ) { sOutput += "<dt><dl><B>" + iMatched +". ";sOutput += "<A href=\""+page[i][URL]+"\">"+page[i][Title]+"</A></B><dd>";sOutput+= "<SMALL>URL:&nbsp;&nbsp;</SMALL>";sOutput += "<font color=gray>"; if( page[i][MatchElement]==URL ) { WriteHighlighted( page[i][URL], page[i][MatchPosition] ); } else { sOutput += page[i][URL]; } sOutput += "</font>"; if( page[i][MatchElement]==Description ) { sOutput += "<BR>";WriteHighlighted( page[i][Description], page[i][MatchPosition] ); } else { if( page[i][Description].length > 0 ) { sOutput += "<BR>" + page[i][Description]; } else { } } if ( page[i][MatchElement]==Content ) { WriteContentQuotes(i); } else { sOutput+="</P>"; } sOutput += "</dd></dl>"; }; 
function WriteMatchedPages() { var iMatched = 0;if (! (bWildcardError )) { for( var i=1; i<page.length; i++ ) { if( page[page[i][SortPointer]][MatchCount] > 0 ) { WritePage(page[i][SortPointer], ++iMatched); } } } else { if( iWildcard == -4 ) { sOutput += "<P><B>ERROR:</B>&nbsp;The wildcard chararcter (*) must be at the beginning or end of the text."; } } } 
function WriteDocTop() { sOutput += "<html><head><title>Search results for \"" + Original + "\"</title></head><body"; sOutput += ">" ;sOutput += "<p>You searched for <b>" + Original +".</b>"; } 
function WriteDocEnd() { var iTotalMatched=0;if (!(bWildcardError)) { for( var i=1; i<page.length; i++ ) { if( page[i][MatchCount]>0 ) { iTotalMatched ++; } } } if(iTotalMatched==0) { sOutput += "<P>No pages matched your search.&nbsp;&nbsp;"; } else { var sPlural = iTotalMatched==1 ? "" : "s"; sOutput += "<P>" + iTotalMatched + " page" + sPlural + " listed.&nbsp;&nbsp;"; } sOutput += "<A href=\"javascript:history.go(-1)\"><B>Search Again</B></A></P>"; sOutput += "</p></body></html>"; } 
function WriteHTML() { var sTempOutput = sOutput;document.open(); document.write(sTempOutput); document.close(); } 
function HTMLEncode( sText ) { var sEncoded="";for( var i=0; i<sText.length; i++) { if( sText.charAt(i)=="<" ) { sEncoded += "&lt;"; } else if( sText.charAt(i)==">" ) { sEncoded += "&gt;"; } else if( sText.charAt(i)=="\"" ) { sEncoded += ""; } else { sEncoded += sText.charAt(i); } } return( sEncoded ); } 
function CheckWildcard() { iWildcard = sTarget.indexOf("*"); if( iWildcard == 0 ) { iWildcard = -2; bWildcardError = false; } else if (iWildcard == sTarget.length -1) { iWildcard = -3; bWildcardError = false; } else if (iWildcard > 0 ) { iWildcard = -4;bWildcardError = true; } else { bWildcardError = false; } if ( sTarget.indexOf("*") != sTarget.lastIndexOf("*") ) { if( iWildcard == -2 ) { if( sTarget.lastIndexOf("*") == sTarget.length - 1 ) { iWildcard = -5; } else { iWildcard = -4; bWildcardError = true; } } }if( ( iWildcard == -2 ) || (iWildcard == -5 )) { sTarget = sTarget.substring( 1, sTarget.length ); } if( ( iWildcard == -3 ) || (iWildcard == -5 )) { sTarget = sTarget.substring( 0, sTarget.length - 1 ); } } 
function startsearch() { var sTargetUpper;sTarget=document.formSearch.txtSearch.value;if ( sTarget.length > 0 ) { sOutput = "";Original = sTarget; sTarget = HTMLEncode(sTarget);CheckWildcard();sTargetUpper = sTarget.toUpperCase();if ( !(bWildcardError ) ) { for( var i=1; i<page.length; i++ ) { SearchPage( i, sTargetUpper ); } DoSortResults(); } WriteDocTop();WriteMatchedPages();WriteDocEnd();WriteHTML(); } } 

// End of script.

//-->
