/* Popular phrases - BEAUTYBRIDGE - 21:47:29, Thu Mar 18, 2010 */
var asPhrases=new Array ('on sale','new arrivals','glominerals','colorescience','dermablend','gift ideas','tweezerman tweezer','pop beauty','borghese','illuminare','free samples','exuviance','ahava foot cream','pixi','jane iredale','nail polish','id bare minerals','true cosmetics','nuxe','dermalogica','concealer','dermablend concealer','youngblood','astringent','mineral makeup','lip stain','line tamer','dermablend quick fix','too faced','neostrata','loccitane','priori','peter thomas roth','md formulations','sula','paula dorf','prada infusion d iris','too faced kit','skinmedica','jane iredale liquid foundation','exfoliant','murad','joey new york line up','miss oops','acne sunscreen','cologne','shampoo','almond','calvin klein eternity','dermalogica daily microfoliant','returns','eye make up remover','tweezerman','solid perfume','bare escentuals lipstick','full coverage foundation','trial size','sothys','gift for her','lash curler','on_sale','powder','jaqua','dry oil spray','zirh','self tanner','karin herzog','hair thickeners','md','loccitane hand cream','ahava','primer','oil free sunscreen','talc','modelco','coffeeberry','brush','kneipp','eyelash','phytomer','brow','vixen','soap','lippmann','verbena shampoo','fake bake','id minerals','intellizyme','true','lucky chick sugar scrub','selftan','tantowel on the glow','samples','dark circle concealer','nail polish remover','bare minerals','facial mist','babor pure day cream','brush cleaner','babor mask','stretch mark','archipelago botanicals oat lotion milk','oat milk','baxter of california','shadylady','lip liner','colorescience let me be clear','l\'occitane body cream','shave kit','illuminare fantastic finish foundation concealer','polo balm','tweezerman petite','acqua di gio','dermablend foundation','mineral','sothys eye','thebalm','serum','retinol','lotil','foundation','blush','babor lifting gel','brush set','auburn mascara','replenix','pca eye','gel eyeliner','prada amber for women','carolina herrera 212 for men','gel','bronzing lotion','true redness reducer','intense lightening complex','dermablend loose setting powder','mens makeup','brow stencil','cellulite','sunscreen','liptini','sponge','rilastil intensive','lipstick','jack black','kiss me mascara','pink leopard','glycolic acid','cherry blossom','archipelago botanicals lotion','shaving brush','hydroptimale gel','organic','neoceuticals','lip plump','two faced mascara','borghese set','kinerase lip treatment','the one','1752 shave cream','babor eye brow designer','june jacobs pore refining oatmeal scrub','bioelements lipstick','shine','equavie','june jacobs cooling cucumber eye gel','june jacobs lip renewal','sun','dermalogica concealing spot treatment','colorescience tamer skin brightener','moisture masque','brow gel','mascara','polo','body wash','blinc','cellex c','new west','oil-free','lycon','lippmann collection','armani mania','borghese lip','armani emporio','alien','mint','dkny','string of pearls','armani code sheer','liquid foundations','bvlgari','azzaro','dead sea','ti silc','priori smooth lines','aramis after shave','sula stiletto musk','lucky chick body butter','mood swing','creme de la creme','azulene','menerals','real menerals','diesel brave','la nuit de l\'homme','escada ocean lounge','tea tree oil','sula butterfly kiss','polo sport','ring','nuxe creme etincelante','ampoules','gm collin','foot care','colorescience refill','i.d foundation','get fresh spa','hand cream','dermalogica age smart antioxidant hydramist','nail','deodorant','z-silc','shea vanilla','dandruff','exuviance foundation','orange flower water','hyoil','press powder refill','instant face lift','babor basic care moisturizing cream','soy','deodorant stick','modelco lash wand','clean start','ralph lauren romance gift set','pore refiner','babor moist intense','derm renewal','dental white','youngblood mineral powder','sweet spot','dermalogica hydramist','scar','travel size','sula perfume','eye','matte lipstick','mirror','borghese brush','lavender lipstick','champagne sugar','nuxe cleanser','glitter nail polish','loose minerals','tommy bahama set sail st barts','paula dorf foundation brush','pixi sheer cheek gel','neck cream','sothys serum','coverblend','bunny too faced','clean','jane iredale amazing base','ed hardy','euphoria shower gel','l\'occitane deodorant','eyebrow mascara','tweezerman file','coffret','dead sea salt shampoo','nutriderm','soy milk lotion','tweezerman cuticle nipper','pencil sharpener','foundation brush','finishing powder','bionic serum','grenadine','phaze 31','borghese blush','archipelago botanicals hand cream','colorescience sunforgettable','cheek stain','l\'occitane vanilla','eye cake','puracne','joey new york foundation','lip lines','neova retinol me','solid','african american','spa','hide and heal','caswell massey','bruise','ed hardy love and luck','too faced eyeshadow','skinmedica uplifting eye serum','tricorn','l\'occitane citrus verbena','sula champagne sugar','primer potion','lotil hand cream','leonor greyl tonique vivifiant','babor night','euphoria lotion','eye cream','pca','juara','blemish treatment','paraben free','pca skin','gift for him','l\'occitane shampoo','retinol advanced','shea butter','quick fix','tinted moisturizer','dermablend powder','ahava mineral body lotion','burberry brit sheer','ralph lauren','sleep','curaforte','borghese hydro minerali','pca rebalance','vanilla','miso pretty','hydramist','travel','whish','perfect combination','pure night','pressed mineral foundation','almond soap','diesel fuel for life','deborah lippman','joey new york','bioelements lip','sampler','lip drink','organic make up','sean john','romance','rocawear','youngblood loose mineral','dream tint','md moms baby silk delicate skin comfort silky liquid powder','barrier repair','eyelash conditioner','bioelements pumice peel','babor eye gel','cover creme','too faced retractable kabuki','copeland','bio','neova matrix','lightening','tom ford','double black','bag','pixi lip stain','powder puff','anthony logistics','cosmetic bags','vanilla orchid','deep wrinkle treatments','carolina herrera','burberry brit','joey pure pores','balancing toner','body spray','archipelago botanicals pomegranate','clarifying solution','night bright','archipelago pomegranate','leopard','pre shave oil','facial masks','aftershave balm','youngblood mineral blush','ds laboratories spectral','collagen gel','facial cleansers for sensitive skin','psoriasis','cream shadow','priori coffeeberry tightening serum','toner','aramis','too faced smokey eye kit','moom express pre waxed strips for face and bikini','organic shampoo','for dry skin','sula nail polish','neova eye therapy','apricot chamomile body butter','gm collin cleansing milk','calvin klein obsession','eternity','fake bake bronzer','dorf','true masks','graftcyte','colorescience trial size','transforming mineral mist','treatment','yves saint laurent','glocamouflage','chloe','gm collins h50','powder foundation','l occitane shampoo','renewal lip complex','gloface primer','tummy toner','daylong','mud soap','face soap','dermalogica oil control lotion','anti-aging','omnilux clear u','natural mascara','paddywax','body oil','eyeshadow base','mama mio zap emergency repair kit','essential oil','jane iredale bags','loccitane body lotion','sothys morning cleanser','supersmile','armani diamonds for men','seaweed','spots','jaqua hand','peter thomas roth ultra lite','waterproof eye liner','ahava dermud','lift defense','concealer stick','loccitane rose','milk lotion','precleanse','loccitane hand soap','loccitane hand','cosmetic case','corrector','sothys foundation','jessica simpson fancy','lily of the valley','leonor greyl conditioner','exuviance vespera bionic serum','kabuki','cream eyeshadow','foundation compact','eye liner','polish','gm collin toner','quick fix concealer','argan','fixing powder','eye bright liner','jane iredale magic mitt','eye shadow base','lip lights lipstick','revita shampoo','clean start wash off','gm collin organique','eau des baux','jane iredale so bronze','loccitane cleansing','nail lacquer','color science','ed hardy gift set','hydro flavon cream','cheek tint','orange blossom','l\'occitane eye cream','caswell-massey shampoo','rose','hydra matt fluid','age smart antioxidant hydramist','mom and baby','g.m collin eye cream','sachet','timebalm','collagen products','alien liqueur','thebalm timebalm anti-wrinkle concealer','modelco tan in a can','ultra comforting','leonor greyl dandruff','hair','diesel shower gel','loccitane lip','fantastic finish','collagen','bioelements lutein indoor protective day creme','beaute','bioelements calmitude hydrating solution','sothys purifying lotion','sothys normalizing beauty milk','miyake','pure pores','hand lotion','shea butter hand','pressed base','rose water','lippmann happy birthday','frangipani','lavender vinegar','cor','matte nail polish','sarah jessica parker','skin smoothing cream','strivectin eye','cu3','porsche','peter thomas roth anti-aging eye illuminator','globrow collection','nuxe lip','almond cold cream','caswell-massey verbena','mineral bronzer','exuviance skin brightening gel','peter thomas roth aha','tom ford black orchid','bioelements complexion','coconut','dead sea soap','rescue me foot cream','organic deodorant','retin a','hydramucine optimal cream','lip conditioner','peptide lip therapy','super rich repair','dermalogica shave','corrective foundation','olive water toner','silver mark','borghese creme','sun diffusing protector','get fresh body creme','eyelash tint','luxe','sprayology sleepease','flawless vitamin veil','pixi lip booster','anthony for men','puracne oxygen gel','issey miyake','set','calvin klein eternity for men gift set edt asb sg','just kissed','lemon','status gloss','thebalm shadylady palette','blush milano','argireline','matrixyl','mama mio cream','paula dorf brushes','true moisturizer','l\'occitane shea','pore reducer','sensiderm','havana','dermalogica clearing skin wash','neostrata cream','makeup primer','wrinkle smoother','body powder','decorative soaps','ralph lauren lotion','caswell-massey sandalwood','eyexcellence','h50 therapy cream','pop eye cake','lip pencil','techno buff','limoncello','psorent','juniper','orchid lip liner','oligo','supersmile whitening toothpaste supersmile whitening toothpaste','bare escentuals brow','modelco bronze airbrush face','white eyeliner','anthony logistics body spray','scrub','oxyliance','powder eyeliner','too faced chocolate','phytomer oligopur','fragrant touch','caviar','hunter green eyeline pencils','bioelements power concealer','revita','womens fragrances','june jacobs shampoo','supersmile toothpaste','glycolic','perfecting serum','skin tightening','g.m collin sensiderm cream','calming','face pads','sun protection','perfect visage','antibacterial facial cleanser','exuviance moisturizing antibacterial facial cleanser','june jacobs cucumber','too faced pink leopard bronzer','total cohesion','l\'occitane grape','velvet concentrate','borghese mud','patchouli','skin polish','babor combination','skin resurfacing cleanser','remergent dna repair','green concealer','chemical free sunscreen','lip palette','modelco face base skin primer','jane iredale just kissed','more lip lip plumper','kouros','rosewater','savons de provence','treatment foundation','kaplanmd','l\'occitane aromachologie soothing shampoo','eye cream wrinkle','jasmine','stop hair loss','l occitane lavender harvest lavender vinegar','mousse','joey makeup','valentino','cashmere mist','true essential pore and complexion refiner','drakkar','amber','skin drink','collin cleanser','rilastil deliskin','dmae','loccitane lavender','murad clarifying','thalassothys','blackberry','facial peel','marquee','tweezerman nail file','modelco liquid buds','angel gift set','clarifying','day fluid','gommage','colorescience concealer','spf lip','jack black lotion','hair care','tinted','moisturizer spf','dry body oil','lip trio','priori day complex','paula dorf brow duet','kneipp bath','zirh shave gel','cellex','gm collin sensiderm','blonde mascara','neostrata gel plus aha 15','brit sheer','face balm','colorescience pressed mineral compact','liquid','burberry london','iredale absence','makeup brush case','retractable brush','best of l\'occitane','sheer foundation spf 20 fair','mandarin ginger bath salts','lip powder','exfoliating wash cloths','lip crayons','evian','pca trial','colorescience pressed eyeshadow','cleansing','olive oil','primal elements','rhubarb','l\'occitane serum','vetyver','babor fluid','sheer','pixi velvet rouge','extreme c','thymes','doctor babor','jaqua pink potion','neroli','satin','kneipp bath salts','oxygen puractive+ mask','pregnant','face cream','makeup brush sets','hydramucine optimal gel','polo black','cheek color','miss sixty','clear cover stick','e shave','oat creme milk','dermalogica skin prep scrub','colorescience finishing brush','too faced concealer','rose eau des 4 reines','skinmedica exfoliant','colorescience eye','tea tree','omnilux','apricot chamomile','turn the tides','leonor greyl magnolia','rilastil intensive eye contour cream','rose belle','mousse body','murad lip','colorescience prismatic','sprayology','mist','babor phytoactive','valentine','nuxe aroma-vaillance','zirh scrub','caswell-massey','covet','l occitane after shave','michael kors island','i am king','eye color','dermalogica body','egyptian musk','sandalwood candles','angel by thierry mugler','myrtle','zirh best seller kit','folding lash comb','eyebrow pencil','mineral lipstick','antiseptic','amatokin','clean warm cotton','diesel after shave balm','brow envy','perfect glo','second skin','memories','ka2008w1','exuviance skin lightener','blue mascara','tweezerman no-slip skin care tool','archipelago lip butter','diaper','tin','pure pressed base','restoring rich cream','true cosmetics nightlight trio','thebalm to the rescue','pop beauty blush','self tanning lotion','ahava mud soap','jaqua candle','mugler','modelco lash brow','colorescience face freshener','foundation samples','colorescience face paint','soy algae body oil lemongrass','fine lines','exuviance body wash','l\'occitane conditioner','too faced beauty balm','honey lemon','shea butter verbena','smoothing gel','she','babor nail remover','jane iredale eye shadow','sugar scrub','bubble bath','l\'occitane foot','skin prep scrub','colorescience brush','brightener','phaze 7 protecting hydrator spf 25','multivitamin power recovery masque','l occitane hand','vitamin a','zegna colonia','chroma 2','too faced candy lips','lovely sarah jessica parker','eye wrinkle','the wait is over','nuxe teint prodigieux','face','stella mccartney','harmonizing gel cleanser','l\'occitane mist','twilight','orange','healthy hair mask','dkny men','souffle marin','rear repair','red light','ahava lotion','body mist','ultra sheer','salt scrub','sexual','babor oil','l\'occitan','ahava face','soins soleil cellu-guard','burberry weekend','spirit','paula dorf sweep away','colorescience primer','murad spa','body polish','babor men','aha 20','tired legs','shea cocoa butter aloe','bioelements sleepwear','hyaluronic acid','camouflage brush','dental','travel puff','eye candy','royal blue','olive oil loccitane','mineral highlighter','empty compact','cactus cloth','eshave sweetheart','eye believe','l\'occitane lotion','murad mattifier','emporio','lip products','white effect','dna','pina colada','bonne mere','is clinical','l occitane lotion','get fresh sugar scrub','body scrubs exfoliants','eyebrow wax','snow','heaven on earth','apple','neostrata bionic face cream','foot fetish','pixi brush','gm collin cleansing','murad moisture rich cleanser','sensiderm gel','nuxe eye cream','pen','murad sleep reform','lippmann fashion','murad active radiance serum','modelco gloss','murad oil','murad t-zone','babor white effect intensive concentrate','egg cream','dermalogica total eye care','olive daily face cleanser','babor tonic','phytomer homme','dermalogica super rich repair','true restoring rich cream','eye brow gel','erase those lines','cradle cap','under eye cream','sunscreen sample','creme de la copper','brown sugar','hair repair','neova antioxidant serum','chap stick','ck free','biotin shampoo','multivitamin capsule','colorescience take out','day bright','reve de miel','lip brush','positano','code','g.m collin hydramucine optimal gel','mania','sugar lotion','ralph lauren notorious','paula dorf magic stick','too faced eye shadow insurance','colorescience line tamer skin brightener','toenail clipper','jaqua weekend bag','absolute moisture','medibac clearing wash','murad hydrating toner','too faced lip injection','issey','dermalogica shampoo','dermalogica skin smoothing','a.g.e total defence','challenge','fade fast','derm renewal gel','true color','get fresh lemongrass lavender','babor sunscreen','jane iredale disappear','sun spots','neova copper peptide mask','too faced sun bunny','lip butter','nuxe etincelante','coverage','sharpener','colorescience f.a.c.e trial','modelco powerstick duo concealer','murad set','ahava body lotion','neova copper moisture mask','hyaluronic','retractable lip brush','frankincense','suncanny foundation','regenerate','babor pure mask','too faced powder','dermalogica face brush','multivitamin','neova mask','dermalogica climate control','for men','gloves','alpha hydroxy','rose velvet','dr michelle','g.m collin lip plumping complex','talcum powder','sun bunny','pixi parfum','camouflage makeup','apple of the cheek','bioelements natural','ethereal','vera wang gift set','almond foaming bath','treating lotion','ck','puff','balance','zirh ikon','neostrata serum','caswell massey gardenia','sothys eau thermale spa exfoliating facial scrub','kinerase photofacials','nutrithys','urban detox','babor mimical control','boticario de havana','beauty to go','l\'occitane shine mask','l\'occitane ylang ylang','pop beauty polish','lip moisturizer','juara go on the glow kit','anti-dandruff','lavender gift sets','yu be lip','pencil','vera wang truly pink','june jacobs citrus body balm','sothys face cream','green eyes','sea silk oil-free moisturizer','cucumber','dkny night','oily face','scentao','pom mist','jane iredale liquid','magic mitt','purifying deodorant','cream dry skin','chroma 5','cedar','to faced','youth','t-zone','sothys immuniscience creme','neostrata hq','sothys immuniscience fluid','glospa lip conditioner','box of chocolates','waterproof lip pencil','hy001','eyebrow color','blotting','l\'occitane shea butter ultra rich shampoo','ultra rich eye balm','too faced tricks of the trade','verbena leaf soap','caswell-massey freesia','sothys sparkling eye pencil','wine and grape seed','the golden branch','sunkiss','foot odor','slant tweezer','lamb','anti-fatigue eye contour gel','prada tendre','shooting star','soy body facial','tricks of the trade','dermalogica age smart','dermalogica samples','parfum mens','toothbrush','burberry summer for women','too faced first base','scented candles','depilatory','after dark','burberry brit for women','pump up the jam','g.m collin visible lifting cream','tweezerman baby','pep up gel','bioelements quick refiner','bagno di vita','l\'occitane honey','polo ralph lauren balm','sebum','armani code after shave','karin herzog additional day','bvlgari aqva','eye stain','qualities of nail polish','too-faced','don\'t tell mama','dermalogica skin resurfacing cleanser','too faced the jewelry box pink diamond edition','long lasting makeup','neova purifying facial cleanser','dreaming','rose soap','butterfly kiss','recovery serum','dusting powder','compact mirrors','whatever lola wants','california in a compact','gucci pour homme ii','lacoste inspiration','l occitane shaving cream','mineral hand cream','pop beauty conceal and correct','borghese delicato','huile de palme','babor phytoactive base','bioelements post shave serum','gucci envy me','hydracontinue','christmas','too faced lash injection','azzaro after shave balm','z silc spf 30','voglia face mask','skinmedica vitamin c','miss','skinmedica lip','pop beauty lip lust','almond talc','lil dipper','l\'occitane face cream','coffee','neova body therapy','omnia','sothys noctuelle','anthony peppermint','valerian','di gio','caswell massey elixir of love','jane iredale absence','peter roth','oxygen puractive+ cream','moisturizing mascara','men soap','elixir','armani diamonds for women','glospa sugar body polish','gloeye','soleil','celebration','l\'occitane shea hand cream','verbena hand lotion','rose 4 reines eau de toilette','pigment discourager','dermablend shades','oil free foundation','multivitamin power','glospa body firming lotion citrus lavender','sothys concealer','bella','joey new york collagen boosting lip gloss duo','sebo care','sothys lotion','ogenage','eyebrow kits','anthony soap','copeland sun','babor eau de toilette','one step cleansing bar','20% shea hand cream','chromawhite','sprayology party relief','attitude extreme','jordana','dermalogica soothing eye make-up remover','obsession body lotion','vera wang bouquet','quick cover','dermalogica candle','pink potion','shaving gel','l occitane oil','propolis','dr babor','loccitane candle','sun tanning','lavender citrus','baby phat','babor lipstick','prada iris','medical makeup','l\'occitane shea butter','acne sulfur','l\'occitane lavender hand wash','grapefruit fragrance','mineral radiance','party relief','tns essential serum','thierry mugler','bio organique','colorescience sunforgettable shimmer','body powder puff','undereye circles','l\'occitane aromachologie','dermalogica power rich','yes no maybe','jack black clear solution skin purifying set','concentre energetique','lip 20','gardenia lotion','dermalogica night','glominerals lip','socialite','tooth powder','oat salt','citrus body balm','dermalogica booster','wicked game','mink','foot soak','rouge','circus','ahava shower gel','mattifying gel','joey cinnamen lipstick','pit boss','verbena lotion','skin primer','bioelements instant emollient','cystic acne','baby eyes','oat lotion','borghese fango active mud for face and body','staniac','m.d','slim','brown mascara','keloid','lime soap','kiss','babor for men','cleansing water for face','piedi vitale','pink champagne','pomade','neostrata lotion','grow hair','sothys hydroptimale thi3 hydrating serum','gm collin lipo','sothys night','biotin','neon lid','modelco lash brow growth stimulator','ahava men','dermalogica buffing cloth','alphaderma ce','pass the butter','loccitane olive','all products','caswell massey honeysuckle','bvlgari omnia crystalline','anti aging serum','shea butter verbena soap','glolash','murad renewing cleansing cream','marine','babor hy','gradual tanning','viterol','l occitane olive','eshave after shave cream','anthony logistics continuous moisture eye cream','peter thomas roth glycolic acid 10% hydrating gel','anthony logistics vitamin c serum','in the wild','murad lotion','neostrata oily acne prone protocol','ginger','mineral gel scrub','goji','refinity','eye makeup','sothys gommage','crema saponetta','honey almond shea lip balm','number 6','resveratrol','tighter skin','sothys blush','babor skinovage oxygen energizing cream','sothy\'s homme','calvin klein the one','ahava mud exfoliator','water','lip set','clay','eye shadow brush','glo minerals blush','french manicure','comedogenic','sothys radiance gloss','anthony after shave','l occitane immortelle very precious eye serum','body odor','dopp','crease brush','borghese spa perfume','babor skinovage oxygen','selection','bioelements trial size','clay cleanser','eyelash glue','golden branch candle','l occitane soap','sagging skin','lil angel','l occitane almond apple velvet concentrate','magic stick','dermalogica masque','volumizing shampoo','cream eyeliner','sothys softening emulsion','babor acne','dermalogica conditioning body wash','pedro','dermalogica skin hydrating booster','finishing brush','lip polish','genie','lip serum','karin herzog mild scrub','ahava products','sink','suncare','babor travel','powerful','jack black pit boss','black lipstick','polo explorer','mens gucci','pep up pen','dermablend remover','pure lash','pop day to play','jaqua scrub','sets for men','wheat protein','perfetta lip pencil','paula dorf aura','floating candles','klgs391','spectral dnc l','aftersun','magnetic','enhancer','buffer','wash','steppin out','woody','babor cleansing gel','olive','duo','dermalogica deodorant','eau marine','l\'occitane olive soap','dermalogica travel kit','dermalogica hydrating','h e bronzer','l\'occitane grape shower oil','additives','facial scissors','furfuryladenine','antioxidant spray','pollution','t zone','c','babor promotion energy fluid','glow in the dark','jewelry box','babor basic care','gel skin clear gel','discoloration','verbena travel','prevents','aloe','4 reines','prevent scar','lip and cheek tint','anthony ingrown','too faced snow bunny','true mascara','orly nail','nuxe huile','too faced juicy jewels','too faced lip plumper','recovery complex','special camouflage','clay pomade','callus','ultra smoothing cream','colorescience sunforgettable full body shaker spf 30','ultra daytime smoothing cream','insurance','l\'occitane peach','ginger shampoo','be still','body mask','anti cellulite','babor derma cellular','neostrata oily skin solution','gel candles','skin cream','green nail polish','gm collin sun veil','anthony shampoo','anthony rescue','too faced base','soft cream peeling','cabanaboy','l\'occitane olive radiance cream','hugs kisses','bha','neostrata shampoo','too faced lipstick','dermabrasion','long lash','george','dnc','l occitane creame ultra riche body','tns night eye repair','dermalogica body wash','too faced absolutely flawless','hq','colorescience second skin','balance refill','chroma 2 true beige','sean john unforgivable black','primer lemon','dermalogica post-shave balm','minerals in the mist','papaya purifying enzyme masque','ahava for men','oil blot','vessels','talika brow lipocils','pixie eyeliner','metabolism','lymph','seboregulator','anti shine','face tan','l occitane immortelle brightening toner','roth','blueberry','babor body line thermal refreshing shower gel','babor white effect enzyme cleanser','algae','sothys collagen','babor pure clear cover stick','single lashes','babor basic care lipid balancing cream','basic care moisturizing','creatine','babor hsr platinum cell reactivating eye cream','babor selection ultimate concentrate','babor hsr platinum cell reactivating cream rich','babor hsr lifting foam mask','babor skinovage selection ultimate care cream','babor hsr platinum cell reactivating cream','anticellulit','anti-cellulite','result','eshave after shave cream white tea','l occitane aromachologie repairing','baby wash','anthony toner pads','cellex-c sensitive skin serum 2 step kit','jane iredale tinted moisturizer','badger shaving brush','gm collin lipo fitness serum','lip kits too faced','solar butter','cover cream','feu d\'orange massage oil','l\'occitane white tea','babor q10 cream','md formulations lip balm','kneipp rheumabath','homme','kneipp citrus','phytomer ogenage','babor organic','cura c','cellex c oil free moisturizer','cellex-c betaplex new complexion cream','cellex-c clear complexion complex','cellex-c betaplex gentle cleansing milk','cellex-c betaplex clear complexion mask','cellex-c anti-aging kit','cellex-c betaplex fresh complexion mist','cellex-c betaplex smooth skin complex','cellex-c betaplex line smoother','cellex-c fresh complexion foaming gel','cellex-c betaplex gentle foaming cleanser','cellex-c hydra 5 b-complex','cellex-c speed peel facial gel','cellex-c advanced-c eye firming cream','cellex-c body smoothing lotion','cellex-c skin hydration complex','cellex-c advanced-c eye toning gel','g.m collin sensiderm','cellex-c advanced-c skin toning mask','cellex-c fade away gel','cellex-c eye contour cream','cellex-c seline-e cream','cellex-c g.l.a eye balm','sothys secrets intensive lip care','cellex-c eye contour gel','cellex-c under-eye toning gel','ahava salt','cellex-c hydra hand cream spf 15','cellex-c sea silk oil-free moisturizer','cellex-c eye contour cream plus','cellex-c skin firming cream plus','sothys men','spectral dnc-l','true beauty','babor gold','l\'occitane cinnamon orange','june jacobs candle','anti-aging moisturizer','gel cheek stain','b kamins maple','june jacobs serum','an9047','skin hydrating booster','june jacobs pore purifying toner','ahava spf','june jacobs papaya body balm','titanium','caswell-massey lip balm','june jacobs mandarin moisture masque','june jacobs redness diffusing serum','june jacobs intensive age defying hydrating serum','raspberry recovery','june jacobs brightening moisturizer','june jacobs age defying copper complex','glospa body butter','ti-tan','baxter aha','bridge','b kamins skin lightening','borghese tonico minerale stimulating tonic','colorescience achromatherapy gem spritzers 4 oz','l\'occitane lavender pillow mist','eye pencil green','eye brush','ba-2003','phaze 13 pigment gel','too faced wrinkle injection','volumizing','paula dorf enhancer','borghese body lotion','bikini wax','ahava after sun rehydrating balm','dermalogica extreme c','show stoppers','orange lipstick','paula dorf bronze glimmer','optical illusion','bath powder puff','sothys hydra nourishing body lotion','sothys radiance tightening bust serum','sothys marula massage oil','l\'occitane lavender lotion','loccitane shower cream','sothys shampoo','sothys shower gel','sothys energizing shower gel','sothys delicious scrub','sothys massage elixir','aha cream','paste','sothys total resculpting serum','glopressed','look','cooling','ahava body scrub','woman ralph lauren','colorescience bronzer brush','jetsetter','babor perfect combination purifier gel','june jacobs pore purifying mud masque','fungus','ur','prada for men','soft soap','certified organic','anthony 32','coverup','n-6 furfuryladenine','oil free sunblock','salt scrub souffle','ahava kits','achromatherapy','l\'occitane olive express eye treatment','medium tan','age maitrise','mature skin makeup','rose body milk','ahava exfoliator','glycolic eye cream','l air du temps','babor phytoactive reactivating','super smile','salicylic','dermalogica climate control lip treatment','too faced foundation','spray sunscreen','lipo-fitness serum','phytoaromatic gommage','soy salt','treating oil','luminance concentrate','sheer tint','tonific','glycolic toner','leaf soap','c6 peptide intensive treatment','contour des yeux prodigieux','glospa bath whip','bota','20% vitamin c cream','too faced eye mascara','stephanotis','borghese apricotta lip pencil','paula dorf eye enhancer','sothys renewal system','b kamins moisturizer','ahava purifying mud mask','beard lube','sheer lustre day moisture','q 10','eau des 4 reines','l occitane shea butter ultra rich body cream','accept','black nail polish','no paraben','knock your socks off','tns hydrating masque','golden goddess','acny','mineral primer','formula 405','mimosa jasmine violet sugar scrub','ctsm','pressed mineral blush','overnight clearing gel dermalogica','lip shine','shadow green eyes','back acne','goddess clutch','true spf','modelco blush','murad night','skin c','gwp','paula dorf mascara fan brush','viz 1000','babor blush','popbegocl','phytomer hydracontinue moisture','whiting teeth','b kamins lactic','01as200k5','no animal testing','semi-permanent eyebrow','multivitamin hand and nail treatment','control','babor stop hair loss','fast application pad','l\'occitane precious cream','crystal peel','stencil','double copper','talika eyebrow','l occitane conditioner','bye bye blues','modelco brush','cover skin','bispaco','acne moisturizer','moisturizing body sugar','pink blush','prime','buttocks','lip liner joey of new york','tensor gel','sunprotection','strivectinsd','roth blemish','starry eyed','polyhydroxy','cream eye liner','pixibrowlift','pieyecose','popbemismey','skinmedica acne toner','strivectin hs','cream foundation','balm springs','bellini','hydro flavon','nutrient replacement cream','angle brush','sothys scrub','ziikgiset','lip enhancer','glamour gloss','babor wrinkle','anelprlo','bicacl','babolithlibu','babolithcole','ultrarich body cream','bachglgel','luchmijavihy','cajoclcosp','molibulipre','trueaccents','cacowaeaudeb','modili','knmoofbalagi','hewashglove','zehetubtea','toofashve','toofafiba','haecopactogo','ahsibefagise','licofolopesl','anlohecogrki','twbrsogrkit','adse2kitbyce','eyeserum');
/* $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);
    }