/* Popular phrases - NOMADTRAVEL - 4:47:7, Sun Feb 12, 2012 */
__SLI_ClientDefaults =
[
    ['ShowBrandingFooter', false ],
];
var asPhrases=new Array ('down jackets','wheeled backpack','primaloft jacket','fleece trousers','warm trousers','fuego','north face womens jackets','money belt','travel wash bag','rucksacks with wheels','backpack with wheels','mosquito net','down filled jackets','wheeled rucksacks','hat','carry on luggage','rucksacks','poncho','holdall','north face','berghaus jalan','travel vaccinations','compression sack','north face fleece women','rehydration sachets','rucksack lock','deet','north face trousers','salomon','quick drying trousers','sun hats','waterproof money belt','cotton trousers','lightweight fleece','osprey','4 season sleeping bag','base layers','mountain equipment','head torch','sterile medical kit','ski jackets','wallet','jalan wheelie','vaccinations','40','travellers medical kit','barts','north face gloves','berghaus jackets','brasher','annapurna jacket','womens gloves','bum bag','barts hat','icebreaker','down womens jacket','front open rucksacks','berghaus hat','buckle','north face laptop','berghaus','trekking trousers','primaloft','sandals','buff','day bags','mens nuptse jacket','polartec fleece','mountain','gloves','sarong','goose down jacket','osprey backpack','snugpak','mountain equipment annapurna','waterproof poncho','berghaus rucksacks','polartec glacier pants','insect repellent','towel','berghaus womens','sealskinz','nuptse 2','padlock','waterproof passport pouch','barbour','explore bag','berghaus activity fleece','socks','wicking t shirts','pillow','etip','luggage straps','sleeping bag','passport pouch','boots','waterproof rucksack','hammock','north face mens jacket','aq2','neck pouch','malaria','north face bag','water bottle','silva','berghaus fleece','leech socks','bandana','berghaus mens jackets','eagle creek','folding bag','low alpine','hunter','fleece jacket','needle syringes','needle kit','polartec','torch','nuptse','paracord','locks','chlorine tablets','sterile needle kit','adaptor','insulated jackets','northface womens fleeces','meindl','north face laptop bag','sahara bags','platypus','steripen','nuptse jacket','sterile needles','travel towel','toiletries bag','waterproof jackets','fingerless gloves','gore-tex','trespass','berghaus trousers','first aid kit','north face footwear','wellies','malarone','water bladder','delivery','fleece gloves','permethrin','thermarest','radio','indiana','basha','berghaus 30','pillow jacket','sleeping bag liner','salomon fastpacker','hot pocket hand warmer','power stretch','bp','jungle trousers','redpoint','glove liner','mitten gloves','luggage','down jacket the north face','travel adaptor','desert boots','belt','convertible trousers','insulated jackets women','inflatable pillow','berghaus gloves','goretex jackets','jungle hammock','annapurna','pacsafe','north face tent mules','stuff bags','berghaus spectrum','lightweight sleeping bags','karve','wash kit','waypoint','permethrin spray','north face etip gloves','medical kit','scarf','silk liner','icebreaker merino','insect repellent clothing','hyvent','raleigh','mammut','underarm wallet','survival kit','period','diarrhoea','tilley','wide brimmed hat','belt safe','north face waterproof bag','rucksack buckle','trek bag','lowe alpine day bag','cotton shirt','travel clinic','gilet','insulated trousers','berghaus 3 in 1','berghaus expedition','nikwax','quick dry socks','washing line','waterproof wallet','insulated water bottle','light sleeping bags','waterproof shell gloves','superfeet','sterile kit','malaria tablets','merrell sandals','walking poles','cargo pants','merrell','dry bag','barts beanie','north face fleece','mountain hardwear','rucksack transit bag','personal medical kit','msr','uk to india adaptor','frio','leatherman','gaiters','rucksacks with detachable day bag','convertible bag','camelbak','tent slippers','berghaus ignite','travelproof zip','roll mat','royal robbins cool mesh 3 4 sleeve shirt womens','aquapac','1 4 zip','mens down jackets','rehydration spoon','mens sandal','waterproof pouches','roll mat strap','craghopper trousers','glacier','berghaus freeflow 35 8','bridgedale','ski','world challenge','hand warmer','skirts','glasses','rucksacks clamshell','indiana shoulder bag','face mask','teva','bp travel kit','umbrella','rucksacks worldwide','north face scarf','handwarmer','lightweight waterproof boots','water','hiking boots','lightweight walking shoe','north face nuptse mens jacket','merino base layer','walking shirt','plug adaptor','stanley','stuff sack','katadyn','shoulder bag','healthy back bag','north face pullover','travel sack','primaloft jacket womens','mosquito','bungee cords','headwear','micro fleece','luggage locks','260 crew','royal robbins','vest','teva sandals','nalgene','under arm','leech','womens hats','large travel towel','travel rucksack','windstopper','biox aqua','sunglasses','nuptse 2 vest','compression','shewee','catch 22','berghaus daybag','lightline','flask','laptop sleeve','petzl','sahara','northface hedgehog','liner','medical packs','silk','hedgehog','mens fleeces','travel wash','sterile','lightweight waterproof jacket','glasses case','security','immunisation','travel trekker','mosiguard','heat pack','newport','rucksack raincover','travel shoulder bag','waterproof gloves','first aid backpack','trek kit bag','maglite','ripstop trousers','travelproof','hyvent jacket','northface','spectrum','clothes wash','upland','doxycycline','loperamide','redpoint optimus','injection kit','trion','regatta jacket mens','womens sandals','water purification','merino wool','ortlieb','julbo','rehydration tablets','keen footwear','pilgrim','optimus','joby','sleeping liner','baselayers','jungle','chlorine','berghaus stretch','tape','skross','bumbag','canvas bag','wellington','snow boots','goggles','north face summit series','osprey kestrel 68','helly hansen warm','daysack','waterproof','barbour jackets','100 glacier','85','vango','fur bomber','trek and travel poncho','sleeping mat','brasher supalite','size guide','merrell chameleon','mess tin','regatta waterproof jacket','explore','wash bag','waterproof trousers','chemical hand warmer','indiana bag','berghaus paclite jacket','lowe alpine travel trekker','2nl','long sleeve shirt','ear plugs','jobs','womens north face','games','north face beanie','nosilife','padded jackets','rolling thunder','explore trek bag','jungle boots','rg1','sacbag','ski goggles','wheelie bags','icebreaker men','headtorch','cable fish beanie','jack pyke','packing cubes','waist pouch','waterproof hat','altberg','fleece','neck scarf','victorinox','cobber','shoulder holster wallet','berghaus beanie','savlon','sun glasses','power adaptor','berghaus akka','expedition','needles','mens north face down jacket','blister','berghaus bags','etip gloves','northface triclimate','plug','3 in 1 jacket','wellington boots','kids','trekking poles','synmat','north face mule','tent','metropolis','mesh bag','silk sleep bag liner','barska','raider','helly hansen','jet ease','barmah hats','verden','polar buff','spork','craghopper','kiwi','barmah','fuel','triclimate','ski gloves','balaclava','north face nuptse','zephyrus','micro','lamina','4 season','gaffa tape','water purification tablets','exped','inlux','biox aqua purification tablets','scales','snood','watch','darla','hunter sock','berghaus freeflow','sea to summit','size chart','cap','tropical hammock','hand wash','icebreaker hiking socks','first aid kit india','map','dioralyte','vango compression sack','money pouch','x mug','clothing treatment','brim','benadryl','icebreaker tech top','sta','syringe','longhaul','regatta','body wallet','compression stuff sack','water tablets','blanket','sherwood','groundsheet','mens gloves','leki','womens goose downs jacket','auckland','tka 200','travelproof fuego','cargo trousers','trouser belt','quick drying shorts','mug','sink plug','travel plug','protexin','duvet jacket','mens gilet','box mosquito net','kids hunters','mosquito repellant','first aid','rehydration','ski pants','fuego jacket','winter lined','laces','raincover','deet lotion','vouchers','sven','rehydration salts','jordan','silva l4 headlamp','fozzie','hunter gloss','thermarest trail lite','silva field compass','anti malaria tablets','bite relief','classic lightline','exit gtx','tee shirt','biox aqua drops','fork and spoon','pacsafe wrap safe','cndw010','vacuum flask','women\'s','platypus 1lt platy bottle with pop top','toe warmers','pacsafe tri-fold travel wallet safe 100','power monkey explorer','north face warm','3d fastpacker','pacsafe backpacker medium','mosquito net treatment','trousers','3 season sleeping bag','lighter','womens trousers','alarm','jalan','rucksack cover','bugproof','duffel','soap','optimus womens','rafting shoes','terra nova','wenger','keen','jerry can','roamer','clipper','momentum','no water','map case','ortlieb dry bag','typhoon','anti malarials','iron','hh dry','trion 30','jet ease tablets','meindl atlanta','berghaus shoes','ortlieb rucksack liner','wax jacket','move','waterproof bag','rucksack laptop','north face freedom','malarone tablets','money','hh warm','spikes','evolution triclimate','poncho men','passport','talon','qeezee','sea to summit x mug','promo','berghaus rg1','victoria','downpour','northface mule','howsar','oasis','exit 2','osprey sojourn','berghaus optimus 40','mountain equipment annapurna jacket','thunder','farpoint','sewing kit','craghopper shirts','teva zilch','rafting sandals','fleece pillow','belmont fleece','walking shoes','boys','sojourn','neck gaiter','boonie hat','hydration','opinel','mesa runner','waterproof socks','thermal gloves','compact towel','ultimate travelwash','malaria spray','altimeter','banshee','bses','shots','leggings','north face base camp','toiletries','garmin','itravel','messenger bag','mosquito protection','packaway day sack','solar chargers','regatta packaway jacket','wax','shaving oil','power traveller','storm shelter','nite ize','fork','optibac','blencathra','polypropylene','north face womens boot','kids waterproofs','north face hats','knife','north face nuptse 2 vest','echo','barts glove','tasman paclite','bottles','overhaul','keyring','light waterproof','scarpa boots','barbour hat','north face overhaul 40','burn gel','candle','bed','cup','universal plug','northface e-tip gloves','self inflating pillow','watertight dry bags','roll on','suncream','farpoint 55','amore','travel pillow','north face womens gloves','net','passport wallet','osprey momentum 34','kit','primus','silk sleeping bags','talon 8','mirror','point five','osprey waypoint 85','ear','atmos 35','batteries','gore tex jackets','polar fleece','glissade','merrel','denali','cable knit','osprey farpoint 70','desert','toothbrush','holster','sahara raider','baby','north face tka 200','afterbite','icebreaker women','travelproof expedition poncho','t shirt','osprey atmos 35','equator','desert scarf','merrell mens sandals','watch strap','berghaus luggage','berghaus power stretch glove','north face redpoint jacket womens','blow up pillow','sling','evolution triclimate jacket','exped vista organiser','upland north face','exped quad trekking pole','morocco','salomon comet','womens jungle trousers','travel torch','uganda','north face jackets','scarpa hydrogen','2 season sleeping bag','fitzroy','beanie','scarpa','waterproof holdall','bradt','black diamond','toilet paper','the north face cable fish beanie','berghaus case','touch gloves','wheeled luggage','lined trousers','superlight','kids thermal gloves','el rio','exit','northface gloves','berghaus palu','pouch','ultra','iru031','worldwide travel sack 65','plastic bag','mosquito tent','explorer light','coleman','waterproof shoes','ski sunglasses','thermal trousers','stores','wool socks','osprey talon','thermal','travel soap','biox','cord','30 litre rucksack','sahara indiana shoulder bag','she wee','angstrom','zinc oxide tape','shirts','money wallet','healthy back','atmos','insulated mug','travelwash','phone','security belt','powerstretch gloves','head lamp','wash','bathroom','stratus','utility belt','coil','north face vest','north face ipod gloves','comet','mens etip gloves','bivi','doubletrack','packaway','day sack','machete','walking sandals','walking socks','berghaus calisto','porter','webbing belt','health advice','lowe alpine tfx','rio','anchor bandage','sunglases','empty first aid','scissors','wheelie','kettle','the north face redpoint','fleece scarf','tka','winter hats','north face slippers','sigg','indiana jones bag','ripstop','rucksack bag','osprey karve','aquapure','icebreaker gloves','north face nuptse jacket','price list','iphone gloves','north face massif vest','flyweight hoodie','trek pod','travel cubes','marvelous','web tex','zantac','vango walking poles','buff original headwear','hand wipes','shewee extreme','osprey talon 44','nail clippers','barts headband','panuelo','sleeping','us army jungle boots','north face luggage','raleigh first aid kit','denali scarf','travel quilt','imodium','india','talon 4','headlamp','food','salomon exit peak','toilet roll','shorts','stuff','leather money belt','purification','bowl','deluge','jacket','usb','x-tracks','seal line','waterproof spray','swiss army','mens ski pant','hoser','health hygiene kit','travel containers','teva terra','the north face triclimate evolution','bug proof clothing treatment','swim','north face gtx','barts kamikaze','strepsil','saklock','mittens','healthguard','talon 22','bamboo','vango tents','repellent','pack list','canvas','trainers','osprey rucksack','axis 18','trolley','belt pack','water purifier','laptop','hunter welly socks','dental kit','vector 18','expedition belt','alpamayo','mycil','anti bacterial hand wash','ste014','jasmin','icebreaker 200','jester','lightweight towels','pack mate','osprey 60','clear bags','berghaus ia','north face zephyrus','whisper','expedition belt pack','city beanie','roberts','outdoor designs','double net','bug proof clothing','cover for rucksack','podsac','kili','spoiler','thunder jacket','denali gloves','calisto','cornice','kids hunter wellies','kestrel','pharmacy','fire','sun caps','led head torch','brunton','rucksack liner','somersets','chulu jacket','freeloader','flight socks','tooth','kit bag','quad','bones beanie','mia','tnfa1090','lingo pix','chapstick','watertight','overlander medical kit','platy','mooncup','vista','zg65','wolf boot','water treatment','hat sizes','kiwi trousers','distance','supercool','impregnation','convertible mitt','go system','storm','exped large','denali thermal','dix','gaviscon','hennessey hammock','berghaus boots','travelproof bathroom cabinet','worldwide','axis','bag','trekking poncho','activity','foam','boonie','sac bag and raincover','water bottle with filter','merrell maipo','insulin','walking shirts women','neck','pack safe','nomad','raid','neck support','brunton solaris','travel washing line','hip belt','merrell arc','flap jack','jungle first aid kit','door','deet 50','mens waterproof coat','osprey talon 22','pen knife','north face doubletrack','luggage tags','verdi','travelproof basha','dragoman','zinc oxide','insulated bottle','tilley hat','roll mat bag','north face surge','mess','evolution','sealed bags','womens micro fleece','security pocket','antiseptic wipes','rain','bed net','earplugs','lip salve','travelproof money belt','ski pass holder','eagle creek silk money belt','travel proof','iv giving set','gaffa','camping mat','berghaus prime 40','explorer boots','gps','3 in 1 mens jacket','sahara indiana','north face borealis','peru','womens boots','stormbreak','foot warmers','womens berghaus jacket','raleigh international','winter','trekker','backgammon','gel','sickness','malaria risk','stuff pack','child carrier','travel bag','travelproof sewing kit','variant','glove saver','churn','sizes','travel pack','bugproof kit','lowe alpine tt','travel bottles','desert ripstop shorts','craghopper nosquito','ladies berghaus jacket','dome net','lite 35','nuptse iv','tent mule','neoprene','mobile','single combo net','fastpacker','windwall','exit peak','down','head net','osprey talon 4','18','hip flask','gift vouchers','splosh','north face venture jacket','calisto light','omnium','sigg water bottle','tsm001','kayenta','travelproof mat','berghaus fleece ia','bp recommended','catch 22 cable lock','paul goodyer','hydrogen','storage kit','vulture shirt','eagle','northface womens jackets','north face thunder','freeflow','freedom','berghaus women\'s akka long down jacket','waist pack','zephyrus pullover mens','neet deet','travel lite','knife fork spoon','packtowel','us water','pregnant','hydrogen mesh','avian','bob hat','light hiking socks','nomad fleece','dr tooth','light rucksack','uv umbrella','pot','no water wash','redpoint glove','jungle net','eagle creek pack it compressor','pegs','rain trousers','clear pouch','eagle creek pack','mens waterproof jackets','geonet','toothpaste','tights','prognosis','traction aids','raleigh medical kit','ice','sleep mask','the north face redpoint optimus jacket mens','berghaus trek','insect repellent deet','safari wear','keen newport','design go passport control','varius guide','north face holdall','repair','tsa lock','explore medical kit','gorilla','bolle','berghaus cornice','h2ono','friars balsam','chulu ii','icebreaker bodyfit','vulture','northface thunder','hand','treatment kit','backpacker net','inflatable neck pillow','kilimanjaro','snow spikes','nfhm011','lancets','activity fleece','bathroom cabinet regular','eating','men\'s down jacket','insect','convertible','spirit','mountain equipment jacket','meal','glove sizes','neck cooling wrap','microchill','lowe alpine tt tour 70','northface laptop','mali','berghaus remote 25','indonesia','icebreaker legging','sojourn 80','t-shirt','berghaus 20','jeep','womens 260 icebreaker','north face ear gear','travel scale','northface womens','mens nuptse','inflatable','upland jacket','trek kit','travel hairdryer','drink','touchstone fleece','day backpack','msr packtowl','womens 3 in 1 jacket','adventure travel boot','ele002','65 litre rucksack','leather gloves','womens rucksacks','camping stove','solar power','cargo shorts','craghoppers kiwi winter lined trousers','compact first aid kit','womens barbour jackets','womens hoodie','tsr003','nuptse jacket 2','mens socks','currency converter','beanie hat','travel guides','waterproof liner','clothing','sta travel','cold','malarial tablets','north face nuptse boot','meindl maine','north face waterproof jacket','school','solar power monkey','nuptse iv boots','north face fleece full zip','sick bags','cooler','north face flyweight','malaria test kit','wet bag','travel usb','mosquito net hanging','desert shirt','mens berghaus fleeces','men\'s nuptse 2','trapper','pantheon','morpheus jacket','north face plasma','sunnyside','mens thunder jacket','north face down','north face 3 in 1','merrell gtx','lowe alpine mitten','lock knife','cordura','marrakesh','mesh stuff sack','sweat rag','camouflage','pop up mosquito','the north face hedgehog gtx xcr mens','north face top','touchstone','berghaus belmont','mecurial','mossi','convertible pants','mossi nets','travel sleeping bag','petzl head torch','north face evolution men','satmap','the north face women thunder','back bag','tt tour 70','citronella oil','medium weight dry bag','boys north face jackets','north face sleeping bag','100% deet','cooking stove','tsr002','barts scarfs','north face upland jacket','cargo bags','the north face men\'s nuptse 2 vest','north face cable fish','luggage trolley','northface parka','berghaus insulated','sealskinz hat','nuptse women','travel shirts','the north face flyweight hoodie','light jacket','north face boys','centro','mountain equipment fleece','north face liner','back pack with wheels','travelproof poncho','t-shirts','berghaus cap','swimwear','sundowner','trekker pro','tfx outback','tfx nuptse','mens north face nuptse','prolite','tnfa1087','north face etip pamir windstopper','toothpick','north face boys nuptse jacket','salomon boots','shower towel','north face downpour','tst013','mens north face thunder jacket','primus commuter','mens north face massif vest','womens snow boots','nuptse boys jacket','crew 200','north face travel bag','berghaus aq gloves','polartec buff','merrell refuge pro gtx','water pack','boys gloves','base','mens walking shirt','north face 3 in 1 jackets','thermal tights','staff','mosquito net repair kit','savlon dry spray','northface down','winter trousers','north face yellowband','40% off','piriton','north face womens nuptse','pocket','north face venture trousers','nuptse 2 women','north face evolution jacket','teva terra fi','masif vest','barbour mens','travelproof zip wallets a4','trav1143','mens long cornice berghaus jacket','wheelie womens','petzl tikkina','mens parkas','mens icebreaker tech top','berghaus activity jacket','north face waterproof trousers','bugproof combo mosquito net treated single','snugpak softie micro','pacsafe wrap','berghaus spectrum hat','basha net','thermarest neoair','the north face redpoint optimus insulated jacket men\'s','northface boots','cold days','powerstretch hat','moab mid','windproof trousers','lauren','men\'s coats','med1006','proguanil','barbour coats','south america','sea','petra','chamonix','littlelife ultralight carrier','bugproof combo mosquito net treated double','tel001','ski mittens','travelproof silk liner single','moon boots','plug india','swiss knife','0.75','travel injections','petzl tikka 2','sta promo pack','bugproof clothes repellent','hardwear','calculator','malaria net','choktoi','compact pillow','littlelife convertible','silk bag liner','backpack rain cover','burner','salomon xa','supercool 25','perry','led keyring','mountain hardwear lamina 0','porter 90','sta pack','north face touch screen gloves','crunch','berghaus torridon','silk sleep liners','north face fleece trousers','waterproof footwear','luxury travel towel','merrell sight','passport case','craghoppers classic kiwi trousers','mens cargo trousers','loader 65','world travel','berghaus paclite pants womens','nosilife cargo','travelproof silk liner','synthetic','north face glacier','backpacker mosquito','mnh029','memj010','satchel','northface flyweight','berghaus long jacket','pile','salomon peak','travel cutlery','berghaus shirts','coffee','therm a rest','travel list','certificate','berghaus blencathra','sachet','berghaus 3 in 1 jacket','worldwide travel','malaria advice','no no','silica gel','sudocrem','north face mens parka','waist coat','paraffin','wound closure','survivor','salomon 3d','womens waterproof gloves','winter lined trousers','north face evolution triclimate womens','water purifying filter','shower bag','capri','tes024','mera','teva hurricane','travelproof self inflating mat','berghaus monsoon','berghaus down','shirt sizes','sleeping bag with mosquito net','bottle opener','boot socks','twist','north face nse','water tabs','sports sandals','travel organiser','north face pink jackets','trek first aid kit','blcj010','swiss army card','money card','berghaus glissade jacket','mens footwear','spectrum ia fleece','solo','berghaus explorer trek gtx mens black','windy','bdw009','sherpa 70','bed nets treated','self','tilley t3 hat','cube full','tt world','shoe size','berghaus choktoi','berghaus explorer trek gtx womens','bp sterile needle kit','waterproof torch','meaj010','bamboo clothing','solid fuel cooker','travel sentry lock','berghaus auckland shirt','carry-on luggage','cooking tripod','shoe size 3','med','waterproof zip bag','berghaus travel cap','backpack on wheels','summer jacket','basha mosquito net','womens teva sandals','swim shoes','skin protection','berghaus size guide','merrell refuge','biox aqua purification drops','merrell water','women\'s waterproof trousers','berghaus glacier gaiter','bag straps','berghaus calisto 3 in 1 jacket womens','scholl flight socks','baselayers men','no water hand wash','north face daybag','teva toachi sandals','belay','metal cup','travelproof water bottle','steel toe','tin cup','womens daypacks','bugproof treated jungle mosquito net','women\'s daysack','bjm6015','travelproof belt','travelproof inflatable neck pillow','water bottle with cover','mcaw010','mosquito clothing treatment','craghopper men','mnc012','travelproof bottle and','berghaus explorer light womens','chameleon arc mid womens','berghaus ultra','trekking socks','berghaus trion 30','women safari','berghaus verden womens 60','terra nova laser competition','travelproof torch','body pouch','sandflies','trekmates storm shelter','travelproof gaffa tape','teva terra fi 3 sandal womens','balm','water system','super absorbent towels','mosquito socks','waypoint 80','transit bag','sqm010','serebu','travel neck pillow','somersets women shaving oil','sdc017','travelproof wind-up torch charger','mosqui go electric','mmmg010','swh009','blgl010','salomon quest 4d gtx mid women','bpa free','sports bag','tbc010','tsk010','mint','cord fidel hat','snowline gaiter','self inflating roll mat','berghaus jalan 55 15 womens','soundtraveller speakers','brasher mens','berghaus 65 15','slr','blh002','mhp009','billy can','trangia 25','phantom jacket','the north face evolution parka jacket','cornice ia','women\'s nuptse vest','mosquito net fixing kit','peak event','malarone paediatric','salomon tracks','berghaus akka long');
/* $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);
    }
