/* Popular phrases - GREENMOUNTAINCOFFEE - 16:50:52, Tue Feb 9, 2010 */
__SLI_ClientDefaults =
[
    ['UseHTTPS', true]
];
var asPhrases=new Array ('80 count k-cup','hot cocoa k cups','hot chocolate k-cups','cafe escapes','decaf k cups','cafe mocha','caribou k cups','cocoa k-cups','hot cocoa','hot chocolate','k cup hot chocolate','80 count kcup','breakfast blend k cups','chai latte','mugs','pumpkin spice k-cup','nantucket blend k-cups','mocha','french toast k cups','breakfast blend','cocoa','half caff k-cup','chai tea k-cups','kona','french roast','decaf','french toast','blueberry','tea','golden french toast k-cup','donut house','hazelnut k cup','kona k cups','caribou','flavored k cups','carousel','newmans own k cups','t4000','french vanilla k-cups','espresso k cup','vermont country blend k cup','blueberry k cup','tea k-cups','nantucket blend','hazelnut','filters','chai','pumpkin spice coffee','our blend','milk chocolate hot cocoa k-cup','holiday blend','golden french toast','italian roast','french roast k cup','green tea k-cups','espresso','dark magic','mocha nut fudge k-cups','our blend k cup','sampler','t6801','wild mountain blueberry k-cups','thermos','travel mug','t6803','variety k-cups','donut house k cups','wicked winter blend','decaf sampler','lake and lodge k cups','chocolate','dark chocolate k cup','sumatran reserve k-cups','variety pack k-cups','wicked winter','colombian','french toast coffee','rain forest nut','k cups','hot chocolate kcups','t6502','flavored variety k-cup sampler','variety','dark magic k-cups','nantucket','tully\'s k-cups','chocolate kcup','newmans','seasonal k cups','heifer hope blend','t6739','french vanilla','cafe mocha k cups','mocha java','pumpkin spice k cup','sampler pack','t6520','southern pecan','lake and lodge','caribou blend','iced tea','pumpkin spice','my k-cup','t6802','caramel vanilla cream k-cup','newmans special blend','iced tea cup','gingerbread','kcups','green tea','newmans special decaf','donut','perfect iced tea cup','bodum','my k cup adapter','b60','breakfast blend decaf','espresso blend','english breakfast tea k-cups','house blend','southern pecan k cup','k-cup carousel','hazelnut decaf','vermont country blend','extra bold','spicy eggnog','tullys','rainforest nut','vermont country blend decaf','descale','cinnamon','limited edition','caramel vanilla cream','cinnamon roll','colombian fair trade select','t6534','french roast decaf','kuerig','perfect iced tea','t6715','pbs blend k cups','decaf k-cups','tea sampler','wicked winter k cup','mocha k cups','cafe escapes milk chocolate k cup','kenyan aa','wild mountain blueberry','eggnog','80','k cup chai tea','seasonal flavors','decaf coffee','free keurig','spicy eggnog coffee','national wildlife blend','coffee mugs','breville','celestial seasonings tea','hot cocoa k-cups','t6501','french press','newman\'s own extra bold','t6507','pottery mugs','b40','t6722','lemon zinger tea k cup','t4000 hot cocoa k-cups','seasonal tour','rain forest nut coffee','pbs','chai tea','french vanilla decaf','chai latte k cups','gift certificate','sleepytime tea k-cups','t6505','rain forest nut k-cup','pumpkin','organic decaf','tower','daybreak morning blend','golden french toast coffee','newmans extra bold','sumatra','earl grey k-cup','double black diamond extra bold','k cup sampler','t6700','t6752','half caff','nantucket blend coffee','ethiopian yirgacheffe','chocolate glazed donut','hazelnut coffee','newmans special blend k cups','iced tea k cups','bodum mugs','kenyan highland cooperatives','k cup filter','sumatran reserve','k cup teas','dark magic decaf','biscotti','b140','k-cups','flavored coffee','cinnamon cream swirl','t6663','vanilla cream','b70','tullys french roast','k-cup tea','latte','organic','k cup adapter','t6823','mahogany','adapter','mocha nut fudge','marshmallows','frother','t6732','keurig carousel','t6783','t6772','t4075','our blend k-cups','b200','pbs blend','office pro','sumatran','caramel','t6792','escapes','decaf tea k-cups','organic k cup','t7522','t6992','t6824','platinum','flavored k-cups','house blend decaf','keurig brewer','raspberry iced tea','chocolate coffee','k-cup filter','dezcal cleaner','raspberry','pumpkin k cup','tea k-cups sampler','chai tea latte','espresso k-cup','newmans own','full city','winter','80 cup box','kona coffee','harvard blend','basket','keurig','special reserve','madison blend','half and half k cups','hazelnut dark roast extra bold','peach','extra bold variety k-cup sampler','t6994','cleaning brewer','t6805','keurig b70','vermont','french vanilla decaf k cup','t7732','t6760','k-cup','brewers','water process decaffeinated','fair trade k cup','t7792','t6822','cafe escapes mocha','my k cup','single origin','t6523','tree','yirgacheffe','water filter','special reserve coffees','carafe','costa rican','k-cup cocoa','evergreen','variety pack','shade grown','k cup carousel','peach k-cup','k cup variety','t6999','keurig single cup brewer','cafe escapes hot cocoa','caribou decaf','dezcal','wicked','t6570','t6821','mandarin orange spice tea','80 ct','newman decaf','t4059','daybreak','heifer hope k-cup','fair trade','wildlife blend','colombian k cup','t6503','bold k cups','travel coffee mugs','hazelnut decaf k cup','peach iced tea','peaberry','special edition','mexican','chocolate raspberry','t6504','heifer','grinder','lake','t6990','sumatra k cup','t7534','vanilla','k cup coffee','organic french roast','maple syrup','mocha coffee k cups','kenya','kona blend k cup','sugar free','newmans 80 count','half caff k cups','keurig travel mug','granola','fair trade organic','organic k-cups','southern pecan decaf','dark hot chocolate','coffee beans','chocolate raspberry truffle','backpack thermos','seasonal coffee','milk chocolate','filter cartridges','t6602','caramel vanilla','t6700 caramel vanilla cream','k-cup decaf','italian','celestial seasonings','breakfast blend decaf k-cup','mini brewer','zhena','kona blend','k-cup adapter','milk frother','newman\'s own k-cup','flavored','english breakfast black tea','keurig cleaner','variety sampler','tullys decaf','colombian decaf','kenyan','mountain blueberry','dark chocolate','dark magic decaf extra bold','k-cup sampler','national wildlife k cup','donut house decaf','travel','t6995','colombian fair trade select k-cup','decaf green tea','t4061','vanilla k-cup','80ct','pecan k cup','dark magic espresso blend','cleaner','heifer hope','nissan thermos','hazelnut dark roast','decaf variety','guatemalan','t4058','double black diamond','decaf sumatra','half-caff','t7694','t4067','ethiopian','regular variety','paper filters','keurig b40','extra bold sampler','vermont country','costa rican peaberry','tea variety','tour','pecan','syrup','nutcracker cookies','b70 platinum','decaf coffee kcups','madison','sampler box','beans','mexican select','half','mug set','black diamond','black tea k-cups','daybreak morning blend k-cup','organic decaf k cups','bold','cleaning','keurig b60','rain forest nut decaf','mild coffee k cups','seasonal','k cup chocolate','medium roast k-cups','chai latte k-cups','wild blueberry','our blend coffee','t6752 mocha nut fudge','t4060','sweet tea','tanzanian gombe reserve','golden french toast k cups','mandarin orange k-cup','caribou blend k cup','t6997','newman\'s decaf','double black diamond k cups','newmans organic special blend','perfect peach','raspberry tea','golden','chocolate donut','sleepytime','mocha coffee','organic breakfast blend','k cup cocoa','my kcup','water filter for keurig','celestial english breakfast black tea','caramel sauce','caramel vanilla decaf','10','caribou decaf k cup','flavored sampler','rainforest','t6998','cafe escapes chai latte','t6993','80 count caribou','french vanilla flavored coffee','dark','lemon ice tea','holiday coffee','extra bold dark magic','t4066','donut house mug','my k-cup adapter','kona k-cup','winter blend','reserve','espresso blend k cups','milk chocolate hot chocolate','lava cake','oolong tea','chocolate lava cake','nantucket coffee','coffee of the month','fair trade organic hot cocoa','stackable mugs','cafe almond biscotti','elite','guatemala','lake and lodge bean','oolong','black tea','chocolate glazed','my kcup filter','my kcup adapter','t4068','cafe','donut house coffee','b145','pumpkin coffee','k cup tower','organic house blend','tumbler','t6991','fair trade k-cups','vine mug','travel brewer','signature blend','scoop','dark roast','extra bold decaf','vermont country blend coffee','keurig platinum','bold coffee','t7602','t6501 k-cup','gombe reserve','harvard','caribou blend k-cup','raspberry truffle','blueberry k-cups','italian roast k-cup','chocolate coffees k-cups','nells breakfast blend','iced','k-cup decaf coffee','k cup tree','k-cup tower','lemon zinger','pottery','organic breakfast blend decaf','signature sampler','80 cup','vending','t4051 newman\'s special decaf','t4057','keurig office pro','colombian fair trade','enjoy life','darjeeling','b30','t6503 decaf variety k-cup sampler','bold sampler','decaf kcups','guatemalan finca dos marias','keurig filter','dan lasser','coffee tour','old world hot cocoa','flavored decaf','medium roast','nell','kcup filter','seasonal flavors coffee tour','tullys k cups','decaf sampler k','my k-cup refill pack','vanilla decaf','keurig mini tote','insulated mugs','donut house cinnamon roll','mocha nut','french','hazelnut kcup','peach flavored coffee','keurig coffee','light to medium','mandarin orange spice herbal tea','wild blueberry k cups','regular sampler','keurig b140','kcup sampler','organic maple syrup','b-70','donut kcup','flavored variety','todd piker','newman coffee','t6570 k-cup our blend','t6694','decaf hazelnut coffee','mini','keurig mug','variety sampler packs','maple butter','kcup decaf variety','chai latte kcups','donut house k-cups','k-cup tree','nantucket blend k-cup','80 count box','t6792 hazelnut','decaf bold','newmans decaf kcup','assorted','keurig milk frother','de-scale','halfcaff','cafe escapes cafe mocha','regular variety k cup','extra bold k-cup','french roast decaf k cup','sleepytime herbal tea','tanzania gombe','chai k-cups','earl grey','office brewers','kenyan highland','eggnog flavor','orange','french roast k-cup','black carousel','fair trade organic k cups','bodum glasses','cafe escapes dark chocolate','medium roast coffee','tom homann slate mug','vermont blend','ultimate','organic hot cocoa','t4056','vanilla cream coffee','press','peppermint puffs','k cup basket','keurig elite b-40 brewer','mild','mitzi\'s maple granola','organic tea','dark chocolate cocoa','spice chai tea','muddy creek','80 ct k cups','red','b-60','cinnamon bun','hot coco','keurig frother','carousel for k cups','storage baskets','tully\'s k-cups decaf','coffee scoop','cinnamon swirl','decaf caramel vanilla cream','logo mug','espresso roast','green mountain colombian decaf','dark coffee','peach tea','breakfast','hold','filter my k-cup refill','light','canister','backpack','glass mug','kcup tree','organic coffee k cups','cinnamon k cups','golden french','half caffeine','rain forest','special reserve tour','stainless steel mug','adapter piece','chocolate journey','assorted k cups','k cup sampler pack','chocolate marshmallows','green mountain decaf','donut house decaf k-cup','variety tea k-cups','coffee house','hot','tote','cafe latte','puffs','pumpkin coffee k-cup','kenyan aa k-cup','k cup storage','earth friendly filters','kcup tea','kcup cocoa','limited edition k cup','popcorn','glazed','caribou 80','roast','colts','sumatran lake tawar','hazelnut k-cup','coffee grinder','cookies','french toast kcup','t4061 dark magic extra bold','teastick','keurig b200','gombe','tully evergreen','devonshire english breakfast black tea','travel tumbler','tully house','original','keurig water filter','indonesian','glazed donut','extra bold variety','b3000','green stainless steel travel tumbler','chai k-cup','cup for iced tea','k-cup tea sampler','wicked winter k-cup','toast','heritage shortbread','tullys house decaf','mandarin','keurig mini','vanilla coffee','lake champlain','rain forest k-cup','jane goodall coffee','chasworth tumbler','newmans french roast','cleancaf','sleepytime herbal','kcups sampler box','lasser','spice chai','ground coffee','lake champlain chocolates','k-cup basket','donut mug','all k cups','k-cup hot cocoa','daybreak k cup','k-cup chocolate','green','emile henry mug','kcup tower','french roast k-cups','my k-cup filter','gingerbread coffee','dark french','dark chocolate k-cup','celestial orange','tea cups','french decaf','t4058 kona 10','orange tea','k cup coffee kona','earl grey tea','flavored sampler decaf','nantucket k cup','medium blend','celestial seasonings k-cups','k cup gift baskets','earl grey black tea','caribou k-cups','peach k cup','porcelain cups','mild blend','celestial teas','santos','dark roast k cups','hazelnut cream decaf','10% kona','special blend','refills','breakfast blend mild','celestial seasonings chai','sumatra extra bold','preserves','lava','cc winkle','k-cup sampler pack','vermont country k cup','iced tea k-cups','tea brewer','hazelnut extra bold','mexican decaf','house collection','breville brewer','peach coffee','hazelnut decaf k-cup','fat toad farm','tully\'s french roast k cup','heifer international','plumbed','stackable','sumatra coffee','organic espresso blend','thermal','tullys house blend','emile henri cherry red mug','keurig platinum b70','mocha k-cups','kcup carousel','tully\'s kcups','nissan thermal french press with logo','roll','organic sumatran reserve','french roast decaf k-cup','regular k-cup sampler','tully\'s evergreen','dark roast decaf','organic house blend decaf','sugar','regular','french roast dark','sauce','kona medium k-cup','late','hazelnut k cup 80','organic light','colombian blend','signature ground','caf escapes mocha k-cup','newman own extra bold','newman bold','french vanilla coffee','hazelnut biscotti','keurig platinum brewer','my k-cup for keurig brewers','breakfast blend light','cafe escapes k cups dark chocolate','flavored variety sampler','barn mug','k cup french vanilla','light blend','80 count cups','my k cup filter','maple granola','lemon tea','cafe escapes dark','organic breakfast crate','spice tea','dezcal descaling cleaner','burr grinder','hawaii','chai kcup','better world','nissan thermal press','guatemalan finca','80 k-cup','jam','french roast decaf k-cups','finca dos marias','fair trade select','caramel k cup','gmcr travel mug','keurig samplers','kcup refill','india spice tea','spring','decaf medium roast','peach k','kcup caramel','bodum tall insulated glasses','caribou cups','mandarin orange spice herbal tea k-cup','k-cups variety boxes','cherries mug','our blend decaf','bodum frother','keurig b30 mini brewer','all','select origin chocolates','coffe maker','dark magic coffee','organic rain forest blend','k cups green tea','fair trade wild mountain blueberry','keurig adapter','orange spice','hazelnut cream coffee','organic espresso','kcup pbs','organic flavored','organic breakfast crate gift','coffee sampler','decaf pecan','celestial','huatusco','shortbread','palopo mug','herbal','regular k cups sampler pack','manzanillo','vanilla tea','boho','kcup brewers','hot chocolate k','cartridges','rain forest certified','80ct k cups','pecan bella bark','k-cup our blend','magic','keurig hot chocolate','celestial seasonings mandarin orange spice tea k-cups','thermal press','k cup dark magic','hot cocoa kcup','national wildlife','nutcracker','diamond','extra bold k cups','chocolate mocha','regular blend bold','magnet','green tea kcup','cinnamon roll kcup','tully\'s house','breakfast tea','#4 filters','coco','green mug','extra bold decaf k cups','buttery','chocolate biscotti','k-cup dark magic extra bold','emile','flavor tour','donut house chocolate glazed','seasonal k cup tour','fair trade decaf k cup','biscoti','bistro','newman\'s special blend extra bold k-cup','free kcups','b-140','fair trade golden french toast','office','newman\'s special','sampler pack decaf','chai k cup','kcups our blend','french vanilla k-cup','extra bold espresso','decaffinated','newman\'s kcups','caribou blend natural decaf','light k-cups','bodum insulated','k cup decaf coffee','cioccolato mug set','decaf k-cup sampler pack','tully\'s french','k-cup hot chocolate','k-cup breakfast blend','single cup','espresso maker','80count','black','muddy','colts chocolate covered marshmallows','cider jelly','green mountain coffee mugs','tully\'s coffee mug','french roast kcup','drinking cups','k-cup tour','keurig k cup carousel','decaf variety pack','sweet raspberry','b-145','tom homann','fair trade organic coffee','dark magic extra bold k-cup coffee','k-cup storage baskets','manzanillo mugs','raspberry preserves','chai tea latte k-cups','decaf vanilla k-cup','cafe mocha k-cup','newman\'s own organics','wicked winter blend kcup','caribou kcups','newmans kcup','espresso blend extra bold','tully\'s sampler','tullys mug','descal cleaner','english breakfast','k-cup organic','steel mugs','slate mug','k cup fair trade select','boho holiday mugs','products','caribou blend k-cups','k cup hot','breakfast blend decaf k cup','hazelnut cups','decaf tea k cups','fair trade golden french toast k-cup','keurig hot cocoa','dark chocolate cocoa k cup','eggnog coffee','newmans decaf k cup','decaf green tea kcups','red raspberry','french roast extra bold','black ice tea','spice coffee','thermo mugs','carousel tree','b-40 brewer','india spice chai tea','light coffee','spring awakening mug','k-cup variety pack','double black','emile henry','seasonal k-cup','kona kcup','heritage','ceylon tea','fair trade organic breakfast blend','assortment pack','express blend','tom','coffee shop','newmans own k-cups','#t6802','insulated carafe','caf escapes milk chocolate','newmans blend','mocha kcups','regular coffee','french vanilla decaf kcup','heffer hope','fudge nut','double wall mugs','chocolate k cup coffee','orange spice tea','chocolate glazed donut k-cup','fair trade k-cup decaf','plastic mug','rain','logo thermos','keurig single-cup brewer','earl grey tea k cup','red k-cup carousel','k cup tour','platinum brewer','breakfast decaf','assorted tea','cafe escape milk','mondo mug','winter mug','clean keurig','caribou blend decaf k-cup','gmcr','newman k-cup decaf','k cups vermont blend decaf','thermos by nissan','mocha coffe','butter cream','do-nut','tullys coffee house','vacuum','dark magic k-cup','dark chocolate hot cocoa','mandarin orange','t-6700','apron','fair trade organic espresso blend extra bold k-cup','k cup house blend','k cup flavored sampler','hazelnut bold','maria','tea variety box','sweet lemon','mahogany k cup','better world mug','fair trade cocoa','beth mueller','brew a better world mug','biodynamic','english breakfast tea kcup','city','caramel vanilla coffee','french vanilla k','grinder brush','earl grey kcups','lodge blend','k cup variety pack','lake and lodge kcup','k-cups carousel','fair trade french toast','coffee house collection','mitzi maple granola','mitzi\'s granola','fair trade rain forest nut k-cup','wicked winter blend k-cup','tully\'s breakfast blend','vermont k cup','making ice tea','winter mornings mug','fair trade organic espresso blend','decaffeinated coffee','extra bold hazelnut k cup','holiday mugs','breakfast blend medium','chocolate k-cups','dark cocoa','newmans organic','refillable k cup','my cup','kenyan k cups','salmon','variety box','coffe of the month','decaf green tea k-cups','red carousel','hazelnut 80','sleepytime tea','spicy','nissan thermal french press','keurig b3000','kflle','pear hazelnut','80 kcups coffee','extra bold medium roast','organic water decaf','water filter starter kit','caramel vanilla k cup','b-30','wicked blend','harvest mug','breville keurig','keurig special edition','madison k cup','tully decaf k cups','keurig brewer b-40 22 k-cups','medallions','organic coffee pods','grind and brew coffee maker','tullys extra bold','hefer','t-6999','b140 brewer','indonesian coffee','newman\'s own special blend','single cup brewing','k-cup variety sampler regular','ultimate gift','reusable shopping bag','tullys french roast k cups','caribou blend decaf','black tea k cups','donut house coffee k-cup','dark hot chocolate k cup','costa rican peaberry select','coffee refills','cafe coffee','hot chocolate cups','pbs fair trade','filter for k-cup','biodynamic green teas','k-cups sampler','pro','filter earth basket','kcup decaf hazelnut','winter limited edition','sleepytime herbal tea k-cup','colombian fair trade select 80ct k-cup','fto breakfast blend','chocolate caramel','milk chocolate hot cocoa','heiffer hope','cherry red mug','lake tawar','organic crate','red press','keurig elite b40','logo nissan mug','tully french','kcup 80 ct','fair trade wicked winter blend','donut k-cups','sweet lemon black tea','t-4052','kcup vermont blend','seasonal k-cups','mild blend coffees','chocolate dipped hazelnut biscotti','spicy nutmeg','celestial black tea','national wildlife blend fair trade organic','winter k cup','perfectly pumpkin','extra bold 10','vanilla cream decaf','unsweetened black iced tea k-cup','k-cup refill','all teas','tully\'s medium roasts','french toast k','india spice chai','cafe escapes milk chocolate','80 kona','french roast bold','light roast decaf','bodum tall','keurig elite k-cup brewer','80ct kcups','flavored variety k-cups','keurig breville brewer','bistro mug','caff','keurig b145','decaf variety k-cup sampler','dark magic decaf extra bold k-cup','tully\'s evergreen blend','k-cup mahogany','baking','newmans own kcup','k-cup newmans special decaf','national wild','stainless steel scoop','kuerig elite','dark chocolate k-cups','enjoy life pitcher','bodum coffee mugs','life pitcher','k cup variety sampler regular','tully\'s espresso','cups and tumblers','homann','lake champlain chocolate journeys','k-cup adapter filter','t-6505','cup carousel','bold hazelnut k cups','boxes of k cup coffee','buttered french toast','tullys dark roast','iced lemon','hazelnut k-cup 80','t-6520','celestial decaf green tea','forest k-cups','80 ct k-cups','seasonal flavored coffees','full city roast','cafe escapes cocoa','bella','keurig b-70','lazy susan','blueberry tea','tea stick','fair trade organic ethiopian yirgacheffe','fair trade organic decaffeinated','caramel vanilla cream coffee','milk hot chocolate','new england coffees','extra bold kona coffee blend','celestial sleepytime','pecan kcup','sumatran reserve k-cup','cafe escapes dark cocoa','kcup decaf sampler','fair trade golden','mild coffee k-cups','keurig coffee brewers','water processed k cups','80 count k-cup boxes','fair trade flavored coffee','city blend','keurig water filter cartridge refill','wicked winter k','cafe escapes dark hot chocolate','black peach tea','cafe cocoa','dan lasser harvest mug','vermont country sap','blade grinder','6 month tour','enjoy life mug','decaf k','french vanilla decaf k-cup','cafe chai','k-cup hazelnut dark extra bold','kuerig platinum','breakfast blend k','k-cup brewer','vanilla kcup','k-cup winter','single filter','roast decaf','organic decaffeinated','extra bold intense dark magic','cooperative','leaf tea','k-cups tea tea','starter kit','daybreak morning','decaffeinated green tea','quiet brew','hibiscus tea','pbs k-cups','green thermos','chocolate k','espresso shot glass','fair trade dark roast','limit coffee','caf escapes milk chocolate hot cocoa k-cup','k-cup variety sampler tea','k-cup southern pecan','hazelnut dark roast extra bold k-cup','lemon iced tea k-cup','k-cup peach iced tea','seasonal spicy eggnog','black tea k-cup','k-cup vermont country blend decaf','fair trade wild mountain blueberry k-cup','kcup breakfast','fair trade organic national wildlife blend k-cup','tully\'s cocoa','fair trade organic sumatran reserve extra bold k-cup','nut coffee k cup','double black diamond extra bold k-cup','raspberry iced tea k-cup','half-half','caf escapes dark chocolate hot cocoa k-cup','newmans special blend extra bold','golden toast','dark k-cup','snowy','emile mug','single brewer','decaf house','english breakfast black','k cup vanilla cream','keurig b60 special edition','special blend decaf','insulated thermos','newmans special blend decaf','green mountain mug','colombian 80','single cup hot chocolate','hammond\'s','sumatran reserve k cup','taste of a better','breakfast tea k-cups','santos vacuum','bold variety','k cup coffee carousel','newman\'s k cups','cafe chai latt','k cup newman extra bold','side hill preserves','kcup tea sampler','k cup variety sampler','limited edition coffee','decaf flavored coffee k-cup','extra bold italian roast','milk chocolate escape','cafe escapes chai','caramel decaf','k-cups milk chocolate','decaf magic','unsweetened tea','popularity','brown','milk chocolate cocoa','oo','k cup tea variety','newman\'s organic sampler','smooth finish','tamper','caf escapes','keurig special edition single-cup brewer','kcup chai tea','k cup coffee medium','plastic','fair trade medium roast','bold kcup','coffee express','fair trade mug','6 month flavored tour','k-cup adapter piece','hazelnut dark roast k-cups','80 count bold k cup','fair trade french roast decaf','italian coffee','keurig ultimate brewer','filter cup','t-6992','t-6501','fair trade spicy eggnog','celestial mandarin orange spice tea','t-4000','half-caff k-cups','extra bold house blend','mocha k','pumpkin spice ground coffee','coffee grinds','vermont kcup','organic mexican coffee','my k filter','elite brewer','single k cups','coffee and cocoa','kcups breakfast decaf','one cup brew','logo travel','brewer filters','my kcup refill','my k-cup for keurig brewing','fair trade organic french roast','free kuerig','k-cup insert','keurig vending','pumpkin spice ground','k-cup flavored variety','celestial decaf','80ct k-cup','dark hot cocoa','santos vacuum coffee maker','extra bold variety sampler','tullys espresso roast','holiday gift','coffee house k cups','extra bold special blend','organic special blend','felicity','22 cup variety pack','keurig k-cup tower','apple and butter crate','fair trade coffee sampler','extra bold k-cup sampler','k-cup coco','k cup wildlife blend','tully\'s gift basket','logo sports mug','dark hot chocolate k-cup','escapes k-cups','winkle popcorn','donut cinnamon','caramel swirl','fair trade organic pbs','cocoa gift basket','coffee olive wood','devonshire','hazelnut k','k cups heifer hope blend','smoked salmon','t-6990','celestial tea sampler','felicity mug','mini k-cup','decaf dark magic k cups','green treasures','c.c winkle','national wildlife kcup','organic coffee sampler','crema','keurig brewer b-60','my k-cup pack','breakfast tea k cup','keurig caf one-touch milk frother','caribou natural decaf','lake champlain journey','kcup latte','tullys coffe mug','our blend k-cup coffee flavored','t-6803','chai latte cups','keurig my k cup','rain forest k','organic dark','copper river','k cup regular sampler','t-6502','t-6801','decaf breakfast blend k-cups','fair trade organic flavored','green mountain coffe mug','grade','taste of vermont breakfast','vermont breakfast coffee','celestial seasonings earl grey','dark espresso','sumatra kcup','breakfast sampler','heat resistant','newman\'s organic extra bold','lake chocolate','caribou k-cup','de-caf','dark bold roast','mitzi\'s','dark flavored','coffee gifts','elite b-40','french vanilla decaf coffee','cafe escapes tea','chocolate donut k cup','nell\'s breakfast blend k cup','celestial mandarin orange spice herbal tea','tully travel mug','espresso glasses','fair trade blueberry','mitzi','flle','caramel vanilla cream k-cups','cocoa mug','fto decaf','keurig cocoa','hot cocoa k','my-kcup','fair trade ethiopian','estate coffee','stainless travel mug','14oz travel mugs','keurig tree','fair trade organic house blend decaf','coffee clip','k-cup hazelnut dark','coffee maker grinder','nissan mugs','celestial sampler','fair trade organic french roast decaf','tully french roast k-cup','fair trade organic tea','extra bold beans','italy','newmans organic k cup','fair trade chocolate','thermal coffee press','tullys french roast kcups','citrus','spring mug','chambord stovetop espresso maker','$20 gift certificate','robin\'s fair trade organic chocolate sauce','t-7694','black apron','t-6503','full city roast kcup','newman\'s dark roast','opus','t-4059','t-4061','high sierra backpack','rain forest nut not certified organic','single cup coffee brewer','fair trade organic rain','fair trade eggnog','lake and lodge k-cups','k cup variety sampler tea','black tea lemon','organic flavored decaf','keurig p latinum','celestial variety','organic maple','caramel k-cups','water decaf','80 coffee cups','origins sampler','kcup monthly','k-cup variety tea','chambord espresso','dark magic decaf k-cups','holiday green','pumpkin flavor','keurig cups','organic espresso blend k cup','k-cups french vanilla decaf','80 count coffee','sumatran kcup','keurig insert','keurig platinum b70 single-cup','one cup brewer','pumpkin spice flavor','coffe samplers','k cup coffee breakfast blend','k packs','t k cups','flavored ground coffee','my kcup refill filters','free paper filters','fair trade organic coffee sampler','indulgence','b30 tote','dark decaf k','nell\'s blend','tullys house blend decaf','fair trade organic k-cups','k cup variety box','yogurt','organic blueberry','donut k-cup','20%','monthly specials','signature k-cup tour 6 months','coffee and maple syrup','mandarin spice','tully\'s compadre','all bold','fair trade holiday blend k cup','keurig cafe one touch milk frother','tully\'s decaf french roast','our blend k','nantucket blend k','fair trade and organic tour','k cup italian roast','double dark diamond','k cup spice','office coffee brewers','sweet black tea','vermont country blend k','t-4068','pea','fair trade organic blend','green stainless tumbler','tullys french roast decaf','celestial english breakfast tea','darkest coffee','k-cup italian roast coffee','20% more','k-cup flavored sampler','k-cup coffee tour','breakfast black tea','saslaw mug','shade fair','chocolate dipped','lover','k cup refil','decaf fair trade rain','t-4050','keurig-sized travel mug','keurig elite b40 brewer','seasonal flavor tour','t-6003','t-6694','fair trade autumn harvest blend','flavored extra bold','extra bold kcups','k-cup bold sampler','white filters','k cup nut fudge','coffee with aroma','frond mug','k-cups decaf sampler','80 k-cup newmans','southington ct','rich coffee','k cup decaf coffee 80 count','growers','my adapter','dark fair trade','english black','keurig coffee carousel','kcup orange tea','city roast','monthly k cup','p umpkin spice','flavored k','g','kcups newmans organics','organic cappuccino','six month','olive scoop','k-cup dark chocolate hot cocoa','80 count k','decaf and regular blend','fair trade house','kcup dark magic decaf','newman organic coffee','organic french decaf','t-6602','t-4057','t-6994','kcup mocha nut fudge','kcup variety sampler','newmans special extra bold','gmcr insulated carafe','k cup variety sampler flavored','fair trade pumpkin','keurig single brewers','stainless steel coffee','caribou coffee sumatra','bold hazelnut k-cup','flavored decaffeinated','brewing a better world fund','seasonal k coffee tour','fair trade wild blueberry','tullys extra bold french roast','newman owns nell medium roast','yoga','gypsy king chai','organic k cup sumatran extra bold','k cup bold sampler','k-cup regular variety','wood animals','is the coffee shade grown','davids','keurig platinum b70 k cup single-cup brewer','ciat','tall insulated glass','native energy','wood carvings','ngo\'s','fair trade organic espresso','crowther','k-cup flavored coffee sampler','extra bold sumatran reserve k-cup','green scoop','other brands','mardy','kcup kenyan','dark blend k cup','very light coffees','fair trade peach','songbird','caffeinated teas','blackthorne','grahams','k-cup kona 10% blend extra bold','bergamot','address 3','sunrise','chocolate love','gmcr grinder','caribou coffee french roast','my delivery','liquid sugar','coffe grinder','estate sampler','k-cup celestial','holly','fair trade summer celebration','ft106t','net sales','french roast by tullys','domestic grant','united nations','k-cup breakfast','k-cup double black','brewer with grinder','k-cup lemon tea','tamp','flavored variety kcups','fair trade perfect peach','6','event donations','organic vanilla coffee','indian coffee','k cup raspberry tea','kcups medium roast','organic sumatra bold','k-cup newmans special blend extra bold','passion','deer','paper bag','#t6502','#t6503','world cocoa','hot beverage cups','sara lee','pick','keurig one cup brewer','certified organic coffee','return address','extra bold 10% kona blend','earth','k cup patent','flavored organic k-cup coffee','kcup wild blueberry','c store','health insurance offerings','k cup evergreen','thriving workplace','extra bold 10% kona coffee blend','#t6501','k-cup patent number','q2 earnings','keurig company','k-cup fair trade espresso blend extra bold','legend','kcup delivery','k-cup fair trade organic sumatran reserve','green mountain coffee tully\'s','mail business','decaf african','keurig-sized','caribou dark roast','keurig sale','nasdaq gmcr','objectives','love my keurig','other drinks','k-cup caribou coffee colombian','conventional','fair trade k-cups pumpkin','value chain','organic decaf breakfast','#2','briefcase','letter of intent','coffee growing countries','kraft','chalk mug','renewable','k-cup caribou french roast','hurricane','k-cup caribou colombian','coffee tamper','rex','net income','k cup lazy susan','issues of financial statements','fair trade organic colombian','k kcup tea','t-6802','k-cup caribou coffee caribou blend decaf','k-cup breakfast tea','k-cup refil','t-6720','garden','k carousel','medium amber','kcup 60 pack','t-7602','t-7792','t-6783','caribou blend natural decaf coffee','dp','k kcup samplers','mill','k cup wicked winter blend extra bold','cake up','my pack','#t6504','ethnic','k cup coffee newmans','j cup','nonorganic','#t6003','keurig k cup filter','keurig flavors','kcup extra bold sampler','my-k','web','fair trade c','coffee accessories','888-try-gmcr','k cup ejection','keurig reusable','keurig kona','k-cup single filter','k cup coffee club','keurig one cup','k cup travel mug','k cup coffee bold','keurig gold cup','grade k cup double chocolate hot cocoa','keurig folgers','decaf single','smoked coffee','fair tradepumpkin spice');
/* $Revision: 3828 $
 *
 */

