/* Popular phrases - NRSWEB - 17:30:46, Tue Feb 9, 2010 */
__SLI_ClientDefaults =
[
    ['Alignment', true ]
];var asPhrases=new Array ('used rafts','knife','drysuit','dry bags','gloves','water shoes','nrs fishing raft frame','neoprene gloves','hydroskin','dry suit','wetsuit','neoprene socks','dry pants','cataraft','drytop','paddling pants','paddling gloves','dry top','cooler','kayak shoes','river shoes','paddle jacket','kayak gloves','fishing package','river knife','used catarafts','neoprene booties','water boots','pogies','boots','tie down straps','dry box','wet shoes','waterproof camera bags','life vest','hydrosilk','neoprene boots','farmer john wetsuit','helmets','foot braces','neoprene pants','straps','splash jacket','shoes','waterproof backpack','cataraft fishing','booties','pfd','rescue knife','used oars','box waterproof','fishing raft','oar mounts','kokatat','life jackets type v','inflatable kayak','paco pad','oar frames','water socks','wet suits','river board','cataraft tubes','deck bag','board','hat','canoe float bags','extreme drysuit','foam blocks','rash guard','deck rigging','neoprene shorts','women lifejacket','aire tomcat','throw bag','waterproof gloves','pvc glue','frames','paddle float','watershed','elbow pads','groover','life jackets','kayak boots','wetsuit jacket','float bags','whitewater raft','carolina pants','paddle bag','fishing frame','womens dry tops','seat','dry sock','rescue pfd','nose plugs','womens pfd','ibex','cockpit cover','kayak seat','protec helmet','kayak straps','rain jacket','hypalon fabric','wavelite','waterproof bag','waterproof camera case','pump','grizzly','farmer jane wetsuit','dry bag duffel','first aid kit','socks','mesh back pfd','waterproof duffel','womens paddle jacket','bandit','semi dry top','womens life jackets','kayak float bags','womens drysuit','aquaseal','gigbob','sandals','anchor','neoprene jacket','endurance','neoprene shirts','nrs toaster mitts','kayak cockpit covers','hypalon','thigh straps','sprayskirt','anchor system','splash pants','ethafoam','inflatable boats','used inflatable kayaks','rain gutter','bungee','hydrosilk shirt','valves','compass','female funnel','fishing','oars','spray jacket','toilet','chaco','keen','camera','skirt','used otter raft','navy','foam','kayak spray skirts','boston valve','bilge pump','fire pan','high float life jacket','fly fishing rafts','women wetsuit','raft frame','kayak life jackets','dog','cataraft floor','nrs storm boot','cup holder','closed cell foam','raft','whistle','casting platform','drybag','gig bob','firepan','river cat','kayak skirt','wet suits women','stove','cargo net','sar','kayak and canoe boat cart','flotation bags','fleece union suit','womens neoprene pants','carolina','endurance jacket','pvc patch kit','rope','oar locks','splash top','latex socks','tow rope','303','hood','extrasport','mesh gear bag','waterproof pants','gopro','z-drag','union suit','otter rafts','women\'s wetsuit','whitewater helmets','mesh bag','pvc repair','canoe seat','sea tour','kayak life vest','tempo','air bags','minicell foam','cargo','drink holder','4 piece paddle','aquapac','kayak pads','sun hat','riverboard','seat pads','hypalon adhesive','grand canyon','rowing gloves','rashguard','pants','ultra jane','throw rope','kayak cover','aluminum dry box','tether','chinook','spray skirt','pro creeker','ducky','tubes','helmet liner','raft pump','portable toilet','pontoon boats','fins','used kayak paddle','patch kit','hydroskin pants','farmer john','cooler mounts','paddle leash','pelican','protec','headlamp','anchor mount','tackle bag','otter','prusik','endurance pants','mystery','tow line','abba','pelican case','yakima footbraces','wavelight','waterproof paddle jacket','tow','powerhouse','oar sleeve','fleece','pins and clips','hydroskin women','mystery shirt','liner','water bottle','sand stake','kayak seat pads','paragon','aire cataraft','kickers','tributary raft','lopro','sleeping pads','river bag','throwbags','rescue boots','carabiner','neoprene repair','sherpa','thule','neoprene','ipod','guide shirts','webbing','z drag','mini cell','sunglasses','portage pack','hydro skin','desperado','gasket','funnel','cataract oars','d rings','mesh duffle bag','astral','loop straps','wavelight pants','union','trucker hat','bills bag','dry jackets','wet socks','atb','shorts','kayak paddle','mitts','flashlight','yakima fit list','repair kit','carlson pump','thwart','boundary','whiz freedom','wetsocks','h2o audio','riken','board shorts women\'s','map case','bow line','engel','treksta','attack shoe','navilight','adhesive','mittens','revolution','mcnett','womens board shorts','waterproof earbuds','kids wetsuits','waterproof jacket','navy seal','d-ring','cover','mp3','drysuit gaskets','brunton','lights','waterproof headphones','hydroskin shirt','net','kayak helmet','kokatat dry top','oar blades','workboot','neoprene top','paragon pack','vest','carlisle oar','waterproof mp3','clifton','raft seat','bibs','table','athena','mambas','ammo can','rodeo sock','hydroskin socks','maverick','pilot knife','nose','ice commander','engle','type b','pulleys','dog life jacket','shirts','cfd','footwear','fly fishing','navi light','solar charger','rash','purest duffel','extrasport rescue','zdrag','kayak back pack','gift card','pin kit','toluene','women\'s dry suits','duffel','kayak cart','14 otter','stern seat','big water v','hydration','inflator','valve adapter','skull cap','cat floor','swiftwater','leg straps','d-rings','canoe flotation','pelican box','hydroskin gloves','kayak compass','strike 2','toilet system','jacket','boundary sock','boaters gloves','water container','dura soft cooler','bag','oar rights','neoprene hat','lvm','halkey','boat bag','e-140','shelter','mesh','kayak tow line','gerber','aire','compression dry bag','kayak lock','event','sar drysuit','padded straps','air pump','rail grab','rescue gloves','economy oar','hydrosilk shirt women\'s','sponge','ice','hand paddles','pins','water helmet','terraprene','ice cream','glove liners','z drag kit','titanium','desperado shoe','counterweight','tent dry bag','seat mount','otter 142','thigh braces','churchill fins','whitewater paddle','sea tour jacket','camera bag','black rock','ice picks','payette','flux','splash jacket women','tarp','women\'s hydrosilk','nrs propulsion gloves','mako saddles','chair','diva','triton','womens pants','kayak foot pegs','rogue','repair tape','k pump','e 160','nrs extreme relief drysuit','work boot','river wing','full zip sea tour','womens chaco','k-pump','womens','big water pfd','creek gloves','aquablaster','mesh duffel','quick dry shirt','raft anchor','foot pegs','felt shoe','tula hats','durasoft','military valve','motor mount','river knives','toaster','storm boot','cord','stabond','navigator','mission drysuit','anchor pulley','aire tributary','hero','super puma','side rails','driduffel','adventure medical kits','flip lines','jumbo whanganui','kayak kit','oarlock','pipe','leafield valve','greenjacket','first aid','inflatable tandem','saddle bag','coffee','attack','tributary','otter 140','drysuit repair','rescue','radio','go pro','video','foundation','rapid gloves','quickneasy','stand up','tandem kayak','raft valves','medical comprehensive kit','halkey-roberts valve','deck lines','rafters gloves','werner footbrace','navisafe','water jug','phone dry bags','tear aid','vista','knee pads','womens splash pants','grill','rowing frame','latex gloves','helmet visor','swim fins','kids paddle','eco safe toilet','grizzly wetsuit','rolla cot','balaclava','drink','high back life vest','cross bar','fit','waterproof socks','left handed paddles','pvc patch','type 1 pfd','thigh bar','soft cooler','tomcat','wavelite xt','canoe racks','paint','wetshoes','women dry suit','north shore','uv protection','audio','merino','footbraces','farmer','scout water shoe','deluxe footbar','paco','paddle carabiner','kayak floatation','green','yakima mighty mounts','crew pfd','bucket','crossover','duffle','dry stow','y thigh bar','stern frame','deck','head','kayak pfd','cam buckle','hypalon paint','strobe light','crew','tula','paddle wax','crazy creek','u-bolt','river shorty','big water 5','dry case','ut3','blower','float shirt','repellant','sea kayak','used equipment','bravo','nez perce','bow','womens hats','1251.5','lynx 1','break down oar','swift water','guardian bag','main salmon guide','drop bag','dermatone','epoxy','colorado river guide','saddlebag','smith','comm 3','shorty wetsuit','safety kit','blast','motion soft shell','day pack','nrs hypalon raft repair kit','inversion','mp3 player','type v','floating rope','patch','rio top','journal','buckle','tactical','universal','raft repair','otb boots','helter shelter','keen h2','chaco men\'s z 1 sandal','hatch cover','clip','nrs dry bag','fishing vest','otb water boots','tubular','nrs attack shoe','inner tube','wetsuit pants','kayak ornament','pee funnel','water filtration','2981','spreader','pursuit','zip','dry box mount','sprite','nrs mystery sea hood','pro guardian waist bag','paddle leash coil','gardener','lash straps','woman drysuit','cataraft package','clean neoprene','wet suit pants','cookware','dvd','splash','toaster mitts','top cat','tempo 200','tear-aid','drypants','boundary shoe','1236','wetsuit top','hammock','rio jacket','cottonmouth nose plugs','patagonia','paragon system','carlson','big water guide','creek','drysocks','fox 40','tropos bib','dyneema','nrs powerhouse jacket','hyprotex','b2','raft storage bag','womens dry pants','breakdown','nrs steamer wetsuit','seat bar','cascadia','stirrups','harness','outfitting','nrs purest','pilot water shoe','map bag','cat','foam paddle float','wet boots','yoke','nrs sweatshirt','chaco women\'s zx 2 sandal','camcorder','stuff sack','pelican 1450','swiftwater fury','child pfd','frame pipe','map','reactor','guide gloves','little jane','otter 13','nikwax','vhf','tow tether','kayak drysuit','raft repair kit','men\'s shorts','norge','tubular webbing','kayak pfd low profile women','type 1 life vests','pump adapter','boxes','solar','5mm wetsuit','cable lock','kavu hat','dry box latch','boat saddles','water filter','slickrock','dry box seat pad','anti gravity','baseball cap','woodland power stove','engel coolers','xt union suit','paddling boots','k40','infinity','rashguard shirt','insole','touring kit','stool','oar holder','campsite counter','salmon','ice chest','latex wrist','thule cable lock','treksta kisatchie sandal','nrs universal','rescue throw','16 cataraft','super tuff','women\'s wet shoes','12 otter','aire lynx ii','noggin sock','duffel bags','aluminum floor','pro','swim shorts','mukluk','prusik cord','rescue pulleys','hydroskin shorts','deck rigging kit','neo touring','ear plugs','footcups','nose cone','stern mount','dutch oven','youth pfd','venus wetsuit','waterproof boots','elbow','package','insulated paddle jacket','animas','hydroskin vest','koss','blaster','futa','ptc paddle','neoprene vest','womens carolina pants','mustang','rafting gloves','cockpit','hypalon d ring','ikelos','raft guide paddle','molded oar sleeve','mariner','bighorn ii','foundation t','carolina splash pants','hydro skin pants','quick change','bowline bag','shampoo','kayak outfitting','deck kit','universal fins','clifton hypalon adhesive','two face','cataract sgg','hd straps','split rings','yak','yakima stretch','1829.1','universal kayak block','cataract magnum blade','carlisle outfitter paddle','weapon','polo','kayak sponge','1234 u','cataract sgg oar shaft','high back pfd','nrs expedition sock','womens gloves','sea stow','feng shoe','bighorn i','guardian','gmer','firebox','kids','puma frame','vista pfd','seal','kokatat liner','rodeo pant','head warmer','echo','silk','rawhide','danuu','showboat','bandit seat','h20 audio','rowing seat','e-130','triple take shirt','astral jacket','team hoody','sawyer oar locks','nrs ultra jane','nrs cat','fishing shoe','ice cream ball','standard oar locks','oar tips','spork','fish cat','river runner','wash','current','bruneau','sea sock','dry shoes','feng','pro paddler','bolt on eyelets','tempest','mens wet suit','nrs big water guide','aire repair kit','tropos drysuit','vynabond','c-tug','seat caddy','hydro skin socks','sta-bond','descent','canoe floatation','e-150','boater\'s bucks','copilot','extreme','hydro shirt','nrs mambas','mighty mounts','hydrosilk pants','sea kayak jacket','titanium shoe','nrs vista pfd youth','kidskin','flip rope','stripping basket','2519 w','3.8','guide to the colorado river','gloves 2440','athena womens dry pant','womens flux drytop','carolina splash','lo pro fitting','pro tec ace','springs','key chain','womens neoprene shorts','rio pant','ipod case','paddler medical kit','guage','long sleeve shirt','katadyn expedition water filter','let\'s get wet','clearwater','hooded paddle jacket','underwear','rapid rescue','cell phone case','expedition socks','fusion glove','headlight','laguna','fabric guard','daffy','nrs paragon pack','nrs gloves','metro inflator','tuff sack dry bag','mirazyme','wet bag','stampede jacket','tom cat','sierra board','c tug boat cart','roof box','event dry suit','nrs canoe 3-d end float','nrs thigh strap','system 5 dry bag','size 15','solar power','extreme relief dry suit','video camera','a7','procreeker','aquapac vhf','summit valve adapter','maverik ii','portage wheels','wonderpump','pegs','bow light','2152','ornament','gift certificate','waterproof ipod','navigator gloves','nrs reactor gloves','access duffle','casting bar','cooler fit list','neoprene mitts','watershoes','men sandals','oar rest','go pro camera','anti','scout','anti gravity shirt','lantern','license plate','sawtooth','adaptor','level 6','gunnison','kids pants','break down paddle','catalina sprayskirt','wing tent','nrs hydroskin farmer jane','grizzly jacket','propulsion gloves','long john','dri-stow','licence plate','nrs youth pfd','anti-gravity','sd card','sierra','zip tech','rodeo shorts','otter 150','drip rings','women apparel','cross 4','maverik i','bent shaft','sawyer','steamer wetsuit','dive skin','womens inversion drysuit','414','whiz freedom bag','dry suit e-vent','northshore jacket','rash pants','404','left hand control','tomcat inflatable','utensil','waterblocker','420','thin skin','north shore jacket','womens water shoes','e-160','super nova','tropos','fitting frames','bearclaw','high back seat','fishing boats','2.5 farmer john','k100','aire puma','extreme sar drysuit','striper','heavy duty bill\'s bag','wonderpump 6','quart cooler','nrs crew pfd','kavu shorts','stand up surfboard','inversion dry suit','performance package','kayak handle','metro','mens drysuit','kayak block','wavelite union suit','radio dry bag','eno','gfer','rescue kit','revolution dry top','cascade jacket','ricksack','split kayak','felt','gusto pump','1225','big horn','women\'s neoprene capri','seat lock','signal','medium dry bag','chilko','dog pfd','wet jacket','werner powerhouse','paddle biner','smc swivel','level 6 shorts','tear-aid type a','pelican 1600','patagonia shirt','seatour jacket','1490','ace wake','cobra','drop','rescue light','spreader bar','nrs rapid glove','winter gloves','rickyroo','sawtooth jacket','junior helmet','player 4 piece','shuffle','valve repair kit','dry stow bag','run off','livery','clock','grizzly bill','catalina','carlisle kayak paddle','gerber shorty','142','swiftwater rescue field guide book','pilot titanium','nrs universal kayak block','chinook fishing mesh back','cell phone cover','comprehensive','swivel seat mount','pelican case 1200','kokatat tempest pants','revolution drytop','ibex women','werner sherpa','nrs gigbob','2545','pullover','sealskinz waterblocker socks','paddle wetshoe','sink the stink','womens keen','pelican 1520','carlisle magic','1150','foot cups','power house','mcnett zip care','gfe','pro tec two face','nrs rapid rescuer pfd','woman shorts','princeton-tec aqua strobe','#2314','top off pump','gig','mistery','rapid','shore adhesive','wfb','aquapak','economy','paddle drip','smc pulley','pilot sheath','waste bags','pet life jacket','slr','pots','scout shoe','nrs crew','sturgeon','mighty mite','kokatat polartec','lowrider','watershed yukon dry duffel','hypalon repair kit','paddle rings','cat motor mount','storm strip','stretching gaskets','side rail rack','double diamond','farmer john grizzly','nrs hustle pfd','shoulder extenders','type iii','women\'s endurance jacket','shoulder','nrs guide shirt','nrs descent','sol light','water blaster','small drybag','cooler parts','fit guide','river guide books','clothing','neoprene life jackets','keen newport','full blast','#2886','yakima end caps','container','protec 2 face','summit ii','watershed big creek','water carrier','shovel','boaters','nrs 30-can cooler','water rescue gloves','well nuts','wave','co-pilot knife','expedition driduffel','black rock dry pants','head light','micro lite','fire starter','#2430','water proof gloves','womens boots','sealskin','waterproof shoes','shoulder sling','capri pants','tempest pant','tech wash','werner guide','women\'s chaco sandals','super duper','womens mystery','tempest jacket','drying mesh rack','batton','nrs boundary shoe','werner double diamond','kayak wetsuit','crkt','purest bag','solight','werner rudder','waterproof wallet','wagg','pink paddle','carlisle kayak blade','women semi dry top','werner carve','system 5','neoprene glove fleece','wrist seal','spare','burning time 2','stormhood','charger','women\'s sandals','kavu ewing street racer top','hat clip','dristow','kokatat supernova','nrs women\'s descent water shoe','shower tent','waterproof kayaking gloves','plus size','sea tiger','rain pants','womens footwear','dupont','passport','kokatat bibs','hydroskin paddling gloves','werner little dipper carbon','kids life vest','ptc','paddlebiner','stern rails','revolution top','dry shirt','drop side rails','werner little dipper','winter grand canyon','powderhound','wetsuits for women','repair instructions','skinz','women\'s fleece pants','bivvy sack','whistler','rigging plate','kayak paddle clip','scout watershoe','women\'s hydroskin pants','wave lite union suit','surfboard','nrs cataraft anchor system','womens inversion','sizing information','tula rodeo','chest','pressure guage','#2210','ricksack dry bag','womens neoprene','pelican case 1450','whitewater classics','round bottom sea stow','fire steel','water proof head phones','siderails','waterproof duffle bag','wave lite shirt','slider','skullcap','canpanion','pelican micro','pressure gage','wavelite mens','womans wet suits','we suits','ctug','colorado bag','seals 7','coffee filter','soggy sneakers','windproof','stand up board','wiz','color-coded','wavelite union','seal skinz socks','#2690','paco sleeping pad','santa canoe','witz','skimmer','wetsuit cement','women\'s tropos','splashjacket','raft paddle bag','raptor','round frame plugs','pelican mini flasher','paddle mittens','work shoe','blue screw','pick of life ice awls','storm helmet','split stern flotation','standard float','crossover tee shirts','wave light xt','dry deck bag','sam splint','womens wavelite shirt','super 4 pump','short sleeve dry top','rio splash','demo rafts','whiz funnel','northshore','synthetic socks','paddle blades','d ring handle','nrs women\'s wavelite shirt','sks cores','scuba diving','womens boaters gloves','#2340','super lube','#2231','big water v pfd','paddler jacket','buff','split flotation','sea skirt','dyneema line','kickers booties','princeton tec strobe','#1126','women\'s splash jacket','storm shelter','women\'s endurance','stormboot','singlenest','wavelite xt shirt','princeton tec eos headlamp','sea kayak party lights','sar boot','bag only','smith hudson','soft seat pad','watershed colorado','solo 3.4','pro-tec two face helmet','black rock paddling pants','protec 2 face helmet','boat clean','pet pfd','bandit thwart seat','chilko splash jacket','split stern float bags','#7524','soft saddlebag cooler','pacific capris','rescue pro','#1828.1','roll bags','nrs life jackets','fishing seats','stove cover','steelhead','stern side rails','semi drysuit','recreational kayak paddle','cold weather','clearwater pfd','double nest','skeg kit','nrs pilot','nrs 1440','fat cat 6','bahia','nrs dura soft','nylon spray skirt','nrs deck bag','nrs men\'s inversion kayak dry suit','full finger','kayak mittens','nrs little jane wetsuit','portaging system','women\'s hoody','san juan shorts','nrs base layers','pelicancase','carbon sherpa','stacker','nrs loop straps','frame cross bar','deluxe kayak car rack kit','comm','pilot knife sheath','powerhouse splash jacket','base camp','nose cone replacement','nrs wavelite union suit','rafting santa','nrs pfd bag','nrs motion shorty','blower pump','paddle lock','nrs wedge throw bag','blackberry','nrs fusion gloves','nrs titanium socks','seal socks','kokatat gfer','sawyer cobra','double action hand pump','carlisle 2 piece','pioneer compass','nrs hypalon patches','swiftwater rescue guide','rack foam pads','colored straps','canoe wheels','kokatat super nova','dry top rogue','carry pack','saw tooth','fishing boat package','women sizing','b-22','buckle protector','neoprene rodeo shorts','propane camping grill','watershed chatooga','women\'s wear','privacy shelter','pfd leg straps','kernmantle','claw','paddling dry pants','canoe center bag','nrs back band','foot peg ik','boatline','stampede long sleeve','water sandals','strap on compartments','projekt','nrs flux','compression dry sack','power dry','chaco womens z2','kwik check','swift canoe','nrs cataraft yoke','watershed tote bag','pfd on sale','nrs ultra','pump valve','six pack cooler','wetsuit fit','wick','boat socks','casting brace','nrs hydrosilk','nrs duffle','kids splash pants','rio frio','raft wear','kayak roll dvd','super duper puma','steamer wet suit','nfpa rope','bowbag','wave lite pant','riken seam tape','woolies crew','smoker light','nrs split kayak flotation','bucket boat','counter','sst fishing oar','hydro skin farmer john','raft color','bow float bag','short sleeve paddle jacket','self bailing','carlisle take apart kayak paddle','childrens pfd','paddleshoe','carlisle stm','werner player bent','footwear sizing','force xl','bravo foot','dry lander','feather','cheetah seat','pelican camera case','big surf','drift anchor','hydroskin little john','bandit carbon','boatbag','shockcord','neck gasket size','padz canoe','removing patch','breeze','counterbalanced handle','womens descent water shoe','belay','rodeo flotation','wetsuit for children','frame straps','kit hypalon','women\'s z 2','rafting jacket','padz seat pad','seat mount plate','canoe foam block','nrs groove','car','women dry','carolina dry pants','screw mounted tie down kit','royalex','nrs nez perce','spandex','women\'s clothing','kayak cup holder','nrs triton','nrs hypalon','cross-4 wetshoe','hypalon floor','nrs 142','nrs cataraft frames 16','dry bags for radios','drop bar','#1439.1','slim','kayak holder','rescue jackets','breakdown side rail adapter','nrs cool dry bag liner','dry shorts','kidskin pants','nrs comm','nfpa throw bag','carlisle outfitter','deluxe touring kit','k 200','whitewater life jackets','#1845 r','waterproof cases for phone ipod','fixed batten attachment','push button','boatloader','pvc ring','bandit repair','#1810','nrs kayak material','wavelite long sleeve','k pump 200','nrs desperado','chaco\'s','basic nylon sprayskirt','stern dry bags','canoe pedestal','stink no more','padz kayak outfit kit','sea stow bag','rafting boots','sit','cataract oar blade','bigwater guide','#1200 sr','river wing tent','san juan paddle','duramesh camp chair','bow-line','shoe laces','paddler med kit','nrs maverick','hypalon accelerator','pfd fit','dry dock','waterproof ipod nano 4th generation','seal line dry bags','drybox gasket','nrs otter 142','woman life jacket','pump 100','frame fit list','deluxe car rack','clamp on','wet suit for women','cotol 240','canoe tie','pilot watershoe','raft 142','stormstrip closure','camp cot','protec full cut helmet','smith audrey','ssg oars','floor repair','supplies','raft wash','supertuff sack','dura soft cooler liner','nrs go bag','werner carbon sherpa','water sandal women','pro kayak tow bag','wake board','keen h2 sandals','patagonia capri','feet bar','foot hypalon','nrs river cat','deck rail','werner kalliste paddle','side loader','kids shirt','cool','roll at table','summit 1 valve','kokatat outfit','co-pilot sheath','neoprenehoods','high roller','breathable kayak skirt','kokatat dry','nrs womens life jackets','knife sheath','safety knife','board bags','halkey roberts tool','nrs paddle jacket','personal cataraft','womens kayak life jackets','paddle mitts','knife holder','bow and stern straps','rockpants','raft motor','raft fabric','freedom','crazy seat','swift water fury','note','pump float','kavu vintage trucker hat','kayak mount','cataract sgg oars','kokatat life jacket','purifier','hypalon floor material','nrs fishing','roof rack crossbars','werner bent shaft paddles','fly fishing vest','standard fishing frame','propane blaster','foam core touring paddles','wind screen','heel pads','counterbalanced oars','spotlight','colorado duffle','basic','western whitewater','desent','kayak package','nrs skidguard','h20 audio headphones','chaco fuse','nylon kilt','sol','canoe end float','childrens wetsuits','water proof camera','repair adhesive','nylon dry bag','river rescue crib sheet','cockpitcover','nrs frame','sturgeon pfd','pro fit','kayak gear bag','dry top repair','waterproof map bag','short halkey','#2560','heat','nrs kicker wetshoe','bravo foot pump fitting','cooler accessories','ptk kayak paddle','cat yokes','hr fill adapter','semi-dry suit','burning','sierra board short womens','bottle opener','cataraft bags','hypalon nylon','pfd strap','rodeo wet pants','dry box strap','helmet buckles','computer','nrs anchor mount','tropos whirlpool bib','kataraft','wonderpump 2','nrs universal canoe blocks','kayak seat padz','cargo frame','clear drybag','deluxe','patagonia a c','waterproof floating bag','kokatat deluxe','nrs big water guide pfd','double','raft shade','whitewater float bags','woman board short','steel','hydroskin farmer','dish washing','travel cover','k-pump valve','women\'s river sandal','doughnut','watershed aleutian','kids rash guard','submersible dry boxes','beer bag','w board shorts','canoe tie-down','pvc raft repair','super pad','foot entrapment','kit for canoes','soft pack coolers','prijon drain plug assembly','cam tie down','smith glasses','clear bag','replacement o ring','truck rack','foam rack','halkey roberts valve types','storage flotation','hip straps','kayak paddle button','raft valve repair','tomcat thwart seat','crew youth','carlisle boat oar','recreational kayaks','show boat','diva tee','project','hd','d biners','selway map','#2719.5','#2755','kayak bladder','sherpa bent','foam brace','camp toilet','footholds','personal','rescue gear','patagonia pants','water proof backpack','nrs splash top','watershed deck bag','sawyer lights','hypalon thinner','patagonia mesh back','dry bag bills bag','cataract counter balance','tomcat valve','halter','paddle pants breathable','nrs breathable paddle jacket','c tug boat','small oar rights','nrs outfitter bags','woman\'s rash guard','cataraft fishing frame','boa','kokatat union suit','women\'s kayaking life jackets','blockhead','rio splash pants','siderail racks','kayak wheel cart','hold','hydroskin titanium pants womens','kayak t-shirt','smith spoiler','boat oars','two way radios','boat specs','flotation devices for dogs','spf shirt','bug shirt','kokatat paddling trunk','paddling trunk','werner shuna paddle','pickup truck kayak','camp site counter','nrs crossbar','tall oar stands','high profile pfd','nrs boats','nrs 2.2','nrs otter 130 fishing package frame','waterproof passport','player bent','cataraft repair','hydroskin ss','nrs tether','nrs rafter glove','fish on seat','nrs utility','shoe insoles','k-400','fat','triton drytop','dri-stow bag','nrs extreme relief','nrs women\'s boaters gloves','summit i','protec twoface','kokatat outer core','drysuit sizing','swiftwater field guide','canoe kneepads','skidguard seats','waterproof shuffle','solar water bottle','car top','cool liner','patch tape','repairkit','river rescue duffel','bravo hose','commercial rafts','shortsleeve dry top','changing bag','bench','toe blocks','seat-pad','pro paddler medical kit','kokatat expedition dry suit','diesel','women\'s waterproof jacket','b2 helmet','padz deluxe','waist pack','creek boat','waterproof mittens','shortsleeve hydroskin','hydrosilk uv','deck pack','patagonia mesh','spout','canada','raw hide','wavelite top','replacement oar handle','pvc sleeve','#3075','carlisle take apart','nrs capris','willis pfd','head warm','nrs pfd hydration pack','womens goddess tee','cap cat','neoprene wetsuit jacket','hydroskin short sleeve shirt','womens dry wear','drysuit cleaner','standard floor','kids splash','frame weights','selway river map','replacement bulb','women\'s kayaking pfds','kids paddling jacket','kokatat paddling capri','deck mesh rigging','wrist repair kit','desolation grey','floatbag tubes','toilet tent','bow tie','kilt cockpit cover','k400','kayak roof rack pads','swift entry drysuit','d ring repair','#3082','halkey-roberts wrench','hull roller','pins n clips','brunton echo','drysuit gasket repair','nylon repair','box waterproof floats','carlisle extension','folding knife','womens life jackets lotus','white water','dry bag d-ring','water weapon','wavelite longsleeve','wrist gasket repair','dry box support','pilotknife','waterproof backpack clear','rack extension','neoprene river shoes','nrs split stern flotation bags','chinok','#2220','hydroskin sport shorts','pick of life awl','water whistle','flood','nrs microlite foundation','dry bag for kayaking','#2341','camera dry box','werner touring paddles','wide loader','nrs 1.5 straps','womens kayak pfd','camp light','nrs otter 142 self-bailing rafts','boats floor','chaco z 1 unaweep sandal men','permits','skirt size','waterproof journal','stainless nrs water','kavu pants','kayak outfit kit','boa bike rack','cascadia bent shaft','frame setup','bungee kit','women\'s chaco 8','pelican case 1520','canoe pfd','chinook fishing mesh back pfd','wetsuit straps','heavy duty rafting oar','women\'s endurance pants','smith method','pelican case 1550','kayak rope','halkey roberts valve wrench','bar pads','waterproof digital camera','#1255','para wing','center bag','frame siderails','care','d ring hook','patagonia vest','rope pulleys','shinook','paddle top endurance','paddler wetshoe','rescue equipment','stink the stink','rack back','chacowrapsody','nrs wet socks','ptk 230','women\'s shorty wetsuits','pro tec wake helmet','cockpit outfitting','raft seat mount','kayak fit','women\'s long sleeve shirts','kokatat women\'s paddling capri','power jacket','waterfilter','steak','patagonia mesh back pfd','b7 valve cap','built-in chest harness of 2 webbing with a quick-release cam buckle and steel rescue ring on the back','waterproof womens jackets','smith threshold','pro tec ace wake','bob cat','cargonet','dry gear','solo canoe flotation bag','nrs dura soft cooler liner','billbag','nova','boat cup holder','c-7 leafield valve','whitewater tow','nrs womens endurance pants','frame break down','k pump guage','counterbalanced','#1271','hypalon d ring patches','dry hat','color options with rafts','water guide jackets','replacement pelican','carbon paddle kayak','#1840','cell foam','nrs stampede jacket','hooded top','wet suit sizing','front zipper wetsuit','wild river float tube','tropos blast','nrs youth vista','nepal','hypalon raft repair kit','spool prusik cord','water headphones','camp filter','sunprotect shirts','camano bent','sizing shorts','werner camano bent shaft','beyond the cockpit','#2729','waste system','sgg shaft','water work boot','carlisle 2-piece raft','nymph','trailrunner hat','#1831.1','nrs 3.8','kokatat swift drypants','raft mounts','standard stern','standard stern float','#2302 desperado','#2229','#2307','werner foot','stainless bottle','water tank','repair nrs bandit','women wetshoe','cargo net w straps','hypalon ring','women\'s relief','rock paddling pant','cataraft cargo floor','patagonia fishing pfd','self-bailing raft','nrs women\'s endurance jacket','push button assembly','strake','dry n clear','pelican flashlight','high neoprene boots','heel ankle','swift drypants','dry aid','cool weather rafting gloves','dry bag pack','clearwater vest','type 2 pfd','safety video','duty straps','woman dry top','deck storage','hypalon seam tape','pelican 1470','blackrock dry','side cut','neoprene head cover','kokatat dry suit repair','black paddle','bow seat','kids vista pfd','nrs canoe 3-d short solo float','fuel bottle','semidry women','waterproof duffle','paddlebag','frame storage','patch aid','pro paddler first aid kit','nrs paddling gloves','b7 repair kit','duffel liner','nrs kayak sherpa backpack','cataract mini','car carrier','sar rescuer','cataraft nose cone','h2o audio waterproof ipod cases','frame specifications','kayak rack for car','seal skinz all season','pfd short torso','womens kokatat tropos suit','brunton butane canister','paddlewax','chinookpfd','new zealand','system 5 drybag','waterproof ipod case 4th generation','neoprene paddle shoe','neoprene water pants','cutting','tufftex','swiftwater drysuit','northwoods guide book','purest with pad','work glove','nrs webbing','pro bag','bidart racerback','double down 5','northwoods whitewater','small plastic stoppers','solar light','self bailing boats','feathering oars','purest duffle bag','nrs guardian','farmer bill #2219 g','water rope','nrs bandit i inflatable kayak','nrs maverik ii inflatable kayak','hydroskin sale','womens liner','freestyle audio 2gb mp3 player','deflator','women\'s carolina splash pants','rash top','paddle fiberglass','nrs cataraft frames','brunton raptor','nrs grizzly john wetsuit','safety vest','paddle travel bag','polartec liner','k-pump guage','neoprene patch kit','tube armor','high floatation pfd','women\'s hydroskin short sleeve shirt','dry float bag','tear aid patch','big blower pump','patagonia racerback','bow line rope');
/* $Revision: 3828 $
 *
 */

