/* Popular phrases - 7FORALLMANKIND - 20:36:54, Sat Jan 28, 2012 */
__SLI_ClientDefaults =
[
    //['Alignment', 'offsetrelative' ],
    ['TargetURL', 'http://denim.7forallmankind.com/search?w=' ],
    //['TextBoxIDCustom', ['searchfield']]
];
var asPhrases=new Array ('a pocket','search','straight leg','dojo','roxanne','austyn','bootcut','gwenevere','short inseam','kimmie','long inseam','shorts','a pocket womens','kaylie','josefina','high waist','skinny','denim','petite','kimmie curvy','dojo jeans','mercer','maternity','slimmy','original bootcut','ginger','standard','maternity jeans','leggings','rhigby','corduroy','roxanne classic skinny','relaxed','jeans','flynt','nate','size guide','austyn relaxed straight leg','white jeans for men','mens bootcut jeans','gwenevere super skinny','jeans for men','jeans for women','lexie','stretch jeans','kimmie straight leg','skinny second skin','kimmy jeans bootcut','seven jeans on sale','new york dark','austyn jeans','second skin','long inseam womens','white jeans women','petite jeans for women','roxanne skinny','high waist bootcut','corduroy men','slimmy jeans men','kimmie bootcut','jiselle','gummy','nakita','sale','a pocket flare','36 inseam','high waisted jeans','gwenevere skinny','kimmie curvy bootcut','straight leg women','skirt','skinny jeans','black','skinny bootcut','lexie petite','jeggings','the skinny second skin legging jean','slimmy jeans','gwenevere jeans','shorter inseam','flare','petite jeans','boyfriend jeans','high rise','austyn relaxed','black skinny jeans','dojo flare leg trouser','long inseam for men','sale mens jeans','grey jeans','bootcut women','mens black jeans','los angeles dark','highwaist straight leg','gwenevere gummy','roxanne skinny jeans','classic straight leg','a pocket relaxed','velvet','a pocket men','white','a pocket bootcut','black jeans','short inseam women denim','mens standard jeans','a pocket bootcut men','crystal pocket','montana','a pocket new york dark','trouser jeans','slim trouser','standard classic straight leg','legging jeans skinny','mens jeans','kaylie bootcut','straight','jiselle flare jeans','bianca','austyn mens jeans','button fly','shorts for women','pregnancy jeans','23','jeans 36 inseam','bootcut new york dark','brett','grey','boot cut','womens petite jeans','shoes','classic straight leg jeans','grey skinny jeans','mid rise womens jeans','bell bottom','high waist straight leg','bell bottom jeans','white skinny jeans','extra long jeans men','boots','chester row wash','relaxed jeans','mens a pocket jeans','colored jeans','long','tall','sale jeans women','size 33 women','original bootcut in new york dark','bootcut original fit','selvage','boyfriend','cropped jeans','cairo','seven on back pocket','aiden','men jeans spandex','white jeans','brett modern bootcut','earheart','kaylie jeans','32 inseam','womens jeans','slim bootcut','tall jeans','mid rise','west cairo','velvet pants','trouser','women skinny jeans','extra long women','mens austyn','khaki','salton sea','a pocket short new york dark','lexie a pocket petite','high rise skinny','women\'s a pocket','rinse','super flare','georgia','relax fit mens jeans','skinny boyfriend jeans','30 inseam','driftwood storm','porter blue','curvy','womens black jeans','women','womens shorts','chino','coat','corduroy pants','second skin legging','leather jacket','slouchy','mercer men','spandex','men','high rise jeans','low rise jeans','relaxed fit','x long','size','corduroy jeans women','ginger jeans','gwenevere skinny jeans','denim shorts','super skinny','high waist womens','spandex bootcut men','a','ankle zip','jacket','mens slimmy','featherweight','shorter inseam men','flynt men','josefina skinny boyfriend','blazer','nate slim bootcut','gummy denim','black straight leg','mens white jeans','dazzling drake','relaxed a pocket jeans','denim jacket','made in usa','destroyed','mid rise bootcut','cropped skinny','stretch denim','baby','belt','black leggings','long legs bootcut','biancha','aviator','a pocket bootcut womens','dojo short inseam','mens shorts','contour waistband','size 34 women','montana mens','second skin skinny jeans','standard mens','kids','bootcut stretch','colored skinny jeans','jared','ap344y702','henley','black bootcut','roxanne black','gray jeans','medium new york','denim skirt','fit guide','sunglasses','bellbottom','lockheed','nakita wash','men jackets','kimmie straight leg jeans','watercrest','double knit','33','grey skinny','chester row','boot cut jeans','cropped','mens bootcut','flare jeans','mon tete rouge','pull on leggings','slim straight','98','cargo','kimmie straight','rustic amber','vintage loring','peacoat','dojo flare leg trouser in new york dark','style','slimmy straight leg','stretch','leather','white skinny','alabama dusk','cerrillos','zip','black jeans for men','kimmie jean','black out','tucker blues','slate nite','kimmie sale','pregnancy','petite bootcut jeans','skinny crop and roll','indigo','grey mens jeans','lady jeanette','high','skinny rinsed indigo','bell bottom super flare','classic flare','size 42','x long jeans','kids jeans','slim straight leg','roxanne rinse','standard mercer','flap pocket','u0041s660s','dark blue','grants pass','aiden tailored straight leg','button down','cargo pants','highwaist','infant','vintage','japanese denim','jegging sale','pocket design','modern bootcut','rinsed indigo','98 cotton','dress','worn mercer','36 x 36','bootcut jeans','dojo flare','front rise 8','a pocket boot cut','ghost squiggle','tie','women size 14','a pocket flare leg contour waistband','vest','a pocket flare with contour waist in new york dark','erin','button fly men jeans','a pocket bootcut for men','mens jeans size 42','alluring night','camp bullis','inseam','jeans no spandex','42','white denim jeans','slimmy slim','new york dark wash','34','light blue jeans','new york boot cut','gardiner','crystal jeans','dark indigo','original bootcut short inseam','jean jacket','women sale','dazzling','gwenevere black','35 inseam women','roll up short','womens roxanne','button fly jeans','wedge','aviator pants','leather skinny','womens corduroy','new york dark standard mens','jennison','straight leg in new york dark','slouchy jeans for men','dojo trouser','skinny men','mens short inseam','38 inseam','royal','the skinny denim leggings in rinsed indigo wash','x long inseam','black jeans for women','the skinny second skin legging','tops','extra long bootcut','lexie a pocket','usa','35 inseam','high waist original bootcut','34 inseam','dojo petite','corduroy jeans','black pants','au130y995','wide leg','amber','jiselle phenomenal slim fit flare','stud','gwenevere grey','contour','khaki pants','au190y702','baywater','gwenevere super skinny gummy denim in black','dark blue black wash','gwenevere super skinny gummy denim in indigo','mens long inseam','061u','low rise bootcut','relaxed mens jeans','dunsmuir','white a pocket','a pocket flare with contour waist','original bootcut new york','curvy straight','mens skinny jeans','camo','ap179y814','gwenevere indigo','petite sizes','mens denim','kaylie five pocket flare jeans','original bootcut in medium new york','7 pocket','ginger flare leg','aggressive siren','slimmy 98%','gray skinny jeans','crop josefina','petite denim','welt pocket trouser','dojo wide leg','second skin jegging','the skinny black shiny featherweight','leg opening 22','austyn los angeles dark','california','shipping','italy','white denim','cashmere','wren','roxanne jennison','kaylie slim','austyn sale','captivating overcast','castroville','size 34 jeans','size 29','slimmy black','jeans with spandex','inseam 29','basic jeans','ghost','extra long','military','perfectly worn','blue','bell','tucker','chester','flynt pocket','womens flare jeans','georgia trouser','classic bootcut','lady jeanette wash','36 inseam womens jeans','paso robles','lexie kimmie','cashmere sweater','au130y916n','second skin legging jean','shimmer','embroidered','slimmy mercer','boot cut new york dark','harem','kimmie curvy straight leg with contoured waist','short inseam women','30 inseam women','size 27','georgia high waist wide leg trouser','black skinny legging','red','slimmy corduroy','melbourne','ap179y702','at waist','standard new york','a pocket jeans','tee','cliffside','classic skinny','organic','kimmie straight leg jeans in dark rinse wash','size 14 jeans','inseam 32 men','indigo bootcut','men shirts','a pocket petite','mens boot cut','black corduroy','vintage casablanca','jiselle earheart','velvet jeans','black denim','white shorts','tank','gray','dojo black','long jeans','maternity sizing','super skinny black','used jeans','highrise','wide leg jeans','grey denim','button fly womens jeans','at511y447','green jeans','size 16','a pocket nakita','green skinny jeans','high waisted original fit','button fly relaxed mens','womens high rise','ankle zipper','colored denim','dawn top','ombre','tweed coat','extra long mens','josefina mini skirt','jeans straight leg women','relaxed long','short inseam denim','cordoroy','men white denim','josefina jeans','dojo denim','flare leg contour waistband','32','front rise 9','roxanne corduroy','roxanne skinny made with','women extra long jeans','a pocket in baywater blue','water crest','denim dress','shorts on sale','size 33 waist','rise','rhigby skinny','lightweight denim','30 inseam mens','california coast','crop and roll','indigo blue','standard button fly','30','l\'amour','pea coat','polyester jeans','ata519-30a','premium denim','wide leg trouser','luxe','sigsbee','clean white','7 for all mankind straight leg in rinse','16','second skin jeans','midnight','34 waist','31 inseam','petite boot cut','womens boot cut jeans','denim sale','salton','front rise 6','men black','27 inseam','erin wide leg','7 jeans','men black bootcut jeans','the','jared mens jeans','tailored denim','skinny jeans for men','roxanne white','jean leggings','t shirts','sale jeans','cadette','a pocket flare leg','concrete','black skinny','twill','white 7 on pocket','100','roxanne lady jeanette','34 waist relaxed','zip fly','skinny second skin indigo','distressed jeans','33 inseam','roxanne original skinny','skinny stretch jeans','crystal denim','sequin blazer','nate jeans','plaid shirts','halter','original bootcut in montana','tank top','standard jeans','a pocket womens jeans','100 cotton','super skinny in black','3','mens low rise','womens denim shirt','jeanette','mens stretch bootcut','los angeles','seamed utility','new ultra destroyed','courderoy','arctic shock','a pocket mercer','bootcut mercer','contour waist','casablanca','straight leg jeans','7 back pocket','dark rinse','vintage jeans','a pocket denim','original flare','velvet blazer','nolita','ap344y997','fur','mens khaki pants','a pocket stretch new york','womens denim jacket','am0090c97','mens standard straight leg','sand','black blazer','skinny twill','classic mercer','classic straight','a pocket lady jeanette','gold','nate men','new york medium wash','skinny second skin black','mens long','high waist boot cut','womens 32 inseam','ginger flare','brick','longer inseam','austyn a pocket','a pocket stretch jeans','l amour','long legs','hereaux','closer tee','racerback','bootleg','curvy fit jeans','no stretch jeans','indigo skinny jeans','denim women jeans','los angeles dark wash','parka','cigar','coat wool','size 10','sangley point','printed jeans','cardigan','size 18','au190y996','button fly relaxed','velvet flare','36','caden dress','the skinny jeans in rinsed indigo','leg opening','twill pants','roxanne new ultra destroyed','sequin jacket','3d','roxanne vintage','tencel','bell bottom distressed','lexie rinse','relaxed spandex','high waist trouser jean','back rise','ap179y03a','the skinny second skin legging in new hereaux','pink jeans','a pocket relaxed mens','new ultra','suit','skinny zip','men\'s jackets','snake','sale dojo','cliffside dark','mercer wash','kaylie petite','the skinny second skin jegging','mid rise original bootcut in l\'amour empire blue','roxanne skinny leg rinse wash','dyess','men boot cut jeans','bermuda','industrial grey','coated jeans','size 12','a pocket flare with contour waist in nakita','brett bootcut','dojo new york dark','worn indigo','mens cords','mid-rise boot cut los angeles dark wash','olive jeans','silk','roxanne skinny in rinse','88','no break','petites women','faded jeans','38','ata521x173','overcast','blue label','black denim sale men','98 cotton 2 spandex','lexie petite kaylie','heureux blue','mid','calee','jeans size 23','gray denim','bootcut crystal','classic straight leg in lady jeanette','spandex men relaxed','knit','tan','am9172nyl','pleated short','dafnee','original boot cut','lightweight','a pocket contour','back pocket','bootcut nakita','industrial','austyn porter blue','tux','nylon puffer jacket','black denim women','ladyjnette','dojo fit','coated denim','grey jeans straight','austyn los angeles','rayon','p344-380s','second skin indigo','mid roll up short','high rise wide leg','amber light','vintage wash','ankle','dojo stretch','teal velvet','ap179y916','colorblock','cargo pants for men','chino pants','women a pocket short inseam','denim shirt','cotton spandex','driftwood','at521y173','t519xl061u','size 44','waist 32 inseam 32','addison','a pocket straight leg','jeans on sale for men','2.0','ponte','charcoal','size 18 jeans','honolulu','zipper','camp ashland','made in italy','light wash','36 inseam austyn','black men sevens','sequin','s on pocket','courtney cardigan','castle rock','rhigby men','alluring sunset','sale skinny','california del sol','hawaiian','springwater blue','ocean','mens denim shorts','motorcycle jacket','heritage','the skinny second','roxanne ultra destroyed','olive','featherweight skinny','curvy short','bermuda shorts','skinny boot cut','welt','dojo cadette','the skinny in indigo','7 for mankind jeans','kimmie petite','bootcut in new york dark','slim straight jeans','raven','mens long relaxed','8 rise','women skirts','roxanne skinny dark wash','baby jeans','aiden 38','roxanne flood','austyn spandex','trousers women','new york dark short inseam','pull on','gwenevere gummy denim leggings','gosling','slimmy 2.0','faux fur jacket','low rise flare','footwears sale','flare leg contour a pocket','boys','kittenger','austyn long','44','brown','jeans flare leg','original bootcut in amber light','tshirts','7fayg038','dojo short','austyn relaxed straight leg in los angeles dark','am5127g27','kimmie bootleg','sangley','trouser 4 pocket','new women jeans','patch pocket','pocket fit flare jeans','long denim','dark blue black','andie','am9076e73','gwenevere ankle','a pocket black jeans','size 24 jeans','pure','gwenevere squiggle','tapered','high rise boot cut','31 x 34','bootcut stretch jeans','the trouser 4 pocket','montana wash','kimmie curvy straight leg with contoured waist in washed boheme blue','plaid','elastic waist','mens cargo pants','low rise skinny','edge','ripped','montana boot cut','worn mercer wash','a pocket flare with contour waist in captivating overcast','porter','sale skinny jean','edge boot','denim size','mankind','new','7','28 inseam','a pocket flare with contour waist in new york dark short inseam','34 x 36','women high waist jeans','new york relaxed','original','12 oz','super low stretch','zipper trouser detail skinny jeans','high rise straight leg','slimmy squiggle','gummy leggings','shirts on sale','men coated denim','tuxedo','36 32','size 32 jeans','belly','sale for women','aiden men','drake','slimmy slim straight leg','dotted a pocket jeans','vintage flash','relaxed montana','dark','size 32','clean pocket','au075y998','los angeles dark in austyn','size 14','flare denim','standard black blue','size 16 jeans','the skinny second skin legging in rinsed indigo','size 33','28','final sale','mens stretch denim slim','women leather jacket','cantaloupe','vintage california','heels','nyd','standard black','swiss dot','paradise cove','22','black jacket','midrise','super flare jeans','emerald','austyn fit','fit','black leather jacket','regular inseam','highrise womens jeans','stretch corduroy','winter sale','crystal pockets jeans','roxanne classic','austyn black','austyn straight leg','loring','sateen','austyn chester row','lexie kaylie','classic straight leg in rinse','footwear','t521xl290u','skinny stretch','white stitching','lexie a pocket bootcut jean','lake blue','a pocket contour waist','ultra destroyed','27','jennison wash','roxanne skinny in stretch corduroy','arabelle dress','captivating','black legging jean','no pocket','hand bags','7 for all mankind straight leg','indigo care','leather moto','printed shorts','leather bomber jacket','mens relaxed','am0147c70','black flare','straight leg men','standard classic straight leg in mercer','soft','t520nb061u','7 for all mankind jeans a pocket new york fit','petite flare jeans','26','relaxed west cairo','black velvet','womens gray jeans','austyn ghost','new york fit','size 33 women jeans','rinse 061u','mens 36 inseam','jiselle phenomenal','seven premium jeans','marty','mercer jeans','blackout','blazers for men','mercer women','bayside shore','a pocket skinny','leather bags','high waist straight','standard selvage jean','cairo men','jeans with crystals','gold pocket','white shirt','a pocket boot','bootcut boheme','low waist','austyn vintage loring','sale shoes','extra long relaxed','slimmy straight','rock','standard medium new york','bellbottom vintage california','madelyn','long sleeve corduroy shirt','boys jeans','heather jersey','tight ankles','classic jeans','women\'s sizes','mens size 28','95','skinny in new york dark','34 x 34','mens button fly','new zealand','puffer','7 for all mankind','am5135g27','slimmy slim straight leg in industrial grey','light grey','slimmy grey','womens long boot cut','slimmy sale','36 men','t521-290u','standard new york men','austyn west cairo','at519y702','sale shirts','super skinny gummy denim','piping','siren','bell bottom super flare in vintage california','new york wash','relaxed straight','standard straight leg','black straight leg jean','coy blouse','panel','high waist classic','women 34','boot cut mercer men','tunic','men\'s a pocket','antoinette','camouflage','high skinny','a pocket new york','bomber','slimmy in mercer','amber light standard','24','snake print','dark jeans','victory','high cast luxe','womens high rise bootcut','29','the skinny in black shiny denim','jiselle velvet','flats','jeans size 26','dusk','black black','monteterge','austyn flynt','low rise boot cut','marlo','t520xl061u','worn nakita','grand forks','bootcut rinse','mens sweaters','women top','coronado','long sleeve v-neck','woven','women dresses','grey sweater','rinse 2','9.25','baywater blue','7 for all mankind skinnies','grey leather belt','shimmer skinny','fur jacket','mid rise flare','a pocket short inseam','mens relaxed fit','mens longer inseam','standard straight leg in cliffside dark','leopard','big mens jeans','shimmer pants','rigid','new hereaux','skinny military','lexie petit bootcut','high waist original','classic','knit jeans','austyn new york dark','mens sale','highwaist classic','elastane','red top','bootcut vintage flash','new york wash boot cut','kimmie boot cut','off register','easy shirt','97','standard classic straight leg new york medium','a pocket womens jeans bootcut','new arriva ls','color skinny','slim fit bootcut','jeans with crystal pocket','new rinse','dotted a pocket','32 long','roxanne original skinny in l\'amour empire blue','wanderer','curvy 31','size 28','new york dark wash bootcut','classic straight leg in new york dark','skinny jeans with pocket','women a pocket short','men cargo','natural rise','straight jeans','white standard','relaxed straight leg','womens size 32','clean black','au075y702','leather look','camp gruber','arctic','cable','chandra','women\'s denim','crop josefina skinny boyfriend','puffer vest','snake skin','standard classic','a pocket in nakita','aviator sweater','straight leg in black','mon tete','classic straight leg in los angeles','tall skinny jeans','7 on pocket','size 23','shiny featherweight','denim button fly','long bootcut','silk shirts','size 24','skinny pants','gwenever','second skin rayon','relaxed fit montana','corduroy bootcut','black shiny','sale items','black velvet pants','striped flight shirt','slimmy white','women colored jeans','no break jeans','womens denim sale','grey austyn','medium indigo','petite flare','slim jeans','seven jeans flare','size 8','wanderer pant','jeans 36','gingham','standard in gulfport','women\'s black pants','a-pocket stretch jeans dark new york wash','denim trouser','ap179y997','leather utility','slimmy blue','dirty nakita','austyn corduroy','original bootcut in new york dark short','classic straight leg in black','dark smoke grey','dojo in new york dark','ap179y975','curvy bootcut','indigo blu','gunmetal','dirty','high rise bootcut','low rise mens jeans','moto pant','lyocell','anya','halter tops','the skinny second skin legging jean in clean white','blackout jeans','jiselle phenomenal slim fit flare in earheart','a design','kimmie curvy bootcut with contour waist in black','classic straight leg in gosling','kimmie 32','standard fit straight leg','men 34 jeans','jeans size','standard corduroy','dojo womens jean','crop and roll second skin','second','cordelia','rhigby skinny jeans','carla racerback','bootcut in mercer','contour waist in new york dark','relaxed fit men\'s','straight leg indigo','straight leg mercer','roxanne skinny rinse','la dark','austyn vintage','stretch flare','slub polo','thermal','coconut','highrise jeans','long sleeve slub thermal v-neck henley','denim legging','worn dirty','at511y080','low','bootcut in nakita','blue velvet pants','leather vest','lexie a pocket jeans','amanda top','expeditor','a pocket melbourne','seven jeans petite','standard straight leg black','sal','women bootcut in new york dark','bootcut in grant pass','pea','motion t-shirt','men relaxed fit button fly','long womens jeans','long men jeans','emma','a pocket black','au190y814t','single anchor','womens boot cut','original bootcut in slate nite','u','size 29 jeans','x-long','stoned leather','stretch flare medium new york','classic straight leg dark indigo','wide flare jeans','am0153f90','arabelle','2','70s','los alamos','deep emerald','relaxed 34','slimmy indigo','standard straight leg jean','size 26','low rise womens bootcut','skinny second skin crop','rinsed indigo wash','womens jegging','austyn melbourne','mens flynt jeans','dark featherweight','skinny trouser','au130y814n','p330-380s','women fit guide','kaylie lexie petite fit','cutoff shorts','clean black skinny','military henley','women straight','an4719e50','austyn denim','an4808g10','a pocket los angeles dark','au130s702','skinny fit','alluring','austyn denim men','13.5','lurex staple a','at511y702','skinny dark smoke grey','mens a pocket original bootcut','women\'s dojo','relaxed salton sea','kaylie aggressive','kimmie boot cut denim','kaylie jennison','los','silky pleated crop pant','arianna','standard classic straight leg black out','womens button fly','button','grey pants','an0488dg08','mineral','washed black','red shirt','austyn 100%','austyn camp bullis','short leg','slim fit boot cut','a pocket womens petite','mens jeans on sale','standard fit','u0150-757s','size 44 men','tevin','mens slimmy slim','mens slouchy','dark bootcut','daria one shoulder top','women denim in black','mens standard black jeans','women size 29','myrella','women\'s bootcut','austyn dark','a pocket new york dark bootcut','a pocket kids','doubleknit','sale on women\'s jeans sale','skinny corduroy','slimmy slim straight','am4189h61','women original bootcut','gwenevere dark super stretch','regular rise','austyn 2.0','denim skinny','original bootcut in los angeles dark','new york bootcut dark women','plum','shrug','summer denim','austyn relaxed straight leg in driftwood storm','robles','sales for men','a pocket dazzling drake','a pocket dojo','straight leg in los angeles dark','white flood','relaxed men\'s a pocket','standard arctic shock','a pocket womens crystal','an0370-d61','black slim trouser','kaylie flare','a pocket flare contour nakita','relaxed fit in new york dark','grey womens jeans','montana boot cut jean','white men','au190yj28','size 31','women\'s petite','austyn driftwood','a pocket stretch','mens button fly boot cut','long sleeve twill','au130p702','an5161f68','crop denim','24 inseams','a pocket standard','mushroom','studded waist jeans','camp ashland standard','a pocket nyd','collection','austyn relaxed straight leg jean','am9173nyl','standard stretch','doheny beach','women black pants','lurex','button fly boot cut','washed boheme','maggie','dai top','men\'s straight leg','austyn paso robles','lindbergh','7 7 7','size 36','anchor','jeans with a zipper','a pocket 100','men red jeans','leather a pocket','black boot cut jeans','size 30','lightweight mercer','classic straight leg in los angeles dark','slate','italian','flare exposed button fly','7 for all mankind roxanne in lady jeanette','back rise 12','womens jeans size 27','button side seam short','ashi cardigan','mid roll up short adara night','decatur','ap179y954','deep cantaloupe','men\'s sweater','roxanne in new york dark','clara long sleeve top','s','cody','cropped ankle zip','daisy','a pocket flare womens','light blue','34 long','roxanne dark wash','27 long','men standard black','standard vintage loring','an4718e50','sale shorts','standard straight','military jacket','straight leg in mercer','shore','relaxed fit button fly','whisker wash','classic blackout','roxanne jeans','bootcut montana','cordelia shirt','slim fit jeans','roxanne victory','deep teal','bead','standard straight leg in grand fork','women new york dark','women jeans size 34','mid waist','long legs a pocket','a-pocket bootcut jeans','mid-rise','austyn squiggle','black knit','mens grey','9.25 oz','midrise flare','boot cut nakita','elastic','dark smoke gray','long boot','a-pocket short in new york dark','contour waist bootcut','standard in medium new york','straight leg rinse','skinny with squiggle','lexie bell','cargo legging','skinny new york dark','dunsmuir wash','standard classic straight leg in stretch twill','soil','campaign','roxanne stretch','austyn twill','mens relaxed straight leg','super skinny gummy','denim skinny jeans','los angeles wash','denim with crystals','medium wash straight leg','blue jean jacket','a-pocket stretch jeans','blue cap','daria','calandra sweater','am4186f96','short new york dark','women\'s sale','dark flare petite','sale denim mens','catherene','7 pocket design','dark grey skinny','roxanne skinny stretch jeans','side zipper','denim relaxed','7 for all mankind a-pocket stretch jeans dark new york wash','black double knit','large','standard sea shadow','women\'s black bootcut jeans','standard classic straight leg in los angeles dark','slimmy in black','long sleeve shirts','men new york','silk top','long rise jeans','a-pocket-flare','standard classic straight leg black','an6236f38','straight leg women a pocket','standard khaki','classic straight earheart','7fayg008','men straight classic','33 relaxed','au0259j13','slimmy in white','graphic tees','size 40 men denim','classic straight leg rinse','slimmy squiggle pocket jeans','36 waist','mens chino','relaxed 36','black label','standard dark blue','los ángeles dark','an4771e06','distress bootcut','lexie a pocket petite in rinse','cheresi','men los angeles dark','black shorts','coral','austyn glykas','size 1','dark skinny','belinda','mens standard mercer','cropped gwenevere','austyn loring','contrast shirt','mens seven jeans style a','standard classic straight leg in worn mercer','double wrap belt','carlotta','austyn relaxed straight leg in chester row','california flare','standard 2.0','11','ap179yj05','slimmy slim straight leg in decatur','slim leg','big 7','mens colored jeans','lexie sale','shoulder top','leather bomber','slimmy slim straight leg in white','skin legging','austyn cairo','skinny jeans a pocket','67','colored corduroy','corduroy kimmie bootcut jeans','bootcut jeans women','starburst','crossbody','white cords','wool puffer vest','size 6','all mankind','straight leg los angeles','womens bootcut original fit','7 for all mankind mercer','classic straight mercer','a pocket flare with','slimmy with multi squiggle glykas','stacked hem','men austyn relaxed straight leg','slimmy chester','long sleeve heathered v-neck','chloee jacket','april sweater','mens denim 38 sale','austyn long inseam','skinny gummy','am0152f97','a pocket dark rinse','button back pocket','staple','ruby','dojo new york','au115y954','amber light wash','roxanne skinny in black black','blue jacket','black slimmy men','au130y374c','womens classic straight leg','austyn relaxed straight leg in dunsmuir','leather detail','7 for all mankind a-pocket stretch jeans','womens white skinny jeans','aiden tailored gardiner','straight stretch jean','relaxed x-long','an0469f42','standard castaic','an4797f41','leather utility jacket','bootcut alabama dusk','classic blue','cotton polyester','denim extra long','am0038-f20','stretch straight leg','long a pocket','sunrise a pocket','size 30 women jeans','am4166d17','bootcut in black black','skinny stretch velvet jeans','a pocket for women','calandra','7 for mankind','slimmy slim straight in new york dark','long rise men','classic fit mens jean','alexis blazer','sateen pants','straight leg los angeles dark','shrink','bootcut lexie petite fit','black skinny second skin legging jeans','classic black','a pocket button fly','a pocket with studs','short rise','roxanne skinny in jamshid','leg chino','boys 12','standard classic straight leg in black out','a pocket new york fit','approx inseam 30','boot cut jean in new york dark','bootcut crystal squiggle','carisa','standard classic straight leg in dunsmuir','a pocket straight','women\'s long','a pocket shorter inseam','a pocket new york dark women','a pocket lurex','bell bottom for women','30 inseam jeans','relaxed fit new york dark','straight leg los angeles dark wash','clean','slimmy leg','7msp1105','bootcut stretch denim','slimmy in new york dark','ankle length','14 oz','womens distressed','roxanne jeanette','skin','am9095e81','austyn size 36','mona','studded denim jacket','bootcut blackout','sketchy','stretch legging','skinny snake print','bootcut for men','7fayb066','7faxb061','standard classic men','am0146f78','womens 38 inseam','7fayg018','cassara blazer','camille shirt','slimmy slim misawa','wind song','mens bootcut in new york dark','30 x 36','mens sizes','gwenevere super skinny knit','7faxg017','standard classic new york medium','bootcut button fly','black skinny pants','mercer slim fit','skinny with zipper','light mercer','standard classic straight leg in medium new york','cropped tux','40 x 34','dohny beach','low flare','standard twill','mens twill','2% spandex','s s','straight high','blue black wash','an3050wol','standard straight leg in arctic shock','cissy','classic straight los angeles','mens 29','gwenevere dark','34 x 30','caileen','aiden fisherman','38 length','covered belt','austyn relaxed straight leg in dark military','austyn in blutar','colored stitch','7 for all mankind kimmie straight-leg in dark rinse','a pocket stretch womens basics','a pocket bootcut jeans','32-32','storm','7fam','cyzarine','leather women','bootcut our original fit lexie petite fit','shadow black','bootcut in','lightweight chambray panel shirt','ashi','skinny spiced','stripe pants','stretch jegging','roxanne rins','6','slimmy slim straight leg in bainbridge','broken in','standard classic straight leg chino in sea shadow 1','lexie flare','standard dunsmuir','low rise womens jeans','7 for all mankind highwaist straight leg','bell bottom pants','7 embroidered back pocket','magnetic moonstone','mens long denim','stretch contour','waist 25','shades','slimmy slim straight leg chino','super skinny gwenevere in zuma sunrise','slimmy porter blue','austyn chester','long sleeve henley','roxanne nyd','mens size 42','austyn los','slimmy rinse','austyn pants','slimmy dark','signature bootcut','black cords','men 7 jeans','standard in black','austyn la','classic crystal','women 7 pocket','all a pocket','men squiggle','slimmy brick','super soft','a pocket swiss dot','cocoon','covered','mens jean high rise','mens 29 inseam','classic oxford shirt','classic double face check shirt','cwen dress','leopard coat','an9153f07','relaxed in new york dark','standard classic straight leg in paso robles','austyn relaxed straight leg with a pocket in pemberton','gwenevere fit black','12.5 oz','classic straight leg in adara night with binding','gummy women','roxanne skinny in california','boot petite','men seven jeans','black cropped','standard indigo','la relaxed','14 relax','mens button fly denim','medium grey','basic bootcut','boys size 12','machine wash','gray a pocket','women\'s high waist straight leg','black boot cut','a pocket flare with contour waist in clean white','sales mens classic 98 cotton 2 spandex','bootcut 100','austyn relaxed straight leg dunsmuir','lexie petite a pocket flare','an0454f38','skinny snake','slimmy concrete','a pocket in womens','long leg womens','a pocket with stones','basic','slimmy slim jean','a pocket pemberton','bootcut slim black','all mens a pockets','crescent heights','straight fit','gwenevere zip','large size','grey corduroy','mens henley','classic straight medium new york','mens stretch jeans','7 blue jeans','standard in los angeles dark','mens original bootcut','bootcut black out','mens tees','straight california','slimmy in cerrillos','multi check tailored shirt','7.5','cait','size 4','dojo in new york','a perfect','an4761f41','men accessories','cove','8.5 oz','moonstone','classic boot','black trouser','sheen','black wide leg jeans','slimmy slim black','bootcut light','austyn tricolor','classic straight leg in earheart','austyn relaxed straight leg in paso robles','men blue','all','standard straight leg 2.0','blue top','classic rise','7 for all mankind relaxed a pocket in melbourne','city','short sleeve shirt','blue a pocket','seven gwenevere','slimmy new slim','relaxed fit in misawa','silky safari short','standard straight leg in tailored denim','standard relaxed','relaxed gray','standard tailored denim','4 button','mens high waist','ann','classic straight leg with piping in mid manhattan','black in black','standard tailored','camp ashland wash','standard classic straight leg in bainbridge','relaxed 38','slimmy slim straight leg in concrete','austyn relaxed straight leg with a pocket in pemberton 1','austyn relaxed straigt leg in gardiner','bootcut in new york','black skinny denim','contrast stitch','relaxed zipper','standard straight leg in grants pass','classic straight leg in overcast vintage','an5164f65','sugar','gwenevere clean','womens denim shorts sale','seven standard','austyn 2','standard in los angeles','classic straight leg in new york','most relaxed fit','black skirt','women boyfriend','second skin denim','signature squiggle','bootcut jennison','slick','classic straight leg a pocket','mens high waist jeans','skinny in dark wash','carlotta cowl neck sweater','clean pocket dojo','slimmy straight-leg jeans','a pocket tees','mens 34','am9143e12','skinny bermuda short','curve','an6236-981','sits at waist','stretch straight','standard grey','sale mens shirts','sea wash','bootcut clean white','12.75','slim bootcut contour waistband','rich','roxanne azul','skinny baby blue','standard leg','strand','slim trouser new york dark','cactus','29 x 36','an6219-f05','size 7','aviator chic styles','a pocket bootcut in new york dark','classic white','sahara crop','classic straight black','black colored mens jeans','slimmy straight leg jean','austyn and standard jeans','men color7jeans regular','lexie petite a pocket flare with contour waist in grey','cross back shirred top','bootcut fit','waist 44','am0109c71','blue coco','au0041t464','relaxed short','roxanne distressed','bootcut polyester','black top','a pocket with flap','2.0 tracer','au199y','bootcut indigo wash','relaxed fit cairo','roxanne vintage nakita','roxanne pure indigo','women utility','stretch trouser','bootcut 30','studded belt','shimmer top','am0109e04','size 2','at0265m05','spring twill','long flare','army tee','barrow','straight leg maternity with extra belly flap','blue shirt','an0435d70','dojo flare leg trouser jean','approx inseam 34','austyn relaxed straight leg in simon lake','roxanne in brushed indigo sateen','roxanne skinny new york','stretch pants','skinny azul','standard classic straight leg in royal','roll up denim shorts','bell bottom denim jeans','slim trouser oceanside','a pocket clean white','am4132c60','check western','mona shirt','a pocket flare washed pure indigo','cmp bullis','leather sandal','relaxed fit west cairo','medium slimmy','longer length','7 for all mankind rinsed indigo pull-on legging','a pocket with back pockets','roxanne coast','an0318b18','bootcut pure indigo','gwenevere-skinny','bootcut stretch jeans washed pure indigo','completes','7 for all mankind gummy gwenevere leggings','austyn with 3d squiggle jean','a pocket oceanside','austyn 2.0 in misawa','roxanne skinny single anchor','slimmy squiggle pocket','supima rib tank','all sale items','reflection romper','am4134c36','dip dye shirt','standard micro squiggle','silk drawstring pants','rumor','slimmy in bezmer','austyn in white','bootcut dark blue','slimmy in inky acid','an4767f49','sale boots','slimmy slim straight leg with ghost squiggle in sangley point','an0408d61','straight leg sunset coast','lexie petite a pocket jean','washed out slimmy cargo','contrast twill leather hoodie','bootcut maternity with extra belly flap in new york dark','mens short sleeve shirts','studded diamond dress','straight leg clean white','an4613d04','men red','a-pocket boot cut jean','slimmy in','an0405d61','slub jersey','am5093c14','blue cat','am5104c25','am0038c75','am0121c79','am9119c62','am0104a35','a pocket vintage california','am6084c22','stripe scoop top','summer jeans','blue tar','slimmy lackland','a-pocket-relaxed','stretchy','white denim a pocket','chunky cardigan','am0122c85','clean white short','crop twill','black cargo','standard charcoal','button short','shirred','slimmy slim straight leg in stretch twill','a pocket white jeans','white rolled shorts','copper a pocket','standard zip fly','size 11','slimmy organic','standard distressed jeans','standard in desert dune','standard medium straight','boyfriend white','slimmy clay','marilis','shadow sweater jacket','straight leg twill pant','mixed yarn long sleeve','striped bias pocket polo','bleached marilis 3','cpisrno','standard 33','slim stretch trouser','standard classic straight leg in lackland','an0416d51','black or grey jeans','slimmy dark indigo','classic crop','boot cut black men','austyn relaxed straight leg in desert dune','roxanne flood classic skinny','a pocket flare in nakita','standard classic straight leg in new york dark long inseam','austyn los angeles dark long','boot cut indigo','rhigby button fly','bootcut in medium','womens high waist super flare','an4682bb39','bootcut vintage nakita','roxanne with peekaboo ditsy print in destroyed adara blue','standard denim jeans','roxanne with peekaboo','boot jeans','an4562b20','men\'s belts','collection vintage patchwork standard in antiparos','ribbed tank top','7 premium','roxanne crystal pocket','austyn relaxed straight leg in melbourne','bootcut washed pure indigo','coated twill bomber','am4149c38','skinny light wash','skinny knit','slimmy 100%','relaxed fit bootcut','clear gray','a pocket vintage courage','standard in winter grey','clean a-pocket','brushed sateen','black sateen','womens boot cut denim','rugby stripe tank','scoop','white linen','skinny legging 29','sits on hips','round scoop pocket short','an4614d04','a pocket new york men','crops sale','roxanne skinny grey','a pocket wide leg','slimmy boho','relax no break jean','slim thigh','sale only','low boot cut','basic bootcut jeans in new york dark','scoop neck jersey top','a pocket rinse','sdmj4184oh','standard in blue','mtlc wash','a pocket relaxed sleepwalk','slimmy with updated slimmy squiggle in riverbluez','se1h3401so','mirror','size 13','men denim slimmy','women\'s white jeans','a pocket boot cut jeans','seamed tunic','slim skinny','28 slimmy','relaxed in west cairo','straight leg maternity','a pocket relaxed in sleepwalk','slub tank','slimmy in black white','women military jacket','standard nakita','classic womens jeans','slim fit bootcut jean','cord top','slimmy desert dusk','relaxed in charred','seven logo','light jersey tank','silk drape dress','mesh top','superfine','stvb4377','standard grayling','standard with ghost','canvas belt','standard in night cat','austyn la wash','stmj4185g','austyn white collar','austyn street','standard ghost squiggle in rebourn','slimmy in night','sale boot cut','slimmy in walker park','an5112b02','straight los angeles dark','stripe and cuffed shirt','3 4 sleeve pullover in black','lip','scoop neck','standard 31','slimmy riverbluez','rhigby freshwater','a pocket with contour waist','lexie oleander','relaxed x-long in rainy indigo','7 for all mankind jeans austyn','ruffle jacket','darkblue','austyn stretch','a pocket in soleado','a pocket vintage port','relaxed chester row','relaxed in nakita','rugby stripe cardigan','dojo shorter','boot cut in new york','chunky cowl sweater','slimmy montana','dina','crew neck sweater','austyn perforated','an4530a98','standard polyester','rolled tux gwenevere beecher','bordered','sale sweaters','a pocket bootcut in beachwater','straight leg provocar','standard 98','bootcut no break jeans','brown a pocket','relaxed rainy','denim 25','bush','bootcut 7','bootcut in new york dark shorter inseam','austyn in chester row','austyn in west cairo','collaborations','roxanne blue','men black out','a pocket new york wash','a pocket boot cut in beachwater','long t shirt','austyn ghost squiggle in stormy night','a pocket fit flare','men 33','bootcut ghost squiggle','a pocket new york shorter inseam','standard in la dark','straight leg in rise','a pocket shorter','black denim jeans women','roxanne clean','roxanne in black illuminar','austyn with corded squiggle','austyn with sketchy squiggle in bakkinblak','standard x-long in new york dark','winter hat','multiplaid overshirt','women\'s full leather grain belt','slim straight with single chain detail in sideshow','a pocket relaxed in nakita','slimmy night cat','men 7 jeans premium','roxanne in dusty charcoal','standard with ghost squiggle in stormy night','3 4 length','best men denim','a pocket relaxed fit button fly','slim panel','aviator hat','am0110a43','a pocket in new york dark shorter inseam','rib tube scarf');
/* $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);
    }