if(typeof(_sli_init )!='object'){var _sli_init=new Array();}
if(typeof(sli_init )!='function'){function sli_init(){ for(var x=0;x<_sli_init.length;x++) _sli_init[x]();}}
if(typeof(asPhrases)!='object'){ var asPhrases = new Array(); }
if(typeof(__SLI_customisations)!='object'){var __SLI_customisations = new Object();}
if(typeof(__SLI_ClientDefaults)!='object'){ var __SLI_ClientDefaults=[]; }
if(typeof(__SLI_validSearchBoxes)!='object'){ var __SLI_validSearchBoxes = new Array(); }
if(typeof(__SLI_asug_used_flag)!='object'){ var __SLI_asug_used_flag = false; }
if(typeof(__SLI_width)!='object'){ var __SLI_width = 0; }
if(typeof(sli_targeturl)!='object'){ var sli_targeturl = ""; }


    __AutoComplete = new Object(); //namespace...
    __AutoComplete_mouseMoved=false;

    // Basic UA detection
    isIE = document.all ? true : false;
    isGecko = navigator.userAgent.toLowerCase().indexOf('gecko') != -1;
    isOpera = navigator.userAgent.toLowerCase().indexOf('opera') != -1;

    /* defaults and options */

    var __SLI_ApplicationName = 'AutoSuggest';
        __SLI_customisations[ 'AutoSuggest' ] =
                {
                    'ShowBrandingFooter' : true
                    ,
                    'TextBoxIDPrefix' : 'sli_search_'
                    ,
                    'BrandingFooterImagePath' : 'http://assets.resultspage.com/autosuggest/sli_systems-powered_150_15.gif'
                    ,
                    'BrandingFooterTitleTooltip' : 'AutoSuggest Powered by SLI Systems'
                    ,
                    'DropListMinWidth' : 150
                    ,
                    'MaxListItems' : 10
                    ,
                    'Alignment' : true
                    ,
                    'TextBoxIDCustom' : []
                    ,
                    'ValidSearchBoxes' : false 
                    ,
                    'IE6SelectBox' : false 
                    ,
                    'IE6SelectBoxPadding' : 0
                    ,
                    'TargetURL' : ''
                    ,
                    'IframeAlignment' : false
                    ,
                    'AlignmentBorderBug' : false
                    ,
                    'IE6OnFocus' : false
                };
    /* 0 = keyname, 1 = value */
    for( defaultValuePair in __SLI_ClientDefaults )
    {
        __SLI_customisations[__SLI_ApplicationName][__SLI_ClientDefaults[defaultValuePair][0]]=__SLI_ClientDefaults[defaultValuePair][1];
    }

    /* pre-fetch branding footer image if being used...
     */
    if( __SLI_customisations[ __SLI_ApplicationName ][ 'ShowBrandingFooter' ] )
    {
        
        if(location.protocol == "https:")
        {
            __SLI_customisations[ __SLI_ApplicationName ][ 'BrandingFooterImagePath' ] = __SLI_customisations[ __SLI_ApplicationName ][ 'BrandingFooterImagePath' ].replace(/http:/i, 'https:');
        }
    
        var __AutoCompleteBranding = new Image();
        __AutoCompleteBranding.src=__SLI_customisations[ __SLI_ApplicationName ][ 'BrandingFooterImagePath' ];
    }


    function AutoComplete_init()
    {
        if(!isOpera)
        {
            var oldonresize=function(){};
            if(typeof(window.onresize)=='function')
                oldonresize = window.onresize;//play nicely with other people's toys
            window.onresize= function(){ oldonresize(); AutoComplete_HideAll(); AutoComplete_Create( asPhrases ); }

            AutoComplete_Create( asPhrases );
            
            var els = document.getElementsByTagName('input');
            if(els)
            {
               for ( i = 0; i < els.length; i++ )
               {
                  if(els[i].name == "asug")
                  {
                     els[i].disabled = true;
                  }
               }
            }
        }
    }




    /**
    * Attachs the autocomplete object to a form element. Sets
    * onkeypress event on the form element.
    *
    * @param string formElement Name of form element to attach to
    * @param array  data        Array of strings of which to use as the autocomplete data
    */
    //function AutoComplete_Create (id, data)
    /*
     * iterate over 'sli_search_*' assumes one or more search boxes numbered from 1...
    */
    function AutoComplete_Create( data )
    {
        var idx=1, e, id, searchBoxPrefix=__SLI_customisations[ __SLI_ApplicationName ][ 'TextBoxIDPrefix' ];
        while( e = document.getElementById(searchBoxPrefix+idx) )
        {
            AutoComplete_AttachHandlers(e, data);
            if( __SLI_customisations[ __SLI_ApplicationName ][ 'ValidSearchBoxes' ] )
            {
                __SLI_validSearchBoxes.push(searchBoxPrefix+idx);
            }
            idx++;
        }
        
        
        //this array comes from the customised list
        var otherTextBoxIdList = __SLI_customisations[ __SLI_ApplicationName ][ 'TextBoxIDCustom' ];
        if( otherTextBoxIdList)
        {
            for(idx=0;idx<otherTextBoxIdList.length;idx++)
            {
                e = document.getElementById(otherTextBoxIdList[idx]);
                if(e)
				{
					if( __SLI_customisations[ __SLI_ApplicationName ][ 'ValidSearchBoxes' ] )
                	{
	                    __SLI_validSearchBoxes.push( otherTextBoxIdList[idx] );
                	}
					AutoComplete_AttachHandlers(e, data);
				}
            }
        }
        
    } 

    function AutoComplete_AttachHandlers(e, data){
        var iframe,id;
        id=e.id;


        __AutoComplete[id] = {'data':data,
                              'isVisible':false,
                              'element':document.getElementById(id),
                              'dropdown':null,
                              'highlighted':null};

        __AutoComplete[id]['element'].setAttribute('autocomplete', 'off');
        __AutoComplete[id]['element'].onkeydown = function(e) {if (!e) e = window.event; return AutoComplete_KeyDown(this.getAttribute('id'), e);}
        __AutoComplete[id]['element'].onkeyup = function(e) {if (!e) e = window.event; return AutoComplete_KeyUp(this.getAttribute('id'), e);}
        // The function call on the next line was changed by Andrew Grieve April 2008
        __AutoComplete[id]['element'].onkeypress = function(e) {if (!e) e = window.event; return AutoComplete_KeyPress(this.getAttribute('id'), e);}
        __AutoComplete[id]['element'].onclick = function(e)
        {
            if( __SLI_customisations[ __SLI_ApplicationName ][ 'IE6OnFocus' ] )
            {
                __AutoComplete[id]['element'].focus();
            }
            if (!e) e = window.event; e.cancelBubble = true; e.returnValue = false;
        }



        // Hides the dropdowns when document clicked
        var docClick = function()
        {
            if( __SLI_customisations[ __SLI_ApplicationName ][ 'ValidSearchBoxes' ] )
            {
               for(var i=0; i < __SLI_validSearchBoxes.length; i++)
               {
                   if(document.getElementById(__SLI_validSearchBoxes[i]))
                   {
                       AutoComplete_HideDropdown(__SLI_validSearchBoxes[i]);
                   }
               }
            }
            else
            {
                for (id in __AutoComplete)
                {
                   AutoComplete_HideDropdown(id);
                }
            }
        }

        if (document.addEventListener) {
            document.addEventListener('click', docClick, false);
        } else if (document.attachEvent) {
            document.attachEvent('onclick', docClick, false);
        }


        // Max number of items shown at once
        if (arguments[2] != null) {
            __AutoComplete[id]['maxitems'] = arguments[2];
            __AutoComplete[id]['firstItemShowing'] = 0;
            __AutoComplete[id]['lastItemShowing'] = arguments[2] - 1;
        }

        AutoComplete_CreateDropdown(id);

        // Prevent select dropdowns showing thru
        if (isIE) {
            iframe = document.createElement('iframe');
            __AutoComplete[id]['iframe'] = iframe;
                iframe.id = id +'_iframe';
                iframe.style.position = 'absolute';
                iframe.style.top = '0';
                iframe.style.left = '0';
                iframe.style.width = '0px';
                iframe.style.height = '0px';
                iframe.style.zIndex = '98';
                iframe.style.visibility = 'hidden';
                
                if(location.protocol == "https:")
                {
                   iframe.src = 'https://assets.resultspage.com/autosuggest/blank.html';
                }
                
                if( __SLI_customisations[ __SLI_ApplicationName ][ 'IE6SelectBox' ] )
                {
                  iframe.style.width = __SLI_width  + __SLI_customisations[ __SLI_ApplicationName ][ 'IE6SelectBoxPadding'];
                }

            if( __SLI_customisations[ __SLI_ApplicationName ][ 'IframeAlignment' ] )
            {
                document.body.insertBefore( iframe );
            }
            else
            {
                __AutoComplete[id]['element'].parentNode.insertBefore( iframe, __AutoComplete[id]['element'] );
            }
        }
    }

    /**
    * Creates the dropdown layer
    *
    * @param string id The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_CreateDropdown(id)
    {
        var theSearchbox = __AutoComplete[id]['element'];
        var theDropDown;
        var left_top = AutoComplete_getPos( theSearchbox );
        var left  = left_top[0];
        var top   = left_top[1] + theSearchbox.offsetHeight;
        var width = theSearchbox.offsetWidth;

        if ( width < __SLI_customisations[ __SLI_ApplicationName ][ 'DropListMinWidth' ] )
        {
            width = __SLI_customisations[ __SLI_ApplicationName ][ 'DropListMinWidth' ];
        }

        theDropDown = document.createElement('div');
        theDropDown.className = 'autocomplete'; // Don't use setAttribute()


        if(__SLI_customisations[ __SLI_ApplicationName ][ 'Alignment' ] == true && document.body)
        {
            theDropDown.style.position = 'absolute';
            document.body.insertBefore(theDropDown, document.body.nextSibling);
            
            // Position it
            theDropDown.style.visibility = 'hidden';
            theDropDown.style.left       = left + 'px';
            theDropDown.style.top        = top + 'px';
            theDropDown.style.width      = width + 'px';
            theDropDown.style.zIndex     = '99999';
        }
        else if(__SLI_customisations[ __SLI_ApplicationName ][ 'Alignment' ] == "offsetrelative" && document.body)
        {
          theSearchbox.parentNode.insertBefore(theDropDown, theSearchbox);
          // Position it
          if(sli_getStyle(theSearchbox.offsetParent, 'position') != "absolute")
          {
            theSearchbox.offsetParent.style.position = 'relative';
          }
          theDropDown.style.position = 'absolute';
          theDropDown.style.left = (theSearchbox.offsetLeft) + 'px';
          theDropDown.style.top = (theSearchbox.offsetTop + theSearchbox.offsetHeight) + 'px';
          theDropDown.style.width = (theSearchbox.clientWidth) + 'px';
          theDropDown.style.visibility = 'hidden';
          theDropDown.style.zIndex     = '99999999';
        }
        else
        {
            theSearchbox.parentNode.insertBefore(theDropDown, theSearchbox);
            // Position it
            theDropDown.style.visibility = 'hidden';
            theDropDown.style.left       = left + 'px';
            theDropDown.style.top        = top + 'px';
            theDropDown.style.width      = width + 'px';
            theDropDown.style.zIndex     = '99999';
        }
        

        __AutoComplete[id]['dropdown'] = theDropDown;
        __SLI_width = width;
    }

    function /* array [ left, top ] */ AutoComplete_getPos( obj )
    {
        var curleft = curtop = 0;
        var sli_flag = 0;

        if (obj.offsetParent)
        {
           do
           {
              if ( __SLI_customisations[ __SLI_ApplicationName ][ 'AlignmentBorderBug' ] )
              {         
                
                if(sli_flag == 1)
                {
                    var clientTop = (obj.offsetHeight - obj.clientHeight) / 2;
                    curtop += clientTop;

                    var clientLeft = (obj.offsetWidth - obj.clientWidth) / 2;
                    curleft += clientLeft;
                }
                sli_flag = 1;
              }
           
              curleft += obj.offsetLeft;
              curtop += obj.offsetTop;
           }
           while (obj = obj.offsetParent);
        }
        return [curleft,curtop];
    }

    /**
    * Shows the dropdown layer
    *
    * @param string id The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_ShowDropdown(id)
    {

        AutoComplete_HideAll();



        var value = __AutoComplete[id]['element'].value;
        var toDisplay = new Array();
        var newDiv    = null;
        var text      = null;
        var numItems  = __AutoComplete[id]['dropdown'].childNodes.length;

        __AutoComplete_mouseMoved=false;
        // SLI Code Modification - Start - Andrew Grieve April 08
        // Trim the textbox so that if is starts with a space then the feature will still work
        //value = value.replace(/^\s+|\s+$/g,"");
        value = value.replace(/^\s+/g,"");

        if(value.length == "")
        {
            // If Textbox length is nothing (after the trim) then don't show dropdown.
            return;
        }
        // SLI Code Modification - End

        // Remove all child nodes from dropdown
        while (__AutoComplete[id]['dropdown'].childNodes.length > 0) {
            __AutoComplete[id]['dropdown'].removeChild(__AutoComplete[id]['dropdown'].childNodes[0]);
        }


        var count=0;
        // Go thru data searching for matches
        for (i=0; i<__AutoComplete[id]['data'].length; ++i)
        {
            // SLI Code Modification - Start - Andrew Grieve April 08 - Added lower casing
            if (__AutoComplete[id]['data'][i].substr(0, value.length).toLowerCase() == value.toLowerCase())
            {
                // SLI Code Modification - End
                toDisplay[toDisplay.length] = __AutoComplete[id]['data'][i];
                count++;
                /* how many to display? */
                if(count == __SLI_customisations['AutoSuggest']['MaxListItems'] ) /* Code inserted to keep list to a maximum of 10 values (was 20 or 30) */
                {
                    break;
                }
            }
        }

        // No matches?
        if (toDisplay.length == 0) {
            AutoComplete_HideDropdown(id);
            return;
        }



        // Add data to the dropdown layer
        for (i=0; i<toDisplay.length; ++i) {
            newDiv = document.createElement('div');
            newDiv.className = 'autocomplete_item'; // Don't use setAttribute()
            newDiv.setAttribute('id', 'autocomplete_item_' + i);
            newDiv.setAttribute('index', i);
            newDiv.style.zIndex = '99999';

             // Scrollbars are on display ?
            if (toDisplay.length > __AutoComplete[id]['maxitems'] && navigator.userAgent.indexOf('MSIE') == -1) {
                newDiv.style.width = __AutoComplete[id]['element'].offsetWidth - 22 + 'px';
            }

            newDiv.onmouseover =
        function()
        {
            if( __AutoComplete_mouseMoved )
                AutoComplete_HighlightItem(__AutoComplete[id]['element'].getAttribute('id'), this.getAttribute('index'));
        };

            newDiv.onclick     =    function()
                                    {
                                    	  __SLI_asug_used_flag = true;
                                                                           
                                        AutoComplete_SetValue(__AutoComplete[id]['element'].getAttribute('id'));
                                        AutoComplete_HideDropdown(__AutoComplete[id]['element'].getAttribute('id'));
                                        AutoComplete_submitForm(id);
                                    }



            text   = document.createTextNode(toDisplay[i]);
            newDiv.appendChild(text);
            newDiv.title='Search for ' + toDisplay[i];

            /* ellipsis for IE only */
            if( isIE )
            {
                newDiv.style.textOverflow = 'ellipsis';
                newDiv.style.width = '100%';
                newDiv.style.whiteSpace = 'nowrap';
                newDiv.style.overflow = 'hidden';

            }
            __AutoComplete[id]['dropdown'].appendChild(newDiv);
        }
        /*
         * append DIV containing footer branding...
         */
        if(__SLI_customisations['AutoSuggest']['ShowBrandingFooter'])
        {
            i = toDisplay.length;
            newDiv = document.createElement('div');
            newDiv.className = 'autocomplete_footer'; // Don't use setAttribute()
            newDiv.setAttribute('id', 'autocomplete_item_' + i);
            newDiv.setAttribute('index', i);
            newDiv.style.zIndex = '99999';
            newDiv.innerHTML = '<a href="http://www.sli-systems.com/powered-by.php" title="' +
                                __SLI_customisations[ __SLI_ApplicationName ][ 'BrandingFooterTitleTooltip' ] +
                                '"><img class="autocomplete_footer_branding" src="'+__AutoCompleteBranding.src+'" /></a>';

            __AutoComplete[id]['dropdown'].appendChild(newDiv);
        }


        // Too many items?
        if (toDisplay.length > __AutoComplete[id]['maxitems']) {
            __AutoComplete[id]['dropdown'].style.height = (__AutoComplete[id]['maxitems'] * 15) + 2 + 'px';

        } else {
            __AutoComplete[id]['dropdown'].style.height = '';
        }


        /**
        * Set left/top in case of document movement/scroll/window resize etc
        */
        if(__SLI_customisations[ __SLI_ApplicationName ][ 'Alignment' ] == "true" || __SLI_customisations[ __SLI_ApplicationName ][ 'Alignment' ] == "false")
        {
            var left_top = AutoComplete_getPos( __AutoComplete[id]['element'] );
            __AutoComplete[id]['dropdown'].style.left = left_top[0];
            __AutoComplete[id]['dropdown'].style.top  = left_top[1] + __AutoComplete[id]['element'].offsetHeight;
        }


        // Show the iframe for IE
        if (isIE) {
            
            if(!__SLI_customisations[ __SLI_ApplicationName ][ 'Alignment' ] == true)
            {
               __AutoComplete[id]['iframe'].style.width  = __AutoComplete[id]['dropdown'].offsetWidth;
            }
            
            
            __AutoComplete[id]['iframe'].style.top    = __AutoComplete[id]['dropdown'].style.top;
            __AutoComplete[id]['iframe'].style.left   = __AutoComplete[id]['dropdown'].style.left;
            __AutoComplete[id]['iframe'].style.height = __AutoComplete[id]['dropdown'].offsetHeight;

            __AutoComplete[id]['iframe'].style.visibility = 'visible';
        }

    e =  __AutoComplete[id]['dropdown'];

    e.onmousemove =
        function()
        {
            if(!__AutoComplete_mouseMoved){__AutoComplete_mouseMoved=true;}
            this.onmousemove = null;
        }

        // Show dropdown
        if (!__AutoComplete[id]['isVisible']) {
            __AutoComplete[id]['dropdown'].style.visibility = 'visible';
            __AutoComplete[id]['isVisible'] = true;
        }


        // If now showing less items than before, reset the highlighted value
        if (__AutoComplete[id]['dropdown'].childNodes.length != numItems) {
            __AutoComplete[id]['highlighted'] = null;
        }
    }



    /**
    * Hides the dropdown layer
    *
    * @param string id The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_HideDropdown(id)
    {
        if (__AutoComplete[id]['iframe'])
        {
            __AutoComplete[id]['iframe'].style.visibility = 'hidden';
        }
        
        if (__AutoComplete[id]['dropdown'])
        {
            __AutoComplete[id]['dropdown'].style.visibility = 'hidden';
        }

        __AutoComplete[id]['highlighted'] = null;
        __AutoComplete[id]['isVisible']   = false;
    }


    /**
    * Hides all dropdowns
    */
    function AutoComplete_HideAll()
    {
         if( __SLI_customisations[ __SLI_ApplicationName ][ 'ValidSearchBoxes' ] )
         {
               for(var i=0; i < __SLI_validSearchBoxes.length; i++)
               {
                   if(document.getElementById(__SLI_validSearchBoxes[i]))
                   {
                       AutoComplete_HideDropdown(__SLI_validSearchBoxes[i]);
                   }
               }
         }
         else
         {
                for (id in __AutoComplete)
                {
                   AutoComplete_HideDropdown(id);
                }
         }
    }


    /**
    * Highlights a specific item
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    * @param int    index The index of the element in the dropdown to highlight
    */
    function AutoComplete_HighlightItem(id, index) // mouseover, index is the list element index, zero-based
    {
        if (__AutoComplete[id]['dropdown'].childNodes[index]) {
            for (var i=0; i<__AutoComplete[id]['dropdown'].childNodes.length; ++i) {
                if (__AutoComplete[id]['dropdown'].childNodes[i].className == 'autocomplete_item_highlighted') {
                    __AutoComplete[id]['dropdown'].childNodes[i].className = 'autocomplete_item';
                }
            }

            __AutoComplete[id]['dropdown'].childNodes[index].className = 'autocomplete_item_highlighted';
            __AutoComplete[id]['highlighted'] = index;

            //also see below...
            //__AutoComplete[id]['element'].value = __AutoComplete[id]['dropdown'].childNodes[index].innerHTML;
            //AutoComplete_SetValue(id);
        }
    }


    /**
    * Highlights the menu item with the given index
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    * @param int    index The index of the element in the dropdown to highlight
    */
    function AutoComplete_Highlight(id, index) // keyboard up/down - index is the direction of travel, 1==down,-1=up
    {
        var childNodes = __AutoComplete[id]['dropdown'].childNodes;
        if(childNodes.length)
        {
	        var lastItem = ( ( childNodes[ childNodes.length - 1 ].className != 'autocomplete_footer' ) ? childNodes.length - 1 : childNodes.length - 2 );

            // Out of bounds checking
            //if (index == 1 && __AutoComplete[id]['highlighted'] == __AutoComplete[id]['dropdown'].childNodes.length - 1) {
            if (index == 1 && __AutoComplete[id]['highlighted'] == lastItem ) {
                childNodes[__AutoComplete[id]['highlighted']].className = 'autocomplete_item';
                __AutoComplete[id]['highlighted'] = null;

            } else if (index == -1 && __AutoComplete[id]['highlighted'] == 0) {
                childNodes[0].className = 'autocomplete_item';
                __AutoComplete[id]['highlighted'] = lastItem;
                index = 0;//hack!
            }

            // Nothing highlighted at the moment
            if (__AutoComplete[id]['highlighted'] == null) {

                childNodes[0].className = 'autocomplete_item_highlighted';
                __AutoComplete[id]['highlighted'] = 0;
                newIndex = 0;
                
            } else {

                if (childNodes[__AutoComplete[id]['highlighted']]) {
                
                    childNodes[__AutoComplete[id]['highlighted']].className = 'autocomplete_item';
                }

                var newIndex = parseInt( __AutoComplete[id]['highlighted'] ) + parseInt(index);

                if (childNodes[newIndex]) {

                    childNodes[newIndex].className = 'autocomplete_item_highlighted';

                    __AutoComplete[id]['highlighted'] = newIndex;
                }
            }

            //populate textbox with currently highlighted term...
            //__AutoComplete[id]['element'].value = __AutoComplete[id]['dropdown'].childNodes[newIndex].innerHTML;
            AutoComplete_SetValue(id);
        }
    }


    /**
    * Sets the input to a given value
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_SetValue(id)
    {
        __AutoComplete[id]['element'].value = __AutoComplete[id]['dropdown'].childNodes[__AutoComplete[id]['highlighted']].innerHTML.replace(/&amp;/, "&");
    }


    /**
    * Checks if the dropdown needs scrolling
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_ScrollCheck(id)
    {
        // Scroll down, or wrapping around from scroll up
        if (__AutoComplete[id]['highlighted'] > __AutoComplete[id]['lastItemShowing']) {
            __AutoComplete[id]['firstItemShowing'] = __AutoComplete[id]['highlighted'] - (__AutoComplete[id]['maxitems'] - 1);
            __AutoComplete[id]['lastItemShowing']  = __AutoComplete[id]['highlighted'];
        }

        // Scroll up, or wrapping around from scroll down
        if (__AutoComplete[id]['highlighted'] < __AutoComplete[id]['firstItemShowing']) {
            __AutoComplete[id]['firstItemShowing'] = __AutoComplete[id]['highlighted'];
            __AutoComplete[id]['lastItemShowing']  = __AutoComplete[id]['highlighted'] + (__AutoComplete[id]['maxitems'] - 1);
        }

        __AutoComplete[id]['dropdown'].scrollTop = __AutoComplete[id]['firstItemShowing'] * 15;
    }


    /**
    * Function which handles the keypress event
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_KeyDown(id, e)
    {
        var result = true;

       var event;
       event = e;
       if(!event) event = window.event;

        var keyCode = event.keyCode;

        switch (keyCode) {

            // Return/Enter
            case 13:
                if (__AutoComplete[id]['highlighted'] != null) {
                    AutoComplete_SetValue(id);
                    AutoComplete_HideDropdown(id);
					
                    __SLI_asug_used_flag = true;
					
                    if( e = __AutoComplete[id]['element'].form['asug'] )
                    {
                        
                        e.disabled=false;
                        e.value = __AutoComplete[id]['asug'];
                    }

                }

                result = AutoComplete_submitForm(id);

                break;

            // Escape
            case 27:
                AutoComplete_HideDropdown(id);
                event.returnValue = false;
                event.cancelBubble = true;
                break;

            // Up arrow
            case 38:
                if (!__AutoComplete[id]['isVisible']) {
                    AutoComplete_ShowDropdown(id);
                }

                AutoComplete_Highlight(id, -1);
                AutoComplete_ScrollCheck(id, -1);
                
                if( e = __AutoComplete[id]['element'].form['asug'] )
                {
                   e.disabled=false;
                   e.value = __AutoComplete[id]['asug'];
                }

                                
                result = false;
                break;

            // Tab
            case 9:
                if (__AutoComplete[id]['isVisible']) {
                    AutoComplete_HideDropdown(id);
                }
                return;

            // Down arrow
            case 40:

                if (!__AutoComplete[id]['isVisible']) {
                    AutoComplete_ShowDropdown(id);
                }

                AutoComplete_Highlight(id, 1);
                //AutoComplete_ScrollCheck(id, 1);

                if( e = __AutoComplete[id]['element'].form['asug'] )
                {
                   e.disabled=false;
                   e.value = __AutoComplete[id]['asug'];
                }

                result = false;
                break;
        }
        return result;
    }


    /**
    * Function which handles the keyup event
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_KeyUp(id, e)
    {
       var event;
       event = e;
       if(!event) event = window.event;

        var keyCode = event.keyCode;

        switch (keyCode) {
            case 13:
                event.returnValue = false;
                event.cancelBubble = true;
                
                break;

            case 27:
                AutoComplete_HideDropdown(id);
                event.returnValue = false;
                event.cancelBubble = true;
                break;

            case 38:
            case 40:
                return false;
                break;

            default:
                AutoComplete_ShowDropdown(id);
                
                __AutoComplete[id]['asug']=__AutoComplete[id]['element'].value;

                if( e = __AutoComplete[id]['element'].form['asug'] )
                {
                   e.disabled=true;
                   e.value = "";
                }  
                
                break;
        }
    }

    /**
    * Function which handles the keypress event
    * This function added April 2008 by Andrew Grieve
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */

    // SLI Code Modification - Start - Andrew Grieve April 08
    function AutoComplete_KeyPress(id, e)
    {
        var event = e;
        if(!event) event = window.event;
        var keyCode = event.keyCode;

        if (keyCode == 13 && isGecko || isOpera)
        {
            return false;
        }
        
        if( __SLI_customisations[ __SLI_ApplicationName ][ 'TargetURL' ] )
        {
            if (keyCode == 13 && isIE)
            {
                return false;
            }
        }
        
    }
    // SLI Code Modification - End

    /**
    * Returns whether the dropdown is visible
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_isVisible(id)
    {
        return __AutoComplete[id]['dropdown'].style.visibility == 'visible';
    }

    function AutoComplete_submitForm(id)
    {
        var e, f, result=true;
        if( f = __AutoComplete[id]['element'].form )
        {
            if( __AutoComplete[id]['element'].value != '' )
            {
            	if(__SLI_asug_used_flag == true)
            	{
                   if( e = f['asug'])
                   {
                      e.value = __AutoComplete[id]['asug'];
                      e.disabled=false;
                   }
                }
                
                if( __SLI_customisations[ __SLI_ApplicationName ][ 'TargetURL' ] )
                {
                	asugvar = "";
                	if(__SLI_asug_used_flag == true)
                	{
                	  asugvar = '&asug=' + __AutoComplete[id]['asug'];
                  	}
                    
                    sliRegex = /resultsdemo\.com/;
                    if(sliRegExArray = sliRegex.exec(document.domain))
                    {
                    	sliRegex = /^http:\/\/(.*)\//;
                    	sliTargetDomain = sliRegex.exec(__SLI_customisations[__SLI_ApplicationName ][ 'TargetURL' ]);
                    	__SLI_customisations[__SLI_ApplicationName ][ 'TargetURL' ] = __SLI_customisations[__SLI_ApplicationName ][ 'TargetURL' ].replace(sliTargetDomain[1], document.domain);
                    }
                    
                	document.location.href = __SLI_customisations[__SLI_ApplicationName ][ 'TargetURL' ] + __AutoComplete[id]['element'].value + asugvar;
                }
                else
                {
                	f.submit();
                }
                
                AutoComplete_HideAll();
            }
            else
                result = false;
        }
        return result;
    }
    
    // get the style that will be applied by the browser, including stylesheets
    function sli_getStyle(el,styleProp)
    {
      if (el.currentStyle)
        var y = el.currentStyle[styleProp];
      else if (window.getComputedStyle)
        var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
      return y;
    }

    // register with onLoad(er...
    _sli_init.push( AutoComplete_init );
    
    function sli_addEvent(obj, evType, fn) {
    	if (obj.addEventListener) {
    		obj.addEventListener(evType, fn, false);
    		return true;
    	} else if (obj.attachEvent) {
    		var r = obj.attachEvent("on" + evType, fn);
    		return r;
    	} else {
    		return false;
    	}
    }
    
    function sli_load()
    {
    	sli_addEvent(window, 'load', sli_init);
    }