/* Default phrases - PCRUSH */
var asPhrases=new Array ('11 x 17 color printer copier scanner','11 x 17 media all in one printers','11 x 17 scanner','inkjet printers 11 x 17','11 x 17 printers','nuvi 1390t','13 x 19 printers','synology','garmin 2820','pioneer elite','color printer','garmin nuvi 255w','hdmi cable','scanners','duplex color laser printer','hp 11 x 17 media printer','vsx-23txh','scansnap','color laser printer','large format printer','545s','garmin 2720','garmin 255w','11 x 17 color copier','desktop','lcd dvd combo','netbook','open box','navigon','acer et.bv3rp.001','shipping','1390t','hp designjet 500','heat pumps','vgn sr490','t640','265wt','11 x 17 flatbed scanner','legal size scanner','fulfillment ready','nuvi 255w','garmin 265wt','plotter','hp scanners','bdp3600','cp2025dn','wide format printer','p2055dn','soleus dehumidifier','ip100','slide scanner','archos','speakers','flat screen tv','cb022a b1h','mobile printers','lexmark t640','m2727nf','zumo 660','samsung printers','garmin','2530p','885t','archos 7','ds209','hp officejet pro 8500','all-in-one printers','pioneer sc-25','label printers','soleus','bdps360','255w','4250','svga projector','vsx-21txh','garmin streetpilot','garmin nuvi 1390t','acer laptop','samsung ln46b750','t610','navigon 7100','sony vaio','workstation motherboard','garmin 885t','receivers','portable air conditioner and heater','wireless printer','q7814a','wmn1000b','ln32b650','tomtom 1m00.780','garmin nuvi','olevia','wireless all-in-one printer','dav-hdx576wf','m3035mfp','pn58b650','c8180','adobe photoshop','servers','p2035','denon','samsung blu ray','ce459a','cb472a','t642','asus epc900ha-blk006x','p2035n','x301','cc378a aba','samsung np-nc10-ka02us','c544dn','epson s6','pn50b860','11 x 17 color scanner','led','macbook pro','short throw projector','9250c','in1-mirror','axis 211','fujitsu document scanner for mac','2730','3600n','bd-p3600','ce459a aba','nuvi 350','c7769b','cp1518ni','x200','hp 2840','acer aspire one','garmin nuvi 200','wireless home theater','pn42b450','gaming laptop','hp officejet pro l7780','pn58b860','pn63b550','hp photosmart c8180','autocad','hp designjet','usb printer cable','garmin 376c','pen barcode scanner','laptop','c7796d','hp c8180','digital camera','260w','hp photosmart printer','c543dn','acer aspire','sandisk sdmx11r004gka57','c534dn','dvd recorder','canon 3818b002','calculator','1m00.780','ap9567','pn50b650','sharp','garmin nuvi 780','enter your email','hp 500','nas','jvc kaboom','c7280','bdps560','garmin streetpilot 2720','11 x 17 paper printer','garmin marine gps','h470','t1936aa','hp','garmin 760','un46b8000','ln52a750','bz569p44','epson projector','macbook pro 13','hp officejet pro 8500 premier','gps for trucks','toshiba 15lv505','a06v133','mfc9840cdw','ln40b750','url','canon g10','hp 9800','sony bdp-s560','sandisk sdmx14r-004gk-a70','widescreen portable dvd player','ht-tz522','fax machines','m3035','officejet 8500','toshiba','hannspree hg281dpb','t642n','sheetfed scanner','asus 1005ha-pu1x-bk','c5550n','cavalry','6530b','hdmi','garmin nuvi 265wt','joystick','acer lu.s040b.162','sony all in one','sp-lamp-024','golf gps','pn50b850','voice recorder','11 x 17 media printer','garmin nuvi 765t','lp2475w','pioneer sc-27','cb524a','ce462a aba','hp designjet 130','panasonic tc-p50g10','samsung ln32b460','cb025a','bdp1600','external hard drive','dreamweaver','squaretrade','xdm5205dwu','fujitsu scanner','scansnap refurbished','cp-x401','xr30x','asus 1005ha-vu1x-wt','hp compaq business desktop dc7900','tomtom go 720','x7slm','l300-ez1523','color laser printers 11 x 17','11 x 17 laser printer','asus epc1000ha-blk026x','cb026a b1h','un55b8000','hp designjet 110 plus plotter 24','sc-27','hp c6380','exs5beebe','ln52b750','haier hlt71','hp all in one printer','cc376a','hp 6500','linksys','canon 2168b002','video conferencing microphones','asus eeepc901-w003x','q2440b','samsung np-n120-ka01us','c8085a','samsung ln46b630','hp designjet 110plus','fujitsu scansnap s510m','datalogic quickscan','garmin nuvi 885t','bd-p1600','samsung ln52b750','2776h1u','sony blu-ray players','large format photo printer','hp 4345','hp laserjet 3050','acer aspire x3200','bluetooth adapter','axis 211w','lenovo ideapad s10-2','samsung pn50b650','sharp lc42d85u','dvd vcr','avr-889','led 55 samsung','zebra zebra','7200','tecra a10','netbook cases','l7680','p2015dn','s4m00-2101-1100t','hp multifunction printers','cb518a','ln40b650','q3714a','cp2025n','usb barcode scanner','arc-1231ml','ipaq','garmin nuvi 275t','samsung bd-p3600','ultimate 5 pro black','fw490','asus n81','t640n','lexmark t642','usb cable','cc477a','apple mb533ll a','hp scanjet 7800','asus p6t se','ln46b650','c544n','2820','panasonic dmc-tz5s','5550dn','nuvi 850','avaya circuit cards','canon d10','hp 8510p','bdp-s360','x200 tablet','air-ap1242ag-n-k9','vga cable','portable ipod speakers','city navigator north america','garmin edge','sony vaio vgn-sr490jab','sony vaio vgn-sr490jbb','network devices','f2a046a10','used','laserjet p1006','24vdc poweredusb cable and 24v poweredusb port on host power cable','acer lu.s050b.133','panasonic phones','blu-ray players','nuvi 755t','b8550','canon','gpsmap 276c','ee418at','samsung pn50b550','document scanner','c8546a','samsung np-n110-ka01us','pcm-1100-06','portable air conditioners','pioneer','sennheiser mm 200','portable audio','l7780','sony lcd tv','acer lu.s560b.103','q3944a','hp designjet 800ps','cisco','hp color printer','20g0200','xp','microsoft office','4700dn','bic f12','q7493a aba','refurbished projectors','nuvi 765t','sdcz6016ga11','garmin 545s','in1100','cb509a aba','all in one printer','europe gps','m3035xs','panasonic u1','bz569p46','ln46b750','air conditioners','coby tftv1524','samsung ln55b650','bdp-s560','projector','lenovo g530','c8084a','hp ipaq','4345x','q7815a','hp 5550dn','vpc100','q6274a','coby tftv1022','blu ray','t260hd','z3100','nuvi 260w','#2776h1u','western digital external hard drive 1tb','epson stylus 1400','blue chart g2','canon sd880 silver','officejet pro','wireless router','s510','sandisk sdmx14r-002gk-a70','dehumidifier','pioneer sc-05','4730 mfp','acer et.ev3wp.001','ce505x','optoma','nuvi 275t','cb509a','ln37b650','x544n','q7815a aba','ln40b630','veriton','vgp-bpl12','usb flash drive','portable hard drive','tomtom 1s00.082','scandyna','mi4004blk','sl500','jgs524','portable dvd player cases','outdoor speakers','samsung ln-46a650','acer travelmate 6493','flatbed scanner','5590','cc471a','hp scanjet n8420','cb494a','acer lx.n240y.023','f2380','rsa tokens','p3005n','pos keyboard','hp scanjet','mfc8220','lc32d47u','ktm-m50 1g','c544x1kg','cisco 2960','printer stand','lenovo x301','toshiba 19av600u','cc335a','42 plasma','in1102','officejet pro 8500','camera','11 x 17 all in one','boston acoustic','bdp-3600','garmin nuvi 350','router','nokia headset','waterproof','brother mfc-7840w','a470','vga monitor cable','printer cable','avr789','hp officejet 8500','dmp-bd80','ocz2a8002gk','cb532a','x264dn','lexmark t644','apple','viewsonic','refurbished','blu-ray','nuvi 885t','2746mlu','2767p1u','47lh55','lenovo w500','4250tn','gigabyte ga-ex58-extreme','asus vh242h','samsung nc20-21gbk','3301b002','kx-fl511','dvd combo','air-ant4941','ls2208','a06vj33','flash drive','soleus air 12 000 btu portable ac','msi wind','fi-6240','forerunner 305','pc3-8500','8730w','samsung ln40b550','p4015n','refurbished hp l7780','aj743a','gmrs','kr807ut','in1','toshiba 19lv506','hp 5510 printer','garmin 2730','sandisk sdcfh-008g-a11','ipod touch','nuvi 360','13 x 19 color laser printers','q2439b','sony dvm12cld','pcm-1970-06','samsung ln46b550','lenovo t400','2711b019','hp printer scanner copier','apple ibook','hp cp1518ni','laserjet p2015d','ln55b650','hp k8600dn','zumo','ce464a','hp digital sender 9250c','p4015x','xdm5205d-wu','sony vaio lv290j s','4345xs','pc power','1446b002','p8400','kv-s2026c','sc27','4350dtn','denon receivers','sp-lamp-027','monitors','portable dvd','cb532a aba','tv stand','samsung wmn1000b','sandisk sdmx14r-008gs-a70','cc476a bcc','oregon 400','keyboard','gps case','seagate','xerox c118 pl','n9120','powerlite 78','samsung ln52b630','canon scanner','brother all in one','blender','home cd player','t9300','a0ea011','samsung t260hd','msi u100 432us','tomtom go 730','panasonic','lenovo','texas baiiplus','4345','xerox phaser 8560dn','garmin nuvi 360','garmin 855','sony laptops','garmin streetpilot 7200','nuvi 5000','nuvi 270','1cj0.058.00','nuvi 785t','l170','printer scanner copier','gps buddy','sony vaio vgn-fw350j h','x544dn','pos','casio sl-200te','garmin nuvi 1350','garmin 540','hp designjet 130nr','garmin 360','mfc7840w','canon g5','ram memory','ln46b630','vostro','street pilot','tape drive','dvd vcr recorder','polk audio','t644','nuvi 200','mt60lp','samsung ln32b650','m265','sc-07','q5988a','hp c7280','bdp-09fd','marine','samsung ln46b650','macbook','samsung un40b6000','lg tv','express cards','samsung netbook','cb057a','oczsdhc6pro-4gb','e460dn','fi-5110c','samsung bd-p4600','motorcycle gps','printer server','streetpilot 7500','nec np50','fujitsu fi-4120c2','lx.e970z.121','gpsmap 60csx','cc372a','all in one laser','bds2900','belkin f5l001','all in one','nuvi 205','xerox documate 152','cb026a','epson epson stylus 1400 claria photo printer','amd motherboards','hp 6715b','c9148a','cb425a','ka9570','scanjet 8270','nb275ua','asus 1008hapu1xwt','logitech speakers','toshiba d-vr660','q5927a','34s0300','lp130','9842a002','bdp09fd','hp 9120','pt-ae900u','garmin 440s','pdg-dsu21n','lexmark c544n','laserjet p4015n','dr5010c','mfc8890dw','dc7900','4345x mfp','nuvi 265t','26a0000','toshiba d-vr610','22 monitor','lc65d64u','red acer netbook','panasonic dmr-ez37vk','hp laserjet 4250n','kodak scanner','thermaltake vd4000bws','34a0050','home server','2666b001','tray t640','garmin zumo 660','western wdavn00bn','anph50lp1','lp350','dual monitor','mio c230','mfc6490cw','2711b054','kh1516i','26c0050','2922b002','laserjet p2035','cb092a b1h','br1300lcd','mzdv','refurbished designjet 90','l2526a','lg rc897t','exz100pkdbb','cannon rebel','lxpbe0x016','ath-es7','blfs220a','hp 4240n','hitachi projector','rs-232c','mfc9420cn','blfp200d','16gb flash drive','cg821a','wallmount','anph50lp2','hp cm4730','3580l4x','kr663ut','garmin nvi 255','r10','mwm0701tw','lap24erbbagm','panasonic kx-fl511','hp scanjet 8300 professional image scanner','ml3471nd','c9721a','small note book','imageclass mf6590','samsung dvd-vr375a','dell laptop batteries','hp dv4','philips dvdr3545v 37','sony vgn-sr','lexmark laser cartridge','n51vfa1','c1861a','color laser multifunction','nuvi 340','radeon','c544 toner','panasonic sdr-s26-k','nbac0208','2667b001','ls4278trbk0100zwr','osa8214gaa6cy','brocade','bf041s','2765t7u','bean5mpred','lexmark t642 tray','bhcmxey','h470wbt','lh02lp','hp cb536a','p2015','pt-dw7000u-k','zs3','lexmark t642n','toshiba pslb8u-0c6025','tx2-1270us','wireless voip phone','designjet 510','scanjet 7800','pioneer sc-07','plasma tv','two way radios','garmin 660','garmin 260w','acer lu.s680b.066','javascript','garmin gpsmap','panasonic tv','multifunction printers','zebra 310','vt800','usb wireless adapter','g5000','home theater','wd10eads','c340','external dvd','large format scanner','hp 1022','mice','hp scanjet 7000','da-lite','acer 6493','flat panel tv wall mounts','xerox phaser 7500','20g0400','cad professional microphones u2 usb stereo headset u2','p3005','c8088b','portable scanner','c8165a','samsung nc10','5110eoxm','bdp1500','t1100','276c','lc46','toshiba netbook','j7934g','case sns-13black','draper','scan snap','nuvi 775t','1350t','in35','nuvi 780','return policy','avr-789','mf6590','western wdme5000tn','c540n','cp-lckngwallmnt2','kvm switch','p2055','gh715aw aba','garmin nuvi 855','ln32b550','onkyo','nokia n95','asus epc1000he-blk005x','wireless barcode scanner','sony open box','panasonic g10','canon 6473a003','sony bdp s550','axis 0235-004','30g0310','5120c','1242b002','hp 3600dn','np10lp','aten vs881','pci express cards','denon avr-689','battery charger','pj402d','garmin zumo 550','toshiba laptops','1910b002','26b0000','vt85lp','one-tp','pjf2 unv','prs unv','cs50','q5693a','mfc-8860dn','dect 6.0','canon lenses','211w','c9403a','phaser 8400','c8532a','olympus vn-5000','c8568a','46xf550u','4730xs mfp','hp 2600n','air-pwrinj3','nokia 6650','palm pilot','ati hd','hp scanjet 4850','transducer','k70io','qx9770','workcentre 4150','x738de','axis 211m','lnsw11','viewsonic pjd6240','c734a2kg','nec lt245','esata adapter','cb496a','tomtom one-s','1005hapu1xbu','7442nik','navionics','samsung cameras','lus820b203','lg 42lh20','apc ap9510l620','u4659e','symantec corporate','fi-5650c','l1940a','0296b113','q6713a','mfc-6890cdw','7517nik','k70ioa1','deskjet','signal converter','q6607a','lus810b322','7524nik','pm520','repair tool kits','panasonic camera','portege r500','13x19 printer','air-cab020ll-r','2578a002','secure digital card','460fp-2','kingston sd4 4gb','2720','ln52b550','lcd mount','q5421a','hp xw8600','skype','p1505n','asus','designjet 500','screen','sony dvp-fx930 r','asus t91sa-vu1x-bk','toughbook 30','nuvi 265wt','lexmark t640n','cp-pwr-cord-na','blu ray disc players','sandisk sdmx4-2048-a70','hp jetdirect 170x','symmetra','gpsmap 545','hp laserjet p4014n','gps charger','microphone','wireless keyboard','i7','cb507a','laserjet p4015dn printer cb526a','tablet pc','sony mdrxd200','cc372a aba','un55b7000','garmin oregon 400c','g4050','hp mini','nuvi 500','coby mp705-4gblk','q9000','sua1500','lenses','nuvi 760','hp 4250n','bdp-1600','asus n81vp','nzxt tempest','haier tcr13','etrex vista hcx','11 x 17','samsung ln22b460','whiteboard','vt77lp','eee pc','epson 6100','5013g','avery','m3027mfp','5200tn','nuvi 1300','et-lad40w','msi gt725','hp business inkjet 2800 printer','h5479e','samsung blu-ray','pssbau00m006','hp designjet 510','nikkor','garmin nuvi 750','cc470a','vga splitter','soleus air','n2230w','lx140','7941g','inliteshow2','fwd40lx2f b','x58 motherboard','hp cp2025n','garmin 705','1800-24g','ag735a','hp photosmart','a1100','thermaltake','p1505','neatdesk','dmc-tz5','lcd3215','acoustic research','vista ultimate','garmin 60csx','jetdirect 615n','linksys 16 port switch','c7972a','l1943a b1h','c7115x','cd recorder','c7180','lmp-c150','lexmark t640 printer','wkb-4000us','ks087ua aba','asus eeepc1000-bk003','fs728tp','infocus in24','kv-ss905c','4250xfm','nuvi 370 gps navigation with 3.5 screen','t6500','ch336a','brother wireless printer','inliteshow-mount','cisco ip phone 7960','lcd5710-2-av','canon 1133b001','dmp','8085dn','ks092ut','scanjet n6310','air-ap1242ag-a-k9','officejet 9130','pn-s525p','pt-lb80u','amd laptop','lenovo docking stations','fujitsu scansnap s300','vgnnw120j w','sp-57','denon avr 889','cp1500avrlcd','hard drive 1tb','7960g','air-ap1232ag-a-k9','tm-t88iv pos thermal receipt printer','duplex tray','case fan','koss spark-plug','hp jetdirect 620n fast ethernet','dw085a','acer 11.6','lcd','graphic tablet','l1940a b1h','yamaha','universal ceiling mount','7800','foxconn','2800dtn','sony bdp-s550','hp laserjet m1319f mfp','streetpilot','hp mini 2140','sony mdrq22lp','n6010','z3200ps','cb495a','panasonic tc-p42g10','utp1400-10g','draper screens','a3l791-03-blu-s','garmin gpsmap 276c','p3005dn','kingston sd6 8gb','pc cradle charger adapters','p4014n','cb413a','ce462a','mouse pad','garmin nuvi 660','47lh40','laserjet p4015x','ln32b460','ph1-12r-03','dvi cable','targus papwr005u','portable dvd player','kingston dt100 2gb','truck gps','cisco ip phones','kingston dti 16gb','barcode scanner','ln52b630','hp 510','cd printer','fujitsu','aten cs1784','server motherboard','gps mounts','labels','garmin portable friction dashboard mount','fi-6130','avr688','fujitsu s1500m','an-ph50lp2','windows xp notebook','dictation machine','v13h010l25','avaya one x phone system solutions','gtx 280','nw160j','rack mount','asus rampage ii extreme','panasonic ae3000u','12 notebook cases','aopen','1005ha-pu1x-bk','z720','apc 1602-25','cta wi-mfg','2055','hp xw8400','dra-397','3m ef200xlb','tripp n020-250-gy','epson v12h004w03','cc436a','lexmark c544dn','panasonic strada','go 720','dr-7550c','z3100ps','q7493a','x364dn','cp-7965g','hp laserjet 4345','plc-xw55a','projection screens','hd8200','samsung un46b8000','et-lax100','hd projectors','pt-ax200u','garmin streetpilot 2730','panasonic dmc-lx3 black','8670m-us','ht-bd7200','tomtom 1ek0.052.02','samsung bd-p1600','faxphones','anxr10l2','panasonic 65','lcd monitor','samsung led tv','hp 7650','elitebook 8530w','adobe creative suite','j9143b','u4826e','cp-wallmountkit','dvd writer','p2055x','motherboard','msi vr420','denon avr','lens','b4545','cb412a','webcam','ks179ut','asus epc1002ha-blk006x','sharp 65','laserjet 4300dtn','samsung lcd tv','wireless projector','imac','targa screen','p120i','ink','linksys wrt610n','asus eee box','q2429a','cc431a aba','pn63a650','400fx','hp laserjet m3035 mfp','acer one','trendnet tew-633gr','cc532a','network cable','pssbau-00e005','sl400','garmin oregon 200','sanyo vcp-l14tu','brother fax2820','pny md2048kd1-400','texas ba-20','ds-2400','ms830','celeron','optoma hd72','ec.j2901.001','telephone accessories','motorola h12','4850e','ds209+','discovery 925 mono earset','microsoft office upgrade','transcend ts2gjfv30','polaroid pogo','targus tsb212','acer aspire one d250','cb413a aba','dvd-h1080','uniden pro520xl','thinkpad t400','nv366ut aba','canon 2507b001','toshiba 15lv506','20g0890','p6t','acomdata pdhd1000use-72','pjd6240','sc-05','designjet 110','sc25','walkie talkies','hp 2140','j6480','pioneer elite receiver','un46b7000','aten','pioneer elite sc-05','tomtom go','dv3','apple mb463ll a','garmin rino','sharp hd projector','mfc-8460n','2430tn','l7580','garmin 540s','wireless adapters','mx860','g31mxp-k','vt2230','toshiba hddr320e03x','panasonic dmw-lmc55','cp-7961g','wmk-005','voip phone systems','ht-bd1250','cp1215','laserjet 4250dtn','p4015tn','infinity','streetpilot 2720','pentax','canon 2923b002','hp laserjet m2727nf','epson epson','laserjet 4250','et.cv3rp.001','asus p6t deluxe','bd-p4600','deskjet 6940','hp scanjet n6310','nokia 002g6q3','sxga projector','asa5505-sec-bun-k9','garmin edge 305','cc516a','nuvi 750','magicolor 1690mf','plvz1','376c','garmin 1390t','gigabyte ga-ex58-ud4p','compaq','pgf210x','sony vaio z','panasonic dmw-lc55','sound bar','np41','psc5100','q6264a','network drive','western wdml5000tn','cc567a aba','cb023a b1h','v13h010l39','iphone speakers','hp 6310','canon dr-1210c','touchscreen','garmin etrex venture hc','pj260d','network hard drive','2764b003','planar','agp video card','t634','pg-f320w','1908wfp','b223w','phaser 8500 ink','sharp 42','magic jack','cmp-10-u5-sc','hp business inkjet 2800dtn','dmc-lx3k','hp p2055','infocus in42','hp scanjet 8270 document flatbed scanner','pioneer vsx-23txh','ultralast ulaa4aaa','eee pc 1000he','lava octopus-550','hp 6380 printer','eh922a aba','denon avr789 receiver','eme625-5776','belkin f9g1030-12','751h-1373','thinkpad x200s','xr-30x','animation and design','ethernet cable','nuvi 260','epson 1400','video capture devices','cb815a b1h','anxr30lp','shredder','rma','5j.j2k02.001','hp 5200dtn','11 x 17 scanner copier','wd10evds','cp3525dn','hp 4350n','hp photo printer','designjet 800','toshiba 22lv610u','acer','sua1500rm2u','officejet j4680','30 monitor','4730x','hp color laserjet 9500hdn','western wd5000bevtrtl','splitter switches','dvi hdmi cable','toshiba 40rv525r','infocus','ups','sata to ide','western wdh1u5000n','iphone accessories','epson 78','brother printer','printer scanner','garmin 205','vt2430','xd95u','5200dtn','wireless mouse','c7770b','mfc-8870dw','nikon s560 black','zumo 550','kingston dti4gb','garmin dash mount','l2700a b1h','samsung srp-350','samsung ln52b550','g3110','dvr','brother','vivitar dvr-510','asus epc1000he-blu002x','ln52b','ht-x710','hp laserjet m3035','sharp al-1551cs','acer d250','3m wr310be','x10','q6719a','hp 4345x','sr250j h','sx10','msi gx630-028us','hp mfp','cb400a','handheld pc','windows xp pro','20g0894','olympus stylus 8000 black','casio fx7400g','q8341a aba','mc860','lns-s30','oki','3210','upconverting dvd player','dr-4010','ol-xl2550lz','dell desktop','sony p','xdm262i5d-wu','mfc-9450cdn','hp cp6015','seiko slp-2rlh','rlc-030','xl 330','all in one laser printer','rm273ua aba','x61','extreme networks','sony dcrdvd650','cs1784','belkin a3x126-15-ylw-s','cs1782','vlt-xd205lp','samsung r80x5210sj','hp color laser all in one','cb401a','c3906a','handheld printers','lexmark x9575','toshiba r600','kxtha12','denon s-101','cisco access point','laptop hp 520','worldnav','th-50pf11uk','axis 5500-071','samsung ln40b530','d1001k','vgnz750d b','government','dvi-d','eb666a 000','des-3526','dr520','engenius','cb028a b1h','air-ap521g-a-k9','canon sd880','kxtg4500','vgnz790dab','scan','p1005 printer','l2690a b1h','pn58b550','wnr1000-100nas','gpsmap 545s','fujitsu scansnap s1500','ear cushions','c6578dn','r500','q7813a','cb494a aba','et.ev3wp.001','sc05','hp g3110','mfc-5890cn','78-9236-7702-1','battery hp-aa zt1000','p4014dn','garmin 755t','canvas printer','acer aspire one d150','sandisk sdmx14r-008gk-a57','h76','samsung n120','kaspersky retail','hp jetdirect 620n','playstation 3','olympus e-520','home video','laptop case','techsmith camtasia studio v.6.0','panasonic projector','cb368a','t640tn','rollfeed kit','tripp aps2012','pixma ip100','cables','lacie hard drive','headphones','un46b6000','mm200','hp cm2320fxi','cisco 881','istarusa','apple mc026ll a','headset','hp scanjet 7650','dp1-40-03','cb507a aba','e250dn','garmin 276c','srp-350','elpmbpjf','5550dtn','samsung wep410','tlp 2844z','returns','laserjet p2055dn','n8420','n8460','skype usb phone','ks176ut','hp laserjet p2035n printer','ks130ut','ks125ut','lenovo t60','xl1550u','coby tvdvd1390','9673a002','cc517a','l1710','coby cve92','en-cahdd2b','z3200','nova arw','garmin 1300','altec lansing','powerlite 1825','speaker stands','q5402a','nokia n800','hp 6500 wireless','cb384a','scx-4828fn','canon 2186b002','avermedia','plantronics s12','officejet 6310','ide hard drive','ks085ut','cb369a','l1980a b1h','lns-w10','t9600','soleus 70','ipod dock','ol-xl2550tz','l2689a b1h','cb385a','hp officejet h470b','sony vgn-fw270j b','ks129ut','v13h010l16','business laptop','pgf312x','srp-350ug','apcrbc110','scs222','2024p','hp jetdirect card','rb456ut','garmin leather case','security switches','cisco 888','hp c4580','weather','ysp 3000','panasonic kx-tca60','mvc-fd200','epson powerlite s1+','mini sleeves','sr490ddb','external cd dvd drive','panasonic viera','asus netbook','apple mb881ll a','conditioner','4250 toner','dv4','x264a11g','air pump','apc smart-ups sc 1500va','apple imac','cisco 877','01ssc9300','lenovo x61','3478b005','ks173ut','furniture','ks172ut','uk680e','lns-w11','hp designjet 130 printer','hp pavilion dv4','ks186ut','ks100ua','ws-ce520-24pc-k9','hp plotter','zalman','samsung 55','hc1600 projector','bd370','pulizzi','beltronics v940','un32b6000','sandisk sdcz4-8192-a11','cc470a aba','q7492a','cb367a','lg 47lh55','panasonic rp-sd128bu1a','un55b6000','m2727nf mfp','pci video cards','acer notebook','tv tuner','okidata c5650','sony vaio sr290','lns-s03','wifi phone','r600','1005ha','rca vh58','cp-7937-pwr-spl','documate 262','garmin zumo','wireless web cam','cp-handset','b430dn','a3 scanner','gn-wi07ht-rh','01-ssc-7387','j9142b','davhdx285','cp-lckngwallmount','u4830e','ce505a','sandisk sdmx14r-004gr-a70','bdvis1000','msi u123-003us','fujitsu 5120c','pjd6220','designjet 130','t650n','un40b7000','nikon l100','hp p2015','dymo','polk','6180n','sharp ceiling mount','4250n','1861','vlt-hc100lp','hp n9120','photosmart 3210','5000-3-200-72','lexmark t640dn','designjet 130nr','un40b6000','gpsmap 520s','cisco 6506','sp-lamp-025','c544x1yg','gps 76csx','dual display carts','adobe acrobat','security camera','sandisk sdcz6-8192-a11','an-xr10lp','wndap330','ks180ut','laser','nikon d60','ulpt-l','gpsmap 530s','th-103pf10uk','nokia','tomtom go 630','cb472a aba','ocz','apple macbook','m51af1','vx2835wm','kodak p720','hp designjet t1100 mfp','kodak m820','scanjet','kodak p820','hp 4700dn','sanyo plc xu48','l1910a','q3714a aba','digital sender 9250c','sanyo plc-xu48','ks035ut','media center','fujitsu fi-6010n','harx900','toshiba 19lv505','in-win','cb412a aba','skeleton','ue685e','q5407a','6500ub','oki c6150n','q7516a','vlthc910lp','panasonic kx-p3196','thermaltake w0101ru','boxd945gcl','ks083ut','l2683a','plc-xf46n','16f1400','9439e5u','garmin oregon','pioneer vsx-917v-k','fi5120c','canon ip90','lxtq60z103','panasonic rr930','p6t deluxe v2','a06x010','ck839a b1k','dzbd10ha','w840','cp2025','ups power supply','samsung 2493hm','wireless security camera','npq1exfa01us','hp p2035 laserjet printer','hauppauge 1200','kworld tv tuner','c9674a','q5956a','rp5700','gps navigation systems','gsm7324na','laptop memory','spot tracker','c8143a','610 309 2706','sanyo hr-3utg-4bp','free ground shipping','garmin rino 530hcx','cada004sa4','laserjet 4730','9110','gsa contract','kr787ut','hp laserjet 1320 printer','ce522a','x500n','panasonic lm-af120lu10','asus eee pc','pioneer elite sc-07','hp z3100','hc1600','vx2260wm','canon sd880 gold','ocz3rpx1333eb4gk','coby tf-dvd1023','hp designjet z2100','zune','asus 90-ids002a00-01pz','windows xp laptops','linksys ezxs55w','q5945a','cp-x3010','acer et.fh3hp.002','sony vgn-ns290j l','paper tray','hp deskjet 9800','j8705a','40y7005','infosafe sat3510bu2e 3.5 hard drive enclosure','phone fax','cash register','cannon digital camera','sandisk sdcz6-4096-a10','cisco cd372-eb','5516-5063','canon a1000 brown','bd-p1500','yamaha rxz7','cp-524sg','warranty','streetpilot c340','infocus in3104ep','pda\'s','fujitsu scansnap','vaio z','coby','2811 router','tlp-lw12','t1i','rm-72','glc-lh-sm','ep761','ep759','hp m2727nf','et1602','dvd players blu ray','hp 2530p','cc378a','sony vgnfw350j b','tn-650','ce252a','hp m3035xs','5d mark','tx761','dmc-zs1k','touch monitor','intercom','lenovo desktop','fiber optic','zebra tlp 2844','l5410','panasonic sv-av100','rz363a','lc-32d47u','targus amp03us','optical','epson workforce','hp scanjet n8460','22g0320','hp laserjet p2035','pg-b10s','us-4a','dmp-bd60k','2746mju','acrobat','5050','belkin f5d8235-4','glc-sx-mm-rgd','scm','alcatel os6400-p48','ws-ce520-8pc-k9','c8550a','paper','intel pwla8391gtlblk','enterasys','lg 22lh20','lexmark printer stand','vgp-amb11','lexmark e260dn','rk5001','eee pc t91','p2014','cable guide','1711','wd1600aajb','s1500','tc-l37s1','2840','canon 2756b003','oregon 200','olympus vn-5200pc','8530w','coby mp305-2gblk','vsx-21','sony kdl-32xbr6','griffin 9501-tripcbl','samsung blu','s4m','lacie','fi-5900c','275t','nb275ua aba','hp laserjet p2015dn','c5650n','3220l','xr-32x','axis 0129-004-02','q7501a','ch337a b1k','765t','4gb ddr3','samsung t220hd','130nr','in hw-presenter-rf','cs290','wenger','belkin f9g934-10','i7 920','coby tf-dvd1021','cc364a','ln32a650','officejet j6480','metra 40-uv41','nvidia geforce gtx 295','lenovo a58','rnd4210','hp 2710p','corsair flash drives','nikon 4730','sony nwze436fblk','wusb600n','cp-pwr-cube-3','retail ip phone','seiko slp-trl','3m ex10xl','netgear wnda3100','ap7950','m1 to component','nexotek nt-p100m','tecra','panasonic kx-tg9332s','transcend ts32gjfv60','q9300','istarusa 4u','bd-s2900bl','compact flash memory','laptops with windows xp','samsung ht','denon avr-789','ce461a aba','tc-p42x1','tc-p54g10','bdv-is1000','ln46b550','hp scanjet 8270','hts8100','avr989','dlink dir-825','ws-c3750g-48ts-s','hp laserjet 1022','x543dn','cp-7962','tomtom 1n01.081','fujitsu fi-6770','wall mount rack','color laser printer wifi','belkin f5u002v1','oczp4002gk','sandisk sdsdb8192a11','neat scanners','camtasia','sandisk sdcz6-4096-a10rb','mini dvd-r','in37ep','lexmark c534dn','hp 2840 printer','cc364x','toshiba 32av502r','cobra xrs9345','hp firebird','tripp pv200','hp laserjet p2055x','kingston sd 512','kvm','wd10evvs','portege r600','teletype','r600-s4201','sony vaio fw','gps mexico','antec notebook cooler','tdp-px10ub','hp photosmart c7280 all-in-one printer fax scanner copier','hp 4100 mfp','fujitsu fi-5120c','3m 1608','panasonic ax200','intel boxdx58so','pyle plcd15mr','gs748ts','color laser printer wireless','zywall','phoenix rsd250.2','hp cp3525x','dehumidifier 70 pint','brother dr510','cl1001-sb','karma','wd 1tb hard drive','hbl60','canon ef 28-135mm f 3.5-5.6 is usm','aiptek a-hd','tlplv3','540s','pharos nav01','hp z800','zyxel','vlt-hc910lp','toshiba notebook','lexmark c530dn','sony dvp-fx930 l','vlt-xd400lp','q5736a','samsung bd p3600','c8562a','x363dn','mc-88s','lmp-c161','belkin surge protector','axis communications 211w','x264h11g','hp 2430tn','pe2-07r-62','microwave oven','u100-451us','video cards','viewsonic n2230w','hc5500u','cp2025 toner','gps friction mount','tv mount','3m 91-4922-191-02','epson powerlite w6');

/* $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' : '/images/public_img/public_icon_img/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 = '/inc/asp/blank.asp';
                }
                
                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);
    }
