/* Popular phrases - MAINLINEMENSWEAR - 5:37:35, Sun Aug 1, 2010 */
var asPhrases=new Array ('t shirts','jeans','footwear','jackets','shirts','jumpers','accessories','shorts','polo shirts','belt','flip flops','watches','trainers','caps','lyle and scott shoes','wallet','swim shorts','sunglasses','shirt long sleeve','shoes','cardigan','short sleeve shirts','lyle and scott','underwear','g star shorts','lacoste flip flops','lyle and scott polo shirts','ralph lauren','hoodie','vest','g star','lyle and scott jumper','stone island','polo','adidas originals','g star jeans','henleys','lacoste','g star boots','lyle and scott trainers','g star elwood','ralph lauren polo shirt','leather jacket','luke polo','lyle and scott cardigan','affliction','fred perry','trousers','evisu','diesel jeans','diesel','adidas','lacoste trainers','penguin','armani','g star polo','g star belt','ringspun','plimsolls','fred perry polo shirt','diesel belt','combat','black shirt','bag','boxers','paul smith','polo ralph lauren polo shirts','lyle and scott jackets','boat shoes','beanie','vivienne westwood','hugo boss','armani t shirt','scarf','deck shoes','g star vests','sandals','ed hardy','lyle scott shorts','socks','g star cap','penguin polo shirts','paul smith jeans','chinos','boots','boss cap','hats','g-star','cruyff','blazer','hugo boss green','swim','voi polo','zip tops','v neck t shirt','levis','coats','armani vest','divine trash','armani boxers','xxxl','lacoste polo','jeans 34w','hooded top','g star hooded','g-star shoes','suits','nicholas deakins','fila','cruyff trainers','gloves','adidas originals t-shirts','brown belt','henleys t shirt','armani flip flops','timberland boots','henri lloyd','humor','henleys jeans','vivienne westwood shirt','levis 501 jeans','lacoste polo shirts','fila vintage','luke','g star tapered','affliction t shirt','k swiss','linen trousers','combat trousers','drunknmunky t shirts','d and g t shirt','white belt','track top','original penguin','g star radar low loose jeans','gio goi t shirts','d&g','bench','paul smith zebra','plimsoles','baseball caps','stone island jacket','lacoste marcel','hackett','white shirt','original penguin earl polo t shirt','havaianas','black cardigan','denim jacket','gio goi','henleys plimsolls','henri lloyd jacket','long sleeve t shirts','diesel polo shirts','belstaff','purple','boss polo shirt','check shirt','38w','black lacoste trainers','adidas plimsole','lyle and scott hoodies','g-star t shirts','g star jumpers','g star tapered jeans','bulzeye','black jeans','white trainers','voi','g star arc jeans','fly 53','denim shirt','two stoned','hugo boss cap','lyle and scott plimsolls','boot cut jeans','hugo boss polo','lyle and scott polo blue','armani jeans','hugo boss trainers','hugo boss jeans','timberland','adidas t shirt','t-shirts','white lacoste trainers','jeans 38w 32l','k-swiss','boss green paddy t','fred perry sandals','cargo shorts','hugo boss polo shirts','white t shirts','zanerobe','luke 1977','ucla','black t shirt','black lacoste','hugo boss t shirt','puma','lyle and scott v neck','toy watch','scotch and soda','calvin klein','lacoste canvas','adidas jumpers','franklin marshall','hugo boss paddy','cords','lacoste protect','boss','westwood','lyle and scott trousers','baracuta','jean shorts','evisu jeans','j lindeberg','lyle and scott small','boxer shorts','penguin flip flops','underwear pack','g star raw shorts','pringle','k swiss trainers','adidas plimsolls','cruyff classics','zathan','black trainers','g star jackets','tracksuit','ralph lauren navy','nanny state','zanerobe t shirt','ralph lauren polo','armani shirts','radar','ralph lauren shorts','england','denim shorts','ted baker socks','vivienne westwood t shirt','g star manny t shirt','g star t shirts','spain','full circle','penguin earl','baracuta g9 harrington jacket','kappa','beckenbauer','polo t shirt','diesel shoes','victorinox','boxershorts','twin pack','trainers shoes','g star cargo','v neck jumper black','lyle and scott jumper black','earl','linen shirt','hoody zip','blue blood','fred perry shoes','adidas trainers','fred perry flip flops','luke 1977 jackets','lindeberg','jeans 36w 34l','gabicci polo','timberland boat shoes','ma strum','two stoned t shirt','lyle and scott vintage','luke shorts','tracksuit bottoms','tapered jeans','hugo boss belts','40w jeans','xxxl shirts','lyle and scott polo','ralph','blue polo','adidas flip flops','white','puma roma','firetrap jeans','bamboo','adidas jacket','g star medium','tank top','joggers','armani j21','fake london','plimsoll trainers','two stoned shirt','sweatshirts','black polo shirts','armani swimming shorts','armani belt','jeans 36w','henri lloyd jeans','beanie hat','tops','hooded','belstaff jackets','puma roma 68','lyle and scott blazer','g star boxershorts','levis 512','levis 511 jeans','g star check','chino shorts','v neck jumper','luke shirt','ted baker','ray ban','paul smith shorts','diesel watches','cargo trousers','t-shirt','g star shirts','36w 34l','navy polo','grey hood','exposure','hugo boss spain','voi iron','nicholas deakins boots','cargo','harrington','goliath','stone island polo','avant','old glory','g star jeans 3301','diesel larke','firetrap','vivienne westwood jeans','drunknmunky','carrera sunglasses','aertex','black leather jacket','g star rovic','scarves','hugo boss shirt','evisu t-shirt','leather','hugo boss shoes','lyle and scott shirts','ralph lauren jumper','flops','knitwear','ralph lauren cap','cast iron','diesel wallet','white long sleeve shirt','khaki','diesel larkee','junkfood','g star raw manny t shirt','4xl','d g','long sleeve polo shirts','diesel zathan jeans','1 2 zip jumper','kasabian','voi jeans','lyle and scott boat','lyle and scott plimsoll trainers','xxl','one more round','vivien westwood','adidas track top','g star raw jumper','fred perry kingston','g star raw jeans','harrington jacket','nicholas deakins shoes','key ring','high tops','gilet','paul smith wallet','hooded jumper','paul smith shirts','d&g jeans','penguin shirts','gabicci','track','belstaff rallymaster','stone island jeans','amplified','ted baker shirt','prada sunglasses','blade','jeans 30w 32l','emporio armani flip flops','long shirt','diesel t shirts','jogging bottoms','long sleeve','ralph lauren shirt','larkee','navy shorts','orange','armani underwear','black trousers','jean regular','3301','diesel t shirts white','lacoste albany trainers blue','firetrap zephyr','oakley','brown','stone roses','g star v neck','hugo boss black','black g star jacket','stone island jumpers','small','henri lloyd polo shirt','pants','henri lloyd shorts','voi kruger','voi irwin','g star white','christian audigier','original penguin polo','diesel jackets','divine','scotch','keyring','adidas originals adi sun flip flops','boxfresh shoes','hugo boss shorts','armani medium','slim jeans','denim','medium armani v neck','boxfresh jacket','windbreaker','jean jacket','penguin t shirt','lacoste marcel twist','franklin marshall medium','white g star belt','ian brown','yellow polo','adidas originals polo','henleys shoes','purple polo','slim','zip jacket','ucla jumpers','elwood','chunk','hugo boss plimsoles','lyle and scott swim shorts','ralph lauren slim','luke t shirts','cuff jeans','hugo boss flip flops','lacoste shirts','turtle neck jumper','lyle and scott t shirts','d&g trainers','city shorts','stone','small t shirts','hooded shirt','penguin jack','adidas watches','two stoned polo','ed hardy polo','mens jeans','black','black polo t shirt','humor jeans','ralph lauren swim shorts','diesel shorts','paul smith polo','adidas europa','lyle and scott footwear','diesel trousers','hooded jacket','bracelet','rayban','lyle and scott blue polo shirt','luke cardigan','g star polo t shirt','class','brown hat','canvas shoes','navy t shirt','bench jeans','fred perry polo','puma trainers','lyle and scott swim','g star grey','affliction polo','x small','ted baker cap','diesel jumpers','armani jackets','knitted polo t shirt','lacoste swimming shorts','radar straight','lacoste jumpers','waistcoat','pink','world cup','adidas adi sun flip flops','hugo boss orange jeans','g star raw','firetrap tricol','g star coats','robe','fred perry trainers','boss polo','adidas originals flip flops','armani j25 jeans','swimshorts','puma 917','blue t shirt','lyle and scott polo t shirt','terrinda','lacoste albany','marcel','ted baker wallet','boxfresh','franklin','grey polo','original penguin shoes','white polo','g star storm','superga','trousers beige','radar low','jeans 38w','sweat pants','loose jeans','5620','breddox','voi hunter jacket','firetrap jackets','white polo shirt','fila jackets','penguin polo','fred perry coxson','cap ralph','hugo','structor','30w 32l','voi shorts','lyle and scott green','bateau','black belt','ray ban sunglasses','flip','red polo','lacoste footwear','ted baker comport','penguin blue t shirts','coats and jackets','jeans 32w','fred perry plimsols','kingston','bottoms','36 30','lacoste t shirts','lyle and scott blue','ralph scarf','jeans 32w 34l','polo neck','calvin klein boxers','levis jeans','emporio armani','lyle and scott deck shoe','grey lyle and scott jumpers','d&g underwear t shirt','ralph lauren slim fit polo','lacoste orange','orange polo','j lindeberg polo','white lyle scott polo','g star raw polo','slim fit','armani twin pack','g star t-shirts','adidas windbreaker','adidas originals track top','luke trainers','luke leg jeans','penguin plimsolls','electric blue','timberland euro sprint','ucla hoodie','henri lloyd belt','lyle and scott harrington','cruyff recopa classic trainers silver','grey t shirt','xxxl t shirts','vivienne','lyle and scott vintage jumper','evisu shirts','lyle and scott crew neck shirt','pringle polo','ralph jackets','g star manny','fila vintage polo','gabicci jumpers','ralph lauren hoody','g star green','fred perry polo t shirt','jeans 32w 32l','tank jumper','havaianas world cup','ralph lauren t shirts','lacoste boat shoes','g star viper','penguin shoes','ralph lauren slim fit','duffle jacket','hugo boss cardigan','lyle and scott polo shirts green','track suit','borg','lyle and scott jumper navy','lyle and scott canvas','amsterdam','loose fit','paul smith printed logo','adidas originals hooded f jumper','jumper medium','luke footwear','40','kurt cobain','armani v neck jumpers','lyle and scott shell jacket black','hugo boss jackets','green polo','linen','exchange','firetrap t shirt','henleys inked','black v neck sweater','quney','black jumper','hugo boss jumpers','parka','spezial','firetrap shirt','moulton','penguin trainers','adidas samba','grandad','long sleeve polo','carrera','36w 30l','paul smith t shirt','gio goi polo shirts','g star purple','italy','track bottoms','pepe lux','blue jeans','flip flips','firetrap wallet','lyle and scott polo shirts white','large polo','tie','duffle','xxxl polo shirts','crew neck t shirt','aslan','voi black jumpers','rhianna','lyle and scott polo t shirt marathon green','puma alexander mcqueen','para pocket','8','western','luke roper','white t-shirt','white hoody','ralph lauren beanie','orange lyle and scott','k swiss 10','lacoste shoes','golf','henleys shorts','ucla cap','lacoste avant','lyle and scott polo t shirt grey','germany','luke phil','hackett shorts','lyle and scott shell','v neck','armani underwear t shirt black','saider','briefs','g star storm 5620 loose post embro jeans','evisu jumper','wash','marshall','ucla shorts','hope and glory','ralph hoody','g star blue','yellow','polo stripe','jeans 28w','levi t shirts','jeans 38w 36l','lyle tipped','alexander mcqueen','tipped','36w 36l','levis shirts','black shoes','purple v neck jumper','green t shirt','multi pocket','stone island hooded jumper','henleys barn dark wash jeans','lyle and scott navy blue','g star raff','henleys fincher','tomginger','g star loose heritage','diesel boots','adidas beckenbauer trainers','franklin marshall reversible wet look jacket','dark wash','green lyle and scott jumper','d&g underwear','lyle and scott smart','jeans 34w 34l','lyle and scott white plimsolls','ted baker flip flops','g-star scuba 5620 loose jeans','ted baker t shirt','wash bag','adidas sl 72','ruky','lacoste marcel spm','plough','lyle cardigan','tapered','green jacket','g star tops','lyle and scott polo t shirt white','hugo boss scarves','adidas spezial','3 4 trousers','ratner jacket','henleys polo','1 shirt','puma g','firebird','holland','linen shorts','polo neck jumper','luke jumpers','boss flip flops','k swiss newport','dmc','cord trousers','zebra','512','timberland shoes','ruger straight','g star grey shirts','turquoise','adidas trefoil hoodie','vivienne westwood suit','two stoned jumper','brown lacoste','hugo boss sandals','long sleeved polo t shirt','sky blue shirt','avant garde','lacoste tourelle','shorts 38','sportsman','g star raw t shirt','kayak','stripes','serger','lyle and scott deck','cargo pants','lyle and scott plimsols','diesel trainers','lacoste t shirt red','diesel shirt','luke shower','g star t','black jackets','toy','penguin sam','new york','g star black','k swiss moulton','jeans orange','washbag','armani polo','diesel t-shirt','cricket','gio gio','hooded sweatshirt','henleys jackets','luke 1977 polo','two stoned shorts','we are replay','g star raw 3301','v-neck','ralph lauren v neck jumper','earrings','ralph lauren trousers','crew neck t-shirt white','paul smith socks','evisu polo shirt','dark jeans','bennie','k-swiss lozan','plum','terry','lacoste high tops','long sleeve t','voi polo shirts','white linen shirts','jeans 36w 30l','511','lacoste shorts','fred perry jacket','gio goi jacket','christian','80s casuals','black short sleeved shirt','3 4','armani cap','denim jeans','pringle jumpers','ted baker polo','lyle and scott t-shirt','diesel krooley jeans','hopkins','paddy','ted baker belt','white ralph lauren','boss orange','grey lyle and scott polo','lyle and scott pink jumpers','g star raw shirts','deck','g-star raw','cream shirt','hannibal','adidas originals t shirt','longstone','armani socks','roll neck','boss green','black leather belt','jack polo','combat pants','luke 1977 yellow','luke 1977 black','fly','lyle scott canvas pump','stone island cardigan','pendant','lyle and scott black deck shoes','checked hooded shirt','trail','green','lacoste polo white','jeans 34w 32l','black hooded top','arc loose','skimmer','blue shirt','ralph lauren england','t','diesel sunglasses','trefoil','armani t shirt black','comfort fit','arc','gio goi duble jeans live wash','bench ansel jersey shorts charcoal grey','38 jeans','large jacket','flannel','lacoste observe 3','merino','crestwood','white trousers','melt','g star target','twin','puma g vilas','black swim shorts','blazer jackets','gio goi testament','humor santiago','grey shirt','black g star shirts','canvas','g-star jeans','lyle and scott heritage','full zip','g star marshall shirt','lyle and scott y neck t shirt','d&g belt','ucla t shirt','penguin red t shirt','lyle and scott white','lyle and scott grandad','lyle and scott plimsoll trainers white','yellow t shirt','adidas original jackets','armani shorts','adidas world cup','lyle and scott grey','forcano','slim fit polo shirts','jeans 32 32','ralph lauren zip','diesel industry zathan 0082b jeans','hugo boss vest','crew neck jumper lyle','d and g shirts','twilight','lacoste navy t shirt','correct','tank','baracuta jacket','g star red','lyle and scott polo pink','cream','lyle and scott multi','vivienne westwood jewellery','lyle and scott heritage polo','half zip','gingham','d and g jeans','daddy','pink lyle and scott','lauren polo','larkee 008b2','diesel lexis','shawl neck','g-star raw jeans','diesel personnel','boss spain','lacoste shirt white','armani logo t shirt','penguin t shirts green','lyle and scott scarf','fred perry t shirts','paul smith jumper','grey cardigan','gio goi jeans','lyle and scott polo yellow','lyle and scott tank top','evisu backpack','henri lloyd shirt','santiago','puma mcqueen','lyle and scott purple','classic fit jeans','diesel leather jacket','t shirt xxl','ted baker underwear','ralph lauren sports caps','k swiss moulton trainers','fred perry large','henleys belt','d and g trainers','paul smith bags','d g belt','g-star shorts','henri lloyd flip flops','leather plimsolls','hugo boss hats','lacoste futur','lyle and scott twill trousers','fred perry slim','boss shoes','barely pink penguin','yellow jacket','puma t shirt','scuba 5620 loose','g star strike shirt','k swiss skimmer','adi 3 stripe','ser','green jeans','d and g sunglasses','pink shorts','knitted polo','original penguin jack','tyll','lyle and scott purple polo','bucket','g-star raw storm jeans','white short sleeve shirt','trench','g star raw shoes','gabicci t shirt','fila gold','henri lloyd cap','lauren','armani underwear t shirt','red shirt','loose','viper','penguin earl polo shirt','g star arc loose tapered jeans raw','gio goi hoody','crew neck jumper','lady gaga','gold','fred perry duke','diesel boxer shorts','samovar','paul smith cargo shorts','ted baker labtoof white','g star navy','cassette','g star trainers','kentucky','suede','goggle','d&g polo','cream linen trousers','fred','lyle and scott cardigan navy','pascii','tee shirts','firetrap harrass','loose fit jeans','trucker','ralph lauren black','ralph lauren sunglasses','henleys hoody','lyle and scott city shorts','lyle shorts','firetrap tricol canvas','ralph lauren cardigan','d&g t shirt','firetrap editor','ted','g star elwood raff','firetrap trainers','original penguin bennie trainers white','evisu hats','wetlook','cast iron t shirts','small armani','world cup cap','k swiss 9','lacoste purple','hugo boss socks','germany polo','paul smith jacket','g star army radar','krall','levis 501','adidas originals spezial','blue','fila t shirt','skull','adidas firebird','armani sunglasses','red lyle and scott','navy jacket','g-star raw 3301','hackett cap','firetrap marti','voi swimming','lee','g-star radar','marti','firetrap zappa','vivienne westwood shirt black','texas','rolling stones','california','bomber polo','stone island full zip','voi nemesis','hugo boss green saggy full zip jumper','g star trousers','saltire blue','cardigan navy','g star trail','backpack','gio goi rester','red evisu','diesel pantas combats','adidas leather','basic','g star long sleeved','black zip jumper','shoreline','pineapple','voi bottoms','armani v neck t shirt','paul smith t','enzo','paul smith belt','ralph lauren classic fit polo shirt','hugo boss south africa','slim fit polo','observe','fleece','diesel b patch belt','provence','fred perry jumpers','ralph lauren hat','ratner','v t shirt','lyle and scott grey cardigan','trefoil hoodie','fred perry v neck','bayham','fire elwood','lyle and scott shell jacket','polo t shirt lacoste','white cardigan','franklin marshall tracksuit','diesel ruky jeans','30w 30l','korbin','firetrap polo shirts','armani crew neck boxed t shirt black','aaron','armani crew neck','diesel hoodies','tartan','sulphur','industry','white v neck','diesel polo t shirts white','long sleeve t-shirt','yellow trainers','goggle jacket','fred perry shirt','scuba','ted baker fulhaws polo t shirt black','red lyle and scott polo','lacoste carnaby cls pf spm leather','milan','waffle','pink shirt','quilted jacket','ralph lauren long sleeved polo shirt','round neck jumper','lacoste carnaby','armani jumpers','cream top','lyle and scott polo navy','ralph lauren classic fit','lacoste observe','lyle and scott black jacket','g star raw cardigan','lyle and scott shell ivory','liverpool','d&g flip flops','affliction jumpers','light blue jeans','lyle and scott button jumpers','cruyff classics recopa trainers','henri lloyd jumper','flurry','levi 511','squam','nostalgia','paul smith polo shirt','diesel polo','luke 1977 dinner jacket','luke lesson','arc jeans','leather belt','ralph lauren polo t shirt','electric blue lyle and scott','black v-neck','adidas cap','d&g shirt','g-star marshall','hugo boss orange colombiae','vexlar','grey jeans','short sleeve','carnaby','voi jumpers','44 waist','scout','henleys griflet polo','g star army','wool jackets','g star marshall','henleys black jumper','g star general','jackson','white vest','hellraiser','timmen','evisu genes','diesel copper','g star beanie','diesel zathan','g-star shirt','canterbury','quilted','g-star boots','skaz','lyle and scott heritage t shirts','black g star raw','observe 3','40w','lyle and scott bomber t shirt','newstem','paul smith cardigan','adidas originals polo t shirt','lyle and scott jeans','mervin','henleys plimsoles','newport','diesel leather','adidas originals trefoil hoody','henleys bowden plimsolls','k swiss lozan','dj','36 jeans','fred perry swim shorts','trefoil t shirt','seldom','luke 1977 beige','lacoste europa strap','ramones','g-star core','firetrap rainbow','alcatraz','ralph lauren shirt red','armani jeans jacket','newi','diesel zama','camden','trilby','g star 5620 heritage','munsingwear','gio-goi','mid','ralph lauren pink shirt','hugo boss hooded jumper','henleys gummed polo t shirt black','boss socks','military style','ralph lauren underwear','paul smith navy polo','lyle and scott jersey blazer navy','lyle and scott striped polo','champion','platoon','j lindeberg belt','paul smith world','henleys t-shirts','cast','g-star red','g star leather jacket','navy jumpers','lacoste cherif','diesel krooley','g-star storm','lacoste crocodile','stone island t','ralph sunglasses','adidas leather jacket','doog','rallymaster','casual','patrico','two stoned jacket','jeans 34w 36l','boss jackets','gabicci duffle','coder','black polo','lacoste camden trainers','armani sandals','purple jumper','lacoste red','ralph lauren orange','v jumper','diesel combats','real madrid','black lyle scott polo','lyle and scott polo t shirt saltire blue','501','litchfield','ralph slim','adidas three stripe','small shirts','polo slim','henri','armani t-shirt','lyle and scott v neck jumper','smart trousers','marathon green','luke 1977 purple','matchday','neon','t.shirts','firebird track top','0088z','nylon jacket','lauren shorts','diesel t dedo rs','brown t shirt','luke dangermouse','blue hoodie','adidas originals pd harrington jacket','zama','g star frisco','sazonar','lacoste marcel canvas trainers white','small polo shirts','g.star','fluo','penguin jacket','boss orange t shirts','ralph lauren windbreaker jacket deckwash','g.star jeans','henri lloyd canterbury 1 2 zip silver','boss t shirt','polo t shirt boss','fila red','frisco','jeans 31w','boss jeans','adidas originals france','france','raff','lyle and scott shawl neck cardigan','smart polo','fujiwara','thatcher','grey shoes','yellow t-shirts','lyle and scott buttoned cardigan','g star raw storm 5620 loose front print jeans','button down','ralph lauren world cup','orange t shirt','viker','lyle and scott striped polo t shirt blue','lyle and scott smart polo','eskie','medium lyle and scott','black combats','cardigan small','bowden','zx','shogun','lennox','adidas originals sport trefoil hooded jumper','sawtooth','polo t','80s','run away','england polo','duffle coat','ortai','garber','gsp','eton','lacoste crocodile polo','gio goi shirt','ma.strum','casual trousers','smart','aviator','hajo','full circle shirt','hooded f','black v neck','klein','trash','ralph lauren socks','beige','hackett polo','j25','ralph lauren spain','g-star elwood loose fit jeans','henleys scorton jumper','ralph lauren polo t shirt red reef','luke 1977 sellick y neck t shirt','dusty','ralph lauren polo t shirt white','penguin daddy','canary','adidas argentina','scott','henri lloyd socks','midnight twill','hugo boss comfort fit jeans','lacoste europa spm trainers white','navy sweatshirt','glamour','9','lyle and scott polo shirts gala pink','xl polo shirts','yellow t-shirt','hugo boss wallet','fred perry shorts','fred perry country','ralph lauren full zip','puma match','t blend','black plimsoles','grey shorts','diesel t','g-star storm 5620','lyle and scott vintage jacket peat','ted baker lasso beanie black','lyle and scott v-neck','england world cup','g star arc','stone island cap','tedd','midnight','g star serger','adida original firebird','faux','lyle&scott shorts','armani large logo t shirt navy','katun','harrington g9','two stoned t-shirt','original penguin polo shirt','white ralph lauren t shirt','hugo boss baseball','hugo boss green patriece polo t shirt blue','adidas spain','g star 3301','tennis','lyle and scott crew neck','armani beanie hats','lyle and scott smart polo blue','pirate','monogram','nicholas deakins junction','hugo boss england','adidas originals hooded','g-star t-shirt','lemon','raw','lyle and scott saltire','jeans 34w 30l','armani jeans j70 smart black jeans','adidas originals germany','armani j31 jeans straight leg jeans','ruby','hiresh','sunrise','ralph lauren combat','ed','g star raw sunrise','adidas originals watches','paul smith scarves','starpiny','yellow shirt','graduate','g9','ralph lauren newport','armani v neck','g star fire elwood jeans','adidas originals shoes','alanzo','hb31','lyle and scott tipped polo','original penguin shorts','adidas hood','adidas original jumper','diamond jeans','red underwear','firetrap jaws','slim tailor','munky','henleys droylsden','brown jumper','ribbed','robe di kappa','white ralph lauren polos','lyle and scott polo shirts purple','lyle and scott shoes white','pique polo shirts','gio goi t-shirts','black coats','hugo boss paddy england','navy deck shoes','franklin marshall franklin marshall','g star t-shirt','lyle and scott y neck shirts','recopa','gio goi belts','webbing belt','ralph shorts','g star radar','twist','diesel pedant','troy','ralph lauren cardigan black','east','ralph lauren green','ralph lauren polo shirt slim fit','marine','ralph lauren long sleeved polo t shirt','lyle and scott courier bag','lacoste swim','boss shirts','lyle and scott crew neck t shirt saltire blue','lyle and scott navy','hugo boss orange hb120 jeans','lindeberg cardigan','brown lacoste trainers','zx tech','g star flip flops','cardigan blue','hugo boss green england paddy flag t shirt','polo world cup','white t-shirts','lyle and scott v neck cardigan black','san ramon','cup','tonic','ralph lauren polo shirt custom fit','flower','lyle scott charcoal','luke red lion polo','g star raw belts','g star swim shorts','recycled','two stoned a wak','biker','elgin','g star campus','sellick','penguin jumper','wayfarer','amplified off white','splash','firetrap polo','gio goi t-shirt','grey polo shirt','stone island yellow','armani jeans jumper','lacoste pink t shirt','ray','g star twin pack','red and white','black lyle scott','10','grey lyle and scott plimsoll','adidas shirts','polo jackets','henri jacket','brown jacket','ralph lauren crew','boss jeans texas','white crew neck','boss green paddy','brown shirt','lacoste red crocodile polo t shirt','body','13','v neck beige jumper','ralph lauren purple','armani long sleeve','sailing','lyle and scott shawl neck','blood','lacoste observe 2 s et spm trainers','g star ricky','brown ralph lauren','lyle and scott black polo shirts','paul smith zebra printed logo t shirt','black ralph lauren polo','lyle and scott polo t shirt grey marl','g star face','lyle and scott tipped','dexter','g star bens t shirt pool blue','diesel pants','g star station','g star fire elwood','safari jacket','lyle scott neck','blue belt','pink ralph lauren','green jumper','lacoste futur od trainers','high collar shirt','lyle scott air','j21','two stoned check out shorts blue','small jackets','purple boxers','bette davis t shirt','vivienne westwood polo t shirt white','penguin windbreaker','lyle and scott polo t shirt perspex green','g-star elwood storm','vivien','belt kender','black long sleeved','spo','lyle and scott polo t shirt shot grey','straight 30w 32l','ralph lauren boxers','blue trainers','lyle and scott crew jumper','scott polo t shirt','ralph lauren crew neck t shirt','lacoste cour','arkansas','lyle and scott tartan','two stoned joggers','boss underwear','g-star organic','g star raw austin board swimming shorts','packs','boss trousers','straight','reese','henleys aslan','diesel pifried shorts','diesel industry zathan 008zt jeans','g-star prime','armani boxer shorts blue','lyle and scott v neck jumper grey charcoal','henleys steak jeans','donk','g-star rise','g star raw hoodies','lyle and scott jumper gala','lyle orange','boss eda','lyle and scott short sleeved shirt','ralph lauren polo shirt purple','g star beta','lyle and scott polo t shirt sky blue','loos','g star jeans raw 3301','g10','lundy','deaths apprentice','lyle and scott buttoned cardigan in navy','g-star cody','g star blade loose jeans','adidas originals italy','hugo boss jofrey jacket black','blue shoes','g-star rovic','firetrap onri','henleys baseball cap','lyle and scott polo t shirt red','gio goi shoes','lyle and scott cardigan hockey brown','black lyle jumper','two stoned chicago','red sunglasses','deckson','ralph lauren polo shirt yellow','henri lloyd camacho','black lyle jacket','black canvas shoes','boss belt','boombastic','lyle and scott mid','red scarf','lyle blue','snorker','lyle and scott v jumper','padded','g-star instructor','lyle and scott t shirt jet black','cobalt blue','texas jeans','hugo boss texas','sinner','two stoned coats','hugo boss black scout 410 jeans','adidas originals zx tech hoflock','henleys steak','henleys darker','grey marl','slick','large','lyle and scott white shirt','lyle and scott polo shirts grey','diesel coat','stone island jumper grey','armani baseball cap','lyle and scott polo shirts splash blue','lyle polo purple','lyle and scott polo t shirt pink','lyle and scott cardigan shot grey','lyle and scott v neck cardigan','lyle and scott sailing jacket','firetrap chopster','ld 80s','firetrap chopster t shirt','lyle and scott bomber','lyle and scott polo shirt large','henleys tookish','pejo polo','lyle and scott dark navy','lyle yellow','g star raw manny shirt','python','d&g melange','g star rektor','lyle cardigan grey','adidas slick','g vilas','lyle and scott jet black jacket','g-star long sleeve t-shirt','g star raw cardigan white','g star heritage loose jeans','lazarus','ralph lauren crew neck jumpers','firetrap major','adidas originals slick','aiden','lyle and scott jumper gulfstream blue','ralph lauren polo t shirt newport navy','swinton','lyle scott plimsoll navy','sconcha','paul smith sweatshirts','stardust','lacoste observe 2','g star raw face t shirt','g star block r jacket','g star felt','purple track top','stinger','gio goi newstem','lyle and scott striped polo t shirt ivory','lyle and scott putty','lacoste observe strap 3','lacoste prep et trainers black','g star stamp','teton','beige nicholas deakins','gio goi sidull','fincher','perrier polo','lacoste carnaby et spm leather trainers','henleys bowden plimsoll trainers','lyle scott short sleeved','braves','lyle and scott vintage jumper black','brown cardigan','diesel reelack','black gloves','diesel culture','para','diesel zip top','lyle heritage','g star stinger jacket','glockner','adidas originals zip track top cream','lyle and scott aqua','paul smith coats','lyle and scott grey marl polo shirt','henri lloyd alanzo','lyle and scott shawl neck cardigan black','lyle and scott smart polo t shirt pale blue','lyle and scott ivory','lyle scott navy harrington jacket','pilgrim','g star loose','tamo','rope','henri lloyd jeans co','grey blazer','lyle and scott cable jumper','ralph pants','lenny','diesel magnete','g star raw original t shirt raw grey','lyle black','lyle and scott jacket red','armani flip','g star riding belt','g.star shorts','henri lloyd mahon','diesel hat','black pants','g star midnight izzi cardigan','henri lloyd cardigans','archer','lyle and scott iodine','red adidas','ski green','henri lloyd elgin','petrol','fred perry oakfield','reijo','penguin v neck','lyle and scott sprint green','black leather','lindeberg belt','g-star jack','lyle grey jumper','fred perry tartan','diesel gold','g star cords','g star attache','g star mauler','boyder','g star pinball','henleys exploit t shirt','ralph lauren robe','henri lloyd gloves','paul smith crew','detroit','g star ridge joist','grey gloves','diesel wormate','ralph gloves','adidas medallion','remission','lyle and scott high v neck jumper','g-star original','henri lloyd fleet','diesel t-omar','d85','hugo boss quney','diesel t scott t shirt cream','ralph lauren 1 2 zip','g-star black t-shirt','henleys wythenshawe hoodie','g star earl','g-star midnight','grey and pink','g-star stinger jacket','ribbon','henleys buffon','diesel selot shirt','g star raw compton beanie','luxor shirt','g star grandad','henleys carvalho t shirt','penguin white t shirt','strauss','black beanie','diesel wormate boots','black scarf','black baseball cap','henleys stardust','hugo boss victory','diesel susino shirt','ralph lauren polo shirt grey','pollux','hugo boss reversible','g star eric','brown scarfs','henri lloyd scarfs','a.c milan','south belt','g-star scuba elwood loose jeans','ted baker sardin','lyle and scott orange jumpers','stinger jacket black battle drill','henleys bellick','black g star jeans','rizmar','ralph lauren quilted jacket','henleys gambler tank top','g star ernest','hugo boss accessories','g star bristol r t shirt yellow','g star raw chase r t shirt','precism jacket','henleys korova jeans','g star narrow','prep s1');
/* $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);
    }