

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

var include_num = 1;
var bold = 0;

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


var s = new Array();
// s[0] = "Title^Path^Description^key,words"; (just copy the line and configure...duh!)
s[0] = "The Ink Dot - Home Page^http://www.theinkdot.com/index_new.html^The best place in Galveston Texas for all your printer needs^The, Ink, Dot";
s[1] = "Refill My Empties^http://www.theinkdot.com/construction.html^The Ink Dot promotes recycling as a way to do our part to go green! Let us refill your empty cartridges for you, and save you money!^refill,refills,empty,empties, cartridges,cartriges,cartridge,cartrige,recycle,recycling,green,conserve,conservation";
s[2] = "Papers^http://www.theinkdot.com/paper_new.html^We offer a selection of quality paper for your printer or copier, including photo paper.^paper, ream,reams,photo,20,60,80,lb,#,pound,card,stock,color";
s[3] = "Cleaning Cartridges^http://www.theinkdot.com/construction.html^Use these to clean your printer for great print quality!^copy,quality,clean,cleaning,cartridges,cartriges,cartridge,cartrige, dirty,toner,dark,smear,smearing";
s[4] = "Ink Refill Kits^http://www.theinkdot.com/construction.html^The Ink Dot promotes recycling as a way to do our part to go green! Let us refill your empty cartridges for you, and save you money!^refill,refills,empty,empties, cartridges,cartriges,cartridge,cartrige,recycle,recycling,green,conserve,conservation";
s[5] = "Toner Refill Kits^http://www.theinkdot.com/construction.html^The Ink Dot promotes recycling as a way to do our part to go green! Let us refill your empty cartridges for you, and save you money!^refill,refills,empty,empties, cartridges,cartriges,cartridge,cartrige,recycle,recycling,green,conserve,conservation";
s[6] = "Continuous Ink Systems^http://www.theinkdot.com/CI.html^Never buy an inkjet cartridge again! We are now receiving brand-new, improved systems for many printers. Check back here soon, or call us for information about these new models. ^continuous,ink,system,systems,economy,bargain,save,recycle,cartrige,cartridge,cartridge,cartriges";
s[7] = "Computer Tutorials on CD^http://www.theinkdot.com/tutorials-CDs.html^Learn what you need to know to make your computer your friend. We offer a great selection of tutorials on cd!^cd,cds,cd's,tutorial,tutorials,train,training,windows,microsoft,office,excel,visual,basic,power,point,word,spreadsheet,access";
s[8] = "Sell Us Your Empties!^http://www.theinkdot.com/construction.html^The Ink Dot encourages you not to toss those empties. We will pay you for them!^refill,refills,empty,empties, cartridges,cartriges,cartridge,cartrige,recycle,recycling,green,conserve,conservation";
s[9] = "Fundraise With Us!^http://www.theinkdot.com/construction.html^Please contact us for the details^fund,raise,fundraise,fundraising,money,charity,galveston,hurricane,ike";
s[10] = "Printers We Recommend^http://www.theinkdot.com/best-printer_new.html^Your needs determine the best machine to serve them. Check here for information^printer,copier,popular,suggest,suggestion,suggested,budget,high,volume,low,black,white,b&w,and,multi,function,multifunction,color,desktop,scan,scanner,scanning";
s[11] = "Voiding Your Warranty?^http://www.theinkdot.com/warranty_new.html^Voiding your warranty? Just ask us.^warranty,warrantys,waranties,contract,contracts,repair,repairs,service,servicing";
s[12] = "Government Contracting^http://www.theinkdot.com/construction.html^null^null";
s[13] = "Our Green Processes^http://www.theinkdot.com/construction.html^null^null";
s[14] = "E-Waste Horror^http://www.time.com/time/magazine/article/0,9171,1870485,00.html?iid=perma_share^null^null";
s[15] = "E-Waste Not^http://www.time.com/time/magazine/article/0,9171,1870485,00.html?iid=perma_share^null^null";
s[16] = "Eco-Friendly Font^http://www.ecofont.eu/ecofont_en.html^null^null";
s[12] = "Customer Testimonials^http://www.theinkdot.com/construction.html^null^null";
s[13] = "Brother^http://www.theinkdot.com/Inkjet-by-mfr/Brother.html^Inks/toners for your Brother printer^Brother, intellifax, series, 1800 C, 1800, 1840 C, 1840, 1920 CN, 1920, 1820 C, 1820, 1920 C, 2440 C, 2440, lw, LW, LW-700 I, 700, LW-730 I, 730, LW-800 IC, 800, LW-830 IC, 830, LW-710 I, 710, LW-750 IC, 750, LW-810 IC, 810, LW-840 IC, 840";


// ---------- 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>');
		}
	}

}

