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