if(typeof(_sli_init )!='object'){var _sli_init=new Array();}
if(typeof(sli_init )!='function'){function sli_init(){ for(var x=0;x<_sli_init.length;x++) _sli_init[x]();}}
if(typeof(asPhrases)!='object'){ var asPhrases = new Array(); }
if(typeof(__SLI_customisations)!='object'){var __SLI_customisations = new Object();}
if(typeof(__SLI_ClientDefaults)!='object'){ var __SLI_ClientDefaults=[]; }
if(typeof(__SLI_validSearchBoxes)!='object'){ var __SLI_validSearchBoxes = new Array(); }
if(typeof(__SLI_asug_used_flag)!='object'){ var __SLI_asug_used_flag = false; }
if(typeof(__SLI_width)!='object'){ var __SLI_width = 0; }
if(typeof(sli_targeturl)!='object'){ var sli_targeturl = ""; }


    __AutoComplete = new Object(); //namespace...
    __AutoComplete_mouseMoved=false;

    // Basic UA detection
    isIE = document.all ? true : false;
    isGecko = navigator.userAgent.toLowerCase().indexOf('gecko') != -1;
    isOpera = navigator.userAgent.toLowerCase().indexOf('opera') != -1;

    /* defaults and options */

    var __SLI_ApplicationName = 'AutoSuggest';
        __SLI_customisations[ 'AutoSuggest' ] =
                {
                    'ShowBrandingFooter' : true
                    ,
                    'TextBoxIDPrefix' : 'sli_search_'
                    ,
                    'BrandingFooterImagePath' : 'http://assets.resultspage.com/autosuggest/sli_systems-powered_150_15.gif'
                    ,
                    'BrandingFooterTitleTooltip' : 'AutoSuggest Powered by SLI Systems'
                    ,
                    'DropListMinWidth' : 150
                    ,
                    'MaxListItems' : 10
                    ,
                    'Alignment' : true
                    ,
                    'TextBoxIDCustom' : []
                    ,
                    'ValidSearchBoxes' : false 
                    ,
                    'IE6SelectBox' : false 
                    ,
                    'IE6SelectBoxPadding' : 0
                    ,
                    'TargetURL' : ''
                    ,
                    'IframeAlignment' : false
                    ,
                    'AlignmentBorderBug' : false
                    ,
                    'IE6OnFocus' : false
                };
    /* 0 = keyname, 1 = value */
    for( defaultValuePair in __SLI_ClientDefaults )
    {
        __SLI_customisations[__SLI_ApplicationName][__SLI_ClientDefaults[defaultValuePair][0]]=__SLI_ClientDefaults[defaultValuePair][1];
    }

    /* pre-fetch branding footer image if being used...
     */
    if( __SLI_customisations[ __SLI_ApplicationName ][ 'ShowBrandingFooter' ] )
    {
        
        if(location.protocol == "https:")
        {
            __SLI_customisations[ __SLI_ApplicationName ][ 'BrandingFooterImagePath' ] = __SLI_customisations[ __SLI_ApplicationName ][ 'BrandingFooterImagePath' ].replace(/http:/i, 'https:');
        }
    
        var __AutoCompleteBranding = new Image();
        __AutoCompleteBranding.src=__SLI_customisations[ __SLI_ApplicationName ][ 'BrandingFooterImagePath' ];
    }


    function AutoComplete_init()
    {
        if(!isOpera)
        {
            var oldonresize=function(){};
            if(typeof(window.onresize)=='function')
                oldonresize = window.onresize;//play nicely with other people's toys
            window.onresize= function(){ oldonresize(); AutoComplete_HideAll(); AutoComplete_Create( asPhrases ); }

            AutoComplete_Create( asPhrases );
            
            var els = document.getElementsByTagName('input');
            if(els)
            {
               for ( i = 0; i < els.length; i++ )
               {
                  if(els[i].name == "asug")
                  {
                     els[i].disabled = true;
                  }
               }
            }
        }
    }




    /**
    * Attachs the autocomplete object to a form element. Sets
    * onkeypress event on the form element.
    *
    * @param string formElement Name of form element to attach to
    * @param array  data        Array of strings of which to use as the autocomplete data
    */
    //function AutoComplete_Create (id, data)
    /*
     * iterate over 'sli_search_*' assumes one or more search boxes numbered from 1...
    */
    function AutoComplete_Create( data )
    {
        var idx=1, e, id, searchBoxPrefix=__SLI_customisations[ __SLI_ApplicationName ][ 'TextBoxIDPrefix' ];
        while( e = document.getElementById(searchBoxPrefix+idx) )
        {
            AutoComplete_AttachHandlers(e, data);
            if( __SLI_customisations[ __SLI_ApplicationName ][ 'ValidSearchBoxes' ] )
            {
                __SLI_validSearchBoxes.push(searchBoxPrefix+idx);
            }
            idx++;
        }
        
        
        //this array comes from the customised list
        var otherTextBoxIdList = __SLI_customisations[ __SLI_ApplicationName ][ 'TextBoxIDCustom' ];
        if( otherTextBoxIdList)
        {
            for(idx=0;idx<otherTextBoxIdList.length;idx++)
            {
                e = document.getElementById(otherTextBoxIdList[idx]);
                if(e)
				{
					if( __SLI_customisations[ __SLI_ApplicationName ][ 'ValidSearchBoxes' ] )
                	{
	                    __SLI_validSearchBoxes.push( otherTextBoxIdList[idx] );
                	}
					AutoComplete_AttachHandlers(e, data);
				}
            }
        }
        
    } 

    function AutoComplete_AttachHandlers(e, data){
        var iframe,id;
        id=e.id;


        __AutoComplete[id] = {'data':data,
                              'isVisible':false,
                              'element':document.getElementById(id),
                              'dropdown':null,
                              'highlighted':null};

        __AutoComplete[id]['element'].setAttribute('autocomplete', 'off');
        __AutoComplete[id]['element'].onkeydown = function(e) {if (!e) e = window.event; return AutoComplete_KeyDown(this.getAttribute('id'), e);}
        __AutoComplete[id]['element'].onkeyup = function(e) {if (!e) e = window.event; return AutoComplete_KeyUp(this.getAttribute('id'), e);}
        // The function call on the next line was changed by Andrew Grieve April 2008
        __AutoComplete[id]['element'].onkeypress = function(e) {if (!e) e = window.event; return AutoComplete_KeyPress(this.getAttribute('id'), e);}
        __AutoComplete[id]['element'].onclick = function(e)
        {
            if( __SLI_customisations[ __SLI_ApplicationName ][ 'IE6OnFocus' ] )
            {
                __AutoComplete[id]['element'].focus();
            }
            if (!e) e = window.event; e.cancelBubble = true; e.returnValue = false;
        }



        // Hides the dropdowns when document clicked
        var docClick = function()
        {
            if( __SLI_customisations[ __SLI_ApplicationName ][ 'ValidSearchBoxes' ] )
            {
               for(var i=0; i < __SLI_validSearchBoxes.length; i++)
               {
                   if(document.getElementById(__SLI_validSearchBoxes[i]))
                   {
                       AutoComplete_HideDropdown(__SLI_validSearchBoxes[i]);
                   }
               }
            }
            else
            {
                for (id in __AutoComplete)
                {
                   AutoComplete_HideDropdown(id);
                }
            }
        }

        if (document.addEventListener) {
            document.addEventListener('click', docClick, false);
        } else if (document.attachEvent) {
            document.attachEvent('onclick', docClick, false);
        }


        // Max number of items shown at once
        if (arguments[2] != null) {
            __AutoComplete[id]['maxitems'] = arguments[2];
            __AutoComplete[id]['firstItemShowing'] = 0;
            __AutoComplete[id]['lastItemShowing'] = arguments[2] - 1;
        }

        AutoComplete_CreateDropdown(id);

        // Prevent select dropdowns showing thru
        if (isIE) {
            iframe = document.createElement('iframe');
            __AutoComplete[id]['iframe'] = iframe;
                iframe.id = id +'_iframe';
                iframe.style.position = 'absolute';
                iframe.style.top = '0';
                iframe.style.left = '0';
                iframe.style.width = '0px';
                iframe.style.height = '0px';
                iframe.style.zIndex = '98';
                iframe.style.visibility = 'hidden';
                
                if(location.protocol == "https:")
                {
                   iframe.src = 'https://assets.resultspage.com/autosuggest/blank.html';
                }
                
                if( __SLI_customisations[ __SLI_ApplicationName ][ 'IE6SelectBox' ] )
                {
                  iframe.style.width = __SLI_width  + __SLI_customisations[ __SLI_ApplicationName ][ 'IE6SelectBoxPadding'];
                }

            if( __SLI_customisations[ __SLI_ApplicationName ][ 'IframeAlignment' ] )
            {
                document.body.insertBefore( iframe );
            }
            else
            {
                __AutoComplete[id]['element'].parentNode.insertBefore( iframe, __AutoComplete[id]['element'] );
            }
        }
    }

    /**
    * Creates the dropdown layer
    *
    * @param string id The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_CreateDropdown(id)
    {
        var theSearchbox = __AutoComplete[id]['element'];
        var theDropDown;
        var left_top = AutoComplete_getPos( theSearchbox );
        var left  = left_top[0];
        var top   = left_top[1] + theSearchbox.offsetHeight;
        var width = theSearchbox.offsetWidth;

        if ( width < __SLI_customisations[ __SLI_ApplicationName ][ 'DropListMinWidth' ] )
        {
            width = __SLI_customisations[ __SLI_ApplicationName ][ 'DropListMinWidth' ];
        }

        theDropDown = document.createElement('div');
        theDropDown.className = 'autocomplete'; // Don't use setAttribute()


        if(__SLI_customisations[ __SLI_ApplicationName ][ 'Alignment' ] == true && document.body)
        {
            theDropDown.style.position = 'absolute';
            document.body.insertBefore(theDropDown, document.body.nextSibling);
            
            // Position it
            theDropDown.style.visibility = 'hidden';
            theDropDown.style.left       = left + 'px';
            theDropDown.style.top        = top + 'px';
            theDropDown.style.width      = width + 'px';
            theDropDown.style.zIndex     = '99999';
        }
        else if(__SLI_customisations[ __SLI_ApplicationName ][ 'Alignment' ] == "offsetrelative" && document.body)
        {
          theSearchbox.parentNode.insertBefore(theDropDown, theSearchbox);
          // Position it
          if(sli_getStyle(theSearchbox.offsetParent, 'position') != "absolute")
          {
            theSearchbox.offsetParent.style.position = 'relative';
          }
          theDropDown.style.position = 'absolute';
          theDropDown.style.left = (theSearchbox.offsetLeft) + 'px';
          theDropDown.style.top = (theSearchbox.offsetTop + theSearchbox.offsetHeight) + 'px';
          theDropDown.style.width = (theSearchbox.clientWidth) + 'px';
          theDropDown.style.visibility = 'hidden';
          theDropDown.style.zIndex     = '99999999';
        }
        else
        {
            theSearchbox.parentNode.insertBefore(theDropDown, theSearchbox);
            // Position it
            theDropDown.style.visibility = 'hidden';
            theDropDown.style.left       = left + 'px';
            theDropDown.style.top        = top + 'px';
            theDropDown.style.width      = width + 'px';
            theDropDown.style.zIndex     = '99999';
        }
        

        __AutoComplete[id]['dropdown'] = theDropDown;
        __SLI_width = width;
    }

    function /* array [ left, top ] */ AutoComplete_getPos( obj )
    {
        var curleft = curtop = 0;
        var sli_flag = 0;

        if (obj.offsetParent)
        {
           do
           {
              if ( __SLI_customisations[ __SLI_ApplicationName ][ 'AlignmentBorderBug' ] )
              {         
                
                if(sli_flag == 1)
                {
                    var clientTop = (obj.offsetHeight - obj.clientHeight) / 2;
                    curtop += clientTop;

                    var clientLeft = (obj.offsetWidth - obj.clientWidth) / 2;
                    curleft += clientLeft;
                }
                sli_flag = 1;
              }
           
              curleft += obj.offsetLeft;
              curtop += obj.offsetTop;
           }
           while (obj = obj.offsetParent);
        }
        return [curleft,curtop];
    }

    /**
    * Shows the dropdown layer
    *
    * @param string id The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_ShowDropdown(id)
    {

        AutoComplete_HideAll();



        var value = __AutoComplete[id]['element'].value;
        var toDisplay = new Array();
        var newDiv    = null;
        var text      = null;
        var numItems  = __AutoComplete[id]['dropdown'].childNodes.length;

        __AutoComplete_mouseMoved=false;
        // SLI Code Modification - Start - Andrew Grieve April 08
        // Trim the textbox so that if is starts with a space then the feature will still work
        //value = value.replace(/^\s+|\s+$/g,"");
        value = value.replace(/^\s+/g,"");

        if(value.length == "")
        {
            // If Textbox length is nothing (after the trim) then don't show dropdown.
            return;
        }
        // SLI Code Modification - End

        // Remove all child nodes from dropdown
        while (__AutoComplete[id]['dropdown'].childNodes.length > 0) {
            __AutoComplete[id]['dropdown'].removeChild(__AutoComplete[id]['dropdown'].childNodes[0]);
        }


        var count=0;
        // Go thru data searching for matches
        for (i=0; i<__AutoComplete[id]['data'].length; ++i)
        {
            // SLI Code Modification - Start - Andrew Grieve April 08 - Added lower casing
            if (__AutoComplete[id]['data'][i].substr(0, value.length).toLowerCase() == value.toLowerCase())
            {
                // SLI Code Modification - End
                toDisplay[toDisplay.length] = __AutoComplete[id]['data'][i];
                count++;
                /* how many to display? */
                if(count == __SLI_customisations['AutoSuggest']['MaxListItems'] ) /* Code inserted to keep list to a maximum of 10 values (was 20 or 30) */
                {
                    break;
                }
            }
        }

        // No matches?
        if (toDisplay.length == 0) {
            AutoComplete_HideDropdown(id);
            return;
        }



        // Add data to the dropdown layer
        for (i=0; i<toDisplay.length; ++i) {
            newDiv = document.createElement('div');
            newDiv.className = 'autocomplete_item'; // Don't use setAttribute()
            newDiv.setAttribute('id', 'autocomplete_item_' + i);
            newDiv.setAttribute('index', i);
            newDiv.style.zIndex = '99999';

             // Scrollbars are on display ?
            if (toDisplay.length > __AutoComplete[id]['maxitems'] && navigator.userAgent.indexOf('MSIE') == -1) {
                newDiv.style.width = __AutoComplete[id]['element'].offsetWidth - 22 + 'px';
            }

            newDiv.onmouseover =
        function()
        {
            if( __AutoComplete_mouseMoved )
                AutoComplete_HighlightItem(__AutoComplete[id]['element'].getAttribute('id'), this.getAttribute('index'));
        };

            newDiv.onclick     =    function()
                                    {
                                    	  __SLI_asug_used_flag = true;
                                                                           
                                        AutoComplete_SetValue(__AutoComplete[id]['element'].getAttribute('id'));
                                        AutoComplete_HideDropdown(__AutoComplete[id]['element'].getAttribute('id'));
                                        AutoComplete_submitForm(id);
                                    }



            text   = document.createTextNode(toDisplay[i]);
            newDiv.appendChild(text);
            newDiv.title='Search for ' + toDisplay[i];

            /* ellipsis for IE only */
            if( isIE )
            {
                newDiv.style.textOverflow = 'ellipsis';
                newDiv.style.width = '100%';
                newDiv.style.whiteSpace = 'nowrap';
                newDiv.style.overflow = 'hidden';

            }
            __AutoComplete[id]['dropdown'].appendChild(newDiv);
        }
        /*
         * append DIV containing footer branding...
         */
        if(__SLI_customisations['AutoSuggest']['ShowBrandingFooter'])
        {
            i = toDisplay.length;
            newDiv = document.createElement('div');
            newDiv.className = 'autocomplete_footer'; // Don't use setAttribute()
            newDiv.setAttribute('id', 'autocomplete_item_' + i);
            newDiv.setAttribute('index', i);
            newDiv.style.zIndex = '99999';
            newDiv.innerHTML = '<a href="http://www.sli-systems.com/powered-by.php" title="' +
                                __SLI_customisations[ __SLI_ApplicationName ][ 'BrandingFooterTitleTooltip' ] +
                                '"><img class="autocomplete_footer_branding" src="'+__AutoCompleteBranding.src+'" /></a>';

            __AutoComplete[id]['dropdown'].appendChild(newDiv);
        }


        // Too many items?
        if (toDisplay.length > __AutoComplete[id]['maxitems']) {
            __AutoComplete[id]['dropdown'].style.height = (__AutoComplete[id]['maxitems'] * 15) + 2 + 'px';

        } else {
            __AutoComplete[id]['dropdown'].style.height = '';
        }


        /**
        * Set left/top in case of document movement/scroll/window resize etc
        */
        if(__SLI_customisations[ __SLI_ApplicationName ][ 'Alignment' ] == "true" || __SLI_customisations[ __SLI_ApplicationName ][ 'Alignment' ] == "false")
        {
            var left_top = AutoComplete_getPos( __AutoComplete[id]['element'] );
            __AutoComplete[id]['dropdown'].style.left = left_top[0];
            __AutoComplete[id]['dropdown'].style.top  = left_top[1] + __AutoComplete[id]['element'].offsetHeight;
        }


        // Show the iframe for IE
        if (isIE) {
            
            if(!__SLI_customisations[ __SLI_ApplicationName ][ 'Alignment' ] == true)
            {
               __AutoComplete[id]['iframe'].style.width  = __AutoComplete[id]['dropdown'].offsetWidth;
            }
            
            
            __AutoComplete[id]['iframe'].style.top    = __AutoComplete[id]['dropdown'].style.top;
            __AutoComplete[id]['iframe'].style.left   = __AutoComplete[id]['dropdown'].style.left;
            __AutoComplete[id]['iframe'].style.height = __AutoComplete[id]['dropdown'].offsetHeight;

            __AutoComplete[id]['iframe'].style.visibility = 'visible';
        }

    e =  __AutoComplete[id]['dropdown'];

    e.onmousemove =
        function()
        {
            if(!__AutoComplete_mouseMoved){__AutoComplete_mouseMoved=true;}
            this.onmousemove = null;
        }

        // Show dropdown
        if (!__AutoComplete[id]['isVisible']) {
            __AutoComplete[id]['dropdown'].style.visibility = 'visible';
            __AutoComplete[id]['isVisible'] = true;
        }


        // If now showing less items than before, reset the highlighted value
        if (__AutoComplete[id]['dropdown'].childNodes.length != numItems) {
            __AutoComplete[id]['highlighted'] = null;
        }
    }



    /**
    * Hides the dropdown layer
    *
    * @param string id The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_HideDropdown(id)
    {
        if (__AutoComplete[id]['iframe'])
        {
            __AutoComplete[id]['iframe'].style.visibility = 'hidden';
        }
        
        if (__AutoComplete[id]['dropdown'])
        {
            __AutoComplete[id]['dropdown'].style.visibility = 'hidden';
        }

        __AutoComplete[id]['highlighted'] = null;
        __AutoComplete[id]['isVisible']   = false;
    }


    /**
    * Hides all dropdowns
    */
    function AutoComplete_HideAll()
    {
         if( __SLI_customisations[ __SLI_ApplicationName ][ 'ValidSearchBoxes' ] )
         {
               for(var i=0; i < __SLI_validSearchBoxes.length; i++)
               {
                   if(document.getElementById(__SLI_validSearchBoxes[i]))
                   {
                       AutoComplete_HideDropdown(__SLI_validSearchBoxes[i]);
                   }
               }
         }
         else
         {
                for (id in __AutoComplete)
                {
                   AutoComplete_HideDropdown(id);
                }
         }
    }


    /**
    * Highlights a specific item
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    * @param int    index The index of the element in the dropdown to highlight
    */
    function AutoComplete_HighlightItem(id, index) // mouseover, index is the list element index, zero-based
    {
        if (__AutoComplete[id]['dropdown'].childNodes[index]) {
            for (var i=0; i<__AutoComplete[id]['dropdown'].childNodes.length; ++i) {
                if (__AutoComplete[id]['dropdown'].childNodes[i].className == 'autocomplete_item_highlighted') {
                    __AutoComplete[id]['dropdown'].childNodes[i].className = 'autocomplete_item';
                }
            }

            __AutoComplete[id]['dropdown'].childNodes[index].className = 'autocomplete_item_highlighted';
            __AutoComplete[id]['highlighted'] = index;

            //also see below...
            //__AutoComplete[id]['element'].value = __AutoComplete[id]['dropdown'].childNodes[index].innerHTML;
            //AutoComplete_SetValue(id);
        }
    }


    /**
    * Highlights the menu item with the given index
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    * @param int    index The index of the element in the dropdown to highlight
    */
    function AutoComplete_Highlight(id, index) // keyboard up/down - index is the direction of travel, 1==down,-1=up
    {
        var childNodes = __AutoComplete[id]['dropdown'].childNodes;
        if(childNodes.length)
        {
	        var lastItem = ( ( childNodes[ childNodes.length - 1 ].className != 'autocomplete_footer' ) ? childNodes.length - 1 : childNodes.length - 2 );

            // Out of bounds checking
            //if (index == 1 && __AutoComplete[id]['highlighted'] == __AutoComplete[id]['dropdown'].childNodes.length - 1) {
            if (index == 1 && __AutoComplete[id]['highlighted'] == lastItem ) {
                childNodes[__AutoComplete[id]['highlighted']].className = 'autocomplete_item';
                __AutoComplete[id]['highlighted'] = null;

            } else if (index == -1 && __AutoComplete[id]['highlighted'] == 0) {
                childNodes[0].className = 'autocomplete_item';
                __AutoComplete[id]['highlighted'] = lastItem;
                index = 0;//hack!
            }

            // Nothing highlighted at the moment
            if (__AutoComplete[id]['highlighted'] == null) {

                childNodes[0].className = 'autocomplete_item_highlighted';
                __AutoComplete[id]['highlighted'] = 0;
                newIndex = 0;
                
            } else {

                if (childNodes[__AutoComplete[id]['highlighted']]) {
                
                    childNodes[__AutoComplete[id]['highlighted']].className = 'autocomplete_item';
                }

                var newIndex = parseInt( __AutoComplete[id]['highlighted'] ) + parseInt(index);

                if (childNodes[newIndex]) {

                    childNodes[newIndex].className = 'autocomplete_item_highlighted';

                    __AutoComplete[id]['highlighted'] = newIndex;
                }
            }

            //populate textbox with currently highlighted term...
            //__AutoComplete[id]['element'].value = __AutoComplete[id]['dropdown'].childNodes[newIndex].innerHTML;
            AutoComplete_SetValue(id);
        }
    }


    /**
    * Sets the input to a given value
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_SetValue(id)
    {
        __AutoComplete[id]['element'].value = __AutoComplete[id]['dropdown'].childNodes[__AutoComplete[id]['highlighted']].innerHTML.replace(/&amp;/, "&");
    }


    /**
    * Checks if the dropdown needs scrolling
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_ScrollCheck(id)
    {
        // Scroll down, or wrapping around from scroll up
        if (__AutoComplete[id]['highlighted'] > __AutoComplete[id]['lastItemShowing']) {
            __AutoComplete[id]['firstItemShowing'] = __AutoComplete[id]['highlighted'] - (__AutoComplete[id]['maxitems'] - 1);
            __AutoComplete[id]['lastItemShowing']  = __AutoComplete[id]['highlighted'];
        }

        // Scroll up, or wrapping around from scroll down
        if (__AutoComplete[id]['highlighted'] < __AutoComplete[id]['firstItemShowing']) {
            __AutoComplete[id]['firstItemShowing'] = __AutoComplete[id]['highlighted'];
            __AutoComplete[id]['lastItemShowing']  = __AutoComplete[id]['highlighted'] + (__AutoComplete[id]['maxitems'] - 1);
        }

        __AutoComplete[id]['dropdown'].scrollTop = __AutoComplete[id]['firstItemShowing'] * 15;
    }


    /**
    * Function which handles the keypress event
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_KeyDown(id, e)
    {
        var result = true;

       var event;
       event = e;
       if(!event) event = window.event;

        var keyCode = event.keyCode;

        switch (keyCode) {

            // Return/Enter
            case 13:
                if (__AutoComplete[id]['highlighted'] != null) {
                    AutoComplete_SetValue(id);
                    AutoComplete_HideDropdown(id);
					
                    __SLI_asug_used_flag = true;
					
                    if( e = __AutoComplete[id]['element'].form['asug'] )
                    {
                        
                        e.disabled=false;
                        e.value = __AutoComplete[id]['asug'];
                    }

                }

                result = AutoComplete_submitForm(id);

                break;

            // Escape
            case 27:
                AutoComplete_HideDropdown(id);
                event.returnValue = false;
                event.cancelBubble = true;
                break;

            // Up arrow
            case 38:
                if (!__AutoComplete[id]['isVisible']) {
                    AutoComplete_ShowDropdown(id);
                }

                AutoComplete_Highlight(id, -1);
                AutoComplete_ScrollCheck(id, -1);
                
                if( e = __AutoComplete[id]['element'].form['asug'] )
                {
                   e.disabled=false;
                   e.value = __AutoComplete[id]['asug'];
                }

                                
                result = false;
                break;

            // Tab
            case 9:
                if (__AutoComplete[id]['isVisible']) {
                    AutoComplete_HideDropdown(id);
                }
                return;

            // Down arrow
            case 40:

                if (!__AutoComplete[id]['isVisible']) {
                    AutoComplete_ShowDropdown(id);
                }

                AutoComplete_Highlight(id, 1);
                //AutoComplete_ScrollCheck(id, 1);

                if( e = __AutoComplete[id]['element'].form['asug'] )
                {
                   e.disabled=false;
                   e.value = __AutoComplete[id]['asug'];
                }

                result = false;
                break;
        }
        return result;
    }


    /**
    * Function which handles the keyup event
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_KeyUp(id, e)
    {
       var event;
       event = e;
       if(!event) event = window.event;

        var keyCode = event.keyCode;

        switch (keyCode) {
            case 13:
                event.returnValue = false;
                event.cancelBubble = true;
                
                break;

            case 27:
                AutoComplete_HideDropdown(id);
                event.returnValue = false;
                event.cancelBubble = true;
                break;

            case 38:
            case 40:
                return false;
                break;

            default:
                AutoComplete_ShowDropdown(id);
                
                __AutoComplete[id]['asug']=__AutoComplete[id]['element'].value;

                if( e = __AutoComplete[id]['element'].form['asug'] )
                {
                   e.disabled=true;
                   e.value = "";
                }  
                
                break;
        }
    }

    /**
    * Function which handles the keypress event
    * This function added April 2008 by Andrew Grieve
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */

    // SLI Code Modification - Start - Andrew Grieve April 08
    function AutoComplete_KeyPress(id, e)
    {
        var event = e;
        if(!event) event = window.event;
        var keyCode = event.keyCode;

        if (keyCode == 13 && isGecko || isOpera)
        {
            return false;
        }
        
        if( __SLI_customisations[ __SLI_ApplicationName ][ 'TargetURL' ] )
        {
            if (keyCode == 13 && isIE)
            {
                return false;
            }
        }
        
    }
    // SLI Code Modification - End

    /**
    * Returns whether the dropdown is visible
    *
    * @param string id    The form elements id. Used to identify the correct dropdown.
    */
    function AutoComplete_isVisible(id)
    {
        return __AutoComplete[id]['dropdown'].style.visibility == 'visible';
    }

    function AutoComplete_submitForm(id)
    {
        var e, f, result=true;
        if( f = __AutoComplete[id]['element'].form )
        {
            if( __AutoComplete[id]['element'].value != '' )
            {
            	if(__SLI_asug_used_flag == true)
            	{
                   if( e = f['asug'])
                   {
                      e.value = __AutoComplete[id]['asug'];
                      e.disabled=false;
                   }
                }
                
                if( __SLI_customisations[ __SLI_ApplicationName ][ 'TargetURL' ] )
                {
                	asugvar = "";
                	if(__SLI_asug_used_flag == true)
                	{
                	  asugvar = '&asug=' + __AutoComplete[id]['asug'];
                  	}
                    
                    sliRegex = /resultsdemo\.com/;
                    if(sliRegExArray = sliRegex.exec(document.domain))
                    {
                    	sliRegex = /^http:\/\/(.*)\//;
                    	sliTargetDomain = sliRegex.exec(__SLI_customisations[__SLI_ApplicationName ][ 'TargetURL' ]);
                    	__SLI_customisations[__SLI_ApplicationName ][ 'TargetURL' ] = __SLI_customisations[__SLI_ApplicationName ][ 'TargetURL' ].replace(sliTargetDomain[1], document.domain);
                    }
                    
                	document.location.href = __SLI_customisations[__SLI_ApplicationName ][ 'TargetURL' ] + __AutoComplete[id]['element'].value + asugvar;
                }
                else
                {
                	f.submit();
                }
                
                AutoComplete_HideAll();
            }
            else
                result = false;
        }
        return result;
    }
    
    // get the style that will be applied by the browser, including stylesheets
    function sli_getStyle(el,styleProp)
    {
      if (el.currentStyle)
        var y = el.currentStyle[styleProp];
      else if (window.getComputedStyle)
        var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
      return y;
    }

    // register with onLoad(er...
    _sli_init.push( AutoComplete_init );
    
    function sli_addEvent(obj, evType, fn) {
    	if (obj.addEventListener) {
    		obj.addEventListener(evType, fn, false);
    		return true;
    	} else if (obj.attachEvent) {
    		var r = obj.attachEvent("on" + evType, fn);
    		return r;
    	} else {
    		return false;
    	}
    }
    
    function sli_load()
    {
    	sli_addEvent(window, 'load', sli_init);
    }