<!-- Begin copyright - This must be retained and posted as is to use this script -->

<!--// This Script was created by Satadip Dutta. 
// Email: sat_dutta@post1.com  / satadipd@inf.com 
// URL:http://dutta.home.ml.org
// Version 1.1-IExp 
// Please honor my hard work, if you use a variant of this in your page, 
// then please email me :) and keep these comments in the Script.
// This code is Copyright (c) 1997 Satadip Dutta
// all rights reserved.
// License is granted to user to reuse this code on their own Web site 
// if, and only if, this entire copyright notice is included. The Web Site
// containing this  script   must be a not-for-profit ( non-commercial ) web site. 
// Exclusive written permission must be obtained before using  this version of the search engine
//-->

<!-- End copyright - This must be retained and posted as is to use this script -->

title = new Object();
desc = new Object();
links= new Object();
matched= new Object();
keywords= new Object();
found= new Object();
var temp=0;
// actual location or the item to be searched
// description of he location
// actual link
// percentage match found
// keywords as parsed from the input
// # of titles present in the database
title[0]=19
//no of keywords after parsing
keywords[0]=0
//no of  matches found.
found[0]=0

<!-- Begin List of Searchable Items -->

<!--put the list of the links and descriptions here!!-->

title[1]="report diary home OTT sponsors 'live the life' coach coaching welcome"
desc[1]="OTT Home page..."
links[1]="index.htm"
matched[1]=0

title[2]="ironman 'half ironman' 'long distance' marathon training endurance distance long half coaching"
desc[2]="OTT Ironman training..."
links[2]="ironman.htm"
matched[2]=0

title[3]="coaching coach 'oscar carlson' oscar carlson training career 'the coach'"
desc[3]="Oscar Carlson - The Coach..."
links[3]="coach.htm"
matched[3]=0

title[4]="'latest news' newsletter diary weekly update calendar timetable team squad coach"
desc[4]="OTT Newsletter..."
links[4]="newsletter.htm"
matched[4]=0


title[5]="calendar timetable training dates sessions events time times 'studley park' windtrainer riding running swimming workout"
desc[5]="OTT Calendar..."
links[5]="calendar.htm"
matched[5]=0

title[6]="philosopy training definition base phase 'pre competition' competition race racing fitness skills"
desc[6]="Philosopy of OTT training..."
links[6]="philosopy.htm"
matched[6]=0


title[7]="diet medical syllabus fitness swimming swim bike riding running run training"
desc[7]="Syllabus of OTT training..."
links[7]="syllabus.htm"
matched[7]=0


title[8]="base 'pre competition' competiton racing periodisation beginners training"
desc[8]="Periodisation of OTT training..."
links[8]="periodisation.htm"
matched[8]=0


title[9]="nutrition food diet vitamins vitamin fat protein carbohydrates 'carbo loading' carbo minerals supplements"
desc[9]="Nutrition for Traithlon training..."
links[9]="nutrition.htm"
matched[9]=0


title[10]="time timimg result team times results session sessions 'time trials' trials test tests events bike swim run ride beep"
desc[10]="OTT team race results and time trials..."
links[10]="teamresults.htm"
matched[10]=0

title[11]="clothing 'ott clothing' outfits gear 'racing tops' running swimming riding uniform singlets bike run swim"
desc[11]="OTT Clothing..."
links[11]="clothing.htm"
matched[11]=0

title[12]="team members squad member new beginner profile people triathlete ott"
desc[12]="OTT Team members..."
links[12]="teamOTT.htm"
matched[12]=0

title[13]="team members squad member new beginner profile people triathlete photo gallery album ott camps weekend ironman training"
desc[13]="OTT photo gallery..."
links[13]="gallery.htm"
matched[13]=0

title[14]="juniors school kids kid child children teenager beginner coaching young age training"
desc[14]="OTT Junior Triathletes..."
links[14]="juniors.htm"
matched[14]=0

title[15]="weekends camps training 'weekend camps' 'weekend camps' calendar events events members team squad new beginner away holiday"
desc[15]="OTT Weekend Camps..."
links[15]="camps.htm"
matched[15]=0

title[16]="brw company training corporate links business work beginner new event calendar triathlete race racing"
desc[16]="BRW Corporate Triathlon..."
links[16]="brw.htm"
matched[16]=0

title[17]="windtrainer training calendar 'time trial' session sessions spin spinning riding bike ride gear workout windtraining"
desc[17]="OTT Windtrainer sessions..."
links[17]="windtrainer.htm"
matched[17]=0

title[18]="injury links link sponsors promotions events events race racing run swim ride 'triathlon victoria' trivic"
desc[18]="Useful Links..."
links[18]="links.htm"
matched[18]=0

title[19]="contact email web 'web developer' oscar 'oscar carlson' feedback phone address details 'contact detail' telephone"
desc[19]="Contact OTT..."
links[19]="contact.htm"
matched[19]=0

<!-- End list of Searchable items -->

