var item = new Array();
var test = 0;

c=0; item[c]=new Array("index.html","","Home","index, introduction, welcome, karma, tarot, cards, interactive, destiny, fate, power, use, comparisons, zodiac, palmistry, mystery","The home of Karma, a website that will reveal all there is to know about Tarot cards.");

c++; item[c]=new Array("history.html","","History","history, background, information, 1375, 1380, spain, islamic, 52, cards, 56, 14, 13, 21, trumps, fool, major, arcana, ninor, 78, trump, 1377, europe, trionfi, tarochhi, tarot, martiano, tortona, da, besozzo, michelino, 1425, 1418, milan, triumphorum, ludus, motifs, deck, marseilles, bera-brambrilla, cary-yale-tarocchi, 1440, 1441, 1442, italian, italy, 1450, jubilee, roman, catholic, churches, hand-made","Learn about the history of Tarot cards. Includes background information, and its movement into the modern era.");

c++; item[c]=new Array("modern.html","","Modern Tarot","tarot, cards, today, modern, quotes, yahoo, answers, beliefs, interview, questions, divination, readings, illusions, psychological, psychology, accusations, groups, economic gain, reason","Find out what people think about Tarot cards today and read a brief interview with a real professional tarot reader!");

c++; item[c]=new Array("belief.html","","Belief","belief, believe, believability, tarot, cards, experience, moment, truth, age, personailty, relationships, swords, fun, reading","Read about the beliefs some people have then decide on your own whether or not you want to believe in tarot cards.");

c++; item[c]=new Array("guide.html","","Guide","guidelines, interpreting, interpret, interpretation, wording, purpose, step, guide, question, deck, interpreter, ten, 10","A detailed step-by-step guide for beginners who want to learn how to properly conduct tarot readings.");

c++; item[c]=new Array("spreads.html","","Spreads","Spreads, readings, tarot, design, imagination, guidelines, celtic, cross, oldest, popular, two, sections, 2, cross, way","Introduction to the concept of different spreads and a description of the most commonly used Celtic Cross spread.");

c++; item[c]=new Array("purchase.html","","Purchase","purchase, 78, product, price, retail, costs, spreads","Interested in obtaining tarot cards? Tarot cards can be easily bought at affordable prices, even through online shopping!");

c++; item[c]=new Array("major.html","","The Major Arcana","22, cards, major, arcana, fool, magician, high, priestiess, empress, emperor, hierophant, lovers, chariot, justice, hermit, wheel, fortune, strength, hanged, man, death, temperance, devil, tower, star, moon, sun, judgment, universe, divination, reverse, wanderer, exploer, gemini, inquisitive, Strategic, aquarius, progressive, socerer, alchemist, idealist, necromancer, seeker, pisces, otherworldly, conception, intuition, taurus, earnest, overlord, supremacy, aries,leader, sage, mentor, teacher,twin-soul, reverence, gemini, entity, channel, cancer, balance, equalizer, libr/a, self, internal, virgo, analytical, cycle, fate, confident, sagittarius, open-minded, leo, enthusiasm, endurance, fortitude, vitality, transcend, evolve, pisces, feeling, mutate, regenerate, scorpia, intense, chemistry, fusion, sagittarius, supernaturla, magnetism, lure, capricorn, industrius, draconian, forceful, authoritative, empyrean, celestial, unique, lunacy, delusion, pisces, creative, power, genesis, enthusiastic, awaken, metamorphose, totality, wholeness","Descriptions/meanings for each individual card of a set known as the major arcana.");

c++; item[c]=new Array("minor.html","","The Minor Arcana","minor, arcana, 56, four, 4, wands, cups, swords, coins, pentacles, water, air, earth, 14, ace, one, 1, 2,3, 4, 5, 6, 7, 8, 9, 10, knight, jack, queen, king, page","Brief explanation of the set of tarot cards (in a common deck) known as the minor arcana.");

