
var include_num = 1;
var bold = 0;

var s = new Array();

s[0] = "Victor Bergman^Index.html^Victor Bergman Managing Director ";
s[1] = "Monitoring & Evaluation^Services.html^Integrate, Automate, Facilitate and Enhance your Monitoring & Evaluation (M&E) systems and techniques for Financials....";
s[2] = "Software Solutions^Services.html^We design, develop and maintain software solutions that will..";
s[3] = "Web Design and Development^Services.html^We design, develop Web based Applications, Client/Server Applications and Databases...";
s[4] = "Database Design^Services.html^Database Design, Development and Maintenance for various technologies e.g. Oracle, Interbase, DB2, MySQL, PostgreSQL etc..";
s[5] = "Total Quality Management (TQM) approach^Services.html^Our Software Quality Control measures are based on the Total Quality Management (TQM) approach...";
s[6] = "Consultation Services^Services.html^We provide you with the most recent ICT possibilities that suit your budget and organisation and Content Management...";
s[7] = "Quality Improvement Measures^Services.html^Our Quality Improvement measures are based on the Six Sigma approach...";
s[8] = "The Executive Management^About.html^Mr. Victor Bergman (Managing Director), Mr. Standton du Plessis (Financial Officer), Me. Tsakane Lesea (Operations Officer), Me. Z Titi (Promotions), Me. M Titi (Administrative Officer), Mr. T Pitsonyane (Web Administrator), Mrs. K Mpeake (Office Manager) ...";
s[9] = "Clientele History (Clients)^About.html^ML-Services, Xerox Bytes, Central University of Technology, Ngubane & Co.";
s[10] = "IT Face^About.html^ITFace founded on the 30th day of January 2000 in Bloemfontein, South Africa and then registered as Mpeake Technologies (Pty) Ltd. It is a Black Youth Owned, Skilled, and Managed South African, Free State based Information and Communications Technology Company. More than 60% of our managers are female..";
s[10] = "Contact Details^Contact.html^AMTS FABLAB Office no. 13, Cnr.Victoria Rd & Kolbe Ave, Bloemfontein, Free State, South Africa, 9301..";

var cookies = document.cookie;
var p = cookies.indexOf("d=");
var r = new Array();

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('Sorry!No related records were found for your search.');
		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>');
		}
	}

}
