/* Popular phrases - TRUERELIGION - 12:32:22, Sun Sep 5, 2010 */
__SLI_ClientDefaults =
[
    ['TextBoxIDCustom', ['searchfield']]
,['TargetURL', 'http://jeans.truereligionbrandjeans.com/search?w=']];
var asPhrases=new Array ('joey','billy','billy super t','ricky','joey super t','becky','billy big t','bobby','swarovski crystal jeans','hats','ricky big t','julie','bobby super t','ricky super t','shorts','disco','johnny','white jeans','womens billy','stella','joey big t','billy super t mens jean','crystal','becky jeans','womens joey','super t','rainbow','36 inseam','tori','tony','jacket','mens joey','sneakers','becky super t','billy super t womens jeans','zach','hoodie','casey','super t men jeans','carrie','dresses','mvp','jodie','mens billy','bobby men jeans','nathan','qt','super t women\'s jeans','joey super t jeans men','boots','claire','johnny super t','joey super t womens jeans','jack','julie super t','joey jeans','inglorious','disco becky','true religion jeans billy super t','geno','big t','shorts for women','jeans','rainbow billy bootcut','rocco','crystal button jean','stella skinny','ricky giant big t','black jeans','leather','julie skinny jeans','size','disco joey','jordan boyfriend jeans','white','vest','mens super t','billy giant big t','mens billy big t','bobby big t','caps','misty','destroyed','disco joey big t','white jean true religion','baby true religion','billy jeans','becky disco crystal','mens billy super t','stella ponte','true religion hoodie','billy jeans men','body rinse','nathan giant big t','mens skinny jeans','baby','pearl','true religion shorts','billy t','khaki','mens sneakers','womens super t jeans','ricky inglorious','boyfriend jeans','petite','womens lowrise','disco billy crystal','mens joey super t','swimwear','black','leggings','sweats','black jeans women','t shirts','disco billy','petite jeans','ricky straight leg jeans','billy rainbow','super skinny','socks','buddha','supervixen','flap pocket','crystal button','leather pocket','hang em low','42','skirt','animal print','billy qt','44','super big t','36','pants','billy body rinse','womens billy super t','jordan','womens becky','ricky storm rider','skinny jeans','giant big t','red','swarovski','big t jeans men','storm rider','true religion shirt','lonestar','belt','jeggings','mens bobby','leather jacket','gwen','sophie shorts','slim','mens shorts','western shirt','joey rainbow','true religion jack','mens jeans','mens bobby super t','dark drifter','billy crystal','jack knife','mvp jeans','johnny womens jeans','womens shorts','destroyed jeans','40','mens ricky','23','pearl jeans','twisted seam','mother of pearl','casey legging jean','red jeans','holly','gold pockets','lasso','black womens','becky crystal','casey santa cruz','stella skinny jeans','billy super big t','medium drifter','studs','short fuse','pink','shirts','mens ricky super t','crystal jeans','whipstitch','disco becky big t','disco billy big t','ripped jeans','boyfriend','billy old glory','fragrance','big t jeans women','women joey super t','studded jeans','carrie flare','infant','ricky body rinse','ricky men jean','womens billy jeans','true religion jeans men','riley','jack knife dark','womens super t','joey big t womens jeans','lizzy','puff','mvp mens jeans','10-564','ponte','jimmy jacket','billy big t men jean','classic jeans','grey','stretch','rainbow billy big','dark vintage','cowboy','eva','disco big t','sophie','cowboy destroyed','santa cruz','graphite jeans','low rise jeans','womens sneakers','sweaters','white shorts','true religion giant big t','black jack','joey t','pink crystal jeans','whipstitch men','julie skinny','whipstitch big t','mens shoes','big qt','38 inseam','ricky in body rinse','cowboy medium','lizzy crop','button','becky big t','straight leg billy super t','graphite','bootcut','fleece','black jack dark','32 inseam','jack big t','twisted seam men','legging jean','becky inglorious','misty leggings','julie lonestar','big t cargo short','starburst','inseam','joey crystal','white men','billy black','t shirts women','low rise','nathan big t','vigilante medium','old glory','crystal true religion jeans','loaded gun','black skinny jeans','short fuse medium','glitz','38','twill','mens geno','true religion becky','riley short','dress shirts','ricky super qt','sweatshirts','3075','10-503','billy whipstitch big t','womens joey jeans','mens hats','joey cut off','mens white jeans','white denim','casey body rinse','glitz and glam','mens hoodies','mn2859y9','pink crystal joey','24-859ombb','billy white','3341','gold','white skinny jeans','10-572nbt2','super qt','womens denim shorts','becky bootcut','plaid shirt','joey destroyed','billy twill','sammy','crystal pave','wq8k35bcs','women low rise','ricky super','mens black jeans','womens big t','keira shorts','ricky natural big t','midnight rage','joey shorts','dukes of denim','m70h54el','urban cowboy','3977','swimsuits','pave','flannel','womens hoodie','baby gift set','ricky t','mens jacket','swarovski crystals','trouser jeans','black stitch','cargo shorts','petite joey flare','eagle','true religion joey','nathan jeans','light wash womens','julie big t','joey vintage','cut off','billy super t jeans','2w storm rider','4103','3212','pocket','racer back','4064','3340','lowrise','capri','womens disco','aj','womens white jeans','johnny super t jeans','10h41om','stretch jeans','orange','super','bootcut mens','pony express','swarovski crystal true religion jeans','10-572','ricky super t high plains','wa4bh44el','m70h54el-9v','womens stella','billy classic','light','jordan boyfriend','storm rider medium','savannah','true religion jeans women','bobby super t jean','bobby jeans','skinny','womens joey 36 inseam','crystal starburst','becky dark vintage','42 jeans','rambler','jeans with crystals','stella old glory','womens jeans','tan','capri jeans','storm','tee mens','deep lagoon','high plains','original','billy qt body rinse','mens shirts','24-859bkt2','billy big qt','2914','billy big t jeans','chain','billy jack knife dark','becky petite','womens tony','rocky shirt dress','regular rise','lawless land dark','womens billy big t','super-t','24-858nbtdl','denim jacket','body rinse jeans','zuma','billy white men','tony classic','2s body rinse','black grey','mens billy super big t','urban cowboy super big t','jack super t','an','purple','joey super','womens white skinny jeans','tori short fuse','becky promise land','billy starburst','denim jeans','crystal jeans for women','billy white zuma','true religion joey super t jeans','true religion bobby big t','midnight','tony short fuse','disco jeans','billy loaded gun','promise land','sequin','drifter','elastin','m242h37y9','julie super-t','vintage','jimmy','wide leg','jean shorts','mlptr1169','giant big t men','jack slim','joey petite','straight leg','womens disco joey','dark pony','zach skinny','10k67','mf6bk55qd','ultra skinny','baby jeans','ricky qt','jimmy super t','disco joey big t in dark promiseland','gunmetal','ridin dirty','4043','billy medium drifter','ricky super t round up','stella petite','bathing suits','billy jack knife','seam','men\'s carson','10-572nbtc','casey legging','big t men','khaki jeans','super billy t lowrise','billy super t lasso','denim vest','ricky super t short fuse','becky super t promise land','ar','double barrell','bobby cut off','flare','baby set','pink disco','buddha jeans','billy embellished','embellished jeans','joey super t jeans','29','trouser','mens v neck','johnny dark sierra','bb','24-859nbtdl','johnny straight leg','billy petite','orange threaded jeans','womens crystal','mq6859bgbt','whipstich','johnny super','animal','joey dark vintage','joey super t black','white skinny','camo green','tank top','joey qt','loaded gun wash','ricky black jeans','denim dress','billy super t dark sierra','womens disco becky','mens black','polo shirts','sherwood','wash ar','mb8859ts','lagoon','mens billy jack knife','becky dark','ricky big super t','wq1564bcs','10k73','dark promiseland','natural super t','twisted seam women','true religion','24-803nbt2','calvary','purple crystals','womens skirts','super big t men','billy big t jeans women','billy disco straight leg','green','v-necks','giant','tonal classics','black men\'s jeans','wash r7','billy women crystal','rusty barrel','mens 42','womens disco billy big t','ricky round up','billy eagle','calvary medium','becky super','lawless land','elisa','laguna','triple needle','lonestar skinny','women\'s champ football jersey','love','wagoneer','stella black','n7','rivet','men ricky super t round up','white wash','jeff','mens straight leg jeans','mens ricky big t cowboy destroyed','mens ricky super t short fuse medium','h9-ok corral','mv68l11d85','we29h38ik','true religion disco joey','11 lonestar','women sweaters','pink thread jeans','3980','joey gold','stella legging','billy big','3079','no flap','blue','true religion mens billy','round up','true religion bobby','badger','natalie','wq12j32b05','womens qt','10-503nbtc','pink disco joey big-t','zach jeans','get creepy','billy storm rider','m242j26omob','white shirts','billy super t bootcut jeans','old','joey petite flare jeans','mb8859e4-2s','men\'s big t cargo short','becky super t dark','women\'s carrie','joey tie dye','men\'s western plaid','dark pony express','buckeye dark wash','billy super t lonestar','keira','becky mother of pearl','becky lonestar','wide leg jeans','wq8k35bcs-bg','pony','ricky super t loaded gun','dark-pony','purple disco','handbags','billy bootcut','mens true religion bobby jeans','becky dark drifter','inglorius','ricky short fuse','billy dark drifter','white denim jeans','ricky big','gray jeans','medium rise','becky petite lonestar','zipper leg','men\'s ricky big t-medium drifter','14','billy super t dark wash','mb8b16e4','mens u puff print tee','allie','optic white','scarf','puff print tee','big t drifter','champs','womens 36 inseam','mens joey big t','super big it','world','disco becky purple','men\'s plaid western shirt','dukes of denim short triangle top','bobby cut off shorts','nightowl','straight','dark urban cowboy','carson','fleece pants','white crop','billy giant big t-high plains medium','10h39om','becky super t vigilante','embroidery','women skinny jeans','tie dye','mens inseam','ricky white','cut','true religion ricky super t jeans','ricky giant big t lawless land dark','billy lonestar','vigilante','p2','madison','straight men','men billy big t bootcut','jeans without back flap pockets','cut off shorts','bobby t','24-859nmgbt','crystal shirt','billy super t dark','stella body rinse','grey jeans womens','julie sunset','true religion dress','womens claire','womens joey big t','blaire','womens becky super t','10-502ts','urban','33 inseam','3994','aqua','new jeans','hang low','outback','julie white','true religion billy lonestar','gray','straight leg men','white nathan','white hoodie','mlptr1164','disco billy big t drifter','camo','3298','distressed','womens becky petite','destroyed wash','olivia','sunset pass','short shorts','joey stretch','joey 36 inseam dark vintage','becky midnight rage','rainbow sophie','crop','billy gold','stone','28 joey','mens qt','10-599','mb8858ts','gwen skinny','billy straight leg','m05j60d16','zach black','stephen','billy petite dark vintage','billy 34','berkeley','true religion billy super t','billy white jeans','julie pave','billy short fuse','mens billy giant big t','yellow','thermal','emily jacket','julie sunset pass','super t bootcut','super t straight leg','classic pocket','buckeye dark','womens straight leg','billy stitch logo big t','rocky','high plains light','womens sophie','becky promise','franky','leather shirt','tshirt','ricky super t santa cruz','legend','bobby super','laguna medium','becky body','ricky hang em low','billy classic womens jeans','bikini','becky pearl','crop jeans','womens billy classic','back flap pocket','crystallized','denim leggings','womens petite','billy big men','cotton pants','mens coats','mens vneck','long hair dont care','stagecoach','v neck','mens ricky big t','true religion skinny jeans','cali jersey','joey lonestar','bz','slim leg','joey body rinse','w10j45omob-2s','be','w07k89md','joey super big t','inseam 30','nathan mens','gift set','lawless','faux pocket','promiseland','tori lonestar','ml4bg48mnt','womens johnny','plaid','billy t dark drifter','seal','body rinse super t','gwen women jean','billy grey jeans','authentic vintage','true religion jeans ricky big t','womens boots','cornelli','women\'s joey 36','allie women short','joey patchwork','leah','womens julie','zach ultra skinny','mvp world champ classic','mens billy whipstitch big t','womens stud jeans','wq1k75bcs','ricky big t double barrel','fuse','wq12j36b05','becky t','spandex','high plains dark','relaxed jeans','3892','set','womens disco billy big t crystal','joey dark drifter','mb8800e4','mens light wash','twisted','claire classics','true religion jeans johnny super t','plaid western shirt','silver','joey super t laguna','womens leather','billy big sugar','stella pony','55','one flap pocket','cabrillo','carpi','point guard','billy whipstitch','allie short','women\'s bobby','mb8859e4','giant t','mens western shirts','mens billy giant big t loaded gun','u puff','billy super big t lawless land dark','parfum','billy giant t','sierra','women carrie','3m','jodie dark drifter','triblend','joey 36 inseam','jack torque','ricky savannah','red pocket','johnny straight leg jeans','ricky big t jeans','r7 rambler','women billy dark','joey super t body','tori bootcut','mens leather jackets','vintage joey destroyed','womens dress','mens nathan giant big t','womens becky promise land','mens t shirt','ricky whipstitch storm rider','ricky super t straight','billy dark vintage','emily','womens billy super','i love johnny','skinny mens','mens ricky body rinse','1189','joey cut off shorts','mens billy stitch','u8','mens ricky giant big t','true religion joey jeans men','big t hoodie','barrel','true religion billy','mp4bg48vy','my5bg48d22','wy6k35c92','all black','body rinse claire','bobby big','racer','stripe','rocky dress','bobby inglorious','flap pocket jeans','mens jack','women','love haight','ricky slacker','bobby body rinse','billy deep lagoon','women\'s joey super t','bobby super big t','mb8800ts','sunset','billy leather','i love joey','24-859nbt2','swarovsky jeans','4 shorts','24-859nbtls','billy jean petite','billy wagoneer','billy giant','natural big t','v neck tee','sugar','julie supervixen','hang em low mens','2','mens mvp','true religion stella','relaxed tee','white and gold','3979','double barrel','badger dark','ricky true religion jeans','joey natural super t','billy 33','point guard super t','joey rambler','heels','men\'s whipstitch','wq1k28bcs','bobby dirty','black jacket','2w','medium legend','pink swarovski','joey bootcut jeans','billy-deep lagoon','billy big t-graphite','ridin','xl','bootcut womens','womens julie super t','womens billy lonestar','girl\'s road trip tee optic white','mens ricky super t cowboy destroyed','womens billy vigilante','holly women jean','brown shirt','womens leggings','my5bg48mn','wl4b460l21','true religion mens jeans ricky big t','bobby super t short fuse','mens rocco','ricky loaded gun','womens tori','womens leather jacket','ricky santa cruz','womens jodie','10-564nbtc','wg9572c88','tan stone','billy t black','true religion bobby cut off shorts','bobby qt','red trues','big','billy super big t-body rinse','malibu','flap','brand','joey natural','red shirt','womens u puff print tee','men\'s billy deep','buckeye','eva pant','disco billy big','sateen','joey flare jeans','women\'s johnny dark sierra','billy natural super big t','wv8k35c91','ricky giant t','wq8k35em','skinny super t','10-503l','wash dc','15 1 2 back rise','joey super-t medium laguna','true religion jordan','denim jimmy jacket','mens giant t','white skirt','womens animal print billy','4152','joey 36','skinny khaki','wb84g10e4','men\'s joey super t high plains medium','disco bootcut','joey super big t lawless','wash 83','mens billy t','w96k39qd','white zuma','billy storm','black skinny','w34hj28eg','women\'s joey flare','wash f3','qt hoodie','joey super t medium','wash bz','road trip','wash am','womens joey petite','men\'s flannel','tube','white bootcut jeans','ricky super fly','high plains medium','women\'s johnny super t','super t jeans','2s','3604','cutoff','mens 40','coco','true religion billy jeans','brown gold','joey pink pocket','wash f9','julie glitz','whipstitch jeans','b24e08qz','becky short fuse','plaid western','new lonestar wash','johnny sierra','bobby straight','women\'s joey 36 inseam dark vintage','mh7h54omb','blue tshirts','joey big qt','joey crystale pave','mv68l11d96','becky pave','womens joey classic','womens vintage joey destroyed','mv68g51d96','baby 3','ricky cowboy destroyed','women\'s black jeans','true religion coats','billy vigilante','back pocket designs','joey pink disco','billy super big t medium drifter','ridin dirty dark','true religion disco','4062','stretch denim women','wl4b460mn','durango','julie crystal','women\'s julie lonestar','hi tops','mens ricky whipstich','mens billy twill','ricky grey big t','wy1k35el','ricky storm','ricky high plains','27','pebble zachs','3885','3496','ricky black jack','dc','mens twill','36 36','mens body rinse','3654','body','zach body rinse','super t storm rider','31 inseam','becky rinse','women\'s disco becky big t','sophie jean shorts','ricky super t medium','tie dye tank','slacker','3266','women sequin jeans','mh7h54omb-t3','ricky super big t men jean','28','11','womens billy legacy medium','white jacket','mens straight leg ricky','ricky body','billy super big t jeans','corral','billy dark','white t shirt','3947','mens ricky storm rider','true religion jeans','blaire short','joey black','bottoms','3192','wb84g11e4','julie gold','blue t shirt','mens ricky super big t','white lizzie','wv68k98e17','mens ricky black','men\'s nathan','men t-shirt','3656','womens joey flap pocket','32','true religion zach','mv3bg48tt','3691','true religion julie super t','mens billy storm rider','billy flap pocket','az','mens true religion jeans billy-deep lagoon','mens u tee black','ricky giant big','joey cutoff','mens joey super','u tee','men\'s mvp point guard super t black jack','true religion leather jackets','white julie skinny jeans','c','womens khaki','3972','v-neck','embellished','joey destroyed womens','3642','3623','u6','true religion jeans men\'s ricky super t-round up','disco joey dark drifter','joey flare black super t lasso','big t body','mens zach','joey relic','3306','womens plaid shirt','sadie','big disco','true religion billy big t bootcut jeans in medium legend wash','athletic build','cheyenne','billy drifter','allie cuff short','womens stretch jeans','dakota sky','seven jeans','lone pine medium','3967','womens joey dark','womens jeans with crystal','men\'s billy jeans','dark sierra super t','billy super big','10k68s','83','black eva pant','wash 3m','billy 40','mens inglorious','womens red jeans','mens rocco body rinse','vigalante medium','stretch bootcut','stretch poplin','3297','mens v neck tee','rib tank top','sofia','white pocket','sedona','true religion men\'s joey super t','4017','6t','womens billy medium drifter','3457','3784','m242h67y9','billy rinse','15 destroyed','super t dark homestead','men\'s billy short fuse medium','12 rise','mens jack jeans','gl78g77d70','stephen shirts','womens jean shorts','ricky super t cowboy destroyed','women shirts','stretch and straight','joey inglorious','3647','billy giant big t-lasso','mens billy lasso','3t','ricky super big','super t american','bobby super qt','3391','3928','vneck','womens white','mens high plains','blue shirts','stella petite dark','mens fleece','3023','4091','dirty','julie lonestar skinny jean','w962g15b86-2s','trbj','legacy','women white short','billy legacy medium','3674','3174','3616','billy dark mens','mn2859y9-ar','4033','3222','40 jeans','i love','3730','m177k58d72','true religion jimmy super t','dove','3855','3866','billy petite women','j6','wg3h64eg','crew neck','super t-cowboy destroyed','becky inglorius','3727','3763','3','women\'s jackets','womens joey body rinse','mens joey body rinse','billy giant big t-loaded gun','3183','white tank','mens joey super t body','mens jack big t','white joey shorts','womens pink','black jean shorts','3772','3790','t5','loaded','ricky super big t storm rider','3001','box','3726','billy super t lawless','3405','joey t jeans','3920','pineapple','cashmere socks','women black super t','3949','ricky super big t men jean cowboy medium','3387','billy sierra','3129','4071','3871','3983','men\'s joey super t body rinse','3564','3610','3799','3615','true religion ricky straight jeans','skinny leg','white leggings','mens ricky big t stagecoach','3662','3407','women\'s jordan','4058','mb8j19ts','ricky body rinse white','mens billy short','4063','3535','women\'s gold','mens ridin dirty','3487','womens stella petite','3990','ricky billy','3853','4023','ms48j49b49','r7','3402','royal','super t true rider','ricky straight','3411','ms48j49b46','billy natural super big t urban cowboy dark','white bootcut','becky supervixen','3968','men\'s billy giant big t lasso','mens geno shorts','3690','bobby short fuse','3890','109g93','super t with big t','big logo','3975','billy super big t lawless','17 elastin','joey lawless','mens jeans nathan','billy big t legend','3636','3234','wash j3','billy high plains','true religion bobby jeans','#24-859bkt2','63','3978','3410','women viscose','4032','men\'s billy super big t body rinse','4','w2','billy super t body','3952','joey super-t','mens billy super t urban cowboy','men\'s ricky inglorius','white v-neck','ricky hang em','rocky triple','3987','3792 storm','t lonestar','joey big 7','super t medium','sophie cheyenne','4050','billy in dark drifter','mens jeans 40','3946','becky boot-cut drifter jeans','102j58','men\'s bobby big t','mh7h54omb-2s','3870','t4','true religion billy big t','true religion ricky big t','joey 15 destroyed','3896','3995','3899','26','ricky destroyed','3792','4042','4079','skinny jeans men white','true religion billy jeans studs','women\'s vintage','21','billy in lonestar','womens socks','10j14om-11','mens bobby super t short fuse','womens white denim','wash f4','ricky super t 55','4012','womens becky super t medium drifter','3805','women rambler','3455','3940','3779','3998','3846','3465','3543','3714','true religion julie','3775','3687','joey 32','3999','3764','3706','3578','3938','3939','3986','wide','3778','3573','billy natural super t urban cowboy','men\'s joey flare black super t','3705','3572','women gold','3774','true religion bobby multi','3971','3912','21 leg','men\'s stephen shirt black','3012','julie dark pony','billy super t cowboy','j3','ricky midnight','4006','men\'s low rise','men\'s billy natural super big t urban cowboy dark','rider','joey crystal flare','women\'s stella petite dark pony express','3996','3819','3717','womens size 36','3953','3707','womens billy legacy','3720','true religion becky disco','mens bobby body rinse','rib','3721','3807','3628','mens cowboy','super t in lasso','men destroyed jeans','women\'s julie natural super t dark homestead','women emily jacket','billy giant t lasso','billy graphite','4046','keira dark dakota sky shorts','mens western','3676','3732','true religion joey stretch flare jean','3833','2z','womens disco joey big t','billy-legacy','men billy super t bootcut in dark wash','bobby rinse','billy super t high plains','3982','super t santa cruz','joey swarovski','true religion joey super t women','3567','billy animal','4049','julie t','women\'s vintage joey','billy super t drifter','mens rocky triple needle','wq64g10el','8 1 2','men\'s ricky giant big t lawless land dark','billy super-t','mens ricky super t santa cruz','orchid','womens becky body rinse','true religion johnny','3565','printed pocket','billy 3979','stretch shorts','women\'s joey dark vintage','white denim shorts','3413','wh55h12ed','billy big natural','women\'s disco becky big t jack knife dark','billy big t bravo','womens skinny','mens low rise jeans','men\'s billy big t medium legend','joey lasso','super low leather','made in','women\'s gwen rambler medium','3848','double','mens true religion jeans ricky corduroy-ghost town grey','3301','billy outback','billy big 7','men\'s jimmy hoodie jacket dust bowl','slides','bobby kids','becky cotton','3445','joey with leather','3787','mens whipstich','men\'s billy white zuma','men\'s billy rainbow big t','bobby night train','billy-disco','3867','women\'s rambler','8b','3240','billy big t loaded gun','men\'s bobby super t blue river','billy jack','true pink','round','3653','ricky super-t round up jeans','men rinse','women\'s disco joey sequin body rinse','bobby shorts women','3806','women 32','billy super t dark urban','28h81omb','2%','2a','men\'s fairchild big t pullover hoodie black','joey\'s super t','men\'s billy super t lasso','3386','3594','3553','3797','w1','3400','wh5502mrj','2f','julie sequin','3692','mens billy body rinse','wv1bg72b07','joey graphite','becky 30','men\'s billy stitch logo big t jack knife dark','men\'s joey flare black super t lasso','mens size 38','billy giant t loaded gun','2947','3741','white rinse','moose','joey size 23','women\'s low rise','ricky super-t','wq64g10el-f2','18','women\'s billy super t drifter dark','2829','super low','billy hitching','joey flare vintage','mens ricky jack knife dark','joey with leather pocket','men\'s rainbow ricky','billy 34 33','3454','3673','28 inseam','3100','women\'s jordan boyfriend','super t savannah','black joey flare','womens skinny stella','joey homestead','women\'s jean','ricky yellowstone','black buttons','women\'s becky panhandler','julie style','billy super t body rinse','wl96j90c50','3566','3640','billy super t light','3663','black stretch pants','julie pony','joey stitch','billy in bravo','3802','wp4b460vy','men\'s grey jeans','super big-t','wlpsierra','womens big joey','julie westbound','3440','women black bootcut','joey flare black super','men\'s bobby super-t','mens billy zuma','men crystal buttons','womens billy natural','3851','womens big-t denim fleece hoodie dust bowl','disco flare','mens ricky whipstitch','bobby 2s body','1v','3213','3629','3254','womens marissa','ricky jeans in superfly wash','super drifter','wlptr1000','ricky 2w','womens 100% cotton','2853','mens sizing','mens vintage wash skully tee','19','womens aqua','womens v neck','3382','billy nine lives','disco promiseland','black t shirt','big 7','2924','womens lonestar','julie night','34 30','3467','3558','3483','joey flare leg jeans','3599','joey t stretch','3217','ricky big t high','3580','bn48h87lj','3228','billy super t 2s','billy super t 38','disco medium','2826','dip dye beanie','mens black skull poplin western shirt black','mens poplin dardevil western shirt white','mens billy leather flap rattlesnake','womens sunglasses','3626','becky 29','36 in','black gwens','billy super t light wash','3127','black western shirt','joey wildcat','soft brown','becky dark savannah','joey destroyer','billy 2v','men size 34','joey flare jeans lonestar','mens billy-body rinse','womens stretch skinny','men\'s socks','mens ricky super fly','8e','womens henley','becky 2%','mens zach santa cruz','black super','women\'s relic julie body rinse','billy super t in light','single needle','mens true religion billy super t','billy light wash','men\'s ricky studs','black rinse','3478','28 x 32','3219','womens dark harlow','womens joey fit','billy super t 34','women\'s inseam','disco drifter','bobby twisted','billy big jeans','big t men hoodie','3320','big t pant','joey flare body rinse','36 jeans','joey 26 inseam','bobby mens kick','joey in body rinse','men\'s billy with studs pops','bobby round up','women\'s rockstar stella rinse 26','ricky fit','joey 3m','mens hitching post','mesh','big t switchblade','3379','julie black super t homestead','black wash','msl','mens lasso','2909','mens vintage shirts','36 34','becky 32','women\'s sienna rambler medium','joey 100% cotton','mens ricky prankster','3255','repair hoodie','mens 28','women\'s rockstar stella','1b','men\'s true religion billy super t jeans','womens billy body','1i','billy super t in dark sierra','2913','big t body rinse','mn48h34kc','billy 27','womens white t shirt','mens wool hat','2910','mens_billy_bootcut dark_drifter','mens gloves','3271','billy in rio grande','joey super twist','joey flap womens','mens storm rider','3242','black patent','women\'s studded','ricky straight-leg jeans','28 ultra skinny','3086','mens flare','womens v neck t shirt','men cowboy joey','joey 2v','women\'s julie big t dark lovestruck','men\'s daredevil repair tee manilla','big t bravo','julie 2s body rinse','billy true blue','joey size 27','womens flare','womens lone wolf','bobby fit jeans','2940','womens joey 100% cotton','men\'s relic','men\'s ricky patent leather dark prankster','1309','bobby frontier','dark big t','joey medium nine lives','ricky blue rainbow','billy-body rinse','men\'s true religion super t jeans','3245','super t light wash','becky xfit','rust button','mens pipeline jeans','billy orange','3122','billy super t 6w','3140','womens joey white sequin','wl97g76dt','mens rebel wash','men\'s billy with leather pocket drifter dark','joey pipeline','becky medium','mens true joey super t religion jeans','wren','joey 63','3053','3116','2812','womens joey cut off shorts drifter medium','2705','3113','1548','joey super dark','2907','billy super stretch','bobby 38');
/* $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);
    }