c++; item[c]=new Array("palmistry.html","","Comparison to Palmistry","hand,background, information, palmistry, comparison, greek, hippocrates, galen, clinical, julius, caesar, yard, scotland, medical, skin, patterns, relationship, fingerprints, cardiac, illnesses, color, pattern","How tarot cards are alike and how they are different from palmistry, another form of divination.");

c++; item[c]=new Array("zodiac.html","","Comparison to zodiac","background, information, zodiac, comparison, history, babylonian, ecliptic, celestial, coordinate, moon, mercury, venus, mars, jupiter, saturn, astrology","How tarot cards are alike and how they are different from zodiacal divination as it pertains to astrology.");

c++; item[c]=new Array("interactive.html","","Interactive","interactive, simulation, try, quiz","Experience a flash simulation of an actual tarot reading in the celtic cross spread. Find out what the cards mean for you!");

c++; item[c]=new Array("bibliography.html","","Bibliography","bibliography","The works cited page for the Karma with references for the entire website¡¯s content.");

c++; item[c]=new Array("about.html","","About Us","about, us, bryan, arthur, steve, joseph, jonathan, knochel, coach, students, sis, quotes","Learn about the authors and designers of the Karma Tarot Cards website.");

page="<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN><html><head><link href=index.css rel=stylesheet type=text/css><script src=search.js type=text/javascript language=javascript></script> </head><body><center><table class=content><tr><td class=logo><div align=right><form method=get action=javascript:void(0) onsubmit=search(this); return false;><input type=text name=srchval style='border=1px solid  #2F004F; font-family: arial; font-size:11px; margin-top:58px;'><input type=submit value=Search style='border:1px double  #2F004F; color: #2F004F; font-family: arial; font-size:10px; margin-right:15px;'></form></div><tr><td class=info><center><table><tr><td><object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0 width=728px height=41px id=menu align=middle><param name=allowScriptAccess value=sameDomain /><param name=movie value=menu.swf /><param name=quality value=high /><param name=bgcolor value=#FFFFFF /><embed src=menu.swf quality=high bgcolor=#ffffff width=750px height=41px name=menu align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer /></object></td></tr></center><tr><td><div id=title>Search</div></td></tr><center><table class=contentinfo><tr><td width=600px;>" ;

function search(frm) {
	win=window.open("");
	txt = frm.srchval.value.split(" ");
	fnd = new Array(); total=0;
	if(txt=="") {win.document.write(page + "<center>Please enter some words to search for and try again. </center>");}
	else{
	win.document.write(page + "<center>You have searched for: <br />" + "<i>" + txt + "</i>");
	for (i = 0; i < item.length; i++) {
		fnd[i] = 0; order = new Array(0, 4, 2, 3);
		for (j = 0; j < order.length; j++)
			for (k = 0; k < txt.length; k++)
				if (item[i][order[j]].toLowerCase().indexOf(txt[k]) > -1 && txt[k] != "")
					fnd[i] += (j+1);
	}
	for (i = 0; i < fnd.length; i++) {
		n = 0; w = -1;
		for (j = 0;j < fnd.length; j++)
			if (fnd[j] > n) { n = fnd[j]; w = j; };
			if (w > -1) {total += show(w, win, n); test++;}
			fnd[w] = 0;
	}
	}
	if(test==0)	win.document.write("<p><i>No match is found.</i></center></p>");
	win.document.write("</td></tr></table></center></td></tr></table></center></body></html>");
	win.document.close();
}

function show(which,wind,num) {
	link = item[which][1] + item[which][0]; 
	line = "<tr><td class=searcha><p><a href="+link+">"+item[which][2]+"</a><br /></td></tr>";
	line += "<tr><td class=jtext>" + item[which][4] + "<br /></td></tr>";
	line += "<tr><td class=jtext><a href="+link+">" + link + "</a></td></tr></p>";
	wind.document.write(line);
	return 1;
}
