function search() {

var searchText = searchForm.searchString.value
var searchGemener = searchText.toLowerCase()
var searchOrd = searchGemener.split("+")
var hit = 0
var direkt = searchForm.direkt.checked

   document.write ("<html>")
   document.write ("<head>")
   document.write ("<title>Search results in JavaScript</title>")
   document.write ("<link rel=stylesheet type=text/css href=sok.css>")
   document.write ("</head>")
   document.write ("<body bgcolor=FFCC99>")
   document.write ("<div class=visa>")
   document.write ("Your search for: <b>" + searchText + " </b>generated the following result:" + "<p/>")
   document.write ("<table class=resultat cellpadding=10>")

   var nycklar = new Array(13)
       nycklar[0] = new Array("history.htm", "chocolate's", "history", "saga", "cacaobean's", "cacaobean", "cacao", "cocoa", "cacao's", "cocoabean", "cocoabean's", "aztecs", "aztec", "aztecs'", "maya", "mayaindian", "indian", "america", "central", "mesoamerican", "south", "origin", "chocolatl", "xocoatl", "cacahuatle", "kakaw", "olmec", "choco", "molinillo", "columbus", "moctezuma", "cortéz", "drink", "fruit", "cloetta", "nestlé", "etymology", "bitter", "hot", "nahuatl", "cortés", "metate", "cortez", "cortes", "guanaja")
       nycklar[1] = new Array("chocolate.htm", "cocoa", "bean", "criollo", "forastero", "trinitario", "theobroma", "cacao", "south", "central", "equator", "amazon", "amelonado", "america", "africa", "trinidad", "brazil", "orinoco", "bitter", "korsning", "yeast", "ferment", "roast", "cocoamass", "powder", "butter", "conching", "tempering", "cocoabean", "linnaeus", "carolus", "harvest", "yield", "grow", "production", "kind", "kinds", "variety", "varieties", "blend", "fermenting", "yeasting", "roasting", "dutching", "nibs")
       nycklar[2] = new Array("products.htm", "selection", "praline", "boutique", "assortment", "gift", "vitaby", "gifts", "present", "pralines", "presents", "calvados", "rum", "anna", "ferreira", "cup", "drink", "drinks", "chocolates", "drinking", "spain", "spanish", "mexico", "mexican", "brazil", "brazilian", "grand", "cru", "caribbean", "flavors", "flavor", "flavour", "flavours", "chilli", "chili", "honey", "cinnamon", "shop", "helena", "rimfors", "box", "fondue", "store", "truffle", "truffles")
       nycklar[3] = new Array("workshop.htm", "course", "courses", "chocolate-tasting", "chocolate-tastings", "tasting", "tastings", "lecture", "making", "sample", "taste", "try", "manufacturing", "experience", "register", "sign", "make", "sampling", "example", "flavor", "interest", "experiences", "learn", "lectures", "conference", "conferences", "compose", "own", "form", "meeting", "company", "customize", "customized", "customise", "organize", "customised", "custom-made", "tailor-made", "tip", "liking", "participate", "participant", "workshop", "workshops", "taster")
       nycklar[4] = new Array("recipe.htm", "mole", "oaxaca", "hedh", "spain", "mexico", "recipe", "tip", "frida", "kahlo", "dinner", "drink", "drinking", "recipes", "chocolate", "atole", "chicken", "hot", "drinks", "west", "caribbean", "mexican", "brazil", "chilli", "spanish", "brazilian", "hed", "jan", "menu", "menus", "champurrado", "muscovado", "vanilla", "cinnamon", "sugar", "thick", "chili", "milk", "linnaeus", "hepburn", "katherine", "brownies", "fondue", "brownie", "spices")
       nycklar[5] = new Array("curious.htm", "denmark", "currency", "mazetti", "screensaver", "cocoa", "facts", "phenylethylamine", "error", "misspelling", "aphrodisiac", "cure", "hangover", "curiosity", "fact", "70", "dark", "cholesterol", "level", "science", "butter", "caries", "counteract", "beer", "carlsberg", "young's", "beers", "stout", "bredaryd", "chocolate", "preference", "bribe", "hepburn", "katherine", "skin", "criollo", "enzyme", "heart", "download", "praline", "rauch", "ganache", "canache", "truffle", "theobromine")
       nycklar[6] = new Array("myths.htm", "true", "false", "wrong", "right", "truth", "facts", "fact", "incorrect", "acne", "fat", "obese", "obesity", "butter", "vegetable", "migraine", "tyramine", "akne", "pimples", "pimple", "caries", "cavity", "tooth", "teeth", "decay", "calcium", "fluoride", "tannin", "tannins", "counteract", "counteracts", "allergy", "allergies", "food", "nuts", "nut", "almond", "headache", "overweight", "trace", "myth", "prejudice", "myths", "delusion", "healthy")
       nycklar[7] = new Array("european.htm", "eu", "name", "called", "directive", "sweden", "chocolate", "according", "regulations", "rule", "regulation", "legislation", "products", "product", "congress", "country", "standard", "standards", "law", "countries", "fat", "fats", "vegetable", "parliament", "politics", "ec", "european", "union", "substitute", "court", "justice", "europe", "label", "eea", "treaty", "dispute", "pro", "cent", "denmark", "commission", "swedish", "council", "britain", "great", "market")
       nycklar[8] = new Array("travel.htm", "oaxaca", "travel", "charter", "mexiko", "guide", "trips", "mecka", "photo", "city", "mexican", "trip", "tour", "immunizations", "vaccine", "tips", "acvice", "information", "molinillo", "tours", "mayordomo", "la", "soledad", "chocolate", "street", "travels", "casa", "arnel", "tejate", "vessel", "pottery", "arauco", "travelling", "agency", "tourist", "orchard", "info", "hotel", "hostel", "metate", "comalcalco", "guidebook", "plantation", "plantations", "tabasco")
       nycklar[9] = new Array("facts.htm", "table", "diagram", "statistics", "facts", "production", "information", "diagrams", "per", "capita", "person", "consumption", "eat", "sweden", "ivory", "switzerland", "ghana", "indonesia", "companies", "mars", "nestlé", "hershey", "kraft", "nutrition", "nutritional", "vitamin", "content", "ingredients", "application", "denmark", "norway", "white", "dark", "milk", "finland", "vitamins", "mineral", "minerals", "calcium", "magnesium", "austria", "Ildefonzo", "lecithin", "world", "kilogram")
       nycklar[10] = new Array("test.htm", "knowledge", "test", "try", "check", "science", "question", "questions", "marabou", "stork", "maraboustork", "verify", "right", "wrong", "true", "false", "how", "much", "know", "you", "fun", "funny", "compete", "competition", "quiz", "evaluation", "know-how", "rate", "rating", "valuation", "score", "result", "proficiency", "answer", "click", "marke", "view", "points", "questioning", "point", "examine", "examination", "identify", "reply", "crossword")
       nycklar[11] = new Array("links.htm", "links", "articles", "magazine", "article", "newspaper", "read", "questions", "lödahus", "chokladkultur", "vitaby", "christinehofs", "slott", "vote", "choose", "price", "allehanda", "link", "stock", "market", "institute", "daily", "cocoa", "research", "cologne", "choco-club", "brymm", "chocovic", "valrhona", "american", "bonnat", "museum", "museums", "chocolatemuseum", "birmingham", "köln", "barcelona", "brussels", "biarritz", "quebec", "santander", "felchlin", "chicago", "colombian", "web")
       nycklar[12] = new Array("contact.htm", "contact", "information", "map", "maps", "find", "drive", "road", "leaflet", "chokladkultur", "lödahus", "mail", "snail", "e-mail", "address", "agneta", "info", "number", "phone", "telephone", "email", "open", "opening", "hours", "vat", "numbers", "tele", "business", "kivik", "saedén", "sćdén", "saeden", "brösarp", "download", "calendar", "esperöd", "event", "events", "happenings", "direction", "addresses", "österlen", "mailaddress", "directions", "street")
	   
   var rubriker = new Array(13)
       rubriker[0] = "History - the history of the cocoa and chocolate"
       rubriker[1] = "The cocoa bean - how the bean becomes chocolate"
       rubriker[2] = "Products - a display of our chocolate products"
       rubriker[3] = "Chocolate experiences - chocolate tastings, workshops, lectures, courses etc..."
       rubriker[4] = "Recipes - old, new and original ways of using chocolate"
       rubriker[5] = "Curiosities - interesting and funny things about chocolate"
       rubriker[6] = "Myths - true and false about chocolate"
       rubriker[7] = "The Chocolate Directive - what can be called chocolate in EU?"
       rubriker[8] = "Chocolate tours - get inspired to a trip to Mexico"
       rubriker[9] = "Statistics - lots of statistics, facts and diagrams"
       rubriker[10] = "The Chocolate quiz - test your knowledge about chocolate"
       rubriker[11] = "Links - lots of chocolate related links"
       rubriker[12] = "Contact us - contact information, opening hours, directions etc..."

   var beskrivningar = new Array(13)
       beskrivningar[0] = "Here you can read about the history of chocolate and cocoa, from pre-colonial times to present times."
       beskrivningar[1] = "Here you can learn everything about the cacao tree, different varieties and how the cocoa beans becomes chocolate."
       beskrivningar[2] = "A display of our products such as chocolates, truffles, drinks and gifts. Also an insight to our shop."
       beskrivningar[3] = "Read about our chocolate experiences (tastings, lectures, workshops etc.) and design and register for your own tailor-made chocolate experience."
       beskrivningar[4] = "We offer popular recipes as well as odd and funny ones from far away cultures, traditional and new ones."
       beskrivningar[5] = "Things you knew and didn't knew about chocolate as well as funny curiosities related to chocolate."
       beskrivningar[6] = "Improve on what's true or false about chocolate and discover the myths and prejudice surrounding chocolate."
       beskrivningar[7] = "Learn what can be called &quot;chocolate&quot; or not according to the Chocolate Directive of the European Union."
       beskrivningar[8] = "We offer tours, guidance and valuable tips for people interested in travelling to Oaxaca in Mexico."
       beskrivningar[9] = "All the facts and statistics about chocolate in the shape of diagrams."
       beskrivningar[10] = "Test your knowledge about chocolate in our chocolate quiz or complete the puzzle! See what you've learned from our Webpage."
       beskrivningar[11] = "Lots of selected links to Webpages related to chocolate in one way or another, and also articles about L&ouml;dahus Chokladkultur."
       beskrivningar[12] = "Our contact information, trading hours, maps and calendar events where we are participating."

   for(i=0;i<13;i++)  {

      for(j=0;j<45;j++) {

         for(k=0;k<45;k++) {

            if(nycklar[i][j].indexOf(searchOrd[k]) > -1) {

               if(direkt == true) {
               var adress = "http://www.chokladkultur.se/" + nycklar[i][0]
               location.reload(adress)
               }

               document.write ("<tr>")
               document.write ("<td valign=top class=visatraff>")
               document.write ("<b class=visatraff>" + rubriker[i] + "</b>" + "<br/>")
               document.write (beskrivningar[i] + "<br/>")
               document.write ("<a class=visatraff href=http://www.chokladkultur.se/" + nycklar[i][0] + ">http://www.chokladkultur.se/" + nycklar[i][0] + "</a>")
               document.write ("</td>")
               document.write ("</tr>")
               hit = 1

            }

         }

      }

   }

   if(hit == 0) {
      document.write ("<tr><td class=visatraff>")
      document.write ("Your search did not match any documents." + "<p>")
      document.write ("</td></tr>")
   }

   document.write ("</table>")
   document.write ("<p>")
   document.write ("<a class=visatraff href=english.htm>New search!</a>")
   document.write ("</div>")
   document.write ("</body>")
   document.write ("</html>")
   
}
