

// ---------- script properties ----------

var include_num = 1;
var bold = 0;

// ---------- sites ----------


var s = new Array();

s[0] = "Hompage^index.htm^Traditional Bowhunters of British Columbia homepage.^Traditional Bowhunters of British Columbia, TBBC, tbbc, homepage, home, main, welcome";
s[1] = "The TBBC^about/index.htm^Details on the Traditional Bowhunters of British Columbia. ^Traditional Bowhunters of British Columbia, TBBC, tbbc, club, about the club, about us, club details, accomplishments, executive, guiding principles, principles, values, objectives, regions, vision, mission, vision and mission, wildlife programs, programs, executive team, president, directors";
s[2] = "Executive^about/executive.htm^Listing of the Traditional Bowhunters of British Columbia Regions and Executive Members.^executive, executive team, president, directors, regions";
s[3] = "Regions^about/regions.htm^2007 - 2008 British Columbia Hunting Regions. ^regions";
s[4] = "Vision and Mission^about/vision_mission.htm^The Vision and Mission of the Traditional Bowhunters of British Columbia. ^vision, mission, vision and mission";
s[5] = "Guiding Principles^about/guiding_principles.htm^The Guiding Principles of the Traditional Bowhunters of British Columbia. ^guiding principles, principles, values";
s[6] = "Objectives^about/objectives.htm^Objectives of the Traditional Bowhunters of British Columbia. ^objectives";
s[7] = "Wildlife Programs^about/wildlife_programs.htm^Wildlife Programs Supported and Managed by the Traditional Bowhunters of British Columbia. ^wildlife programs";
s[8] = "Accomplishments^about/accomplishments.htm^Accomplishments by the Traditional Bowhunters of British Columbia. ^accomplishments, successes, contributions";
s[9] = "Memberships^memberships/index.htm^Traditional Bowhunters of British Columbia Membership Information.^memberships, join, members, sign up, signup, membership applications, membership form, member benefits, membership package, membership costs, membership fee, membership fees";
s[10] = "Membership Form^memberships/membership_application.pdf^Traditional Bowhunters of British Columbia Membership Application.^memberships, join, members, sign up, signup, membership applications, membership application, membership form";
s[11] = "Events^events/index.htm^Traditional Bowhunters of British Columbia Events.^events, shoots, 3d shoots, shoot list, 3ds";
s[12] = "2008 Shoot List^events/2008_shoot_list.htm^Traditional Bowhunters of British Columbia Events.^events, shoots, 3d shoots, shoot list, 3ds, 2008 shoot list";
s[13] = "Resources^resources/index.htm^Traditional Bowhunters of British Columbia Resources.^resources, off the shelf, ots, magazine, newsletter, publication, publications, how tos, instructions, documents, bowhunter education, bowhunter education course, photos, shoot photos, hunt photos, harvest photos, links";
s[14] = "Off the Shelf^resources/ots/index.htm^Read the latest issue of Off the Shelf or review past issues.^off the shelf, ots, magazine, newsletter, publication, publications";
s[15] = "How Tos^resources/how_tos/index.htm^Learn about how to develop your technique and design your own equiptment. ^how tos, how to, instructions";
s[16] = "Bowhunter Education^resources/bowhunter_education/index.htm^Learn about the Bowhunter Education Program and upcoming courses.^international bowhunter education program, international bowhunter education course, bowhunter education program, bowhunter education course, ibep, ibec, bowhunter education, bep, bowhunting course, bowhunting education";
s[17] = "Photo Albums^resources/photos/index.htm^View photos from various shoots, hunts and other events.^photos, shoot photos, hunt photos, harvest photos";
s[18] = "Links^resources/photos/index.htm^View a listing of links to various helpful websites.^links, other sites";
s[19] = "Forum^http://tbbc.kics.bc.ca/cgi-bin/ib3-12/ikonboard.cgi^Access the TBBC Forum to participate in discussions on bowhunting in BC.^forum, campfire, discussion board, tbbc forum, web forum";
s[20] = "Contact^contact/index.htm^View the contact information for the TBBC.^contact info, contact information, email address, contact tbbc, mailing address, mail address";








// ---------- end of script properties and sites ----------


var cookies = document.cookie;
var p = cookies.indexOf("d=");

if (p != -1) {
	var st = p + 2;
	var en = cookies.indexOf(";", st);
	if (en == -1) {
		en = cookies.length;
	}
	var d = cookies.substring(st, en);
	d = unescape(d);
}
var od = d;
var m = 0;
if (d.charAt(0) == '"' && d.charAt(d.length - 1) == '"') {
	m = 1;
}

var r = new Array();
var co = 0;

if (m == 0) {
	var woin = new Array();
	var w = d.split(" ");
	for (var a = 0; a < w.length; a++) {
		woin[a] = 0;
		if (w[a].charAt(0) == '-') {
			woin[a] = 1;
		}
	}
	for (var a = 0; a < w.length; a++) {
		w[a] = w[a].replace(/^\-|^\+/gi, "");
	}
	a = 0;
	for (var c = 0; c < s.length; c++) {
		pa = 0;
		nh = 0;
		for (var i = 0; i < woin.length; i++) {
			if (woin[i] == 0) {
				nh++;
				var pat = new RegExp(w[i], "i");
				var rn = s[c].search(pat);
				if (rn >= 0) {
					pa++;
				} else {
					pa = 0;
				}
			}
			if (woin[i] == 1) {
				var pat = new RegExp(w[i], "i");
				var rn = s[c].search(pat);
				if (rn >= 0) {
					pa = 0;
				}
			}
		}
		if (pa == nh) {
			r[a] = s[c];
			a++;
		}
	}
	co = a;
}

if (m == 1) {
	d = d.replace(/"/gi, "");
	var a = 0;
	var pat = new RegExp(d, "i");
	for (var c = 0; c < s.length; c++) {
		var rn = s[c].search(pat);
		if (rn >= 0) {
			r[a] = s[c];
			a++;
		}
	}
	co = a;

}


function return_query() {
	document.jse_Form.d.value = od;
}

function num_jse() {
	document.write(co);
}

function out_jse() {
	if (co == 0) {
		document.write('Your search did not match any documents.<p>Make sure all keywords are spelt correctly.<br>Try different or more general keywords.');
		return;
	}
	for (var a = 0; a < r.length; a++) {
		var os = r[a].split("^");
		if (bold == 1 && m == 1) {
			var br = "<b>" + d + "</b>";
			os[2] = os[2].replace(pat, br);
		}
		if (include_num == 1) {
			document.write(a + 1, '. <a href="', os[1], '">', os[0], '</a><br>', os[2], '<p>');
		} else {
			document.write('<a href="', os[1], '">', os[0], '</a><br>', os[2], '<p>');
		}
	}

}
