/* Popular phrases - GREENMOUNTAINCOFFEE - 17:3:28, Sat Jan 28, 2012 */
__SLI_ClientDefaults =
[
    ['UseHTTPS', true],
['TargetURL', 'http://search.greenmountaincoffee.com/search?w=']
];
var asPhrases=new Array ('pumpkin spice k-cup','french toast k cups','cappuccino','chai latte','golden french toast k cups','rain forest nut coffee','french toast','coconut k cups','coconut','cappuccino coffee','breakfast blend k cups','golden french toast','decaf k cups','white chocolate','donut shop k cups','pumpkin spice coffee k-cup','samples','hot cocoa k cups','pumpkin spice','half caff k-cup','swiss miss','hazelnut k cup','apple cider k cup','french vanilla k-cup','cafe mocha','caramel vanilla cream k-cup','gingerbread','rain forest nut','blueberry k cup','dark magic','nantucket blend k-cup','breakfast blend','80 count k-cup','donut shop','southern pecan k cup','swiss miss hot cocoa','green tea','chai','variety k cup packages','sumatran reserve k-cup','hazelnut','timothy\'s k-cups','kahlua k cups coffee','espresso k cup','shipping charges','donut house k cups','k cups','chocolate raspberry truffle','free trial k cups','mocha nut fudge k-cup','blueberry','vermont country blend k cup','butter toffee k cups','lake and lodge k cups','hot chocolate','decaf variety k-cup sampler','golden french toast k-cup','hot cocoa','decaf coffee k-cups','t6739','mocha java','southern sweet tea','latte','german chocolate cake kcup','revv','blueberry mountain k cups','french vanilla','tea','french roast','extra bold','wild mountain blueberry k-cup','newmans special blend k-cups','chai tea latte','earl grey tea','raspberry truffle','t6520','80 count k cups','french roast k cup','chocolate glazed donut k-cup','our blend k cup','newmans extra bold','espresso blend dark roast','caribou k cups','breakfast blend k cups 80','kahlua','hot apple cider k cups','donut house','dark magic extra bold k-cup coffee','green mountain breakfast blend','thermos','jet fuel k cup','filters','mocha','caffeine','espresso','columbian fair trade select k cup','mudslide k cup','calories in k cups','breakfast blend decaf k-cup','tree hugger k-cup','sampler k cup boxes','cocoa','revv pulse k-cup','french roast decaf k-cups','jobs','cinnamon pastry k-cup','nantucket blend','cafe escapes','gluten free k cups','gift certificate','hazelnut decaf k cup','half caff','cider','italian roast k-cup','apple cider','tullys','t6502','vermont country blend','sleepytime herbal tea k-cup','sampler','caribou','newmans decaf k cup','t6201','free shipping','dark magic decaf','keurig','flavored variety k-cup sampler','chocolate raspberry','cinnamon roll k-cup','double black diamond extra bold','t4061','swiss miss hot cocoa k-cup','half and half perfect iced tea','chai tea','sweet tea k cups','coconut flavored coffee','t6602','tea variety sampler','nantucket','irish cream k-cup','emeril\'s big easy bold k-cup','our blend','low acid coffee','seasonal k cups','kenyan aa k-cup','vermont country blend decaf','variety packages','espresso k-cup','french vanilla decaf','decaf tea k cups','donut','calories','dark chocolate hot cocoa','iced tea k cups','whole bean','caramel drizzle k cups','t6801','mudslide','french vanilla decaf k cup','toast','lake and lodge','swiss','t6534','decaf tea','green mountain k cups','butter toffee','mugs','black tiger','italian roast','hazelnut k-cup','mint','80 ct breakfast blend k cup','english breakfast k cup tea','mahogany k cup','barista prima','coffee people k cups','milk chocolate hot cocoa','decaf sampler','donut shop decaf k-cup','kahlua k cups','decaf','t6700','barista prima italian roast k cup','double black diamond k cups','colombian fair trade select k-cup','t6825','french toast k-cups','t6805','cafe express','southern pecan','tully\'s french roast k-cup','donut house decaf k-cup','newmans','pumpkin spice k cup','travel mug','t6803','tpb4141','vanilla caramel k-cups','t6663','revv k cups','pumpkin','t6732','caramel vanilla cream','t6783','italian blend','t6802','t4000','timothys decaf k cups','newmans extra bold k cups','jet fuel','t6715','variety','green mountain decaf','island','t6792','t6772','island coffee','lemon zinger tea k cup','seasonal','t7602','southern pecan coffee','iced tea','tullys house blend','blueberry coffee','club','espresso roast k cups','mocha java k cups','my k-cup adapter','french toast coffee','nantucket blend k-cup coffee','coffee people','peach','coconut flavor k cups','black magic','cafe escapes milk chocolate','gingerbread spice','french roast decaf','k-cups','french','t6520 breakfast blend','organic k cup','pecan','t6523','t7522','t4060','tpb4137','decaf green tea k cups','t6722','t6501','hazelnut decaf','southern sweet perfect iced tea','t6992','my k-cup','calories in coffee','black tea k cups','vanilla','mandarin orange spice herbal tea','lake and lodge coffee','sumatran k cup','t6570','rain forest','ethiopian yirgacheffe','apple cider k-cup','cinnamon','columbian','express blend','80 count box','daybreak morning blend k-cup','chocolate','bodum','timothy\'s k-cup variety pack','tree hugger','sumatran reserve','costa rican k cups','kenyan aa','locations','t7732','coffee makers','tea sampler','vermont','kcups','irish cream','free hot cocoa','german chocolate cake','vanilla k cup','80 count','earl grey','sugar free','chai k cup','rain','t6614','t4066','grinder','brew over ice','big easy bold k-cup','mocha nut fudge','t6752','raspberry iced tea','ice tea variety','decaf coffee','celestial seasonings','emerils jazzed up decaf','sumatra','golden french toast k-cups','chocolate glazed donut','tpb4104','cafe escapes mocha','tpb4114','dark magic decaf extra bold k-cup','pumpkin spice coffee','butter toffee k-cup coffee','green mountain french roast','dark hot chocolate','t6058','pumpkin spice coffee k cups','b40','t4067','carousel','sumatran','cinnamon cream swirl','t7792','caramel vanilla','house blend','barista prima colombia k cup','caramel vanilla decaf','english breakfast black tea k cup celestial seasonings','flavored variety k-cup coffee sampler','t6056','raspberry','caramel','keurig carousel','t6999','swiss miss hot chocolate','starbucks french roast','iced coffee','dark magic espresso blend','green tea with pomegranate','taste of vermont sap bucket gift','pomegranate green tea','extra bold k cups','80 count breakfast blend','double black diamond','b145','80 ct k-cups','nicaraguan fair trade','daybreak','variety sampler','tree','k-cup decaf','seasonal flavors','pecan k cup','excelencia','hazelnut 80 ct kcup','timothy\'s tea','emeril','wake up','coffee','sleepytime','black diamond','nantucket blend iced coffee','hot apple cider','nells breakfast blend','breakfast blend decaf','regular variety k-cup coffee sampler','original donut shop','apple','sugar free apple cider','pastry','organic','hot chocolate cups','caribou k cups 80 ct','wild mountain blueberry','wake up coffee','cinnamon pastry','cider cups','t7534','cafe escapes dark chocolate hot cocoa','insulated mugs','green mountain coffee','80 count k-cup donut shop','t6507','rainforest espresso k-cup','maple syrup','b60','cake','half','french press','jet fuel k-cup','mocha coffee','t6694','pumpkin spice seasonal','parisian nights k-cup','cinnamon roll','mint tea','midnight magic k cups','celestial tea k cups','decaf green tea','unsweetened black iced tea','t6990','india spice chai tea k-cup','k-cup adapter','caribou decaf k cup','k-cup tea','swiss miss k cups','kenyan','caramel vanilla nut','t6054','t6505','taste of vermont','barista prima french roast','italian','caffeine intake','sweet tea','donut shop decaf','join club','kenyan highland cooperatives fair trade','biscotti','tullys collection','b70','t6503','celestial english breakfast black tea','pumpkin spice k-cups','t4000 hot cocoa','glazed donut k cup','winter k cup','k cup teas','frother','cafe express coffee club','our blend coffee','black tea','keurig brewer','black tiger k-cup','chai green tea','t6828','t6824','revv pulse','espresso blend','iced coffee k cups','raspberry tea','tullys french roast','sleepytime tea k cups','mahogany','green mountain','free gift','t4062','columbian k cup','t6613','t6055','cafe escapes chai latte','lake','french vanilla supreme k-cup coffee','emerils big easy bold','tour','toffee','k cup adapter','organic coffee','newmans special blend','golden','80 pack k cups','descale','flavored variety','t4063','green tea k','toffee k cup','free keurig','coffee club','milk frother','cinnamon k cups','caribou blend','house blend decaf','bigelow','pulse','lemon zinger','hazelnut cream k cup','wild blueberry k cups','platinum','barista prima italian roast','large cup','brewers','italian blend kcup','chocolate almond','tea variety','mandarin orange spice herbal tea k-cup','flavored decaf','milk hot chocolate','timothys k cups','colombian fair trade select','coconut coffee','hot tea k cups','costa rican','limited edition kcups','filter cartridges','donut house decaf','t6822','columbian decaf k-cup','cuisinart brewer','water filter','cider k','t6501 k-cup','fair trade k cup','barista prima house blend','peach iced tea','t6612','tea k-cups','tpb4136','newmans special decaf','keurig mug','flavored coffee','keurig mini','light roast','chamomile tea','descal cleaner','pecan flavored coffee','filter for k-cup','fair trade','chai latté','free cocoa k cups','caribou blend k cup','thermo ceramic mug','mr coffee brewer','glutenfree','free offers','english breakfast tea','orange spice tea k cups','t4057','southern','low acid','tpb4130','t6994','k cup carousel','extra bold dark magic','flavored sampler','bold coffee k cups','hazelnut k-cup coffee','my k cup adapter','tullys travel mug','coffee calories','tumbler','tpb4103','k cup variety','perfect iced tea','flavored coffee sampler','rainforest espresso decaf','bodum mugs','k cup chai tea','shipping time','almond biscotti','extra bold espresso','golden french','t6014','half-caff k-cup','carousel tree','pancake mix','timothy cinnamon pastry','tpb4138','half caffeine k cups','variety sampler regular','breakfast','mint medley tea','cozy chamomile tea','nantucket blend coffee','hazelnut coffee','t6823','decaf hazelnut coffee','cupons','t6611','signature sampler','timothys variety pack','k cup sampler','dark magic decaf extra bold','southern sweet','herbal tea k-cups','tpb4110','french vanilla iced coffee','keurig descaler','morning blend k-cup','mahogany k-cup coffee','german chocolate k cups','bigelow tea','dark chocolate','k-cup organic','chocolate covered marshmallows','coffee scoop','t6832','vanilla decaf','cafe express club','keurig b-70','blueberry flavored coffee','kahlua original coffee','jazzed up decaf','t6060','t6995','free brewer','cafe latte','limited edition k-cups','assortment packs','black diamond extra bold','fair trade rain forest nut','newman\'s special blend extra bold k-cup coffee','tullys french roast decaf','mint medley','special blend','bold','perfect iced tea variety pack','peach tea','t4051 newman\'s special decaf','lake and lodge bean','tree hugger k cup','decaf espresso k cup','decaf hazelnut k','regular sampler','organic french roast','southern sweet iced tea','coffee tour','coffee mugs','keurig filter','gombe reserve','tpb4100','sumatran bold','newman decaf','ultimate gift','decaf k-cups','mountain blueberry','mocha k cups','infusion','barista prima french roast k-cup coffee','columbian fair trade k cups','half-caff','t6051','supreme','vanilla cream','irish','carmel apple cider','k cup hot chocolate','t6821','guatemalan mug','join coffee club','winter seasonal','blueberry mountain coffee','mocha nut','tully\'s coffee house k-cup collection','t6997','decaf green','german','coffee of the month','vanilla nut','syrup','white coffee','stainless steel thermos','house blend k-cup','guatemalan k cup','scoop','water process decaffeinated','tpb4101','signature coffee sampler','french roast decaf k cup','egg','java','colombian','tpb4108','tiger k cup','marshmallows','hot apple cider kcup','keurig b60','parisian nights','chai kcup','jet','backpack thermos','columbian fair trade','bodum travel mug','t1252','golden french toast coffee','dark roast k cups','bigelow green tea','mocha nut fudge k cups','k cup french vanilla','c','irish cream k cups','timothy\'s decaf coffee','kenya coffee','my k-cup refill pack','gluten free','seasonal tour','dragonfly mug','tpb4134','magic decaf','green mountain colombian','donut shop kcups','espresso machine','k cup filter','emeril k cups','coffee press','platinum brewer','join cafe club','vanilla nut coffee','tea cups','double black','refillable k cup','b40 brewer','tully coffee house collection','adapter','fair trade organic','glass mug','yirgacheffe','donut house cinnamon roll','iced','swiss k cup','mexican','hot cider','french roast k-cup','wild blueberry','80','b155','t6831','keurig travel mug','b60 special edition','k-cup sampler','rainforest','sleepytime herbal','k-cup green tea','nell','chocolate coffee','nicaraguan fair trade organic','5 pack','light blend coffee','italian roast k cup','coffee pods','berry tea','decafe coffe k cups','midnight magic','spiced windmill cookies','tpb4124','almond flavor coffee','ethiopian k cup','diamond','tullys decaf','travel coffee mugs','chocolate kcup','half and half k cups','glazed donut','vermont decaf','nantucket coffee','blueberry k-cup','elite brewer','b140 brewer','decaf variety','decaf process','nissan thermos','hot cider k cup','french vanilla coffee','assorted k cups','dark','swiss hot chocolate','coffee bags','mr coffee','beans','orange','tea tin','italian blend k-cup coffee','caffeine free coffee','the original donut shop k-cup coffee','green mountain naturals','morning blend decaf','coffee sampler','tpb4120','extra bold decaf','tpb4112','biscotti coffee','sweet lemon black tea','french vanilla iced coffee k-cup','magic','donut house decaf k-cup coffee','timothy\'s variety','breakfast tea','morning','ethiopian coffee','k-cup flavors','organic decaf','cinnamon pastry k cup','newmans organic','tpb4109','green mountain house blend','blueberry mountain k-cup','brew over ice tumbler','fair trade colombian k-cup','special reserve','shortbread cookie','ethiopian','half caff k cups','milk','descale brewer','coffee people donut shop','cozy chamomile','flavored decaf coffee','peach flavor','orange tea','colombian decaf','mudslide k-cup','breakfast blend caffeine','single origin','spiced cider','hibiscus tea','raspberry black tea','decaf rainforest espresso k-cup','the original donut shop coffee','mudslide coffee','ice coffe','my k cup','guatemalan finca dos marias','zinger','mini travel mug','southern pecan k-cup coffee','kenya k cup','columbian fair trade select','coffee house collection','cups','sumatran reserve k cup','k cup decaf coffee','english breakfast k cup','my k-cup for keurig brewers','water filter cartridges','sweet peach iced tea','caffeine free k-cups','filter kit','timothys decaf','kenyan k cups','tpb4133','organic tea','pumpkin k cup','chamomile','celestial seasonings sleepytime','apple cider sampler','donut house cinnamon roll k-cup','express club','timothy\'s','nut','huehuetenango','breakfast blend k cups 80 count','kcup variety','peru','emeril\'s big easy bold k-cup coffee','extra bold decaf k cups','tea leaves','paper filters','breakfast blend 80 ct','b140','special offer','newmans french roast','mexican select','breville keurig single-cup brewer','passion tea','b70 platinum','cheddar cheese straws','half and half tea','jazzed','caribou decaf','daybreak 80','rainforest espresso','variety sampler decaf','decaf caramel vanilla cream','backpack','unsweetened tea','revv k-cup coffee','highland sugarworks','medium roast k cups','golden french toast coffee k-cup','late','lemon tea','tullys extra bold french roast','breakfast crate','bold decaf k-cups','organic house blend','tiger','k cups green tea','container','straws','german chocolate','windmill cookies','fair trade organic house blend','ribbon candy','butter toffee coffee','costa rica','vermont country','sweet raspberry black tea','sweet lemon iced tea','big easy','revv pulse coffee k-cup','mocha red river mug','bagged seasonal','brazil','morning blend','dunkin','keurig b40','vanilla supreme','lodge','timothy decaf coffee','breakfast tea k cup','organic sumatran extra bold','red river mug','candy','tullys breakfast blend','b200','morning edition','flavored syrup','hot cocoa k','chocolate mocha','keurig b31 mini plus brewer','maple k-cup','caramel decaf','english breakfast','charcoal filter','variety box','timothys french vanilla','stainless steel','timothy\'s decaf k-cup','big','shortbread','breville','kcup tree','free cocoa','tully decafe kcup','todd piker faceted mug','mini brewer','sumatran lake tawar','dezcal','cranberry tea','sweet coffee','maple granola','organic house decaf','barista italian roast','mild coffee','naturally flavored k cups','dezcal descaling cleaner','variety pack','french vanilla supreme','k-cup our blend','colombia','prices','espresso coffees','bigelow chai green tea','fair trade coffee','unsweetened ice tea','cleaner','apple cider gluten free','mexican organic','international','flavored','seasonal flavors k cup tour','coffee grinder','vermont blend','k-cup french toast','dark magic coffee','seasonal coffee tour','tanzanian gombe reserve','organic sumatran reserve','lively columbian','ingredients in hot apple cider','chocolate donut','mini plus brewer','kenyan highland cooperatives','guatemala','dark roast','cinnamon roll k cup','barista','grind and brew coffee maker','donut house k-cup coffee','collection','glazed','house blend sample','brownie mix','india spice chai','fudge','k-cup tree','nantucket iced k cups','iced tea variety pack','water process','coffee shop','breakfast blend medium','herbal tea','monthly k cup','fair trade our blend','colombian fair trade','swiss miss cocoa','k cup tree','lemon zinger k cup','k-cup carousel','finca dos marias','butter','my kcup filter','k cup dark magic','lemon','newmans special blend extra bold','special reserve la prosperidad peru','press','double diamond extra bold','timothy\'s mocha java','blueberry coffee kcup','basket filters','bold k cups','lemon zinger herbal tea k-cup','noire','nut coffee','caramel vanilla cream coffee','caramel vanilla cream k-cup coffee','tpb4106','emerils big easy','k-cup variety boxes','special reserve coffees','adapter cup','private reserve maple syrup','nell\'s','decaf columbian k cup','blue mug','double black diamond extra','extra bold double black','ginseng','kahlúa original k-cup coffee','big easy bold','mocha java k-cup','froth','flavored coffee tour','mandarin orange','taste of vermont sap bucket','my k-cup refill','celestial seasonings english breakfast tea','truffle','pomegranate tea','perfect iced','timothys parisian nights','vanilla iced coffee','basket','tom homann cerulean blue mug','nicaraguan coffee','keurig k cup filter','k-cup variety sampler tea','co','lemon zinger tea','caramel apple cider','vermont country blend coffee','travel cups','cafe almond biscotti','timothy\'s rainforest espresso k-cup','kahlua k-cups','vanilla k-cup','gourmet coffee','forest nut','breakfast blend 80 cup','tully\'s house blend kcup','tullys coffee house','daybreak morning k-cup','coffee people tree hugger','swiss miss chocolate','lemon ice tea','80 count k-cup coffee','caramel vanilla k-cup','cuisinart filter','mountain blend','timothys cinnamon','espresso shot','water processed decaf k cups','regular variety coffee','hot apple cider from green mountain naturals','tanzanian coffee','light roast decaf','celestial india spice chai tea','12 cup','b31 mini brewer','adapter piece','hot cocoa cups','indonesian','80 ct','columbian decaf','sweet ice teas','double black diamond extra bold k-cup coffee','barista french roast','donut shop chocolate coffee','bigelow earl grey','timothy tea','fto house blend','k-cup hot chocolate','country blend kcups','bigelow english breakfast','sugar free flavored decaf','k cup variety sampler','coffee syrups','decaffeinated k cups tea','specials','wiener melange','tully house','fair trade organic sumatran reserve extra bold','english tea','flavored variety k cup','k-cup cocoa','k-cup','tully\'s house','kahlua coffee','hot apple','sap buckets','decaf sumatra','lake champlain cocoa','celestial seasonings sweet tea','logo travel mug','nissan travel mug','golden french toast k','prima house','holiday','coffe maker','12 k cups','tullys espresso','fair trade select','gifts','arabica beans','keurig water filter','caribou blend k-cup','cocoa gift','wild mountain blueberry k cups','donut shop coffee k cups','80 cup','low acid decaf','pumpkin spice tea','human being organic','iced tea half and half','cinnamon pastry k-cup coffee','nantucket k-cup','decaf dark magic k cups','bigelow english breakfast tea','stainless steel travel mug','burr grinder','toffee coffee','decaf flavor k cup','todd piker','b-70','celestial seasonings tea variety','brew over','timothy\'s cinnamon pastry','mexican coffee','emeril bold','strong coffee','keurig cleaner','keurig platinum brewer','k-cup breakfast','half caffeine','black ice tea','timothys flavored k-cups','kenyan highland','tully french roast k-cup','tullys mug','organic french roast decaf','mandarin orange spice tea','our blend fair trade certified','prima','starter kit','tullys french roast k cups','xl reservoir','popcorn','brazil coffee','black tiger k cup','fair trade golden french toast','sumatra beans','flavored variety kcups','keurig b60 single cup brewer','keurig brewer b-40','k cup variety sampler flavored','apple cider coupon','mild k cup','mandarin','replacement','k cup timothys french vanilla','fudge nut','full city roast','brew over ice duet','seasonal coffee','hazelnut k-cup coffee 80 ct','caramel sauce','house collection','organic breakfast crate','lemon zinger herbal tea','vanilla tea','fair trade sumatran','tree hugger mug','80 pack k-cups','breakfast blend coffee','chocolate cake','keurig elite brewer','decaf green tea k-cup','hot coco','guatemalan floral mug','keurig platinum single-cup brewer','mr.coffee keurig','iced tea southern','k-cup refill','bigelow cozy chamomile','preserves','wild mountain','sweet raspberry iced tea','nantucket iced','b31','mr coffee single cup brewer','bitter','guatemalan coffee cup','filter for k cup','b70 brewer','garden','fair trade vermont country blend','bodum mini travel mug','country blend','best selling coffees','cinnamon swirl','k cup flavored sampler','caribou blend decaf','black tea with lemon','newman coffee','house','k-cup regular sampler','organic chocolate squares','breakfast blend travel mug','almond coffee','our blend k','decaf house','donut decaf','decaf espresso','80 ct bold','toasted coconut','keurig travel','hazelnut biscotti','private','fair trade golden french toast k-cup coffee','cafe escapes milk chocolate hot cocoa','organic house blend decaf','bigelow green tea with pomegranate','peach sweet tea','espresso maker','k cup nantucket blend','black tea sampler','tully\'s french roast decaf k-cup','red tea','cuisinart keurig single cup brewer','green tea with white tea','tpb4111','french vanilla iced','newmans special blend k cups','tully cups','green chai','80 pack','wild','timothy variety','spice','smooth coffee','iced vanilla k cup','tpb4125','fall k cups','caribou blend k-cup coffee 80 ct','thermo mugs','tall cup','tullys espresso roast','flavored k cups','fair trade organic sumatran reserve','keurig single cup brewer','maple k-cups','coffee singles','zhena\'s tea','monthly coffee tours','coffee cups','celestial seasonings southern sweet tea','cuisinart','k cup tea sampler','b3000','nicaraguan','lake champlain hot chocolate','heritage shortbread cookies','hazelnut k','columbian excelencia','barista italian','cinnamon bun','mug tree','daybreak morning blend','turkish roast','k-cup variety sampler','newmans extra bold kcups','sleepytime tea','celestial seasonings decaf','organic coffee k cups','apple cider mug','single coffee pack','spice chai','cafe escapes dark','milk frothing','pancake','green','midnight','mild','jason silverman mugs','olivewood coffee scoop','acidity','cookies','escapes','tpb4131','keurig water filter cartridge refill','coffee gifts','backpack mug','starbucks breakfast blend','coffee and caffeine','jet fuel mug','seattle','german chocolate cake k cups','sweet lemon tea','hope','organic flavored','decafe donut shop coffee','logo thermos','sea','perfect sweet tea','close','dunkin doughnut coffee','spice chai tea','orange tea k cups','sweet raspberry tea','dunkin donots','hazelnut decaf k-cup','dunkin doughnuts','mandarin orange k-cup','dark magic decaf extra bold k-cup coffee','zhenas pumpkin spice tea','new products','full city','barista prima italian roast k-cup coffee','coffee filters','celestial seasonings sleepytime herbal','jane goodall coffee','keurig adapter','timothys rainforest decaf','irish cream coffee','coffee house','maple cinnamon french toast','finca','cafe escapes hot cocoa','donut coffee','celestial iced tea k cups','dark bold','french k cup','bold definition','columbian coffee','decaf variety k-cup coffee sampler','cream','organic pancake mix','spice tea','k-cup filter','barista prima mug','donut house coffee','tully\'s travel mugs','kahlua original','filter bags','bucket','cuisinart water filter','tea latte','jazzed decaf','water processed coffee','newmans dark roast','keurig frother','coffee k cup variety pack','bella bark','donut shop k','spresprog','kcup orange tea','travel brewer','breakfast black tea','french roast decaf k-cup coffee','chocolate donut shop','half and half perfect','lemon tea k cup','donut house k','b145 office pro','mini kcup brewer','cafe express recurring order','combination boxes','universal tumbler','steel thermos','mandarin orange tea','celestial seasoning green tea','tully house blend k cup','india spice chai tea','donut shop coffee','maple','french coffee press','french toast k','french roast dark','coffee house decaf','decaf vanilla k cup','variety coffee','caff','organic hot chocolate','coffee containers','barista prima coffeehouse','newman\'s special decaf k-cup coffee','tully\'s bistro mug','caribou 80 ct','machines','k-cup iced tea','morning blend coffee','guatemalan coffee','bigelow cozy chamomile herb tea','bistro','turkish','blue dragonfly','t5086','escapes chai latte','vermont blend coffee','newmans special blend decaf','english','chocolate glazed','donut shop beans','timothys espresso','tully house blend k-cup','donut shop decaf k cups','milk chocolate','silverman','tully bistro mug','coffee shop decaf','organic truffles','parisian','seasonal sampler k cups','flavored coffe k cup','caramel pecan','berry','decaf bold k-cup','fresh toast','red keurig brewer','chocolate dipped hazelnut biscotti','k','molten chocolate cake mix','jet fuel k','my k cup refill','kflle','my','homann mug','maple syrup leaf','cashew','decaf tea k','zhenas black tea sampler','celestial teas','dark roast decaf k cup','barista blend','keurig classic brewer','half and half perfect iced','english black tea','friends and family','keurig b155 brewer','refillable filter','k-cup hot cocoa','gluten free biscotti','spicy','my k cup refill pack','vending','keurig k-cup carousel','extra bold sumatran reserve','chocolate k cup coffee','mr coffee single cup','decaf k-cup sampler','k-cup chai tea','french roast decaf coffee','auto drip','bigelow mint medley herb tea','maple k cup','keurig special edition single-cup brewer','k cup chocolate','chocolate coffee k-cup','sweet peach','timothys rainforest','knuckle','syrup and pancake mixes','k cups vermont blend decaf','french decaf','caramel mocha','clean keurig','half and half coffee','finca dos','english breakfast black','cinnamon flavor','k cup calories','replacement filters','celestial chai','coco','help','celestial seasonings india spice chai','t k cups','k-cup variety sampler regular','tanzania','newman\'s special decaf k-cup','nutty','alerts','special edition brewer','bigelow earl grey tea','wild blueberry coffee kcups','half caff flavored k cups','classic brewer','french caramel','tully french','cleaning','vermont country coffee','tully\'s extra bold','cranberry','single-cup coffee machines','flavored decaf kcups','reservoir','india chai','fair trade our blend k-cup coffee','celestial green tea','keurig mini brewer','k-cup flavored sampler','seasonal k-cups','dipping','green mountain kcups','decaf colombian k-cup coffee','regular coffee','no sugar','santa','mocha red river','barista prima colombia k-cup coffee','coffee shop k cups','coffee lovers','sleepytime herbal tea','celestial','keurig single-cup brewing system','coffeemaker','extra bold medium roast','80 cup packs','brownies','coffe people','travel tumbler','organic double chocolate brownie mix','extra bold decaf k-cup','coffee bag size','celestial orange','mountain','most popular k cup coffee','coffeeteam','big bold easy k cups','80 ct french roast','drizzle','half-caff coffee k-cup','lake and lodge kcup','reserve tour','office pro','jason silverman','tully\'s french','decaf k','refills','broken','chocolate shortbread','#4 filters','granola','coffee people kcups','keurig coffee filter','half caff coffee','colombian excelencia','tullys 80 ct','irish coffee','celestial k cup','tullys house blend extra bold','k-cup tea sampler','small business','a stimulation shot of revv','keurig cups','donut shop travel mug','caffeine french vanilla','de-scale','cafe','sandflower mug','caramel k cup','french vanilla decaf kcup','bodum insulated mugs','process','b130','celestial lemon zinger herbal tea','timothy\'s french','fair trade organic sumatran reserve extra bold k-cup coffee','hot c','iced tumbler','vermont country k-cup','keurig accessories','guatemala coffee','extra bold sumatran reserve k-cup','my k cup filter','add to order','aa','de','orange spice tea','single cup brewer','blend','fair trade blueberry','double dark','ceramic mugs','french vanilla k-cup coffee','vanilla decaf coffee','donut shop decaf extra bold','hot tea','grain','double diamond','k cup prices','k-cup coffee tour','green mountain cups','dark noire','new','chambord','southern pecan k','french to','14 oz mug','hot coffee','fair trade organic sumatran','2 filters','celestial seasonings tea k cups','remove','business','lake tawar','elite','keurig mini plus brewer','dark magic espresso','keurig b70 single cup','guatemalan','cozy','naturally decaffeinated','celestial seasonings mandarin orange','coffee people jet fuel','pot','iced coffee k-cup','regular variety','café escapes chai latté','roast profile','breakfast blend k-cup coffee','india spice','southern sweet perfect tea','sp0311','k cup cocoa','k-cup coffee tour 6 months','nells blend','my cup','keurig cafe one-touch milk frother','colombian select','fair trade wild mountain blueberry','caramel cream','fat toad','apple cider calories','krs12','celestial seasonings english breakfast black tea','keurig b3000','naturals hot apple cider','tanzanian','blueberry-k-cup','black chai tea','gypsy tea','santa tea','double chocolate','french roast decaf dark','energy coffee','keurig water filter starter kit','office','k-cup light roast','mitzi\'s maple granola','decaf hazelnut flavor','charcoal','display','bigelow english','natural decaf','b31 mini plus keurig','tullys coffee','family recipe','colombian fair trade k cup','tea infuser','stainless','dark roast decaf','french toast coffee kcup','keurig b31','extra bold sumatran','keurig brewer size 2 cups','vermont blend decaf','naturals','breakfast blend whole bean','brew over ice cup','keurig tea','darkest roast','mocha fudge','original blend','stoneware','brewer filters','indonesia','kenyan kcup','tully\'s backpacker thermos','fair trade vermont country blend k-cup coffee','keurig classic','dark extra bold k cups','newman k cups','mitzi maple granola','k-cup coffees','tullys bold','french vanilla k','keurig platinum b70','decaf vanilla k-cup','green mountain cider','brew over ice coffee','barista house','donut house decaf k cups','mindfulness','recurring orders','italian roast k','tully\'s full','popularity','kenyan aa k-cup coffee','standard shipping','hazelnut medium roast','k cups southern sweet tea','italy','german chocolate k-cup','my k cup for keurig brewers','half caff k','breakfast blend decaf k cup','organic coffee k-cup','whole','de scale keurig','mocha nut fudge coffee','10 free','water filter kit','timothy k-cups','80 count cups','chocolate donut k cup','foundation','24','5 cup','assorted k-cup','bold coffee','stainless travel mug','bottle','colombian medium roast','k-cup decaf tea','sweet peach black tea','water reservoir','our house','costa','tea variety pack','extra bold house blend','darkest','cup cake','butter coffee k cup','premium coffee','classic roast','caffeine free','colts bella bark','coffee people black tiger','newman k-cups','french roast k-cup coffee','fair trade wild mountain blueberry k-cup coffee','newman special blend bold','black iced tea k cup','dunk','barista mug','dark roast espresso','keurig brewer b31','german chocolate cake coffee','k cup decaf sampler','columbian especial medium','cold coffee','cerulean blue mug','vermont country decaf','cappuccino glasses','sweet lemon','pop','green mountain french','regular','bodum travel','french decaf k cup','keurig b200','k cup coffee sampler','woven mugs','bag','tully decaf k cups','coffe sampler','bigelow earl','k cup breakfast','assorted variety','is your hot apple cider gluten free','piker mug','timothy\'s tea k cups','stoneware mug','bold 80','sleepytime k-cup herbal tea','celestial seasonings tea sampler','fair trade organic hot cocoa','iced brew','single cup adapter','apple cider k','tully\'s french roast extra bold','light decaf','mug set','mahogany coffee','mini','santa spice tea','fair trade vermont','perfect iced tea sweet tea','energy','emeril\'s','caffeine chai tea','tully k-cup','tullys house blend decaf','vanilla iced coffe','k-cup mahogany','k-cup portion pack','cup carousel','kahlúa original k-cup','celestial seasonings perfect','fruit','fruity','hot herbal tea','k cup fair trade select','keurig refills','decaf brew over ice','day break','brew over ice tea','crunch','bigelow chai','dark magic extra bold k cups','flavored teas','nantucket blend iced','bodum tall insulated glasses','sleepytime herbal tea k cup','pumpkin spice k','elite b-40','keurig bag','15','celestial sleepytime tea','gombe','seasonal k tour','nantucket blend k','decaffeination process','caffeine free tea','bigelow mint medley','small revelation','caramel vanilla coffee','celestial seasonings lemon','timothy bold','la prosperidad','tully\'s coffe house collection','caramel k-cups','fair trade hot chocolate','fair trade hot cocoa','hibiscus','mitzi\'s granola','orange spice','donut people','lake champlain','cheese straws','tawar','columbian select k cups','german k cup','dark chocolate raspberry','mild blend','newmans special','dark decaf k cup','polar berry','dark roast k-cup','green mountain columbian','country','teacher','colombia excelencia','my k-cups','decaf chocolate coffee','maple leaf','assorted','keurig elite k-cup brewer','tully\'s house collection','kenyan aa k cups','bistro mug','kuerig b70','combo','fair trade organic cocoa','donut shop 80 count','capresso grinder','dark magic k-cup','keurig k cups','my-cup refill','prima italian','seasonal flavors k-cup coffee tour','donut shop medium roast','tiger coffee','stacking','mix coffee','re','decaf and sugar free','sweet black tea','coffee grinds','regular variety kcups','tully\'s coffee house collection','pumpkin k-cup','chocolate glazed donut coffee','month','rocky','organic coffee beans','replacement water filter','multigrain organic pancake mix','iced french','coffe tour','assam','tea variety box','6 month','roll','donut coffee kcups','cuisinart single cup brewer','donut house coffee k-cup','daybreak morning blend k-cup coffee','80 count k','newmans bold k cups','sweet escapes','cafe escape chai tea','v cup','light brewed coffees','brew over ice gift basket','cinnamon roll coffee','water process decaffeinated k-cup','cafe club','ceramic travel mug','kuerig coffee','cafe escapes chai','bodum red mini travel mug','fat free','coffee samplers kcups','k cup gift baskets','decaf coffee beans','special decaf','timothy mocha java','bold decaf k cups','decaf cups','wood','single','em','kcups house blend','cafe hot chocolate','cinnamon vanilla','indonesian coffee','breakfast blend extra bold','barista prima french','petite mug','heritage chocolate dipped shortbread','newman decaf coffee','kenya k','newmans k-cup organic','chocolate glazed donut k cup','colombia decaf','bark','revv cup','under','certificate','scale','breakfast blend medium roast','6 month signature tour','caffe late','breakfast blend 80','k-cup flavored coffee','fair trade chocolate','decaf coffee variety','biscoti','kenyan coffee','tully\'s french roast k cup','organic mexican select','earl','limited edition k cup','hot apple cider k','business to business','flavor tour','k cup tour','dark decaf','warm french toast','coffee basket','iced tea cup','signature decaf','timothy k-cup','madagascar','bodum frother','b130 brewer','sap','milk tea','cuisinart keurig','xx','timothy rainforest espresso','k cup refill pack','cinnamon french toast','dark magic espresso k cup','emeril big','all decaf teas','lemon ice','hot apple cider bagged','chocolate chip','k-cup decaf ice tea','red french press','organic hot cocoa','lemon herb','tully\'s k-cup','fair trade organic mexican select','newman\'s special k-cup','columbian especial','breakfast blend decaf coffee k-cup','espresso k','daybreak morning blend k-cup coffee 80 ct','bold k','flavored k cups medium roast','newmans caramel','bigelow chai tea','12 month tour','unsweetened','iced coffee variety','french vanilla cream','logo backpacker','my k-cup brewers','coffee tree','keurig adapter piece','keurig tree','decaf chocolate k cup','french vanilla decaf coffee','seasonal k-cup','caribou blend decaf k-cup','drawing','k cup rainforest','b60 water reservoir','matte','8 oz cups','golden french to','keurig platinum b70 brewer','grind and brew','celestial seasonings iced tea','lake champlain chocolates organic truffles','green mountain breakfast','coffee people mug','brazil nut','crate','keurig personal brewer','caramel vanilla k cup','k-cup dark magic extra bold','black tea k-cup','fair trade country blend','timothy french','celestial sweet tea','my cup adapter','strong k cups','african coffee','k cup sleepytime','french roast beans','rum','nutmeg','b31 mini','blackberry','jane goodall','barista prima house blend k-cup','donut shop light roast k cups','makers','spice chai latte','ultimate k cup','polar berry tea','individual','italian blend k cup','celestial sleepytime','keurig b145','k cup regular sampler','midnight magic k-cup coffee','prima french','newmans organic extra bold','lake champlain chocolates peanut butter cups','keurig breville brewer','hugger','dark cocoa','keurig kcup','keurig b31 mini brewer','coffe frother','decaf variety k cups','chocolate hazelnut biscotti','spiced windmill','organic gifts','coffee regular sampler kcup','caramel coffee','country blend decaf','colombia prima','emeril bold coffee','celestial perfect ice tea','assorted tea','tully\'s sampler','22 cup sampler','decaf timothys espresso','cup for mini brewer','barista prima colombia','seasonal variety','colombian light roast','newman bold','green mountain signature','caribou blend natural decaf','thermo ceramic','keurig platinum','k c','donut k cup','breakfast blend tea','fair trade highland cooperative','celestial decaf tea k cups','decaf iced tea k cups','decaf rainforest extra bold','chambord stovetop espresso maker','kuerig elite','celestial tea variety','k cup tea variety','k cup coffee tour','colombian especial','organic k','organic ethiopian','tully\'s backpacker','vanilla chocolate','k cup insert','mr coffee keurig','k cup variety sampler decaf','highland cooperatives','coconut flavor','pourover','organic cocoa','20','irish cream cups','southern tea','toad caramel','mod','coffee mug tree','tullys tumbler','k-cup celestial green tea decaf','darkest coffee','tully travel','to go cups','coffee people donut','creek','french roast bold','black iced','3 month','madagascar vanilla','cafe almond','moroccan spice mug','magnet','logo backpacker thermos','kuerig platinum','wild mountain blueberry coffee','our own','high sierra backpack','gmcr grinder','steel','brew cup','steaming','tully\'s coffee house k-cup','hazelnut flavored decafe coffee','1 2','80 count coffee','tully\'s k','chocolate marshmallows','woven mug set','fair trade certified','mix','80 k-cups','mr.coffee','woven','special blend decaf','3','coffe cups','k samplers','puls','seasonal flavors coffee tour','chocolate donut shop k cups','keurig elite','coconut coffe','keurig office pro coffee brewer','flavored k','assorted decaf','donut kcup','french vanilla iced k-cup','dark flavored','half-half','gift order','keurig special edition b60','colombian fair trade select k-cup coffee','brewing system','breville keurig','keurig office pro','floral mug','combination','k cup cider','k-cup coconut','xl water reservoir','k cup variety sampler tea','logo travel sports mug','burst','timothy tea k cups','kenyan aa k','hazelnut 80','double black diamond extra bold k-cup','colts chocolate covered marshmallows','vanilla coconut','k-cup refill filters','k cup coffee of the month','rs106','offers','columbian k','k cup coffe sampler','donut shop coffee mug','organic french decaf','highlands sugarworks private reserve','tully extra bold breakfast blend','hazelnut k cup 80','hot cocoa milk','6 month tour','is the hot apple cider gluten free','celestial seasonings k-cups','my k','apple k-cup','jazzed up','breakfast blend k','seasonal k cup tour','milk cocoa','caramel vanilla cream k cups','mini b30','k cup vermont country blend decaf','fair trade breakfast','limited edition k-cup','hand spun','sweetly satisfying','extra sharp','santa spice','assorted coffee','tom homann','green mountain sample','columbian roast','tully\'s coffee french roast','keurig k-cup variety pack','colombian decaf coffee','personal','golden k cup','chocolate mocha fudge','maria','dark black diamond','flle','sandflower','most popular','keurig elite b-40','cheese','caribou decaf coffee','caribou blend 80','keurig b130','decaf dark extra bold','milk chocolate cafe','organic breakfast','decaf beans','muddy','keurig gift','coffee maker grinder','tanzanian gombe','emeril\'s jazzed up decaf k-cup coffee','barista prima coffee house','sumatran lake','organic bagged coffee','medium coffee','celestial peach','goodall','tom mug','seasonal k cup coffees','private reserve','red raspberry','organic french','apple k cup','green t','colts bella','tully\'s gift basket','world tour','emerils jazzed up','columbian select','assorted regular','decaf variety k-cup','especial','black lemon','champlain','tully\'s dark roast','brew over ice french vanilla','k-cups pumpkin','k-cup nut','ft112','k-cup collection','22','quality','day','tully french roast 80 ct k cup','my-k cup','coffee and tea','one cup','discover your favorite','english k cup tea','donut shop travel','gift bag','vermont syrup','timothy\'s columbian excelencia','k cup packaging','high sierra','fair trade organic sumatran reserve extra bold k-cup','homann','green mountain apple cider','k-cup kenya','butter toffee k','timothy\'s vanilla','ribbon','breakfast tea k-cup','columbian medium roast','board','mini brewer mug','black bold','b60 xl water reservoir','café escapes milk chocolate hot cocoa','caramel vanilla swirl','flavored ice tea','muddy creek','newman k-cup decaf','dessert','muddy creek sandflower mug','vermont sampler','spin','caramel toffee','dark hot','hazelnut coffe','caffeine-free','french roast green','program','k-cup winter','k cup mixture','keurig my k cup filter','windmill','dark magic decaf extra','celestial tea lemon zinger','most popular coffee','keurig elite b-40 brewer','keurig cocoa','vermont country k cup','extra bold special blend','donut cinnamon roll','bigelow chai green','fresh roast','breakfast sampler','jet full','dark cups','mandarin tea','celestial tea sampler','keurig elite k-cup','tully backpacker thermos','k-cup cider','k cups mandarin orange','fair trade rain forest','donut mug','ads','bag clip','lively colombian decaf','german cake','barista prima italian','stearns','chocolatey','seasonal decaf','green mountain columbian decaf','donut shop cups','powder','breakfast blend k cups light roast','tully dark','chocolate hot cocoa','smoked','vanilla k','kcup newmans special blend','my keurig','hat','black peach tea','12 months','mueller','mug windows','bodum tall','80 ct hazelnut','80 count caribou','black mug','exclusive','cover','coffee program','celestial southern sweet perfect ice tea','seasonal flavor tour','indulgence','coffee people best','tully\'s medium roasts','full','celestial sampler','k nuckle','mr','k-cup donut shop coffee','chocolate glazed donut k-cup coffee','barista prima coffeehouse italian roast','enjoy life mug','flavored variety sampler','coffee holding','newman\'s own sampler','mitzi granola','green mountain naturals hot apple cider k-cup','smooth','bodum milk','newman\'s french roast dark','southern iced','french coffee','k-cup sumatran','brands','coast','vermont country sampl er','world blend','k cup double black diamond extra bold','bigelow english tea','k mug','tully\'s coffee house blend','cheddar','chambord red french press','quiet','vision','chocolate squares','best decaf','kit','decaf coffee cups','muddy creek windows mug','green mountain naturals hot apple','tullys extra bold french roast decaf','barista french','pumpkin flavored coffee','timothy\'s coffees rainforest espresso coffee','vanilla cream decaf','travel thermos','celestial seasonings english breakfast','donut shop k-cups','pum pkin','chocolate donut coffe','fair trade our blend k cup','tullys medium roast','keurig water reservoir','green mountain coffee travel mug','dos marias','celestial english breakfast','caribou blend coffee','green mountain naturals hot apple cider','perfect iced variety','pumpkin k','organic our blend','fair trade organic coffee','cinnamon p','trade','k cup country blend','k cup coffee italian','french roast 80','french vanilla decaf k','escapes dark','decaf blends','tom homann blue mug','pumpkin coffe','kenyan cooperatives','k cup filter adapter','fair trade medium','donut bold','british tea','caribou natural decaf');
/* $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();
                }
result = false;
                
                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);
    }

