/* Popular phrases - POOLDAWG - 17:44:3, Thu Sep 2, 2010 */
var asPhrases=new Array ('break cue','jump break cues','gloves','sneaky pete cues','shafts','sneaky pete','cue rack','pink cue','jump cues','lucasi hybrid','cue balls','snooker cue','balls','cue tips','pockets','predator shaft','chalk','purple cue','break stick','voodoo','low deflection','predator','cuetec','tips','kamui','coin cylinder','stealth','pool balls','balabushka','one piece pool cues','purple','extra long pool cue','skull pool cues','5280','bridge','chalk holder','leather wrapped cues','cushions','playboy','hybrid cue','purple cue stick','pool gloves','moori tips','joint protectors','stealth cues','coin holder','lucasi shafts','break pool cue','pink pool cue','screw on cue tips','joss','pink','ob shafts','ultimate tip tool','nfl pool cues','house cues','junior cues','tiger tip','pink cue stick','62 cue','5280 cue','joss cues','players pool cue','ril11','low deflection shafts','jump break','snooker','predator 314','junior cue sticks','katana shaft','pool cue tips','heavy break cue','break cue phenolic','52 inch stick','pool cue racks','rack','imp02','wolf','travel cases','ng01','r360','magazine','dragon','snooker pool cue','towel','harley davidson pool cues','dragon pool cue','outlaw','13mm cue tips','lucasi jump','wolf pool cue','meucci','lhe20','red pool cue','leather pockets','pool cues with skulls','cuetec shafts','bumper pool cues','mcdermott','skull','mitre','f2720','schon cues','tip tools','mezz shaft','riley','joint protector set','ac11','ath08','dooley cues','pooldawg master chalk','womens cues','ob2','laser cue','elbrkhvy','spray adhesive','ob1','13mm tip','g02','junior pool cues','ball case','archer','elk master cue tips','val02','pocket reducers','mcfarland','pro skills drills','hybrid','cue shafts','zebra','pool table cover','cone chalk','its george','table covers','lucasi break cue','players jump break cue','porper','g201','billiard gloves','balabushka cue','ball rack','powder','dallas cowboys cue','atrox','screw on tips','brush','weight bolt','jump stick','52 cues','pool cue stand','bumpers','cue clamp','felt','action skull','carbon','g97','st louis cardinals','apa','pool tables','graphite cue sticks','left handed glove','womens pool cues','bgsir','spots','aramith','scorpion shaft','aramith cue ball','stinger','aramith balls','lucasi hybrid pool cues','bridge cue','extension','pool cue holder','52 inch cue','ac35','sander','purple case','36 inch cue','quarter holder','cue silk','ath17','talisman','black widow','covers','dawg glove','shirts','lava','black cue','wall rack','trouble shooter cues','jos01','g32','gambler','billiard balls','hand talc','sniper','ecn35','g207','short cue','master chalk','pool table pockets','pocket lathe','cuetec r360','z shaft','dolphins','52 pool cues','aramith case','soft case','masse cues','bridge head','pooldawg cue','cue extension','t shirts','camouflage pool cue','ball cleaner','players cues','ob','hustlin','meucci sneaky pete','ash tray','27oz cue','x1','replacement cue tips','cue top sander','bulldog','scorpion cues','pink cases','imp21','rails','acrnd','cue cases','delta rack','g16','cue cube','leg leveler','yankees','scorpion cyc94','f2750','magnetic dart board','poison','phenolic','caddy','ferrule','pat','sure shot gloves','tip pik','eagle','predator z','mcdermott shaft','saints cues','elite break cues','cue bumper','g48','vik205','black cue ball','lucasi hybrid shaft','cuetec bumper','pred2','lhf46','phenolic ferrule','5280 joint protectors','dawgchm12','break','scorpion','pool cue shafts','mcdermott extra shaft','qttelk','gr13','pnkpht','elite break','mezz power break','l2000sp','27oz','act113','glue','tch10','pool table cloth','viking pool cue','kamui tips','jump buddy','pool cases','cue wax','scorpion break cue','carbon cue','luggage id tags','g21t1','bottle','silver cup','rng07','rng01','val13','q','bbecc','vik23','lex5','nine ball trophy','buckeye','cue towel','light up pool cues','g206','meucci cue shafts','pool stick tips','prexs','ct3671','ath03','le18','delta 13','alabama cue','bw01','ol14','half moon','cocobolo','bbast','mcdermott cues','banking with the beard','ob-1','cue','limbsaver','pool table lights','texas longhorns','elite nexus','g76','triangle tips','indiana','predator joint protector','ivory ferrule','act131','rose','cloth','act39','action cue','q wiz','qt6sct','shamrock pool cue','ol20','snooker tips','water buffalo','ball carrying case','zzsp','washington redskins','tch9','action sneaky pete','bbsaptv','break jump tips','cbvm','georgia','bbsap','mcf204','pk06','ball star cleaner','beard','rock out with your chalk out','m54a','blue master chalk','g202','lucasi jump break cue','low deflection pool cues','soft pool cue tips','corner castings','phenolic tip','act56','pool pockets','lucasi case','ttbow','viper','cases','qtmor','diamondback','cue doctor','ct317','darts','miller light','white cue','sco12','pool rack','scuffer','snooker shaft','dime','outlaw extra shaft','bar','diamond','314','schon weight bolt','viking shafts','jrsnow','simonis cloth','giants','katana','jos16','scoring beads','ll30','banned breaking cues','justa bridge','red circle','scorpion glove','3 shade','action imp02','rilext','heavy duty','tpms12','slip on tip','apa05','actr','tiger everest','pool chalk','cowboys','players sneaky pete','pro series cases','rk8phd','cue tip tools','action sneaky pete cues','sco51','shark','crazy 8 ball','mezz zzsp','black','snooker spots','black and silver','pool table fabric','apa02','screw on pool cue tips','f73b','mcdermott i shaft','stealth pool cues','yankee pool cue','fiberglass cues','north carolina','card game','flames','hand chalk','one piece cue','score board','pooldawg 1 1 soft case','predator sneaky pete','mezz','euro chalker','sneaky pete pool cues','mcdermott bumper','birdseye maple','elephant balls','layered tip','tip tapper','frog','red dot cue ball','tch','elite','jump','jump caddy','voodoo pool cues','the twister masse','billiard digest','banks','lights','qclaw','9 ball','lp-ch','pool ball rack','thunderbolt','harley davidson','pool ball cue','color of money pool cue','minnesota','pool hall junkies','corona','pool rules','reaper','meucci cues','raiders','adhesive','lhah5','cuetec cues','irish linen wrap','elsnk03','pool table felt','lhc97','scorpion snooker','ash pool cues','ipat','hustler','pool tips','repair kit','pink cue cases','shims','le66','sco21','ultimate pool challenge','master cue','willard','player g-21t1','gb9','turtle tapper','voodoo tool','cue stik','fat shaft','viking 314','pooldawg cue ball','g03','johnny archer','era05','shaper','lhf50','mlb dart board','acto bundle','simonis','bears','qccbx','hd20','mcdermott stinger','sandman','g24','pool cue weight bolts','ipupc','tweeten','hammer head','scorp29','viking cues','porper big shaver','scobkb','burnisher','mastering pool','cyc94','gb23','wolves','action jump break','tip master','lc3','spug1','ball tray','womens','lucasi jump break','mh24','porper tip clamp','alison fisher','mushroom grazer','goth','qhl2','rk9ol','apa cards','blade','str08','ep13','viper cues','g95','lh10','griffin','ttvod','cue wall rack','g46','players cue pink','g15','pool sticks','predator weight bolt','lhf10','moori','chm12','g25','break heavy','lucasi extra shaft','g50','vik201','voodoo shirts','g20','green pool sticks','hats','pills','cue holder','tiger','act109','ath04','pool books','ath05','gold 8 ball','ikon 2','jos02','ath23','doctor','g84','act54','g31','g38','g39','g77','g70','ath18','ath07','g69','olh35','ath25','qhciu','brad','act132','ath21','dr cue','cut rite','apa01 pool cue by action black red','pooldawg coin cylinder','g27','52 one piece cue','g65','explorer','vikbrk','cues with screw in tips','3677','ath11','g27p','black widow tungsten dart','act12','scorpion cue ball pocket','magnum','pooldawg glove','g10','silver bullet','36 cue','outlaw cases','lucasi','le29','mcdermott break cue','cuetec earl strickland','cushion facings','5280 pool cue','short pool cues','lh40','simonis x-1','cuetec weight bolt','g53','q claw','tip glue','instruction dvd','levelers','adventure','vodshirt','g42','cue extender','yellow cue','g11','ob1 shaft','tch7','slim shaft','g41','oregon state','predator air jump','dent','c155','cue sticks with skulls','tiger pool cue','wood pool cues','pool tip repair kit','le-46','le pro','p3','voodoo glove','steelers','cone chalk holder','ja04','radial joint protector','radial joint','green pool cues','measle ball','action joint protector','steel tip darts','rempe','voodoo cues','joss n7','cue tip covers','m29b','8 ball replacement','cbpc','stealth black','ik07','pirate','action junior cues','change tip','9 foot cover','preik09','triangle chalk','piloted','virginia tech','ultra glide hand talc','ballstar','marble balls','red sox','meg02','le pro tip','ac22','actop48','mezz power break 2','cyc82','elephant practice','books','red white blue','9 ball rack','acbx18','12mm','red circle cue ball','cuetec extra shaft','aramith pool balls','l2004nb','wolf cues','bhmh','acto57','tiger glue','dvdpgts','15oz breaker cue','unc','cyc84','dufferin pool cue','1 piece cue cases','shadow chalker','lp60','qhqc3','lathe','tch8','rosewood','earl strickland','johnny archer pool cue','eljmp','cleaner','dufferin','scoring','48 pool cue','rush creek','viking g53','pro skills drills dvd','52 inch','8 ball','48 inch pool cue','griffin extra shafts','athena','miami dolphins','action travel case','schon shaft','pocket marker','limited edition','spring loaded leather case','48 cue','green bay packer','9712bd','elcp24','dons rack','everest tip by tiger','saints','tip scuffer','left hand pool glove','chalk stick','i2','orioles','purple stealth','jr10b','talc','ecl24','accessory kit','washington huskies','table lights','beer pool cues','snooker balls','brown leather pockets','spcs','leather wrap','rules','g502','right hand pool glove','1 piece cues','kentucky','gators','pool table cleaner','corner stand','pool cleaner','pink phantom','pool cards','pool tip shapers','free shipping','brunswick pool balls','economy','vik206','schmelke','travel cue case','billiard aim trainer','bees wax','prew','web pockets','ez shine','mayhem evil jester','lhos1','ladies pool cues','gapr','action bundle','luggage tag','predator blak','acto48','delta 13 rack','jim rempe training ball','i-3','crazy','g28','unicorn pool cue','silver cup cone chalk','fairy','starter kit','viking g27','fine line','ttig','g14','dart board','glow in the dark pool balls','table felt','shades','bag tags','lhe30','junior','cuetec sneaky pete','tshirts','laser','action case','ct535','action glove','21-3312','tc8','act41','player g-2218','valley cue ball','scorpion pool cues','pool ball stickers','tip removal','outdoor','aiming by the numbers method','light up pool stick','g27b','table tennis balls','q clip','bundle','ecp22','masse tip','reaper pool cue','katxs','rmr181','strap','dart cabinet','pocket liners','angle buddy','apa cases','jpmcd','tennessee volunteers','actxs','pink pool cue cases','clips','university of miami','lhe 10','players flirt','red dragon','acto','adv81','mcdermott joint protectors','l-e46','kids','quarter','ghost cue','ikon','bbat','act102','tucker','lucasi sport','widow','triangle rack','cue sander','aramith ball cleaner','small cue','jr10','triangle','314 shaft','ivory','ld5','action','mezz cues','tiger sniper','harley davidson case','3 piece cues','bslc','table brush','joscom','samsara tip','quick clean','zero flex','dart flights','pool cue tip repair','g22','q-wiz','irish','adv60','action velcro','ct426','tip pick','g55','42 inch','zen pool','pdbundle','cuetec cue shafts','qcscf','z601','ecgt22','fh04','schm02','stl','neptune','aramith magnetic','jester pool cue','act69','george tool','chalk dude','schon bumper','l-el','9712','action junior','coffin case','practice pro pocket reducers','lucasi cues','dent remover','replacement pads','tiger shaft','clock','tip repair kit','big beulah 2','trob','pooldawg','q clean','longhorns','hard case','rail cushion','chem pak','outlaw cues','zzbk','hof02','coin','pink pool case','proshot glove','bk2','tally','ac22 black','13-677','pool cue extenders','isb35','predator cue cases','adv85','g08','act10','bhal','viking g37','mezz z404','va61','yellow cue stick','floor cue holders','20-0600','viking g69','jack daniels cue','dvd one pocket','lucasi pool shaft','inl07','player with a women on it','rail and rubber','pinup','corners','vintage','scorpion ball','mezz z601','chalk on a stick','cue cleaner','instroke cue cases','clown','predator p3','gr01','orange pool cue','gray chalk','red cue stick','le pro pool cue tips','lucasi lady','one pocket','gr17','strickland','ct272','adjustable','parts of a pool cue','chicago bears','ttut','nfl','dragon cues','aluminum case','elite cues','fr8','eagle cues','str03','52','measles','g23','spring loaded','polo','engraving','ol09','pool rails','ac1224','schon cx53','hard tip','spade','joss shaft','elite cases','ele06','green cue','dubliner pool cue','valley supreme','neon ball','g06','lucasi joint protectors','twister','bengals','oklahoma','bbbm','scorpion weight bolt','tip burnisher','predator 314-2','rosin bag','mcdermott genesis','scbreak','scorpion jump break','qr02','longoni','vod11','rosin','wood joint','samsara','proshot','table cue holder','shaping','lime green cue stick','qham','philadelphia eagles','predator ikon 7','meucci weight bolt','miller','ds67','lucasi l-e46','6 in 1','sppsp1','score keeping','pool cue tip glue','ac24','trouble shooter','scoreboard','elsnk','ispr22','green','ct450','5280 case','ril06','prert1','bbbt','cue chalk','bw02','fats','deflection shaft','mercury','apa01','vodcof','ld1','table cleaner','flower','viva','f46','elk master tips','wood-to-wood','wood to wood joint','c267','lucasi cue case','ath','viking bumper','everest tip','tbth','27oz pool cue','mercury cloth','griffin gr13','lucky cues','bacote','pink ribbon','harley','michigan','cue doctor wax','predator cues','jester','athena ath08','ath20','kit','ld2','griffin gr-09','white pool cue','zz09','slip on ferrule','travel bag','chscc','ohio state cue','tight rack','pooldawg glove red','metallic','3 8 x 8','illustrated','how to tip','red chalk','pro cup cue','8 ball ash tray','stone','no wrap','screw on cue','meucci gambler','beads','glide','stealth blue flames','cuetec joint protector','dawgsc','elite extra shaft','sco30','delta','cyc89','grp03','scorpion cue ball','mhbj','cue tec','pool cue with cards','lhf30','sco89','2000sp','soft hit cue','preik03','birdseye','pool table spots','poker tables','flower pool cues','dartbundle','triangle pool cue tips','light up','shaping the tip','qcpv','predator case','bw12','actbc02pd','legend','porper cut-rite','porper mushroom grazer','5 piece pool cue','marble pool cues','pool dawg glove','lady luck','elephant','table spots','gb21','q glide','cue weight bolts','jos14','act49','pooldawg soft case','ball cleaning','mahogany pool cue','viking mirrored','predator by jacoby','ld6','pool games','lhfsp','predator weight','str09','rubber pockets','qtara','str06','ct275','clover','flag','ct451','pins','clemson','bw10','bw08','pool cue repair kit','byrne','penn state pool cue','quiet roller','bw11','bw09','cue and case bundle','ct396','bw07','action color cues','ct454','cement','ct269','swirl','rose cues','black leather pockets','jump cue tip','children','sir joseph','cuetec break','games','stealth pink flame','42 cue','bat','actobundle','tip maintenance','pool cues with screw on tips','pool stick holders','qtsam','ttgm','lp30','griffin gr23','ld8','adv82','ct3674','olsk','dvdvts','chscc1','hot pink pool cue','jump tips','unicorn cue','sardo','act103','lhc96','lhe','lhos2','shaft polisher','sardo tight rack','white 8 ball','pool ball cleaner','lonext','cat','lhos3','fr12','lhc99','aluminum','lh20','feather stripping','gr14','lhf','dart tips','wd700','13-671','chrds','gr24','pooldawg hat','adv59','fr10','gr04','spring loaded cue case','medium hard','glow in the dark ball','meucci bumper','pete','era01','griffin pool cue','apa cues','blue','scorpion one piece','nebraska','replacement tips','san francisco','ctxs','chicago cubs','greatful dead','hammer head darts','bloodwood','ebony wood','jos61','jr01','floor','ultimate ball cleaner','sco73','cue stick with cards','3m','black master chalk','viking g01','olh22','george','liners','jpex','ladies','col bundle','eco02','dart bundle','imp03','viking g50','blood','bridge hooks','gr23','mhsp','break pool cue tips','bgps','pool cues kits','actrop 52','action era','check out','q-slick','action act','chalk off','i3 shaft','tttm','ball polisher','package','masse','plastic apron mitre','billiard ball clock','cue lathe','oklahoma state','tspahtribal','tiger everest tips','intimidator shaft','act60','billiard cloth','wood','chs12','athena shaft','ll20','chalker','jpvik','bowtie tool','white eight ball','mlb pool cues','walking stick','one piece','lucasi sports series','meucci stick','lhe10','tiger icebreaker','stlsnk','5280 shaft','ttsan','mlb cue','cardinals','dvdpel','purple break','holder','play your best 9 ball','big beulah','action inlays','flirt','eco01','jrbs','cue it up','f104','camouflage','leather case','8ball rack','lucasi blue','crow','dual tone','action bw02','lhc','nodor','clemson cue stick','titan','l2000jc','schon extra shaft','custom cues','zzpb2','scorpion nt04','pool felt','purple chalk','sparkle','black dot cues','lp40','bhwp','radial pin','wr6d','texas tech pool cue','pcw11','ep07','scorp27','action rng06','mg08','tiffany light','lucasi air hog','mezz break cue','spj','30-mag','long cue','lhf65','luggage','blue flames','griffin gr17','bkippb','clbb','predator bk2','kelly pool','lucasi weight bolt','nt06','viking break cue','jb6','cuetrack','tigx','ol11','bbsffsu','baseball','tppk05','viking g94','psycho clown','37-0006','cue chalker','screw on','cuetec bowtie','lp65','ep17','johnny archer cue','viking extra shaft','hustler cue','sneaky','l-e63','breaking cue tips','polish','auburn pool cue','cue wiz','break book','phillies','deflection','cue picks','pool challenge','jpac','porper pocket chalker','predator break','mcf211','black and white pool cue','action jump break cues','u23','elite heavy break','tp5122','hd10','actop52','viking g02','mezz z801','leveling a pool table','viking g14','pm','arachnid','scorp53','aramith tips','lucasi l-e66','pearl','broncos','tpabc','jos69','hirun','tin signs','k55','trtg','cue tip repair','spjl','trick balls','stlcpl','nim04','ballstar pads','aramith snooker balls','table shims','404','lucasi lhc97','action extra shaft','phoenix','silk','tiger x','bbrem','5 piece','tip repair','lucasi ld1','great white','eight ball cue rack','pink break cue','porper shaft polisher','action act60','pcw','magnetic','lock cases','bbcbp','ncaa cue balls','action balls','american flag','le7','hot pink cue','bald eagle','elk master','kansas city chiefs','action weight bolt','jump break stick','picker','porper glove','pooldawg strap','5280 cue ball','outlaw cue ball','viking g11','lsu ball','prep','nighthawk','holly','may19','f2780','obbrk','cues by weight','flight protectors','bandit','black pool sticks','phoenix cue','pro cup','super aramith pro','viking g06','mcdermott break jump cues','hx8 shafts','blouse','actrop','twister tip','l-e9','scorp03','jpluc','ar02','ctxsr360','ct401','ep01','m29','sco74','lucasi custom cue','nimbs','rm24','strips','tall','16-1408','byrne\'s','10 foot pool table cover','mezz extra shaft','8 ball pool stick','acgt22','valley pool balls','dodger pool cue','cue grip','evil jester','athena butterfly paint','sneak pete','black balls','r360 shaft','long pool cue','3rd eye stroke trainer','ballstar cleaner','tspahppub','everest','centennial balls','dark','pdstrap','q-clip','aramith premium','movies','hx8','lhbb2','sc11','ct263','tray','l-d2','predator shaft viking','novelty balls','tspahvin','white','slip on','booger','mezz joint protector','7 foot cushions','cuetec cleaner','cue doctor dent buffer','pool ball cases','lsu pool cue','bbpccb','jb03','hp01','pool cue chalk','gr11','brass tip tool','c151','tampa bay rays','1951uga','action shaft slicker','veltex','ct273','olh11','5280 extra shaft','metal pool cues','wood case','sco78','dent buffer','riley extension','chargers','cuetec break jump cue','viking g04','gb01','adv07','gr15','bbsfpur','table walls','aramith super pro cue ball','texas longhorn pool balls','clean','scorpion ar04','inl','ttpmg1','lxs','wisconsin','3 8 x 14','chst','miami hurricane pool cue','lp','lucasi hybrid l-h10','airshooter','1 1 soft case','aramith ball and cue case','meucci 9721','elbrk','guiding wheel','wood rack','clown pool cue','leather tally bottle','bk2 shaft','valley magnetic cue ball','digest','jacksonville jaguar','pool cues with roses','36-0535-00','denver broncos','pk01','l-ss2','cloct','raiders pool sticks','ac35 burgundy','pink cue and 8-ball set','taliesin','nfl cues','junior shark','wr8','action dragon','mushroom','3 piece break cue','ds46','action starter cues','elsnk01','bundle purple','viking black','snk01','action zebrawood break jump cue','dart case','cuetec glove','hybrid fusion','cyc95','pool clocks','ol08','best pool cue','g2204','l-ex30','lucasi rosewood','black light','screw on ferrules','brad scuffer','neon cue','arizona state','m71c','pool table repair','z405','pool dawg stick','corona leather bridge head','male joint','viking g76','mg05','lucasi pool cases','pooldawg apparel','poker pool balls','indestructable racks','pool spots','viking g29','color of money cue','outlaw pool cue case','mezz bumper','qtkam','jb5','soft cue cases','l-d1','viking break','radial','purple pool cue','tiger smoother','ebony','detroit','qtkblk','firm hit','lex10','crown standard','stealth jump','sco75','ep02','viking g20','cue repair kit','hot pink','cue tip repair kits','slate wax','pooldawg one pieces','z806','sco83','great break shot','p3 weight bolt','rams','ld-1','fat daddy','deadstroke chalker','tubes','wr10','wrsc','viking case','tp3m77','adjustable weight','pooldawg spots','act119','ramin','scorpion break','elsnk04','g21bd','jos85','qtelk','pink sticks','sneak','4 shade','fsu','3 8','quick connect','knight','scorp12','turquoise','tip cover','mezz dual force','table chalk','sisal','stl8','actop57','pea pool','action replacement ball','shane van boening','sniper ii','purlght','replacement pool balls','orange cue','cube','bgct','cleveland browns','spccc1','mcdermott jump cue','abrasives','porper cue case','tttpshch1','pool chalk holders','cubs','ttcss1','scorpion wood cues','pearl white','aramith super pro balls','cx51','cueball','castings','8 ball bible','pdcmillt','actop42','mirror inlay','aramith pro','widdy','straight pool','c261','moose','spirit of america','aramith pro cup cue ball','light shades','impala','white cue rose','8 ball cue sticks','action zebrawood','mega thrust','49ers','spqgl','beginner cue','5280 break cue','mcdermott mg01','apa07','scorp26','play your best 8 ball','cue stands','magnetic shot planning table','tp5124','slyde rite','orange case','cuetec jump break','rattle','grim','purdue','mirror','qtwb','lhsp20','qtscorp','biker','lhsp40','deluxe cone chalk holder','lucasi lh10','action deluxe glove','scorpion scorp51 pool cue stick','apa06','black glove','viking g57','bee','thread protector','37-0003','dude','vx04','crutch','40-0451','cx03','predator fat shaft','pooldawg towel','ikon 9','ds61','ist23','3 5 cases','play your best','may21','all white','gb6','qhqc5','new york yankees','m22br','spmc','elite jump cues','elite nexus reserve','safety','cmp02','joss weights','c265','cuetec ct263','mezz sneaky pete','ds21','ct264','pnkpht52','cuetec warp resistant','rmr132','shuffler','scorpion case','scorpion scorp22','trcrk','13mm ferrule','predbu','hand towel','black marble','pool table brush','pooldawg logo','predator bumper','l-er','l-2000sp','acbx40','bbsf','bbsfunc','5280 mhsp','card shufflers','bgss','act101','5280 cue cases','elite cue cases','act05','predator sport cue','scorp30','viking sneaky pete','bullet','tiffany','gem03','mh14','mh12','21t1','viking g05','ds01','mcdermott cherry','tennessee titans','elk tip','mg14','olh','demon','pink jump cue','action value','bbg-20-24','bculti','mcdermott intimidator','viking leopard','prep3','nebraska pool balls','pool ball carrying case','mika','mh13','hurricanes','cuetec black diamond','hhm52bk','firestorm','42','jumpbreak cues','stlsnk02','viking birdseye maple','37-0001','bkzen','bullet scuffer','elp22','the pro book dvd','sharpener','qcul','crown standard belgian balls','m85d','phantom','bulldog pool cue','lucasi hybrid classic','spcpqc','bca book','c110','liquid burnisher','byrnes dvd','chameleon rack','mcdermott nighthawk','sneaky pete cue shaft','tees','cue rite','qttal','scorp24','qtwb1','nt0','argyle','mezz tip','860','scjc','scl24','trophy','bottle openers','bkwidow','lucasi pro package','36-0535-01','8 ball towel','drtsg','cue tip screw','bbsfiow','actrvdlx','mef01','qtzzpi','13-674','9711bd','act 109','total shot trainer','wisconsin cue ball','preik02','acl22','52 cue sticks','st louis','5 16 x 14','sc71','glass rod','sb4035','cloth cleaner','enm-6','reach','indianapolis colts','scoop02','pc36','9721bbd','dime shaper','tp5069','blue lava','lucasi hybrid l-h20','nylon wrap','preik08','lp-bra','bbepb','smooth','l-2000jc','saps','mef01bd','lhf70','cuetec 3 in 1 bowtie tip tool','vod','cue tip clamp','hh80pbs','action inlays inl07 pool cue','bgac','rk8p','playboy lava cue','ball counter','predator low deflection shafts','pool cue glove','shelve','15-4116','bbsftex','aramith cue','lc-3','lava skull','plastic apron','tppk01','tiger laminated','duck','pdhat','st louis blues','action white marble','bull seeker','lhsp50','lucasi ld2','ct455','venom','air hockey puc','5280 ele06','tiger dynamite','mef04','porper shaft','competition','act 11','griffin gr14','mcf209','light break cue','porper chalk','jpmeu','mcdermott wolf','billiard balls carom','players jb6','tefco master spots','scorpion blue','sdsticker','plastic shims','cyc91','cuetec edge','stealth holders','cue shine','swirl billiard balls','scsc','cyc93','preik01','sb2035','cyc92','lucasi traditional','pool shark','ttm44','aluminum clamp','acbx','players bumper','lifetime warranty','linen wrap','loop','aramith billiard balls','stealth cases','acbx14','bk350','ath24','srcueball','act21','burgundy','bumpso','aramith tournament','tpk669','ath06','shaver','scorp22','trk','tt4ts','action one pieces','players jb5','southwestern','lucasi exotic','pooldawg viking','act134','blue marble','act135','martini','act100','power pool','super','silver pool cues','chick','scjump','scorpion bumper','adv84','adv78','pool extension','bbsapvpk','sports grip','bkbill','chiefs','bruins','cue tools','act07','tpk','bhjc','mezz jump cue','pink break','lucasi l-h40','spcpqw','action hustler','bbvmcb','tiger burnisher','act01','practice','cuetec natural','lucasi 2004','lil guy','lp-drg2','pool wall rack','sniper 2','porper tip','jpmezz','players flirt f2760 cue','m32e','ttps','ttat','bca rule book','scorpion cue case','princess','texas','pads','predator cue tip','predator fat','peace','top rail','colors','break down bridge stick','light sticks','act 56','gag pool cue','gadesb','mcdermott m33','a&m','bullet pocket chalker','cue rags','bkidiot','cue tip sander','schon cx04','tag','mile high sneaky pete','5280 jump break','mh21','99 shots','scorp15','small ball','cushion repair','scop01','pro skills books','pool cue wall holders','pdcblp','all cues','cue tip cement','pcd22','8 ball floor','act59','action rings blonde','lucasi lewr','action pool stick','ttut r','viking hd1','padres','joss jos02','stiff hit','pirate pool cue','play','piston','predator extra shaft','mcf205','light-up cue','tpk668','poker dart','all sneaky pete','scorpion ar02 johnny archer','tiger ball cleaner','cue tip medium','gapad','auburn tiger','loc-tite','aramith tournament set','act114','small tables','lc 3','val','mcdxs','action pool case','gr08','pink junior cue','corona leather bridge','pool kits','1x2 case','steel joint','bbswl','protec','acsc03','gapbpp','bbpink','simple','jos','billiard ball case','putnam','tpptc','action standard cue ball','travel cues','sn3','aramith red circle','microfiber cloth','blank','shockwave','actop36','lucasi le66','mcdermott leather wrap','linen cleaner','mcdermott sedona','pool ball polisher','silver widow','pokpak3','cigar','pool ball mug','tank top','table kit','lucasi lhf55','preqr02','players g21t1','scorpion design','green bay','lp20','cuetec ct450','scorp01','billiards mirror','tp5055','texas longhorn pool cue','poker tray','sco81','bgppg','players break','laminated tips','action pak aluminum clamp','team pool balls','mcdermott jump','bbcc','bbpok','pool cue polish','mcdermott leather','motivator','lsu cases','tiger red line tips','lucasi l-p40','athxs','craft master','action velcro delux','9709','graphit pool sticks','lucasi tips','texans','scorpion sport','scorpion fiberglass','baltimore','vx14','colored chalk','stealth dooley','scorpion johnny archer','meex','mezz airshooter','georgia tech pool cues','7500mic','georgia tech pool balls','pooldawg 1 1','tspftar','premier aramith balls','mcdermott m43a','cribbage board','detroit tigers','stash','bbsfvtech','lucasi l-p20','viking cue with flames','clat','montreal','cue mate','ttcz','ttppp1','ttqm','box','solid hit','all breaking cues','7500cle','lucasi cue bumper','schon stl9','pdtank','stealth 52','pnkflm52','pcala','mep02','bbrcc','cue shaft slicker','pool marker','bbsfmich','bbsfbcl','tungsten dart','louisville cardinals','tp5125','atrox tip tool','bbsfmia','15-4110','salute','plyrmiss','2 4','got chalk','cltri','tungsten soft tip','mf-b56','lucasi le46','lucasi leather','val supreme','action jump','g-02','pool videos','small gulley boots','black plastic bridge','miami hurricanes','rk9p','scorpion grip','ranger','ptkpsbl','cue length','mg-26','tbmb','99','precision grip','9ball rack','predator joint','preik04','15-4115','l-l20','action joint','gb3','measled cue','acbx05','acsc','tpqkcln','16-1414','bb8bwht','pool cue with extension','pool table apron','aramith measles','15-4111','red dart','scorpion scorp21 white w black pool cue stick','dawgchm','sentry','action tips','lucasi low deflection','vod06','prebk2spt','36-0908','ttgt1','all pool tables','actrop 57','13-676','twins','bubbles','rng05','serious','7500miz','bbg-25-11','pdcfsu','action 109','rng03','bkgob','tacker','denver','malachite','monthly cues','copag','players junior','ram lights','rousey','six point','threads','meucci medici','act04','cuetec ct450 pool cue','ttm','viking g36','act71','cue tender','dvdphj','cups','sco80','chem','cue z','pdcmarine','gcl24','bhbs2','arcade style dart','lpch');
/* $Revision: 6883 $
 *
 */

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';
          if ( theSearchbox.clientWidth < __SLI_customisations[ __SLI_ApplicationName ][ 'DropListMinWidth' ] )
          {
            theDropDown.style.width = __SLI_customisations[ __SLI_ApplicationName ][ 'DropListMinWidth' ];
          }
          else
          {
            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=' + escape(__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' ] + escape(__AutoComplete[id]['element'].value) + asugvar;
          }
          else
          {
            if(f.onsubmit)
            {
              if(f.onsubmit() !== false)
              {
                f.submit();
              }
            }
            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);
    }