function search(){
var skeyword=document.searchengine.keywords.value.toLowerCase();
var check=1;
var pos=0;
var i=0;
var j=0;
var  itemp=0;
var config='';

while (true)
	{
	if (skeyword.indexOf("+") == -1 )
		{
		keywords[check]=skeyword;
		break;
		}
	pos=skeyword.indexOf("+");
	if (skeyword !="+")	
	{
	keywords[check]=skeyword.substring(0,pos);
	check++;
	}
	else
	{
	check--;
	break;
	}
	skeyword=skeyword.substring(pos+1, skeyword.length);	
	if (skeyword.length ==0)
		{
		check--;
		break;
		}
			 
	}
// the keywords have been put in keywords object.
keywords[0]=check;

// matching and storing the matches in matched
for ( i=1; i<=keywords[0];i++)
	{
	for (j=1;j<=title[0];j++)
		{
		if (title[j].toLowerCase().indexOf(keywords[i]) > -1 )
			{
			  matched[j]++;
			}
		}	
	}
// putting all the indexes of the matched records  in found

for (i=1;i<=title[0];i++)
{
	if (matched[i] > 0 )
		{
		  found[0]++;
		// increment the found 	
		  found[found[0]]=i;
			
		}	
}



for (i=1;i<=found[0]-1;i++)
	{
	for(j=i+1;j<=found[0];j++)
		{
		if ( matched[found[i]]< matched[found[j]] )
			{
			temp= found[j];
			found[j]=found[i];
			found[i]=temp;
			}
		}
	}

// end of sort

output = self;
output.document.write('<html>');
output.document.write('<head>');
output.document.write('<script>');
output.document.write('window.onerror=new Function("return true")');
output.document.write('</script>');
output.document.write('<title> OTT Search Results... </title>');

output.document.write('<style type=text/css>');
output.document.write('A:link{FONT-WEIGHT: bold;FONT-SIZE: 14px;COLOR: #990099;FONT-FAMILY: Arial, Helvetica, sans-serif;text-decoration: none;}');
output.document.write('A:active{FONT-WEIGHT: bold;FONT-SIZE: 14px;COLOR: #990099;FONT-FAMILY: Arial, Helvetica, sans-serif;TEXT-DECORATION: none;}');
output.document.write('A:visited{FONT-WEIGHT: bold;FONT-SIZE: 14px;COLOR: #990099;FONT-FAMILY: Arial, Helvetica, sans-serif;TEXT-DECORATION: none;}');
output.document.write('A:hover{font-family: Arial, Helvetica, sans-serif;font-size: 14px;font-weight: bold;color: #00ff00;text-decoration: none;}');
output.document.write('</style>');
output.document.write('</head>');
output.document.write('<BODY bgcolor=#ffffff>');

output.document.write('<font face=Arial, Helvetica, sans-serif size=4 font color=#990099><b>Search Results... </b></font><br><br>');    
output.document.write('<span class=main>');
output.document.write('<font face=Arial, Helvetica, sans-serif size=2>The Keyword(s) you searched :: <b>'.big() )
for (i=1;  i<=keywords[0]; i++)
	{
	output.document.write( keywords[i].bold() +"   ");
	}
output.document.write('</b><br></font>');

if (found[0]==0)
	{
	//alert(found[0]);
	output.document.write('<br>');
	output.document.write('<font face=Arial, Helvetica, sans-serif size=2><b>No matches resulted in this search!</b></font> <br>');
	output.document.write("<br><a href=search.htm><< Back to OTT web site</a>");
	}
else
	{
	// data has been found
	output.document.write('<font face=Arial, Helvetica, sans-serif size=2>The Results of the search are  :: </font>');
	output.document.write("<font face=Arial, Helvetica, sans-serif size=2><b>" + found[0] +"  Entries found  ".italics());
	output.document.write('</b></font><br><br><table border=0 width=500px> ');
	for (i=1; i<=found[0];i++)
		{
		output.document.write('<tr><td valign=top bgcolor=#990099>');
		output.document.write("<font face=Arial, Helvetica, sans-serif size=5, color=#ffffff><b>" +i +"</b></font>");
		output.document.write('<td valign=top><font face=Arial, Helvetica, sans-serif size=2>');
		itemp=found[i];
		output.document.write(desc[itemp].bold() +"<br>" + links[itemp].link(links[itemp])+"<br></font><br>");
		temp= (matched[itemp]/keywords[0])*100
		//output.document.write("<font face=Arial, Helvetica, sans-serif size=2><i> Matched  with keywords  :: " +temp+" %  </i></font>" );
		matched[itemp]=0
		} 
	found[0]=0;
	output.document.write("</table></font><br>");
	output.document.write("<br><a href=search.htm><< Back to OTT web site</a>");
	}

//output.document.write ("<form><br>"); 
//output.document.write ("<input type='button' value='Search again?' onClick = 'search.htm'"); 
//output.document.write ("</form>");

output.document.write ("</body></html>"); 
output.document.close();
}