/* Popular phrases - TRUERELIGION - 11:19:41, Fri Jan 27, 2012 */
__SLI_ClientDefaults =
[
    ['TextBoxIDCustom', ['searchfield']]
,['TargetURL', 'http://jeans.truereligionbrandjeans.com/search?w=']];
var asPhrases=new Array ('jeans','cargo','hats','hoodie','cargo pants','billy','jackets','joey','ricky','shirts','becky','eva','jean jacket','bobby','billy super t','shoes','ricky super t','denim jacket','joey super t','sweatpants','baby','white jeans','infant','shorts','mens jeans','boys','corduroy','sweaters','julie','jeggings','hoodies for men','toddler','black jeans','casey','stella','skinny','super t','black','true religion hoodie','leggings','size','mens hoodies','womens billy','caps','johnny','petite','vintage','white stitch','sweats','sneakers','men cargo pants','misty','boys jeans','leather','pants','bobby super t','vest','red jeans','rocco','joey women\'s jeans','billy jeans men','crystal','becky super t','qt','skinny jeans','denim shirt','white','phantom','geno','coats','womens jeans','t-shirt','jeans with rhinestones','jodie','billy super t mens jean','baby true religion','boots','beanie','billy jeans','sweatshirts','bobby men jeans','mens billy','womens joey','ricky straight leg jeans','mens black jeans','hood','super t men jeans','lonestar','high rise','julie skinny jeans','grey','carrie','billy big qt','thermal','womens super t','slim','mens cargo','mens shirts','mens hats','shannon','true religion jeans billy super t','men','ricky big qt','infants true religion','billy super t womens jeans','women','v neck','womens hoodie','super t women\'s jeans','bobby jeans','mens denim jacket','joey super t jeans men','mens jacket','snake eyes','v-neck','crystal pocket jeans','pink','khaki','red','fleece','big qt','serena','drifter','jeans for men','ricky black','cameron','misty leggings','sweatpants for men','women skinny jeans','mens skinny jeans','leather jacket','44','bootcut','ricky big t','boyfriend','halle','purple','zach','pandemonium','billy qt','slim fit','ripped jeans','big men jeans','high rise bootcut','straight leg','silverwood','mens ricky super t','becky bootcut','buddha','men sweaters','jeans for women','selvedge','boot cut','retribution','thermal shirts','mens ricky','anthony cargo','swarovski','becky jeans','ricky super qt','raw','womens shorts','billy t','jack','becky crystal pave','dresses','joey jeans','stretch jeans','jackets for men','womens billy jeans','straight leg men','cords','cameron boyfriend jeans','23','long','14','boyfriend jeans','mens joey','36 inseam mens boot cut jeans','bobby big qt','t shirts','mens sweatpants','selvage','womens billy super t','body rinse','denim jeans women','qt jeans','vintage jeans','inglorious','womens super t jeans','low rise','stella skinny jeans','womens jacket','ricky qt','julie skinny','black jeans women','pebble','vintage carrie','mens bobby','women coats','revolver','relaxed','true religion jeans','hoodies for women','true religion shirt','button up','henley','boys shirts','joey super','baby jeans','army','womens white jeans','tara','toddler jeans','casey legging jean','stretch','plaid shirt','rusty barrel','flare','light wash womens','womens sweatpants','gold','long jeans','fragrance','red stitch','marissa','misty glitz and glam','joey jeans for women','lightweight','natural','double puff','42','ripped','joey flare jeans','anthony cargo pants','ricky straight','logo','jackets for women','petite jeans','embellished jeans','mr nice guy','casey jegging','anthony','crystal pave','johnny womens jeans','premium vintage','glitter','chesapeake','womens straight leg','t shirts women','super qt','raw denim','coats for men','gold jeans','flap pocket','tee','mad859f83','independence','redwood','julie jeans','phantom jeans','leather pants','ricky straight leg','womens hats','tr classic hoodie','vintage billy','black sweater','womens straight leg jeans','mens corduroy','chainstitch','jeans for boys','yukon','pave','embroidered pocket','joey twisted','1','casey legging','mens slim','grey skinny jeans','true religion','flannel shirts','vintage ricky','ricky men jean','relaxed fit','denim leggings','long sleeve tee','qt hoodie','phoenix','skinny jeans for men','colored jeans','pony express','stitch','carrie flare','denim','true religion jeans men','mens shoes','destroyed','hooded sweatshirt','long sleeve','women shirts','32','twisted seam','black men\'s jeans','29','hem','studs','fit size','embellished','lowrise men','midrise jeans','40','black hoodie','infant gift sets','25','glitz and glam','destroyed jeans','grey and black jeans','grey jeans men','skinny mens','big','pullover','mens t shirt','twill','glitter pocket','white shirts','straight','true religion jacket','vera cruz','dark blue jeans','dark stitching','white stitch jeans','corduroy pants','fleece jacket','billy bootcut men','legging jean','shirts for boys','new','flare jeans','cameron boyfriend','size 32','dark navy','mens shorts','custom','suede','patch jeans','morgan','crystal button','western','all black','scarf','pioneer','zach jeans','buddha jeans','raegan','billy natural super t','tori bootcut','cut','womans jeans','superfly','embroidered','womens becky','serena legging','vintage flare','outfits','patch','vintage jacket','grey super t','38','rocky','chestnut','relaxed jeans','toddler boys','mens joey super t','joey flare','boys pants','red pocket','gloves','premium','dark wash','julie super t skinny jeans','pink stitch','point','natural qt','classic hoodie','light','v neck shirts','swimwear','pants for men','true religion women','3 piece set','long leg','becky lonestar','pink jeans','used','u3pcsetc25','aviator','distressed','mens thermal shirts','activewear','hand','vintage denim','crystallized','colored denim','becky glitz and glam','ponte','foil logo','sunglasses','all men jeans','grey jeans','winter coats','light jeans','fur hat','mens billy super t','midrise womens jeans','thick stitching','bootcut jeans men','mens super t','brown','puff tee','blue jean jacket','indigo','horseshoe','28','dark blue','xxxl','white mens shirts','heather grey','fit','distressed womens jeans','zipper','forsaken','jodie skinny jeans','infant set','mens slim fit jeans','tara legging with zipper','casey skinny jeans','helmet','corduroy for women','studded jeans','womens boots','sweatpants for women','polo','ricky fit','hoodies for boys','cowboy destroyed','plaid','men\'s hoodie','snake','misty pave','in','danny boot cut','puff','mens flare','zipper leg','crystal pockets','tops','joey super t jeans','twisted jeans','in seam','high rise womens jeans','u jeans','johnny straight leg','navy','one piece','dark wash skinny','ricky jeans','denim skinny','puff print','penny royal','plaid flannel','double puff logo','little boys','jean shirt','gold hardware','optic white','no 1','embroidered jeans','lowrise','big t straight','morgan flare vintage jean thunder heart','u','misty pave stretch','graphic','button fly','light denim','billy black','gold jeans womens','helmet hat','gift set','blake','light wash','hippie chic','white pants','dana wide leg trouser','jimmy jacket','tank','billy big','velvet','julie super t','sawbuck','24','athletic','hi rise bootcut','dark','44 waist','womens black skinny jeans','light brown','xs','grey hoodie','forsaken shannon','grey sweatshirt','medium drifter','mq2859l22','yellow stitch','nice guy','shallowmaker jeans','v neck t shirts','new women jean','crop','eau','fragrance for men','xxl','m24p61m65','fur','orange','ashbury','skinny jeans for women','red shirt','long sleeve t shirt','trisha','dark pony express','ricky inglorious','university','mid rise','purple jeans','rainbow billy bootcut','shannon lonestar','gold stitch jeans','flare leg','gunned down','rhinestones on pockets','wide leg jeans','american flag','mq2859l17','jeans with crystals','ricky t','wq8k35bcs','pocket designs','suede pants','black skinny','bobby qt','bootcut mens','30 36','low rise jeans','ricky premium vintage','mens vest','bathing suits','the call','boys hoodies','mens fleece','womens joey jeans','swarovsky jeans','super','hardware jean','cowboy','shallowmaker','little t','baby gift set','inglorious wash','hoods men','pulling jeans','velvet pants','double','lena','mens boot cut','arena','sweats for men','christina','glitz and glam jeans','grey jeans womens','leather hat','matt','green','qt stitch','gold stitch','mens pants','joey t','julie lonestar','no pockets','brown jeans men','rusty barrel dark','conductor','slim straight','42 jeans','36','longsleeve','women\'s billy natural big qt','traditional rise jeans','canvas','heritage','crystal jeans','natural super t','button up shirts','no 1 hand','boys jackets','rocco super t','suede casey','foil','gtm','jeggings with rhinestones','inseam 32 mens boot cut','cap hat','mens jeans red stitching','embroidery jeans','white jeans for women','yellow','womens skinny','billy super t jeans','becky petite','easy fit','tee mens','dusk','pal','grey stitch','vintage tees','snake eye jeans','sun bleached','rocco n2','glam','scarves','size 14','yellow button','julie crystal','pandemonium wash','vintage boot cut','becky qt','33','children','low rise bootcut','carrie flare jeans','mens billy qt rusty barrel','men big','ricky classic','tank top','lounge pants','joey shorts','ghost logo','ricky 34','2v','item','womens sweatshirts','rocco slim','becky trbj','6237','parfum','jeans with rips','horseshoe jeans','denim dress','mid rise jeans','dana','bobby snake eyes','mq2859p50-2v','cardigan','grey sweater','short fuse','zipper pocket','size 23','1956','vintage collection','geno jeans','premium vintage jean','parka','mq2858l17','nordic','white hoodie','gray jeans','antonio','shorts for men','mens sale','puff logo','becky embellished','women sweaters','high rise boot cut','glitz','stella petite','wad572f83','children\'s','womens stretch jeans','36 36','men sweats','geno snake eyes','ead','womens carrie','carter','chain stitch','true religion ricky straight jeans','womens johnny','blue stitch','purple flannel','tori boot cut','baby boy jeans','jodie crystal pave','womens flare','men billy natural','billy chain','zip hoodie','high waisted jeans','corduroy for men','size 30','eggplant','straight cut','24j60nbt2','ripped skinny jeans','midrise','westwood','women\'s julie lonestar','black leggings','blue skinny jeans','buddha tshirt','trouser','rocky denim','ricky premium vintage jean','boardshorts','w10m04m20','high','sugar creek','black stitch','billy independence','jodie classic','zeus','twisted seam women','hand stitched','vera cruz wash','mad858f83','fitted jeans men','white skinny jeans','infant jeans','size 26','mens straight leg jeans','seal','ricky big','jeweled jeans','jodie crystal','billy vera cruz','size 23 jeans','2s body rinse','wadm04f83','baby gift box set','chino','rocky western','becky big qt','bobby vintage','boys zach','oregon trail','blazer','mick','missouri wash','stretch leather','11 lonestar','man','pink shirt','black skinny jeans','morgan flare jeans','becky crystal','black pants','natural big qt','42 waist','boot cut jean women','ricky super','slim jeans men','dark vintage','true religion joey','tr classic','outerwear','dark pony','true religion becky','zipper jeans','denim jacket for women','big stitch','mq2858l22','jada','t','marissa sweatpants','bootcut womens jeans','billy seat','high rise skinny','true religion billy super t','billy straight leg jeans','flap hats','bikini','mens big qt','ricky\'s','boot cut men jeans','johnny chestnut','women\'s','flap pocket jeans','mn2859y9','billy natural','leather coat','saratoga','stretch denim','wcjn96bcs','denim jean jacket','size 25','true religion ricky straight mens','skull','straight with flaps','gold and orange','super skinny','women\'s shirts','ricky shallowmaker','relaxed bootcut','black sweatpants','rocco jeans','size 24','trisha forsaken jeans','bobby straight leg','classic','boot cut jeans','lisa','cargo\'s','hippie','hooded shirt','thick stitch jeans','italian','ponte skinny','mq6859l27','jack slim','billy big qt jean','size 31','vintage jeans for men','womens long jeans','men t-shirt','grey titan','stella skinny','ricky super t short fuse medium','petite bootcut','embellished thermal','mq6859el','forest','style','bobby t','mens buddha crewneck tee','flap','sparkle jeans','skinny leg jeans','billy super t drifter','ricky short fuse','sparkle','head','trbj','rocky western shirt','billy natural big qt','midnight rage','supervixen','mens black','slim jeans','mens johnny jacket','distressed mens','hi rise boot cut','straight jeans','swim','mens coats','trm4','ricky straight leg ashbury','brown hoody','billy super','bobby silverwood','field jacket','julie pave','lem','billy jeans for men','becky pony','jack qt','vera','sun bleach light','navy blue','black jeans for men','mq9859g17','mid rise bootcut','joey qt','jayde','mens billy revolver','hickory','ricky big qt cyclone','31','ricky overdyed','roman','casey stretch','6271','billy vintage jeans','faux fur hoodie','hollow','6090','leather label','mine creek','casual','wasm04n35-klm','wax564l97-2s','slim basic','mq2859p50','b24h54nbt2','pnm','mq2859m64','billy brown','womens billy vera cruz no rips','jewel','motorcycle','vintage men jean','boys black jeans','mens leather jackets','big boy','bobby revolver','ricky medium drifter','mzd','billy white','barrel dark','no flap jeans','boys size 14','boys sweats','woman','peace','length','wq8k44e59','man jeans','button','puff logo tee','headwear','poppy','men jeans 44','bobby premium vintage','10j14om-11','womens stella petite','white trues','red true religion jeans','western poplin','serena pave','becky classic','wq1564bcs','tee shirts','mens raw','true religion jeans women','rocco basic','size 3','baby gifts','ricky brown','georgia','missouri','women jean jacket','carter corduroy','no flap','mv3bg48tt','green cargos','women\'s petite jeans','billy drifter','x5','lightweight jeans','purple puff tee','shannon baby lime','super t drifter medium','billy big jeans','sku was564f75-ead','shearling hoodie','womens white skinny','white trues pants','men\'s boardshorts','rust combo hoodie','ml4bl68vymb','women\'s skinny jeans','ricky ghost','boys skinny jeans','ashbury medium','boys billy','cameron gold','v-necks','orange shirt','short fuse medium','ripped women jeans','santa cruz','gift box','bobby qt straight','grd','avery sunglasses','charcoal','1956 selvage','black denim','gold pave','boys billy indigo super t','blue jeans','straight men','womens jeans with crystal','ricky super t jeans','becky bugsy gold','red white and blue','womens back flap jeans','mens thermal','men\'s jean jackets','bootcut womens','tr classic sweatpant','black skinny women','suit','brand jeans','becky chestnut','men\'s tee','mens low rise','lonestar hoodie','womens white skinny jeans','qdm','sw17','leather stretch jeans','light color jeans','egg','fur hoodie','buddha brand','side weave','men\'s ricky jeans','light wash jeans','wv68l03g5909','billy medium drifter','ricky straight leg body rinse','misty gold glitz','shirt size','chain','bootcut jeans','bz inglorious','womens jodie','becky vera cruz','johnny pigment','geno slim','4807','pants for women','men\'s skinny','misty ponte','shearling','bootcut boys','men\'s rocco n2 vintage','factory','ricky premium vintage pandemonium','applique hoodie','brown stitching','medium rise','green pants','woman black jeans','red stitch jeans','mwd','mens billy qt','poplin western shirt','black true religion','ladies jeans','26','herbie','bobby blue','phoenix chino','mens jean shirt','julie\'s','men\'s ricky black and grey chainstitch logo','becky boot cut','bobby phantom grey','becky natural super t','mens joey jeans','joey super t retribution','mens ricky super t cowboy destroyed','women\'s billy purple super t independence','baby\'s','womens sweats','womens bobby jeans','black jeans for boys','del mar','misty glitz','sherpa','newest jeans','mens geno','sugar creek medium','5276','serena super skinny','japanese denim','buckeye dark','30','white tee','mens flare jeans','crop jeans','mar840k33','bobby phantom','iron horse','men\'s tee shirt','colored stitching','white v neck shirt','assasination','ricky multi','woman vintage jeans','classic straight leg','solid shirts','men\'s helmet','white boot cut','bootcut for women','women\'s tank','wq1572h94','ransack','billy straight','tony petite','billy black grey','small','misty super skinny','size 27','women\'s casey overdye legging','all cotton','black blue','wide leg','army green','boys qt hoodie','twisted','4643','cp','scarlet','jeans 44','women crop jeans','sugar creek med','skinny leg','traditional rise','t-shirts','10j14om','vixen','mens vneck','true religion coats','misty gold pave','raye','sunbleached','embellished logo','bobby black','12-18','faded jeans','medium drifter wash','wq1564p02-nbd','classic rise jeans','knee wide flare','polo women','all red jeans','3975','lake','button down','julie natural super t','boys billy super t natural','billy boys jeans','becky pave','true religion becky bootcut jeans in dark drifter wash','silver','becky t','mens sweatshirts','new arrivals','ricky destroyed','joey big','multi stitch','men size','men\'s ricky lightweight jean','brown pants','men\'s billy\'s','sweaters for men','relaxed fit jeans','billy grey','mick western','quilted hat','joey cut','red hoodie','billy purple','women\'s caps','was564f75','mens anthony','white stitch jeans womens','rusty barrel med','revolver wash','ricky big qt black grey inglorious','nam','wq8k44f71','bobby big','bobby super','rivet','mckn56j39','blake phantom','baby jack','mens vintage','mdln76y9','rocco snake eye','hardware skinny','skinny super t','mens billy boot cut vintage jean','super t jeans','true religion jeans women\'s','pigment','wq1572m33','ricky big qt straight','stella women jean','geno snake','navy blue jeans','by size','tara mid-rise legging','size 12','mid-rise','women\'s black jeans','joey twisted seam','billy rusty barrel dark','mens relaxed straight leg jeans','jack brown gold','men\'s mvp','rebel','selvedge denim','mens ricky big qt','ricky medium drifter with rips','firebird','5336','rust combo qt','quinn','faded black','5985','5228','julie skinny crystals','emily','joey vintage','black tee','becky boot in lonestar','11','wcjk99bcs-2s','t shirt sizes','design','joey dark','mens point guard','billy red stitch','ricky natural super t independence','womens white denim','trm402pl-6000','high pocket','whisker','aviator sunglasses','curve','men\'s ricky brown multi super t jean','men\'s ricky super t medium drifter','field','cyclone with rips','rinse','ricky ashbury','mens flannel','mens bobby big qt','bbd','julie crystal pave','trisha forsaken','brooklyn','billy vera cruz no rips','mens billy natural super t','ghost','wq1592l31-nbd','mid rise skinny','stealth','10h40om','womens billy classic','ricky retribution','black crystals','billy boot cut me','men\'s natural qt','billy super t medium','5746','marled','serena redwood','mens leather boots','black shirt','joey twisted flare','womens fragrance','wq1564l34','fabric','becky glitz','mens plaid shirts','ryan','athletic fit','old school','boy rocky denim','combo','brown suede','womens denim jackets','plaid western','becky bugsy','womens denim','t stitch','jack torque','womens dark wash skinny','regular','red and black jeans','men\'s ricky qt','skinny cord','becky bootcut jeans','wheat','multi super t','billy straight leg','johnny jeans','billy premium vintage','forsaken carrie','julie purple super t','women\'s becky dark pony express true religions','del mar medium','logo hat','becky jamestown','slim fit men','womens becky super t','womens v neck','tara super skinny','becky super','baby billy','billy embellished logo','julie big t','julie womens jeans','black leather','bobby straight jeans','pink skinny','bobby straight leg firebird','billy super t blue','short sleeve shirts','black pave','black boot cut men','mick rayon western','boys sweaters','women\'s rocky flannel western','true religion morgan','ricky super straight','men\'s bobby super t','thick','relaxed straight','tr sweatpant men','purple hoodie','boys tee','midnight denim jacket','m177k57qt309','trm4 navy','huckleberry','true religion sweaters','billy qt rusty barrel','billy rust','wadm24f83-gxm','women\'s becky natural','casey brown','mens big size','y5','womens billy indigo super t','joey distressed','mens snake eyes','boot cut for men','casey overdye','mens ricky black and grey','back flap','ricky black men\'s jeans','billy fit','mens short sleeve','mens bobby natural super t jean','bobby brown','cowboy super t','oregon','mens ricky inglorious','men\'s joey super t jean','shipping','buckeye','womens billy embellished logo','ricky q2','men\'s sweaters','becky petite lonestar','black stretch','ricky stretch','mens multi super t','ms48l14g46y3','bobby basic','becky super t medium drifter','mid-rise jeans','wdsk35k32','black grey','womens plaid shirt','mcb9m53k32-lfblack','womens billy natural super t','mcb800k32','men\'s ricky natural super t jean independence','men\'s blake phantom jean','mens ricky super t short fuse medium','men\'s billy chain stitch jean retribution','10-572nbt2','ricky little t','women\'s bobby','billy cut','jeans crystal pave','bobby premium','red sweater','women\'s becky petite','mini fragrance','jeans 14','women\'s morgan','popular','sweatshirts white','women puffer jackets','becky cut','ricky lightweight','men\'s billy chain stitch jean','seat','hoodie and pants','fuse','mwm','true religion brand jeans ricky straight leg jeans inglorious wash','mad800f83','9v','ricky phantom','madm23f83','ricky phantom grey','cyclone','casey emerald','women\'s boot cut','black true jeans','ricky drifter','mens rust combo','men\'s vintage jeans','mixed hardware','becky santa cruz','men\'s slim jeans','billy super t retribution','star','trouble shooter','men\'s ace low leather shoe','az','boot cut true religion jeans','cord pants','10h40om-63','womens tony','w648k98pffnf','men\'s bobby natural super t jean rusty barrel medium','women\'s jodie brown combo','6159','made of stars','ricky body rinse jeans','baby julie','bobby ghost','ricky super t medium drifter','size 6','women t-shirts','brown jeans women','super vixen','thunder','brianna','mens ricky overdye twill super t','ricky big t black','mens relaxed jeans','crystal tee','billy rusty barrel','serena high rise legging','black ponte','wy6k35n28','becky pony express','mens ricky big qt cyclone','luca solid flannel','billy mellow yellow gold hardware','wcjn95bcs-ch','pom','stella jeans true religion','women\'s western','butter','true grit','becky petite jeans','super tee','ricky boot','ricky fuse','black true religion pants','true religion billy super t boot cut in industrial','t-short','wazk82g17','waffle','mq2859y9r','wm47l61g74y3','studded hoodie','slim fit jeans','6248','ricky q2 vintage','men\'s rust combo qt hoodie','mens antonio premium vintage jean','classic women jeans','style 10-564','10-564','womens misty glitz','m24n76k31-01','black womens','bobby natural super t','mac9020el','mad2j55y9','boys billy super t','ricky super t independent','ricky cyclone','womens high rise','billy rinse','white tag','size 2','billy natural super t medium drifter with rips','brown combo','bn48h87f53','black boot cut','color jeans men','womens misty black pave stretch','becky slim boot cut','bobby straight','4551','men s ricky ghost logo jean','becky gold','wax599p01','boot cut jeans for men','true religion hood','mens double puff','womens tanks','ricky old multi','men\'s sweatshirt','selvage jeans','crew tee','tshirt v neck','mens qt','men\'s canvas helmet','5689','pop saloon','silver pocket jean','boot cut jeans woman','bobby low rise','california style','billy vintage gold','27','midrise skinny jeans','men\'s ricky big qt cyclone with rips','billy 30 33','black beanie','womens flannel','billy stretch jean','pool hall','mens army','mp4bm17iknh','becky logo','mq2859y9r-mzd','rusty barrel medium','m176l49qt309','3015','billy flap pocket','mens rocco','womens jeggings','mq6859el-2s','big horseshoe','billy super t yukon','true religion woman','true religion skirt','womens petite','4313','men hats beanies','billy super t med drifter','woman pants','black button up','billy super t yellow','bootcut little t','tara legging','multi','ricky natural','wcjn96n84','barrel','jeans ricky super t body rinse','ricky velvet','ricky big t men jean','true religion skinnys','men\'s billy brown multi super t jean','billy indigo super t','mens ricky vintage','mens billy natural super t-medium drifter with rips','joey low rise flare','women\'s track jacket','womens moto jacket','what is super t','pacific','mr','womens indigo','johnny studded u','men\'s ricky straight leg jean','was564f75-ead','true religion men cargo','men\'s bootcut','puff logo for men','luca','men\'s bobby black multi super t','big stitch womens','men\'s slim fit','women billy big qt','men ricky drifter','white poplin western shirt','trw3','4658','skull jeans','trw10','mens geno premium vintage torque jean','ricky supert','trail','mens billy inglorious','trm13c','5328','men\'s horseshoe logo crewneck thermal','men\'s qt hoodie','wm46h70l71y3','ricky super t straight leg','5342','men\'s bobby rust combo big qt jean','rebel med','men\'s billy rusty barrel dark','women becky qt','4244','med7g40l473c','corinne','sku 10j14om-11','mens vintage collection','slim straight jeans','men\'s ricky premium vintage','5959','carrie missouri','burnout','billy dark','mens ricky brown wheat','ricky twill super t','mn2800y9','buffalo','rocky plaid','bobby natural super t jean rusty barrel medium','billy natural super t jean','mn2j60y9','mens ricky straight jean','mv68l11h653c','5848','boys skinny','white jacket','true religion mens billy super t','justin','men\'s relaxed fit jeans','premium denim','5852','billy super natural','billy stitch','austin','wm47p07l70y3','men long sleeve tee','nice guy hoodie','womens billy vera cruz','boys thermal','med8h34h673c','serena mid-rise legging','ricky chainstitch','rust combo','women\'s becky natural super t','becky natural big qt','misty glitz and glam legging jean','cruz','5269','mens billy super t drifter medium','mens black bootcut','lamb','men\'s tr classic hoodie','mens ricky medium drifter with rips','shirt hats','men\'s','low-rise','mens horseshoe','straight women','trmc','medium drifter with rips','size 10','womens big qt','wq8k44e59ead','true religion men shirts','mq2858f64','true religion billy straight leg','men denim suits','luca flannel','jeans for woman','rage','true religion style','men winter','wl4bl72vymb','women\'s capris','bobby chainstitch','ricky rips','mens ricky premium vintage jean','women blazer','billy man','rosewater','serena high rise','size 31 jeans','women stretch','high-rise','mens stretch','ricky classic logo','mens billy rusty','womens western shirt','mens letterman','jeans super','becky bootcut petite','shiny','6126','women button shirts','boys bootcut jeans','mens t-shirts','men wear','ricky inglorious wash','tara skinny','rise','womens qt','wf43k44e29-black','jack premium vintage','womens dark wash','wq1m10y9','pocket detail','women\'s leggings','ricky super t straight jeans','julie pave embellished','mens rocky shirt','misty black pave stretch ponte','women dark','rust combo qt sweatpants','mckn56j39-lld','womens carrie forsaken jean','men\'s billy black and grey multi super t','becky bootcut dark wash','becky bootcut black','wz86h70l712s','billy bootcut women','purple julie','womens puff','women\'s becky dark pony express','becky body rinse bootcut','wf4k44p04-1001','black superfly','size 8','billy boot cut jean','mens pullover','crystal horseshoe hoodie','women\'s casey over dye legging','skinny fit','melange pullover','bobby dark','boaz','casey super skinny','b177l16e62','bobby qt straight leg jeans','blue men','men true religion t shirts','pave horseshoe jean','trwf11v02','size l','mens ricky corduroy','girl\'s julie violet super t dynamite pass','pink sweater','staple','mens ricky nashville','blue men\'s','mq22k61bcs','women low rise','black track jacket','serena seal','mens true religion hat','wy6k35n28-pq','boys straight leg','trwf11j01','bobby dark vintage','pocket horseshoe','t-shirt boy','bobby classic','black blazer','size 12 jeans','black sweatshirt','straight t','white stitching women\'s jeans','true religion denim','misty black pave','women\'s valcore track jacket','mens jeans long','men\'s billy qt rusty barrel med','was572n35','black leather jacket','women\'s dana wide leg trouser stealth jean','becky pave crystal','billy revolver','true religion ricky','men gloves','men\'s bobby premium vintage jean','wq8k35bcs-bg','mens bobby basic black','men\'s bootcut jeans','women\'s straight jeans','true religion billy natural super t','super t retribution','boys zach natural','women billy vera','regular women jeans','women\'s plaid','woman\'s','mens buddha pullover crew','white t-shirt','julie super','billy 34','m176l49e7209','mv77g40l462s','mens henley','becky boot','true religion brand jeans ricky straight leg jeans','woman\'s becky','5261','mens ricky lightweight','ricky straight-leg jeans','crewneck tee','boys billy durango','biker lace up','boys billy factory','ricky\'s big qt','stella jean dark drifter n rips','women\'s jackets','ricky old multi super qt','ricky straight jeans','men\'s billy white','billy multi','mens billy premium vintage','men\'s billy premium vintage jean','pink cap','tr hoodie','wq1572h94 63','women\'s sparkle v-neck tee','skinny legs women','mens jeans 42 waist','brick','stella dark pony','carrie lonestar jeans','men\'s gift set','babies infant boys','super t dark','billy brand','mens switchblade tee','women track pants','men\'s rocco basic jean','becky glitz and glam bootcut','mens true religion billy jean','boys rocky','joey indigo','women\'s flannel shirt','womens marissa pant','mens pulling','mp4bn83ik','black pants women\'s','men\'s white stitch jeans','billy 36','men pandemonium','billy yukon','mkd pandemonium','m176l49l4609','women\'s thermal','women\'s cords','womens legging jean','julie vintage','billy logo','super t reds mens','billy super t sugar creek','men\'s billy handstitch logo jean','stretch boot cut jeans','1v super vixen','melange','black women sweatpants','multicolor','wq1564e59-bg','womens billy vintage','bobby black jeans','men\'s cap','buddha shirt','mens buddha','women\'s foil print puff tee','ricky logos','mens phantom','men\'s bobby qt','bobby basic black','true religion billy jeans women','mens 40','shine','jeans 33','mens ricky rust combo qt jeans','jeans dark pony express','children shirts','becky dark','super t straight','joey 34','womens becky bugsy gold boot cut jean','wy6n96n28-hw','mens ricky qt-cyclone jeans','w19bl67e29','becky big qt del mar','crystal t','womens drifter','mens ricky rust combo','billy yellow stitch super t','women\'s pocket','mens twill','women\'s carrie forsaken','mens black pants','billy cord','boys jeans slim','midrise women\'s jean','casey legging santa cruz','women\'s stella petite dark pony express','womens valcore track jacket black','black studded jeans','black horseshoe','re','womens sparkle v neck','men\'s billy vintage','ricky straight inglorious','ricky black jeans','mens billy natural super t medium drifter with rips','billy super t bootcut','mens bobby superfly','mens bobby black','true religion fleece','trwf11p03','b24e08k99','mens zach stretch','bobby iron horse','black super t','true religion ricky straight leg jean in inglorious wash','combo qt','ricky hand stitch','super t dusty skies','black cords','womens billy natural','black on black','wbfk91l25-2s','womens buddha','men destroyed jeans','waxk68l74','mens premium vintage','black slim','mq2858f64-gmm','boys natural super t','boys billy natural super t true grit','size 7','billy phantom','mckn57j39-01','crystal leggings','wq1503h94','womens henley','julie straight','boys puff logo graphic tee','billy lhm dodge city','men\'s bobby basic','the original true','size xs','billy qt rusty','true religion julie skinny jeans in lonestar wash','womens casey legging','womens straight billy','joey cut-offs','size 14 jeans','size 24 jeans','twill shirt','boys billy midnight','cropped western','mda7k71j89hl','wq1k75bcs-11','serena legging with','men jeans big qt','charlotte','wcb572k32-lf','bobby black t','men\'s trmc tri blend crewneck tee','true religion on sale','men\'s ricky rust combo big qt jean chesapeake','men\'s pulling jeans tee','mens ricky studs','men\'s horseshoe logo raglan zip hoodie','twill cargo','wv68k98e173c','men\'s ricky super t jeans','billy brown multi','super t yukon','ricky old multi super qt jean','ricky super t men medium drifter','mar9n90k32','mens tr','blue flannel','super t stitching','misty buckeye','becky flare','ricky super qt jeans inglorious','true religion mens billy super t boot cut jean','mens black hoody','ricky pioneer','men\'s billy boot cut jean nashville','seam','color leggings','brim hat','super t flare','joey vera cruz','boot cut jeans for women','men\'s western shirt','children\'s jeans','top size','men\'s grey jeans','boys billy super','cancer jeans','women\'s billy qt','men\'s billy premium vintage passenger','womens billy natural big qt-rusty barrel dark','size xxxl','midrise legging','super t short fuse','white wash jeans','ricky straight black','super t inglorious','black henley','womens boyfriend jeans','saloon','joey flap pocket','collar','boys jack old multi qt','super t drifter','w648k98j933c','med8g49db3c','women\'s sizes','mens brown','mens 28','mq6j60el-2r','women\'s joey super t','mens poplin western','cyclone qt','julie pant','boys jack vintage','misty black','billy inglorious','super t relaxed','women xl shirts','men\'s billy chain','ruckers','women billy dark','julie skinny pant','ricky old multi qt','true religion jeans logo','12 1 2','joey low rise','billy super t white','men\'s hand-drawn horseshoe v-neck tee','baxh54el-2s','baxh54el2s','5599','red tee','men\'s ricky natural super t','crystal horseshoe cap','ricky 44','skinny for men','becky vintage','sliver','baby set','womens becky natural big qt','ricky low','women blue jeans','baby true','25 long','womans leggings','wcjn96n84-nbd','womens misty','mens black sweaters','5551','trilby','wax564l97','wy6k35n28-pq redwood','men\'s leather','super t arena','boot cut sparkle','becky pave boot','women\'s low rise jeans','true religion qt','straight aged denim','mcb858k32','womens becky glitz and glam','waxn44el','print','billy men black','med8h34g493c','women\'s becky vera cruz','mq2858l17-retribution','joey for men','misty legging charcoal','5846','wq1m09y9','medium wash','round pocket','black ricki s','billy nashville','men light','billy pony express','spring','boy\'s jack','becky arena','women s halle mid-rise legging black','crystal buddha','men\'s double puff logo tee','personality','b07a74mdy5','mens ricky super t body rinse','bootcut natural','men\'s poplin plaid western shirt','mens inglorious','med7g40l473c-1001','women billy gold','women\'s t shirt','straight cut jeans','men\'s straight leg','billy straight leg qt','women morgan jean','mens classic hoodie','mens ricky big t','women\'s joey cut-off short','mens true religion jeans billy-rusty barrel dark','mens bomber jacket','support','j\'adore','billy orange','wbfk75l25-11','boys flannel','mens ricky premium','men\'s billy boot cut jean','ms48l14j843c','men\'s t shirts','boys size','wv77l61e72','billy super t ehm','wv77l61e72cm','julie skinny big qt','midnight combo','5978','crystal disco big t','madm23f83-kkm','true religion for babies','billy in pony express','billy bootcut sawbuck','combo super t','casey pink dusty pink','billy super t drifter medium','white crystal jeans','true religion men jean ricky','wq1m09y9-bb','ricky 38','women\'s tshirts','run for the hills','wbdbm18ttky','5285','5855','mens bill bootcut #118','boys old multi qt horseshoe hoodie','men\'s sherpa','super t\'s','wlpsq1036','28 long','4427','billy w','men\'s plaid flannel western shirt','slim leg','bobby 34','men long','brown multi','mens lightweight','women\'s plaid poplin rocky western shirt','mens poplin plaid shirt','mens ricky brown','mean','mens billy natural super t jean','true religion becky super','womens wide leg','mens leather shirt','black v neck','shooter dark','ricky super t destroyed','men\'s ricky indigo super t','billy super t dodge','wadk75f83-lqm','mens sunglasses','mens rickys bootcut','men\'s bobby indigo super t','true religion billy super','5310','wax564uk-2h','true religion billy super t denim mens jeans','wv68k98h573c','womens straight with flaps','stretch poplin','womens retro','mens v neck t shirts','mens ricky super qt','wash ch','billy with crystal','straight titan','ricky\'s super t','boys flannel plaid western shirt','becky rebel','brooch','ml4bn73mdma','womens billy natural super t sugar creek medium','straight jeans with flaps','true religion mens billy','womens becky crystal','mens billy midnight combo super t','w962j59qd','mens the call tee','mq6859el 2r','men point guard super t relaxed','super t for women','womens 32','wy6k35n34-09','red white','men\'s u puff print tee','women\'s buddha crystal v-neck tee','billy quick draw','womens becky corduroy','jack medium durango jeans','men\'s u qt zip hoodie','wq1m26y963','sku w648k98k0309-redwood','ricky distressed','mens ricky denim','ck','men\'s 42','skinny zipper','womens glitz','men\'s bomber zipper','mens ricky brown super t','julie big sugar','5443','womens casey jeans','bootcut gunmetal','rolled cuff','mens world champ','slim big t','mens billy stretch','blue sweater','mens ricky t','mens true religion jeans bobby midnight multi super t-cyclone','men\'s plaid western shirt','sku 10k73-bb','womens medium rise','womens forsaken carrie','men\'s denim shorts','crystal peace','jeans color white','billy natural super t quick draw','men\'s ricky straight leg jean body rinse','bl4ba74vy','bb-short fuse','casey green','mens military','billy rancher','womens jayde','women\'s casey legging jean santa cruz','black puff print','ricky rusty','wlpfhipgift','men\'s ricky natural','mens black stitch','becky medium drifter','wash 2v','joey 32','mens billy brown','womens true religion joey','wcb564k32lf','sku wq1k75j45-40','true religion billy jeans','jeans bobby super qt','white flare jeans','brown poplin','women\'s disco','straight black','billy 32 34','4852','mens billy basic','men\'s denim and twill','true billy','men\'s u triblend v neck tee','mens straight lightweight super','joey reclaim','just','womens stretched leggings','womens medium drifter','men\'s billy orange','5240','mens ricky black grey bqt3','jjl','womens carrie titan','ricky straight leg pant','ricky gunmetal','5484','stainless button','mens tr script','boy t','5670','women\'s classic billy','mens billy t','misty denim','misty hot lead','boys jack brown gold basic dark harlow','mens triblend','mens bobby big','wq1503bcs-jrd','black knit','womens stella big','mens ricky midnight','brushed','bootcut crystal','men\'s bobby super lightweight basic chattanooga','womens tanks and t-shirts','billy bz inglorious','super t sugar creek','bone','becky dusty skies','med rise','coil','5129','becky dusty','women emily jacket','women\'s solid tri-blend v-neck','billy ny super','medium waist','5262','mens billy body rinse','ricky super t bb short fuse','wlps2js211','joey cut off titan','wazn59k67-hu black','women\'s billy petite','ricky bz','wazj58g17-hu tangerine','ricky straight leg twill pants','wazj58g17-hu pineapple','men\'s billy qt-rusty barrel med','womens sandals','wy6g11g17-butter','becky ead','men s logan jean','ricky straight in nashville','4999','true religion becky glitz','men\'s ricky grey titan jean','boy fit','womens super t jeans becky','true religion jeans bobby super qt','men\'s tony premium vintage jean texas plains','white t-shirts','4112','billy sugar','5146','wlps2gr210','slub tee','5350','ricky barrel','men\'s ricky midnight brown super t','wadm25f83-gym','4882','5190','5179','4625','4914','true love jeans','5175','5218','bobby midnight multi super t cyclone');
/* $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);
    }
