

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

var include_num = 1;
var bold = 0;

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


var s = new Array();

//s[0] = "JSE^form.html^Enter JSE in the example above ...^open source, free, client side";
//s[1] = "JSE DOCUMENTATION^doc.txt^JSE is a client-side local site search engine. Written entirely in JavaScript 1.3 it works with browsers from Netscape 4.7 to Microsoft Internet Explorer 6.0 ...^ faq, docs, instructions";
s[0] = "Home^index.html^The main part of the site.News and highlights are shown on first page.Headlines for latest news.All channel links in My-Partners...^index,main,start,home,front,news,highlight,partner,my-partners,welcome,first page";
s[1] = "About Us^about.html^Description on My-Partners business field. What is in My-Partners.Contact details and general information about the founder of the site and what the site is about.^about,partner,vision,mission,team,who,foreword,overview,objective,directors,people,background,business focus,business,education,health,telecommunication,public sector,method,promises,methodology";
s[2] = "Products^product.html^Products that is needed in this site.^pc,personal computer,product,hardware,software,educational,training,3D,virtual reality,AMIRA, AMAPI, CARRARA,open inventor,telecommunication, wireless, solution,sample,features,levelone,polycom,healthcare,graphics & animation,graphics,animation,mypse-view,mypse-cms,mypse,mypse-qaos,hp,cisco";
s[3] = "Enquiries^enquiry.asp^Links to sites which has the Enquiries form.^enquiries,enquiry,enquiries form,form";
s[4] = "Services^services.html^Links to sites which has the My-Partners services. As a reference for other sources.^services,maintenance,project management,Educational Services,Operational Services ,system integration,planning, design services,planning & design services,design";
s[5] = "Subsidiaries^sub.html^My-partners subsidiaries.^subsidiaries,My-partners subsidiaries,My-partners education xcess sdn bhd,My-partners solution sdn bhd, My-partners engineering and consultancy sdn bhd,url,client,client list,testimonial,project list";
s[6] = "News and Events^news.html^Links to sites which has the My-Partners news and events. As a reference for other sources.^news,events,ittoolbox,latest news";
s[7] = "Contact Us^contact.html^Contact details and general information about the My-Partners.^author,contact,who,phone,email,number,address,name,fax,map,view map,location,find us,where";
s[8] = "Product Carrara^product_carrara.html^Products that build by My-Partners Team. Carrara is a complete 3D program for modeling, animation and rendering for Print, Web and Video. ^product,software,multimedia,creative multimedia,application center,engineering software,operating system,carrara";
s[9] = "Product AMAPI^product_amapi.html^Product AMAPI...^product amapi,amapi,product,software,design,brochure,mypse brochure";
s[10] = "Career^career.html^Career on My-Partners business field^job vacancies,career,careers,internship,job";
s[11] = "Partners^partners.html^Our partners...^partner,IT business consulting,consulting,business,hyundai,tm,telekom,nixfon,macroworld,orisoft,mercury computer,zetta consultants, bixtrak,netprotocol technologies,my-partners partners,list of partners";
s[12] = "News from Ittoolbox.com^news.html^Links to sites which has the News from Ittoolbox.com services. As a reference for other sources.^news,events,ittoolbox,wireless news,networking news,Enterprise Resource Planning News ";
s[13] = "Feedback^feedback.asp^Links to sites which has the Feedback form. ^feedback,feedback form,form";
s[14] = "Support & Downloads^support.html^Links to sites which has the Support & Downloads. As a reference for other sources and also to download the brochures.^support,download,brochure,company profile,cms.oiv,myview,levelone,polycom";
s[15] = "Product AMIRA^product_amira.html^Products that build by My-Partners Team. Amira  -  Advanced 3D Visualization and Volume Modeling . Wherever 3D data sets have to be processed, e.g. in microscopy, medicine, biology, or engineering, Amira offers fascinating new opportunities. ^amira,software,design";
s[16] = "Sitemap^sitemap.html^My-Partners Sitemap.^sitemap,about us,profile,contact,people,map,product,service,my-partner,company profile";
s[17] = "Hardware^hardware.html^Hardware that provide by My-Partners.^hardware,hp,cisco,polycom,levelone";


// ---------- 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], '" target="_parent">', os[0], '</a><br>', os[2], '<p>');
		} else {
			document.write('<a href="', os[1], '" target="_parent">', os[0], '</a><br>', os[2], '<p>');
		}
	}

}

