/* Popular phrases - NEXT - 12:38:17, Mon Feb 8, 2010 */
__SLI_ClientDefaults =
[
    ['ShowBrandingFooter', false ],
    ['IE6SelectBox', true],
    ['IframeAlignment', true]
];
var asPhrases=new Array ('curtains','dresses','rugs','wedding','cushions','leggings','lighting','bags','boots','maxi dress','wallpaper','maternity','tunic','shoes','mirror','cardigan','slippers','blinds','jeans','wellies','tops','swimwear','shorts','jeggings','photo frames','suits','clocks','skirts','baby','bedding','bridesmaid dresses','handbags','sandals','hoody','towels','trousers','sideboard','lamps','childrens bedding','wellington boots','converse','treggings','socks','ivory shoes','shelves','curtain poles','peppa pig','dressing table','snow boots','linen trousers','pictures','maternity wear','womens dresses','coats','wardrobes','jackets','superdry','sofa','tv stand','bikini','shirts','womens suits','storage','throws','vest','coffee table','black trousers','joggers','kettle','opus oak','tights','black dress','opus','watches','linen trousers female','desk','trainers','skinny jeans','sofa bed','vest tops','dressing gown','leather jacket','waistcoat','luggage','superdry women','bridal','sunglasses','headboards','ladies dresses','wii fit','armchair','flip flops','table runner','sports bra','bridesmaid','womens tops','picture frames','pillows','ladies suits','mugs','wall art','swimming costumes','bookcase','console table','belts','tankini','sleepsuits','jumpsuit','scarf','opus mango','hats','tunic tops','wii','pyjamas','vase','teal','tv unit','me to you','floor lamp','jumper','prom dresses','england','valentines','lingerie','bra','tables','eyelet curtains','dining table','roman blind','ballet','changing bag','runners','duvet sets','tatty teddy','chairs','toilet seat','cargo trousers','perfume','frames','sizes','schoolwear','suitcase','adidas','denim shirt','white shirt','wedding dresses','purse','stools','duvet covers','microwave','table lamps','shower curtain','dresses 12-14','black leggings','t shirts','opus mango furniture','lipsy','nike','knitwear','womens trousers','tunic dress','laundry basket','womens coats','ladies tops','wall clocks','fireplace','faux leather','mens slippers','bath mat','boyfriend jeans','black top','cropped trousers','womens jeans','flowers','necklace','sleeping bag','polo shirt','wellingtons','childrens curtains','womens shorts','hetty and henry','playsuit','linen','basket','nest of tables','denim skirt','nautical','hunter wellies','mattress','nursery','newborn','unisex baby','blazer','fitted sheet','bathroom cabinets','petite','jewellery box','bin','ties','cambridge oak','black cardigan','butterfly','ugg boots','womens shoes','red shoes','long sleeved tops','ceiling lights','ben 10','check shirt','bolero','ladies coats','day bed','valance','plum','ladies shorts','gloves','toys','bunk beds','telephones','denim jacket','womens cardigans','wallet','kaftan','black shoes','black jeans','bathroom','denim leggings','hoody tops','superdry men','christening dress','purple','womens hoodies','school trousers','mobile phones','maternity jeans','paint','shoe storage','silver shoes','gift card','bridal shoes','dinner sets','fragrance','knitted dress','mens jeans','single beds','star wars','wedges','petite jeans','ladies jackets','wedding clothes','bodysuits','large rugs','coats and jackets','poppy','red','hunter','shrug','storage baskets','womens boots','fire','womens shirts','school uniform','scarves','ladies boots','mac','nightwear','underwear','dvd storage','tea towels','baby sleepsuits','pink','bracelet','mens suits','duvet','beachwear','combats','black skirt','roller blind','leggins','laptop','denim dress','swimsuit','storage furniture','mens linen trousers','tracksuit','ladies shoes','ironing board','kylie bedding','crocs','toilet roll holder','wall lights','door mat','ipod','teal curtains','toaster','pushchairs','sheets','black boots','pram shoes','runner rugs','grey dress','dresses 14 16','table cloth','joggers bottoms','womens tunic','sofas and chairs','animal print','spanx','maxi','bedroom furniture','pumps','wide fitting shoes','dungarees','red curtains','bedside table','green','canvas pictures','dining chairs','wii fit plus','womens jackets','opus black gloss','beach dress','womens black trousers','white top','red cushion','bikini\'s','cream shoes','kids beds','wall paper','bridesmaid shoes','basque','lined curtains','petite dresses','gladiator sandals','ladies jeans','womens leggings','shelf','nursery bedding','green cushions','glasses','cots','tilson','court shoes','mango','canvas','blouses','double bed','workwear','sonic','bed throws','mango furniture','footstool','christening','cargo pants','womens sandals','sofabed','mirrored furniture','white linen trousers','tankini swimwear','slipper boots','ladies trousers','washing machine','wedding shoes','thongs','junior bedset','furniture','lipsy dress','cath kidston','cargo','hoover','red top','mens boots','ladies black trousers','stripe top','signature','ladies watches','nike trainers','hudson','phones','firetrap','robe','kitchen storage','bedstead','cufflinks','black shirt','cutlery','black jacket','lamp shades','slim fit suit','love','leather sofa','union jack','mens trainers','ottoman','hudson furniture','silver sandals','maternity tops','red dress','bootcut jeans','bean bag','wide fit boots','plimsoles','floral','prams','cd storage','maternity trousers','aspen','knickers','england tops','artificial flowers','toilet brush','womens skirts','ski','white trousers','light shades','wonderbra','opus oak furniture','black curtains','school shoes','cookers','grey top','moses baskets','valencia','black suit','ankle boots','storage boxes','towel bale','ladies cardigan','mens combats','bedside lamps','ladies swimwear','ladies pyjamas','tie backs','storage jars','bathroom furniture','mens socks','lace jacket','football','mario','trunki','plus size','offers','teal cushions','bread bin','digger','pillow cases','jumper dress','black skinny jeans','denim','hand bags','orange','womens trainers','denim shorts','sequin','bedsets','placemats','miss sixty','kickers','pink top','zebra','mens shorts','mens shoes','mens watch','pink curtains','stripe','bathroom mirror','womens swimwear','navy trousers','mens shirts','cambridge','carpet','ladies shirts','skiwear','chiltern','memo board','ladies linen trousers','laundry','red rug','ugg','duffle coat','vests three pack','sweat top','mens hoodies','grey trousers','pencil skirt','matress','home accessories','longline','corset top','art','electric fires','table mats','womens linen trousers','dinosaur','plates','white jeans','leather bean bags','sandles','scales','womens t shirts','boxers','tall women','ornaments','cube','kylie','super king bedding','black bag','beach bag','havaianas','lace','longline tops','ladies hoodies','drainer','floral top','baby tights','long boots','cropped jeans','gel bra','teal rug','shoe boots','runway','boobtube','green curtains','pencil pleat curtains','pink shoes','wine glasses','mattress protector','grey suit','metz','ipod touch','padded bra','towel rail','linen shorts','green dress','primrose valley','candles','cot beds','plum curtains','baby changing bag','orange shoes','chinos','rucksack','swim shorts','womens vest tops','longline cardigan','sun dress','pink dress','nintendo wii','white t shirt','purple rug','trunk','slip','purple shoes','ziggy and friends','petite trousers','photoframes','saucepans','linen suit','mens vests','slim fit shirt','slouch jeans','house signs','trouser suit','gold shoes','womens joggers','wide leg trousers','emily ruffles','tab top curtains','ivory','adidas trainers','blue dress','ladies slippers','long cardigan','fitted bed sheets','plum bedding','bath towels','netbook','childrens rugs','childrens furniture','corner tv unit','ladies leggings','console','floral dress','ladies sandals','michigan mango','lacoste','square pillow','bathroom accessories','kids curtains','jersey dress','suit cases','ladies skirts','gift sets','peppa','womens jumpers','ladies trouser suits','opus black','accessories','mens waistcoats','toy story','linen shirt','tibet rug','tshirts','green rug','converse boots','green shoes','timberland boots','plus fit','kitchen','earrings','animal print tunic','bed runner','mens jumpers','wellie boots','laundry bin','sole reviver shoes','single mattress','pillowcase','sundress','media unit','bed sets','bathroom blinds','cusions','holdall','rings','kitchen accessories','womens slippers','wall stickers','cami','black coat','iron','halterneck top','plain bedding','shinto','hungry caterpillar','hi tops','maternity dress','border','mens joggers','suede boots','cuff sandals','maternity bra','buggies','linen dress','nike joggers','camera','gracie','snow','white curtains','chiltern furniture','tuxedo','blue curtains','merrell','purple top','day dresses','mens polo shirts','tea coffee sugar','red cardigan','backpack','vacuum cleaner','jogging bottoms','addidas','wide fit','cabin bed','beach','bar stools','sportswear','plus fit jeans','white cardigan','tallboy','tote bag','leather bag','biker boots','tie','converse shoes','ladies jewellery','ladies trainers','pram suit','blue shoes','timberland','tv','flare jeans','pans','light pull','grey cardigan','sweaters','oak furniture','high chairs','linen trousers male','beanbag','padded bikini','sequin top','blue top','navy shoes','superdry jacket','grey tunic','across the body bag','polo','door handles','baby coats','ipod dock','grey joggers','xxxxl','hand towels','xxxl','roxy','curtain tie backs','doormat','floral tunic','chest of drawers','sole reviver','side tables','nursery curtains','superdry hoody','gracie furniture','puma','wide leg jeans','hat stand','sarong','wii console','next','michigan','ladies tunic','ladies joggers','wool rugs','black','multiway bra','mongolian cushions','shirt dress','ladies jumpers','plimsolls','grey','spongebob','in the night garden','delamere','freya','cake stand','lacoste trainers','dyson','white dress','adidas hoody','storage stool','animal','purple curtains','me to you bedding','mens jackets','maternity swimwear','bedroom','leather','drawers','t-shirts','corset','flipflops','black tunic','futon','heart','tall','party dress','tilson oak','boot cut jeans','mules','leather cube','school shirts','teal bedding','ladies mac','ziggy','mens coats','place mats','berghaus','womens white shirt','childrens bedroom','flat sheet','cards','childrens storage','ladies white shirt','purple cushion','bath sheet','cupcake','petite suits','black gloss furniture','briefs','blue','tilson mango','long tops','raincoat','floor lights','childrens lighting','womens pyjamas','waist coat','womens accessories','ladies wellies','ps3','ballerina shoes','canvas prints','womans dresses','hello kitty','wrap','bra\'s','stripe dress','romper','treadmill','pants','high heels','prams and pushchairs','all in one','fascinator','rose','school wear','ghd','mens underwear','cd dvd storage','wii games','womens leather jackets','book case','aftershave','sun glasses','table linen','green top','grandad top','westport','venetian blinds','socks five pack','valentines gifts','mens cardigans','wall mirrors','ruffle','chest','weenicons','chandelier','harem','womens trouser suits','montana','baby bodysuits','necklace silver','pink coat','ballerina','yellow','mens t shirts','dressing table mirror','pack tops','linen skirt','black gloss','annalina','caravan club','cutlery set','harbour furniture','levis','oven gloves','pink cardigan','mini skirt','girl\'s shoes','black treggings','hold ups','curtain pole kit','canisters','dining sets','ladies coats and jackets','francesca','slendertone','cups','black furniture','garda sofa','over the knee boots','womens socks','converse trainers','wedge shoes','womens belts','make up','womens skinny jeans','suspenders','bathroom scales','briefcase','ladies fleece','light bulbs','bed sheets','diesel','highchair','white bra','womens fragrance','slim fit','super king','combat trousers','summer dresses','slim fit mens shirts','green cardigan','non padded bra','boxer shorts','print dress','ladies socks','fleece sleepsuit','reward chart','summer tops','bay window curtain pole','3 pack tops','black piped dress','short sleeve shirt','garda','caterpillar','bedside cabinet','mens dressing gown','pink and grey','cords','oak','hi rise jeans','ralph lauren','candle holders','body','polka dot','england t shirt','trend chairs','wedding suit','linen blend trousers','rugby shirt','ashcroft','glass table','school skirts','bulbs','just pink','sandels','wall shelves','sun hat','peep toe shoes','ladies leather jackets','malvern','penguin','upsy daisy','calvin klein','soleil sucre','black linen trousers','asics','wide leg','parka','cropped','nursery furniture','navy','denim skirts women','silk curtains','sketchers','mens flip flops','red bag','bathmat','t-shirt','matress protector','silver bag','swimsuit ladies','double mattress','spot dress','letters','cabinets','new baby','girl\'s tights','ladies vest tops','mens sunglasses','star wars t shirt','wedge boots','womens nightwear','bra two pack','womens combats','photo','heels','going out tops','jeans mens loose fit','tank top','mink curtains','vans','ghd straighteners','miss n','towel storage','school','lace top','bedspread','ladies bags','balcony bra','patent shoes','grey leggings','head board','womens vest','silver','leopard print','hooks','leather gloves','snood','luggage sets','element pink','bathroom mats','pinafore','high waist jeans','mink','tableware','brown suit','womens black tops','box','pink rug','corner sofa','jewel droplet sandals','baby dresses','xxxxxl','cap','long john','zebra print','baby sleeping bag','loafers','pendant light','trench coat','cot bumper','next card','poles','jackets or raincoats','cotbed','mens white shirts','fleece jacket','damask','womens maxi dresses','orange top','womens knitwear','elephant','ladies t shirts','black and white dress','collage photo frame','baby bag','michigan oak','single duvet','faux silk curtains','butterfly dress','shift dress','union jack cushion','high tops','dresses 6-8','bow tie','television stands','peppa pig bedding','mens hats','32dd','apple','womens waistcoats','v neck jumper','red coat','cargo shorts','womans tops','mens black trousers','shower mat','animal print top','coffe table','cropped linen trousers','check','breadbin','bibs','womens tunic tops','tie dye','womens black shoes','black mesh dress','bowl','manchester united','red jacket','childrens desk','mens trousers','red bedding','washing basket','strapless bra','table and chairs','harbour','toe thong','bellagio','womens coats and jackets','quinny','opus white','knee high boots','tops 16','hilfiger','cups and mugs','black patent shoes','junior bed','arm chair','salt and pepper mill','t shirt pack','denim tunic','firebowl','holiday','helly hansen','ultimo','office furniture','bow dress','home','k swiss','nike hoody','egyptian cotton','white leggings','st tropez','hooded shirt','art plinth','black court shoes','pack','purple bedding','mobile','petite tops','black bedding','red kettle','mock shirt','slim fit jeans','star','occasion','gold','luna','mug sets','bathroom storage','black pumps','cushion bundles','womens black jeans','maclaren','lampshades','camouflage','single fitted sheet','laundry bag','red lamp','womens converse','voile','childrens table and chairs','mens boxers','lipsy shoes','television','mens vest tops','kitchen bin','clutch bag','underwired bikini','cream print dress','junior duvet','waterfall cardigan','leather chairs','skinny','spring meadow','cot bed bedding','nx sport','alarm clock','maternity leggings','trainer socks','womens cargo trousers','wide fitting ladies shoes','womens bags','replay','long sleeve t shirt','jump suit','white vest','ladies black tops','mens cargo trousers','mens wallets','womens cropped trousers','allium','pink cushion','bolero cardigan','tub chair','high-sleeper','black shorts','school tights','cubic','womens jewellery','orange bag','botanical','orange dress','pjamas','pashmina','lace leggings','going out dresses','sat nav','platform shoes','womens watch','flat shoes','bustier','navy cardigan','school jumpers','xbox 360','footless tights','bunting','black jumper','dig dig digger','yellow dress','butterfly top','lunchbag','t bar shoes','tatty teddy pyjamas','mats','ruffle top','fleece top','baby vests','addidas trainers','mens belts','cycle shorts','changing mat','mens black shoes','grey jeans','black rugs','telephone table','levi jeans','black denim leggings','skirt suit','monkey','skechers','camisole tops','recycling','jeggins','puma trainers','trim tunic','killah','butterfly buttons','loose fit jeans','plants','leather beanbag','sequin dress','black handbag','ladies vest','braces','tiger','casual trousers','games','porto chair','black vest','black tights','bow','womens checked shirts','white','car seat','black sandals','faux fur throw','coasters','opus furniture','cuff links','gas fires','tutu','ruffle dress','knee high socks','corner','bright','baby socks','follow your dreams','navy curtains','ladies belts','white shorts','tall dresses','dc','womens fleece','beauty','black cushions','double duvet','cord trousers','adidas joggers','element','xxxl mens','suit jacket','digger bed','tilson gloss','ed hardy','sports socks','hair dryer','rash vest','hampshire','kickers boots','baby bouncer','ladies nightwear','natural rugs','stand','navy top','fly','corner shelves','gladiator','puppytooth','printer','utility trousers','black bra','ladies waistcoat','shower caddy','silver jewellery','towelling','pimlico','bathroom bins','ladies knitwear','nintendo','green bedding','ps3 console','cosmetics','flooring','fabric chairs','rain coat','mens leather jackets','white skinny jeans','digital photo frame','cravat','phil and teds','boyfriend cardigan','shade','dualit','memory foam','halterneck','long sleeved bodysuits','white bedding','pleated blouse','womens white trousers','reebok','purple bag','money box','nautical jacket','ben ten','england shirt','black ladies shoes','womens dressing gowns','red shirt','toulouse','school socks','nightie','ceramic letters','leopard','module','baby toys','cream top','bed linen','spot','coat hooks','cherry','2 pack bras','brown boots','summer','stroller','womens denim shirt','baby bath','mirrored table','skinny trousers','sparkle rug','next perfume','swim','grey tights','perfume gift sets','grey jersey dress','dream','parka coats','messenger bag','tweed','stickers','dkny','printed tunic','quilt','green bag','slipper socks','teal lamp','ladies tunic tops','pac a mac','womens wellies','black and white','purple dress','hamleys toys','austin','flare','ladies scarves','ladies converse','mens ties','all star','beanie','cat','mens black jeans','corner desk','gracie bed','blue shirt','black boot cut trousers','over door hooks','t shirt bra','bay window kit','hair straighteners','t-bar sandals','trolley case','white skirt','pink bedding','mens linen suits','rug grip','football curtains','grey bag','bed valance','white shoes','next the fragrance','zebra bag','stitch boots','32f','three compartment bag','anchor','womens blazer','girl\'s boots','seconda pelle tops','plate sets','junior bed set','george pig','girl\'s coats','t bar sandals','brown leggings','womens scarves','fire bowl','teal throw','military','diamante','bandeau','superman','sleepbag','fruit bowl','italia','plinth','pajamas','mens gloves','dish drainer','camisole','twig lights','mens chinos','black trainers','double headboards','mens sandals','non wired bra','ipod nano','red skirt','womans shorts','bookends','v neck','silver curtains','ladies cargo trousers','taffeta','black and white top','ladies white tops','leather handbags','wall plaques','monaco','tops 14','base layer','i pod','small sideboard','slouch','black socks','hetty','gold sandals','shirt jumper','womens sunglasses','animal print dress','hold backs','orange cushions','black trousers petite','balls','bride','single headboards','pillow protector','duffle','womans suits','navy suit','duckboard','shower','babydoll','ladies navy trousers','machine washable suit','teddies','petite maxi dress','linen top','collage frame','sara','double duvet sets','harrington','eyelet','jean leggings','tab top','blanket','hamleys','maxi skirt','shawl','samsung','kids storage','mens fleece','childrens wardrobe','running','floral trim tunic','ladies black dress','brown curtains','cot mattress','high waist','leotard','vacuum','mens black shirt','white blouse','polo tops','slub','ladies dressing gowns','chloe furniture','floating shelves','ladies check shirt','tailoring','prints','extending dining table','bumper','canvas shoes','bootcut','canopy','blanket box','twigs','white long sleeve top','beanie hat','womens hats','fur throw','ballerina pumps','wallpaper borders','boyfriend','rugby','nintendo dsi','dinner plates','oak sideboard','unisex','pink shirt','soul of africa','floral skirt','32e','grey cable insert tunic','womens petite','mac coat','womans coats','psp','petite linen trousers','chenille rug','mens fragrance','green tunic','outfit','tan boots','footbed','womens white tops','brown','school cardigan','cuff','ladies skinny jeans','women long sleeve tops','teal table runner','silk','ray ban','purple blouse','black tie','grey skirt','super king duvet','bedside','orchid','hallway','berber rugs','black belt','black vest top','jewellry box','swaddle','diamante shoes','indigo slouch trousers','school bags','ski gloves','travel systems','baby walker','leopard print bag','biker jeans','petite leggings','purple maxi dress','cream','hats and scarfs','ladies black jeans','ladies black boots','rain mac','crew neck cardigan','duvet king','midi sleeper','gingham shirt','womens tights','control leggings','grey hoody','loungewear','bootcut trousers','womens mac','ladies scarf','salopettes','ohio','black mac','mens bags','plum lamp','womens black dress','tuscany','fleece hoody','ladies bootcut jeans','mens short sleeve shirt','cot sheets','culottes','plum cushions','brown rugs','cuff hem jeans','womans jeans','mens scarfs','stirrup leggings','rugby top','cream cardigan','bathroom shelves','pewter shoes','grey jacket','cream curtains','high sleeper','pan set','hepburn','red table runner','formal vest','faux fur cushions','shirt layer knit dress','pink bag','little digger','define','baby monitor','grey boots','floral print top','ladies tights','white wardrobes','long skirt','bouncer','school shorts','jersey top','boat shoes','womens blouses','ballet tights','platform','tv bracket','navy leggings','womens boyfriend jeans','wall decoration','black ruched treggings','animal print shoes','white slim fit shirt','superdry coat','3 pack','electric fireplace','ski jacket','womens black boots','jars','shower rail','red throw','34e','ladies denim shirt','canvases','black cropped trousers','digital camera','cream microwave','light switch','cot quilt','scoop neck top','handkerchiefs','crew neck top','mens white linen trousers','cake','three quarter length shorts','lace dress','black t shirt','union jack rug','casual jackets','monokini','coffee maker','colour block dress','ladies hats','i phone','womens black cardigan','straighteners','belted jeans','brown cushions','denim dungarees','poloshirt','womans hoodies','linen jacket','fringe dress','butterfly bag','mens bootcut jeans','blue trousers','grandad','black heels','white furniture','womens tshirt','three pack','long sleeve','eyelet curtain pole','hunter wellingtons','black lace top','zip through','womens sportswear','cross trainer','coffee trunk','coral','dsi','black print trim tunic','ladies sunglasses','door hooks','bedstead single','cuff jeans','ladies maxi dresses','towel rack','radio','square pillow cases','fly boots','green throw','nails','cream dress','sculpture','storage units','latino','mesh dress','suede pull on boots','maternity pyjamas','oak shelves','occasion women','ladies long sleeve tops','red kitchen','cagoule','blue cardigan','ladies black cardigan','print embellished tunic','jeffery west','shirt and tie sets','richmond','womens leggins','corner unit','i am 1','fringe','small sofa','mongolian wool cushion','mother and baby','flat cap','christening shoes','ergo jeans','moleskin jacket','brown bag','xbox','round table','oak table','pedal bin','draining board','roman','black jeggings','camcorder','console bookcase','scarf top','ellie bed','settee','travel cot','brown shoes','white vest top','mittens','womens linen','patchwork','ladies black jackets','mens linen shirts','stripe shirt','loose fit vest','paradise perfume','corner pleat valance','sweater dress','white cropped trousers','hair','western boots','womens black jacket','replay jeans','print top','fabric','ceramic balls','cd','roma','rose top','cream kettle','stripe knitted dress','womens grey trousers','boat print','bed guard','screen','ds games','knife block','woven baskets','waspie','essentials','longline shirt','32g','food processor','womens scarf','casual tops','brown trousers','tan','hi rise','green lamp','python','glass shelf','giraffe','chenille cushion','oxford pillowcase','girl\'s socks','red bra','flat boots','peep toe','thomas','simpsons','petite skinny jeans','slim jeans','words','module furniture','black ruffle dress','chatres','cuff shoes','pink chair','control','utility shorts','22','floral shorts','ruched treggings','vera wang','babyliss','zip dress','floor cushions','playstation 3','white linen dress','iron maiden','laptop table','torino','string lights','bustier tops','media storage','biker','underbed drawers','full circle','dressing up','haynes','dsi console','metal beds','trapper hat','black and white shoes','long sleeve crew neck top','sequin bag','fly london','ripped jeans','daisy','pots','smock','broderie top','extending table','high school musical','ladies combats','cardi','l shelves','scoop top','black leggins','smock top','silver print dress','v neck sweater','skull','aviator','bedlinen','timmy time','womens jumpsuit','silver dress','hosiery','baby cardigan','arena chair','evening bags','timberland men','cot bed mattress','black long sleeve top','plum rug','notebook laptop','crib','single valance','over the knee socks','childrens bookcase','womens red tops','black ankle boots','stripe jacket','long sleeve seamed shirt','sports','shinto curtains','silver bracelet','boyfit jeans','black ballerina','boat','makeup','maternity tights','ladies swimming costume','white desk','ds','black wide leg trousers','34g','toy storage','school dress','black skinny trousers','lunch bag','plaque','white jacket','childrens duvet covers','fantasie','liverpool','grey rug','black bootcut trousers','stripe cushion','ladies blouses','black mirror','lego','bomber jacket','ladies briefs','rattan','glass jar','bunk','womans shirts','red boots','bread','onion bag','hall storage','light fittings','tatty','butterfly clock','cake tins','white gloss','34f','dolls','black converse','snake','ladies knickers','black throw','airer','stripe towel','pyramid tote bag','red runner','tree','childrens bed linen','wood flooring','weighing scales','oven','desk lamp','slow cooker','black flat shoes','petite skirts','opus mirror','cabin bag','red tea dress','tea','dvd player','single sheets','door','grey curtains','green wallpaper','poppy cushion','ladies white trousers','all in one coats','red microwave','womans trainers','hooded top','stamford','ladies red tops','knives','mens linen','sweat','chloe','hampstead','ladies cropped trousers','black joggers','satin','navy joggers','ski socks','denim trousers','red tunic','quicksilver','womans trousers','teal canvas','womans boots','bedroom stools','grey treggings','crinkle cushion','stud','ladies superdry','sonoma','glass vase','black wallpaper','womens summer tops','red vase','self tan','childrens shelves','mens tshirts','mr men','womens flip flops','black suede boots','ps3 games','jeans style trousers','amelia bedstead','case','jersey trousers','henleys','green vase','capri','tea dress','layered top','chenille','gingham','womans shoes','play mat','ruffle cushion','rio','push up bra','single wardrobe','black wedges','suit carrier','salt and pepper','charm','size 22','black dot dress','vanity unit','coffee machine');
/* $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);
    }