/* Popular phrases - POOLDAWG - 19:12:1, Sat Jan 28, 2012 */
var asPhrases=new Array ('break cue','cue rack','jump cues','chalk','shafts','sneaky pete','gloves','snooker cue','jump break cues','sneaky pete pool cues','bridge','tips','catalog','low deflection','felt','pink cue','chalk holder','cue balls','balls','voodoo','lucasi shafts','break pool cue','coin holder','rails','cue tips','rack','pink','pocket marker','balabushka','predator','kamui chalk','balabushka pool cue','magic rack','cue shafts','kamui','aramith','pool tables','predator shaft','stealth cues','lights','break','pool table cover','break stick','meucci','cloth','wall rack','pool gloves','quick release cue','one piece pool cues','jump break','pocket chalker','graphite cues','gloves left','pool balls','predator sneaky pete','snooker','pockets','spots','katana shaft','mcdermott shaft','players cues','cuetec shafts','mezz','cases','pool ball sets','graphite pool cues','purple pool cue','skull pool cues','house cues','cue holder','outlaw','table covers','cone chalk','junior pool cues','lucasi sneaky pete','extra shafts','purple','jump','pink pool cue','delta 13','eight ball mafia','pool cue extension','low deflection cues','talc bag','moori tips','deadstroke','cushions','tip tools','skull','5280 pool cue','athena','extension','viking cues','harley davidson','joint protectors','cue cleaner','pocket reducers','players shaft','ladies cue','48 inch cue','alabama','meucci cues','scoring beads','harley','screw on tips','ob shafts','harley davidson pool cues','stealth','sneaky pete cues','q wiz cleaner polisher','meucci shaft','snooker ball sets','dragon pool cue','8 ball mafia','schon cues','measles cue ball','q claw','sniper tip','claw','48 inch pool cue','tip shaper','kamui tips','bridge cue','earl strickland','players','playboy','training cue ball','5280','super slyde rite talc bag','graphite','shirts','bumpers','predator cues','predator z shaft','tiger tip','cuetec break cues','cuetec','billiard gloves','scorpion break cue','lady luck','black dot shaft','slip on tip','52 inch cue','low deflection shafts','womens cues','powder','weight bolt','pool cases','outlaw cues','pink break cue','players sneaky pete','katana','poison','q wiz','athena pool cues','proshot billiard glove','nfl pool cues','mayhem pool cue','towel','cue extension','g core shaft','womens pool cues','billiard balls','break shaft','elite break cues','break sticks cues','dragon','action break cue','adventure','scorpion','sneaky','coin cylinder','pool table cloth','ball cleaner','joss cues','raiders','pool marker','mezz shaft','wolf pool cue','quick clean','short pool cues','ferrule','light up pool cues','black cue','apa pool cue','break cue phenolic','r360','scoring','bw02','elite cues','pool stick holders','pink pool sticks','3 piece pool cue','rubber','ball sets','mcdermott','bk2','score board','packers pool cue','magnetic cue ball','scorpion cues','flames','leather wrapped cues','unicorn','purple cue','master chalk','pechauer','tiger shaft','snooker cue tips','kids cues','gloves right','heavy duty pool table cover','elite','griffin gr17','lucasi weight bolt','pills','36 inch cue','shaper','cue extender','voodoo pool cues','trouble shooter cues','minnesota fats','pool cue tips','leather burnisher','action cues','break joss','tables','g31','outlaw cases','action','tiger emerald','pool cue case','pool table spots','x-1','covers','ferrule tips','eight ball mafia cue','lucasi','ob2 cue shafts','m54a','magic ball rack','strap','elk master tips','accessories','pool ball rack','heavy','triangle tips','bridge stick','instroke cases','graphite pool sticks','ebm02','57','314 shaft','junior cues','p3','snooker tips','shafts for lucasi','masse','apa cues','lucasi hybrid','baltimore ravens','riley snooker cues','yankee pool cue','water buffalo','felt for pool table','kamui black tip','floor stand','apa cases','pool table lights','cuetrack','schon shaft','phenolic tip break cues','predator p3','g214','g207','phenolic tip','mezz pool cues','schmelke','pool cover','aramith tournament pool balls','ng04','cue rest','mali','ath01','kit','cue wax','pool table felt','griffin cues','outlaw 10.5 horsehair pool table brush','air hog jump cue','scuffer','dragon pool sticks','dufferin','blade cues','oakland raiders','mh36','q glide','carbon fiber','riley','9 ball rack','triangle','players break cue','red circle cue ball','balabushka cue','table cleaner','rose cues','joss sneaky pete','chalker','blue diamond chalk','ball star','green','bundle','mcdermott joint protectors','tip glue','quarter holder','simonis cloth','ipat','49ers','delta','mezz break','adv83','lucasi pool cues l-d2 lucasi natural stain pool cue stick','billiard t-shirt','brunswick','cue cases','aramith ball set','pink sticks','lucasi l2000jc','cues american pool','cushion repair','billiard table clothes','t shirts','mcdermott cues','cue bumper','pads','pool cue guiding','aramith cue ball','talisman tip','le pro','preik','ncaa','wolf','adv99','adv60','cue stick holders','apparel','chicago bears pool cue','heavy break cue','canadian maple','ob classic','magnetic','table felt','sneaky pete break cue','pool cue racks','uniloc','moori','mlb','dart board','bridge rack','poison jump break','ct273','clown pool cue','allison fisher cuetec','hxt99','cue chalk holder','gloves sizes','talc','griffin','porper','pool sticks','mcdermott break','simonis 760','le66','leather pockets','predator joint protector','colts','color of money cue','pool ball cases','porper big shaver','sco24','dragon cues','6 cue wall rack','layered cue tips','8 ball rack','pool shafts','short cue','green bay packer cue','dallas cowboys pool cues','sco22','pool cue holder','ultimate tip tool','stinger','act109','pill pool','pro skills drills','62','cue wall rack','cue silk','r360 shaft','euro pocket chalker','green pool cues','joss','outlaw break','lucasi break cue','action jump break cues','black cue ball','ipupc','billiard digest','icebreaker','shaft cleaner','g224','lucasi ll20','poison break','bees wax','pool cues','lucasi lhe10','peradon','joss shaft','poker pool balls','ravens pool cue','red dot ball','ball case','simonis 860','apa24','purple cue cases','mlb pool balls','act41','apa','imp21','4 piece cue','star cues','action case','cue clamp','pill bottle','magazine','tiger glue','kelly pool','chiefs','pool chalker','slip on pool cue tips','round case','cleveland browns','viking','simonis x-1','joss n7','black widow','hats','gcore','tiger sniper pool cue tip','viking shafts','imp16','bengals cue','mercury ultra','cue reach pool cue extension','tin signs','extra long pool cue','sport case','viking g27','joe porper','q clean','rose pool cue','aramith ball cleaner','deadstroke cue holder','right hand pool glove','competition cues','feather stripping','ballstar cleaner','players pub','k66 rubber','bottle','pool extension','apa01','weights','voodoo shafts','imp20','tiger everest','allison fisher','tip pik','razorback pool cue','hard pool cue case','kids','nfl pool balls','lucasi cue ll20','action weight bolt','pool table covers 8 ft','purple and black pool cues','elite nexus reserve','banned','dawgbg','8 ball','schmelke sneaky pete','cardinals','vod09','rail cushion','cue chalk','snooker shaft','lhf65','schon','billiard ball set','lhf55','lucasi jump break cue','samsara','ball rack','cone chalk holder','lhf70','laser','predator pool glove','child cues','ob-1','cannon','nfl pool table cover','black pool cue','celtic pool cues','poison break cue','qtwb','cleaning cloth','tar heels','mh35','rm06','rm02','era03','nickel','mh28','ball carrying case','ghostball','ath','lex','pi kappa alpha','sport grip','acto57','green bay balls','women shirts','rubber feather stripping','vintage','aramith snooker balls','lex20','arkansas razorbacks','boar tip','outlaw weight','pool ball tray','pool cue repair kit','mh30','le pro tip','new york yankees','castings','shims','ultimate pool challenge','guiding wheel','gem03','leather pool cue cases','42','g407','tip replacement kit','extra long','quick release joint','pool rules','g-core shaft','carbon fiber pool cue','irish','cue tip pick','trick shots','skeleton','15oz break','mafia','jr cues','rubber bumper','wd700','tshirts','pool cue shafts','screw on cue tips','cue shaft cleaner','pool table cleaner','vod07','le pro cue tips','steelers','48','5280 cue cases','tiger everest pool cue tip','alabama pool table cover','cyc89','g30','ol20','pool dawg soft case','pool cue tip glue','1 piece cues','lighted pool cue','instroke cue cases','viking g76','yankee balls','icebreaker tip','ct266','wr7wc','wisconsin badger','suede cues','french tip','harley davidson case','athena ath23 cue','ng05','dead stroke cues','ironwood','gr19','light fixtures','rail felt','cue tip burnisher','turquoise cue','mcdermott bumper','48 cue','blue pool cue','cleaner','ghost','blade','reaper','red pool cue','phenolic','ct450','pooldawg master chalk 12','mayhem','tip repair kit','pool cue stand','stickers','pooldawg pool glove','lex50','fsu','beginner cue','dolphin cues','ballstar','box cases','bud light cue','apa02','bridge head','bw01','delta rack','36 pool cues','gators','new england','black gold','36','ct731','tefco spots','players bumper','tattoo cue','screw tips','wr2p12','q cloth','i shaft','tip burnisher','left hand pool glove','screw on pool tips','novelty','claw pool cue holders','lunar rocks','sigma alpha epsilon','lucasi big beulah 2 break cue','tpk66','billiards t shirts','apa08','uni-loc shafts','apa06','national','chalk for hands','magic 9 rack','aramith balls','southwest','ob cues','snooker balls','peas','spring loaded cue case','cue track','cleaner and polish','action cue reaper','ob2','pool accessories','sco25','mezz cues','red dot cue ball','maple cue','eagle pool cue','hook','tiger burnisher','z shaft','turquoise','youth sticks','soft cue tips','cue reach','lp65','i2','ecc24','plastic apron mitre','pill balls','tip replacement tool','cuetec pool cue','zzsp','coffin','cuetec r360 edge','starter cue','qtlp','qttev1','bible','3rd eye','qttalwb','mcdermott g201','replacement cue tips','pittsburgh steelers pool cue','qtelk','scorpion sco03','pooldawg retractable pool cue chalker','crutch','challenger','meucci sneaky','qttem1','action cues spider','5280 extra shaft','brush','red chalk','sco23','red sox','action reverse','pink pool case','qcsbcs','pool challenge','trouble shooter','poison cues','ld6','skull cue','imp19','qcapa','cue stroke','elite ep23','l-2004nb','moori v','green bay','west virginia','sander','cuetec pool cue shaft','coffin case','tip clamp','lh40','southwest pool cue','metal cues','best selling cue','rush creek','silver cup chalk','penn state','air hog','vodshirt','pool cue grips','soft cue cases','cue tip covers','chargers','u23','shamrock','pete','power piston','27oz','g225','mh38','missouri tigers','ct296','porper cut rite','brunswick pocket','elsnk04','pro cup ball','19 oz cues','super pro','i3 shaft','2x2','action act56 break jump cue','cloth cleaner','cyc80','joss color of money cue','luggage tag','players pool cue','clock','pool table shims','steelers pool cue','clown','longoni','metal','patch','gecko','aramith case','ivory','cuetec glove','accessory kit','white 8 ball','pool cue box case','eight ball mafia case','qwiz shaft cleaner','elbt02','sco27','5280 case','l2000','pool dawg master chalk','cyc88','ol21','v129','riley pool cues','13mm water buffalo tip','mcdermott cue ball','pooldawg blue master chalk','moori leather pool cue tip medium','cue spots','gb3','pdtprop','pool stick stands','cue tip tools','break cue shaft','bat','36 cue','cuetec jump break','orange cue','practice cue ball','metal pool cues','kamui tip tool','elite ep20','aramith two cue case','blue flames','bag','q-wiz cleaner','quiet roller','kamui gator','pink cue cases','pittsburgh steelers','mastering pool','poker balls','phil capelle','42 inch cues','yankees','predator break cues','pool lights','g core','pool table cushions','pocket liners','breakrak','break rack','ball cue case','custom','jos07','bullseye bridge','yg0352k','super pro cup','ct694','pool cue chalk','joss weights','joint protect','players pool cue shaft','2 pool balls','elbrk','engraved cues','reviews','cam','break jump tips','outlaw shafts','may26','tip shaping','57 inch pool cue','hard case','grim reaper','dolphins','ng01','cue ball tracker','10mm tip','ath23','clover pool cues','calendars','g223','g-2218','cbblk','cue stands','ol29','yellow','ol28','corner side','personalized pool balls','harley davidson pool sticks','pink ball','air hockey pucks','ebm03','lucasi break shaft','youth pool cues','tpabc','meco01','butterfly pool cues','break tips','cue shark pup','bgvod','ep02','impacts imp12','tweeten','elk master','g23','pool cloth','levelers','snake','qtkam','ol11','vod13','rock out','meucci bumper','jim rempe','shaft burnisher','open finger glove','outlaw pool cases','viking break','scop01','purple pool case','saints pool ball set','simonis 300','snk01','slip on ferrule','jb5','wisconsin','ikon','elite banned break cue','mika immonen','everest','meucci joint protector','fiberglass','womens cue sticks','lc30','f99','giants','voodoo t shirt','ac11','rose','lucasi jump break','sco75','clips','leveling a pool table','delta 13 rack','clemson','ath29','pea bottle','pooldawg case','samurai','ath31','ct263','riley cues','outlaw break cue','sco30','ol14','players joint protector','ath03','st louis rams','black shaft','cue stick bumper','pink and black','cues by weight','tiger x','rage','euro chalk','apa pool tables','jim rempe training ball','maintenance','thor hammer','ohio','digest','griffin pool cue','light cue','golden dragon','pool cues maintenance','cleaner machines','ttpup','ohio state','i3','ct690','ttcc1','meucci high pro','dallas cowboys','miller light','mafia pool cues','jump stick','glue','poker','fiberglass pool cue','long sleeve shirt','weight rings','saints','actbjz','floor cue racks','championship cloth','g401','pool chalk','table cloth','pea pool balls','voodoo glove','its george','cue cases 1x1','san diego chargers','demon pool cue','warranty','lhf50','wrsc','lc3','air hockey','ferrul tool','ct692','aramith red circle','table covers 8 ft','jos12','gel','ct691','deluxe billiard glove','vod16 voodoo pool cues','pool books','tips for cues','gambler','training','rkdelta13','jos93','snooker cloth','action rng02','everest tip','voodoo pool case','table spots','col06','ll30','one piece house cue','half moon shelves','pool table pockets','dart tips','27oz break cue','table stickers','dawgqw','cue doctor dent buffer','burnisher','elite pool cues','shaft slicker','counter','bar cues','delta 13 elite','custom pool cue','patriots','lhe10','act41 sneaky pete','predator sneaky','slim pool cues','mcdermott g210','cincinnati','billiard aim trainer bat','roadline','rules','meucci purple pool cue','predator fat','soft hit cue','sneaky pete break','ob 2','predator glove','l-2008','hard cue tips','tool','flights','cuetec ct263','southwest cue','bullet pocket chalker','meucci power piston','dragon cue stick','redskins','m16a','lhbb2','cues with artwork','color of money','rule book','stealth shaft','eliminator','hd20','predator z','ob 1','mcdermott stinger','wheel','3 piece break jump cue','junior shark guiding wheel','tpk558','telescoping bridge','predator ikon','13mm shaft','best damn','pool cues with skulls','apa07','blue diamond cue tips','neon ball','joint protector uni-lock','tp5145','alchemy','scoop03','9 ball cue','porper cue case','radial pin joint protector','table brush','cue tech','elephant balls','spccc1','billiard cloth','cue doctor','meucci weight bolt','new york jets','predator 314','mcdermott weight bolt','cocobola','jb5 break jump cue','chicago bears','qhciu','beulah','pool table brush','dubliner','g201','christmas ornaments','elephant','action adventure','virginia tech','pooldawg 1x1 hard case black','key chains','lucasi hybrid flexpoint','green and black','predator bumper','outlaw ol11','tiger laminated','314 fat shaft','rolling stones','complete cues','cue tip sander','tattoo pool cue','lh30','action 131','aramith tournament set','black and white','cx81','money','super aramith pro pool balls','3m','impact cues','screw tip pool cues','slim shafts','bears','extender','baltimore ravens pool cue','drill instructor','13mm cue tips','atlanta braves','tennessee','beads','viking g30','angle buddy','books','9 ft pool cover','5280 gem03','g211','linen wrap','ecnr35','trtg','fiber ferrule','laser pool cue','grip','purple glove','predator cue shafts','red flame','silver cue','master chalk box of 144 cubes blue','pool case strap','zzxs','repair','cuetec r360 shaft','ravens','white pool sticks','glow in the dark pool balls','zebrawood','viking harley davidson','simonis','mcdermott g603','players jump break cue','light-up pool cues','stainless steel','jump tips','g206','actbj08','scorpion black','simpsons','olh22','aramith crown standard belgian pool balls','aluminum cue','shafts for joss','crazy eight ball','allison fisher pool cues','leather','tee shirts','vod16','legend','may21','scorpion case','cue sticks','rush','meg02bd','hirano','ath08','predator sport','imp12','jos20','meucci mother of pearl','elite ep02','2004','quick release','schon cx51','pool table parts','jump case','layered tip','outlaw hard case','ball counter','hardware','f46','malachite','ct69','outlaw ol24','31 shaft','g603','mushroom grazer','red cue','packers','8 foot table cloth','players edge','mayhem cues','mitre','blue diamond','sniper','cone','voodoo multi tip tool','pooldawg catalog','skull wood pool cues','lucasi l-e7','adventure adv60','replacement pockets','miami','slug doctor','keychain','tiger cue tips','voodoo case','spssp','prejnw','adv07','jrps','broncos','ball carrier','pro series cases','viking joint protector','blue diamond tip','edge r360','scorpion grp01','hxt70','wood rack','actrop 57','large leg leveler','bear cue','skull cues and cases','training ball','marble balls','st louis cardinals','elite cases','lhc97','12mm extra shaft','denver bronco pool cue','bowtie tip tool','rack hook','mali felt','texas longhorns','repair kit','cocobolo','bbplz','aim trainer bat','chairs','bld07','sth04','gator grip','sco76','gr05','lucasi hybrid big beulah','cx77','moori cue tips','scorpion sco75','master cue chalk','mcdermott gecko','tp5124','cuetec warp','5280 pk06','epoxy','scorpion sco76','trademark','demon','wpba','tally','lucasi 2000sp','glow','act49','g21t1','dart case','cowboys cue','schm03','lucasi le66','lc50','box cue cases','syracuse','hxt1','viking g50','k66','blood splatter','carolina panthers','9 ball rules','measles','beer pool cues','action break jump zebrawood','lucasi slim','dawg','schon weight bolt','predator bolt','delta elite','mef01bd','shades','blue sticks','portable cue holders','chargers pool cue','q-claw','bw12','ob-2 shaft','bkht','jos04','yankee pool balls','athena cues','mug','oklahoma','aim trainer','cuetec bowtie','instroke','players hxt','scorpion weight bolt','bksilmet','g62','aramith cloth','players cue sticks','buffalo','rockies','lucasi lhf65','valley pool table rails','pool stick rack','48 cue sticks','predator jump','florida gators','junior','action shaft','short shaft','arsenal cues','314','stroke','dart board cabinet','one piece','scorpion pool glove','ash tray','cue it up','hustler cue','ttkgg','bk99','meco03','sth03','elbt01','mlb pool cues','dime shaper','sport wrap','air hockey tables','53','bullet pool tool','ball polisher','360','dallas cowboys ball','i2 shaft','tttm','butterfly cues','8 ball magic rack','pool table cushions set','z404','z401','z405','zz08','bbsapvpk','bld01','prep3','pink flames','pool table hooks','meucci winner','voodoo coffin','cuetec edge cue','nfl pool cases','tch8','pocket repair','meucci 97-21bbd','scorpion snooker','l2000sp','break cue elite heavy','ptc cue silk','act54','red and black pool cue','48 pool cue','ac48','georgia','gray chalk','smoke','action 52','guaranteed improvement','9 inch tip sander','ivorine ferrule','green bay packer','pea pool','m72a','pool tips','tiger cue shaft','hxt','championship','q claw holder','lh10','floor rack','tch10','sure shot','99','mahogany','tch9','ultimate tip tool refill','cue ball trainer','hybrid jump cues','dragonfly pool cue','pool dawg catalog','athena pool cues ath11','harley davidson cue','box of 50','tennessee titans','beginner pool stick','bgebm','pro pocket reducers','moori leather tips','chalk board','aramith measles','play snooker','sport craft','bgps','qham','bbpro','g303','washington redskins','rock out with your chalk out','spdb','predator pool cues','lss2','kamui ii tips','scorpion scbreak','pool cue sets','x','lsu pool cue','black cue case','joint stainless steel','chameleon','hybrid','chm12','g507','green pool sticks','tiger hard','aramith pro cup','cx82','elite 62','steelers cue','ball holder','leprechaun','games','schon cx16','schon cx33','oakland raiders pool balls','pearl','da vinci','m29','red case','ez jump','elite 3 5','action spider','pool cue bundle','dawgfather','boston red sox','pool cue scuffer','ath27','pool spots','le9','bullet','robin dodson','tiger everest tips','pocket lathe system','lc45','plastic shims','chm144','3 8 x 14','action lady luck','child','mcdermott g303','stroke trainer','elk tips','action val02','action weight','720','ob cue shafts','57 inch cues','ath05','beanie','ebm04','ebmc22-a','dawgtsdf','oklahoma sooners','act136','hof01','dallas','ril09','instruction books','glide','big beulah 2','extra shafts for lucasi','perfect aim','playing cards','cat','cue tip size','grip handles','detroit lions','g210','dawgbow','ornaments','phi','cbrc','lucasi l-2008','vod14','lucasi radial pin','lxsu','outlaw weight bolt','mezz weight bolt','aramith cue tip','scorpion snooker cue','tweeten repair kit','pool table slate','mcdermott g507','russian','cue covers','brad','q wiz polisher','dart set','g304','ipjt','sth90','zero flex','lc40','long cue cases','adv75','ll20','lucasi le-29','griffin gr05','mets','7','mcdermott g216','white cue stick','viking quick release','elite cue cases','rmpr54','tip cube','pool cue wall racks','table repair','sardo','tip tool bullet','players jump break','viking cue blue','mastering the jump shot','meucci pool sticks','g02','twist','qcsbpc','soft tip darts','prexs2','qks05','zero flexpoint lucasi','actsp08','ivory joint','rams','pool magazines','predator limited edition alexander','pick','jc02','sth12','phillies','mezz z401','g203','qks04','qks03','qks02','qks01','g502','purdue','apa q claw 3 cue holder','royals','ik07','dent buffer','cbpc','tiger pool cue','str04','ballstar pool and billiards ball cleaner','female cues','vod10','7 ft pool table cover','grpjmp','athena ath31','action val05','actbj05','philadelphia eagles','sth01','ct721','sc35','2101','ebmc22c','junior stealth','ebmc22d','g505','san francisco','cpa02','lhf60','qhqc5','bkpybp','action str','cx16','seattle seahawks','pool triangles','florida','frtear','lhf46','g701','qhqc3','qcpv','g302','outlaw rack','action bw14','retractable cue','pool holic','elite esp01','elite leatherette','g216','ct720','cuetec fiberglass','ele01','9 ball bottle opener','ebm07','free shipping','g320','jos21','players cue g-2218','lcsp','action act 56 break jump cue','best pool balls made','ewr','quarter','airshooter','coaster','tip cover','steelers case','pool table rack','dotted pool cue ball','corner floor stand','the ultimate pool challeng advanced series','for women','cuetec r-360 pool cues','grp06','leather cue sticks','lhf40','42 inch','ol18','rg360-orb','lhf69','women pool','ultimate pool','action str0','viking g69','grp07','tip trimmer','iowa','cuetec 264','billiard counter','pro taper shaft','telescoping bridge cue','billiard bridges','poison jump','shaping','quick release shaft','hirano tip','jump training ball','adv77','spqsl','redskins balls','lhf11','cue tip chalk','lhc90','lhl20','lhf15','lhc92','side cushions','white and black pool case','pool tip scuffer','angels pool balls','q-claw cue holder','pool table cover michigan','texas rangers','pool stick carrying cases','bull pool cue','crow','lucasi ld6','athena ath30','nitbl','mcdermott g209','blue viking','foosball','soft pool cue cases','scorpion scobkb','action act 119','pool cue towel','gordias','ct733','schon cx65','cuetec ct690','g27','monster','cues with no wrap','meucci white dot','2 cue case','lc60','spartans','action crazy cue-ball cbcrz','velcro glove','professional','minnesota','action actbjz','texas a&m','inl11','str11','acbx12','hybrid pro','green bay packer balls','brunswick leather pockets','mcdermott g225','ttig','players f2750','ct735','gr31','bengals','seahawks','buccaneer','rack clips','lh20','justa','bblunar','stone pool balls','elite ep01','q2 grim reaper pool cue holder','pro skill drills volume 2','pool cue accessories','may14','gr21','5280 break cue','acbx05','may29','osu pool table cover','pin protectors','dvdbtdg','ebony wood','aramith tips','chalk scuffers','georgia tech','athena rose','solid black','air hockey paddle','belt','soft pool cases','international playing ability test','ttwch','sthbk01','tweeten tips','ncaa pool balls','bbans2.125','ping pong balls','thomas tip','fiber','ath30','pooldawg t-shirt','the best break cue','table tennis','pool talc','great white tips','dice','trouble','porper pocket chalker','bkcoaph','scorpion sco29 sneaky pete pool cue stick','jump break pool stick','qthir','billiard congress of america','outlaw pool cues','university of alabama','glow in the dark ball','christmas','mcdermott ng04','cue package','cuetec ct733','pro cues','predator low deflection cues','pool dvd','pool table vacuum','cx69','g208','qks cases','coffee','8 ball pilsner glass','hp03','act138','qhqc1','toronto','val06','philadelphia','billiard racks','philadelphia ball set','ct711','q slick','redsox','cuetec tips','white cue case','ttptc','action adv','predator shaft z 2nd','limbsaver','pool table installation','princess','ncaa north carolina','power','action black','braves','lucasi hybrid l-h30','cube','schon cx68','usc','los angeles dodgers','ebm06','bag tags','pool apparel','puck','cone holder','cx65','mh27','qtvt','rocket','scorpion pocket marker','ebony pool cue','ath32','ct734','eight','imp09','qtzzpi','qtscorp','meex06','johnny','cue chalker','acflm','tiger stripe','ct275','jos97','st louis cardinal pool balls','733','mirrored billiard sign','cdbd','bird','pattern play','ranger','finger slides','poker trays','athbrk','cx66','replacement clips','voodoo jump cue','finger wraps','actb04','action imp07','g501','ik209','blade shaft','solid black pool cue','val04','jos95','ttptst1','jayhawks','bld08','actsp07','ep03','elsnk10','no number','graffiti hearts','str14','zz09','inl08','merb04','act137','cx68','new cue tips','9711','g212','predator blank','tennis','8 ball t-shirt','2000jc','cx16 schon cue','colorado rockies','used pool pockets','ferel','voodoo pool','red sox pool balls','mh31','cyc87','elite pool cue case','player breaking stick','pirate pool cue','ttptb','ipcbt','mh32','mh15','lighted pool stick','mhbj2','genuine by mcdermott','tulipwood','era01','dvdpgts','jr08','pro skill drills volume 8','spstp','lucasi lhf40','lucasi lh-40','dvdcom','dvdippb','oversize cue','dvdbyrn1','dvdeps1','dvdeps5','dvdeps3','dvdhuscol','wood pin','cmp03','cx80','seahawk cue','cx76','drtgg','drtjkl','drtab','ds67','drtbi','ds68','ds25','drtsg','cdippb','cls8607','action 1 butt 1 shaft hard pool cue case black','cls7609','clshr10','cbsap','cbsco','cls7608','ecl24','trob','bkmwot','bkkids','bkpas','bsdr','cbp','cb5280','bsnp','bld06','16-1405','gr27','cbam','bkpyb8','bld04','ash pool cues','cbol','bldxs','bs6bi','cbcrz','bkpyb9','frtwist','mcdermott ng01','mastering pool volume 2','dawgtsp','denver','comfort strap','pool tip tools','indian','king cue','riley tips','cx79','pool table ball','tr6sor','action jr12 48 inch burgundy marble junior pool cue stick','cut','action cue purple','9710bd','vod03','pool ball ornaments','ttm44','gameroom','spst','cue r360','nicbs','ttlt','spqwapa','tweeten 10 minute cement','scorpion cycle series','mcdermott leather wrap cues','aramith continental','colored chalk','101','9 ball tips','predator sol','snake pool cues','red snooker ball','tin','playing pool','partial','alexander','str05','scrnd','all leather cases','spqw1','mh21','vod05','scsc','m&m cues','shields','3 pocket liners','lucasi l-ex5','redskins pool table cover','dart tool','predator cue glove','40-0600','40-fld','scojmpp','sco103','action bw08','mcdermott weight bolts for mcdermott cues','stiff hit','4 x 4 case','boots','pool cue tools','card shufflers','g313','pink and green','cue of the year','spray adhesive','predator 5','make your own cue','pool table aprons','cuetec 13-734','cue tip trimmer','action ball set','sun-glo','arachnid cricket pro 800 soft-tip dart game','15-4120','15-4135','brown case','south west','sco106','cuetec 13-671 pool cue with r360 low deflection shaft','arachnid interactive 6000 soft-tip dart game','arachnid cricket pro','scorpion sco30','30-0255','cx78','angle','boys cues','401','predator accessories','tiger hard tip','slick','action green','lucasi quick release','tpk669','maple leaf pool cues','pink and purple','basic pool cues','cue tip 12','padres','scorpion sport','lucasi soft cue case','mezz zz09','cue with wolf','actxs shafts','p3 weight cartridge','skill drills','pool training aids','act05','proh','sun glo','sarah rousey','chrome bars','actxsc shaft','pokdk','action act103','bbsfmiz','cue cement','action era03','tiger pool cue tips','arachnid interactive 3000 soft-tip dart game','pool cue in series','bbmlbsf','pttsevo','act81','preblk24','biker pool cues','l-ew','swirl marble pool ball set','athena shamrock','37-0004','protection','mep02bd','preblk23','preblk21','9711bd','ttdssp','trctsrfl','ttcccol1','tp3m90','teflon','tpu238','scorpxs','suede cue cases','cd','premium','bkpww','bkcpp','bkbank','cue slick','bbgold8','aramith clean','pooltees','blue bundle','predator extra shaft','balance','bbamcb','stealth flame','tip file','colors','seven','pre','pooldawg coin','schon cx76','tv ball','brewers','poktray','bbsfind','pre ikon','arachnid cricket pro 650 soft-tip dart game','pink shaft','tppk04','players jump cue','cue stick grip','little tipper','scorpion design','action bw07','col','20-0600','20-0900','sox','ct693','plastic scoring','action junior','tiffany','cue powder','mcdermott sedona','practice','tom rossman','tip holder','six cue','3 cue holder','bbtor','cuesilk table cleaner','schon cx73','stripe','lucasi fusion','mezz polish','action bw1','action break cues shaft','ttpqr1','3 8 10 shaft','actxs r2','9 ball money clip','lucasi deflection','tru lock','lucasi flexpoint','box','stained','mlbphi','aramith glow','pink jump cue','tp51','52 cue sticks','action soft case','baltimore','lucasi pool cues l-d2','action short','carmen','playing cues','suits suck','cuetec explorer tip','blue tips','tr6sob','ct26','buffalo tips','860hr','l2000s','cuetec ferrule','suicide king','l810','bone chalker','tank top','predator viking quick release','skin','act08','sco82','pink jump','clvtu','37-0005','premium belgian aramith pool balls','action sport case','bkedge','bunjeeven','bkpta','lucasi l-ss2','pred z','gapbw','6 cue holder','scorpion cycle series cyc82 pool cue stick','action burgundy','crazy cue','blue light','tprfs','tpwfs','action act 103','30-0355','tiger break','tp3m30','cream','master chalker','actxs c','predik24','plastic bottle','g5','lucasi cue shafts','apa break cue','tampa','bandit','lucasi cue jump cue l2000jc','tip for jump cue','acw12','mlbphil','cyc97','lucasi d-2','msu','griffin gr29','super black pearl','tiger pool tips','predsp22','bbsfcol','billiard books','gapuck','collared shirts','sb2022g','action act114','crimson','schon cx69','action 1 butt 1 shaft pool cue box case silver','bbsftxt','stone collection','travel cue','pro balls','action booger','cuetec ct296','al04','pool room clocks','gb6','action pink','trickshots','scorpion black and red');
/* $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);
    }
