/* Popular phrases - OUTDOORANDCOUNTRY - 4:3:10, Wed Feb 22, 2012 */
var asPhrases=new Array ('hunter wide','hunter socks','hunter balmoral','hunter clogs','hunter welly socks','huntress boots','argyll hunter boots','hunter wellies','hunter gloss','hunter','short hunter boots','barbour','hunter adjustable','hunter short','hunter argyll','hunter boots','barbour international ladies jacket','hunter short socks','barbour quilted jacket','welly socks','wide fit hunter wellies','ladies barbour jacket','wellies','beaufort','hunter glitter','wide calf wellies','silver hunter wellies','black gloss hunter','international','ladies balmoral','huntress','clogs','neoprene wellies','liddesdale','short hunter wellies','glitter hunter wellies','hunter regent','huntress wellies','balmoral','hunter short boots','liberty','gilet','aigle','aigle womens jackets','hunter leather boots','gloves','hunter neoprene','dog coat','men quilted jackets','hats','barbour wellies','barbour jackets','socks','hunter original tall','wide calf','bedale','mens barbour quilted jackets','thurloe','duffle coat','ladies hunter wellies','red hunter wellies','hunter thurloe','neoprene','hunter wide calf','kids hunter wellies','adjustable wellies','belsay','tall hunter','umbrella','international polarquilt','duffle','barbour bags','balmoral zip','hunter boot buffer','womens barbour jackets','aigle wellingtons','sapper','beadnell','hampstead','summer liddesdale','parka','cavalry','durham','barbour gilet','aigle womens','hunter tall wellington boots','regent','mens hunter wellies','wellingtons','hunter adjustable wellies','oak','chelsea','barbour international','barbour international mens jacket','black hunter','balmoral neoprene wellies','aigle jackets','bedale waxed jacket','lined wellies','muted tartan','roadster','hunter gloss short','barbour liberty','cuckmere','boot bag','tie','chocolate hunter boots','bristol','scarf','liner','polarquilt jacket','women\'s derby mac','international quilt','hunter lace','walpole','quilted jacket','barbour ladies beadnell jacket','hunter original short','duracotton','ladies quilted jackets','childrens hunter wellies','mote','xxxl','spofforth','hunter carnaby','ladies barbour','mens wellingtons','hunter wellies for men','belsay jacket','aigle cuckmere','fleece jacket','aigle down','hunter fleece socks','carnaby boa','boots','quilted international barbour jacket','bowfell','georgina','cuckmere jacket','ladies international','bags','down jackets womens','barbour mens','betty interactive liner','barbour liner','hunter buffer','hood','boot socks','ashby','cap','short welly socks','georgina wax coat','barbour rose','derby mac','down wax','hunter short welly socks','blackberry hunter','cavalry polarquilt','aigle parcours','barbour chelsea','polo','liddesdale quilted jacket','newark','hunter wellies original neoprene lined wellington boots','barbour polarquilt ladies','barbour international polarquilt','duffle mens','hunter kids socks','rhs original tall','barbour wax','navy hunter wellies','walltown','womens barbour','raspberry','sapper jacket','fur','original tall','adjustable','beadnell parka','barbour international jacket','brown hunter wellies','hunter gardening clogs','polarquilt','liberty rose','kids','lqu0030re5112','wellington bag','ladies barbour quilted jackets','hunter fleece welly sock','keeperwear','candy pink','eskdale','glitter','flyweight','barbour flat cap','barbour hat','coquet','hunter turquoise boots','combat coat barbour','barbour sweater','hampshire coat','hunter original adjustable wellies','barbour nylon','barbour classic fleece','xxl hat','red barbour jackets','kate','hunter original boots','grace polarquilt','vintage jacket','duralinen','calgary','ladies liddesdale quilted jacket','betty liner','rebel waxed jacket','huntress wellingtons','pile liner','kids welly socks','red quilted jacket','gloss hunter tall','handkerchiefs','cranberry','high gloss hunter','gardening boots','hooded sweater','garden shoes','size 3 wellies','blodwen','gloves men','hunter wedge','barbour international polarquilt jacket','storm','zip-in liner','argyll wellingtons','goretex','tall gloss','wellington boots','barbour powell','aigle quilted jacket','wax','huntress gloss','shape','rose','hunter aubergine','hunter festival 2010','crieff','jacket','barbour ladies cavalry polarquilt jacket','sevenstones jacket','barbour mens chelsea sportsquilt jacket','mens chelsea','barbour trench coat','shirt dress','pink barbour','barbour quilted','barbour ladies international','corbridge','regent savoy','coat','wide calf wellington boots','barbour hood','aubergine','ladies international wax jacket','womens wellies','millton','hunter wellington','bardon','barbour ladies flyweight tartan beadnell jacket','hampshire','drigg','barbour grace','international waxed jacket','northumbria','hunter original gloss short','mqu0068ny71s','le chameau','garden clogs','yellow hunter','laird jacket','international a7','short wellington boot','flyweight utility','hunter purple','putney','interactive liner','hunter wellies original gloss short wellington boots','classic beadnell','chelsea polarquilt','belt','amelia','hunter kids','beadnell rose','green hunter','hunter lilac','tweed','kakadu','hunter original adjustable','a856','hunter wellington boots','josie','boa','mwx0004bk5142','hunter boot jack','barbour featherweight','a835','hunter ladies','lundy','ladies utility waxed','souter','down','beanie','aubergine wellington','hunter hampstead','bayham','international wax','barbour quilted womens jacket','hunter snow wellies','mens','boot buffer','peel','adley','barbour storm','mwb0001ol71s','clifton','ice white hunter wellies','camouflage','barbour mediumweight sylkoil hood','black barbour womens jackets','women barbour international quilt','camo','magenta','mens caps','beadnell summer','flat cap','ladies duffle coat','utility polarquilt','barbour winter force parka','fairfield','utility jacket','barbour utility','lqu0078','sylkoil wax','storm hood','white hunter wellies','waistcoat','liberty beadnell','hunter festival','barbour nation down','balmoral classic','mens hunter wellingtons','short gloss','womens barbour waterproof combat coat','savoy','gotland','welly pouch','melrose','vintage','leather lined wellies','shooting socks','lqu0030','ladies beadnell waxed jacket','flat top trench','boot remover','barbour kate','gold hunter wellies','beaufront','iris','dark olive hunter','outlaw jacket','barbour quilted womens','barbour beadnell','union jack','black gloss huntress','explorer','red hunter wellington','mens barbour liddesdale jacket','fleece welly socks','mqu0001bk91l','original','wellington socks','aigle fleece','orange hunter wellies','yellow barbour jacket','laptop','neon orange','size 13','75th','fleece','argyll ladies','ladies flyweight','royal','snow boots','aigle down jacket','regent savoy wellies','trooper','barbour scarf','kids hunter welly socks','littondale','snow wellies','barbour cap','waterproof','hunter silver','crossfell','barbour down wax gilet','beadnell jacket','rustic','sandstone','trench coat','quilted','border','rucksack','nation down jacket','wax hood','tweed jackets','barbour helvellyn','interactive','baker boy','kids wellies','barbour ladies international wax','duffel coat','gaiters','barbour cavalry polarquilt','womens barbour coat','winter force parka','betty','catterick','bucket hat','grace','barbour trench','international polarquilt jacket','chelsea flyweight','dog','barbour men\'s jacket','a55','sports polo','mens barbour hardwick jacket navy','brushed cotton','zip in liner','scarf lambswool','black glitter hunter wellies','combat','featherweight parka','black barbour','ladies cavalry polarquilt','horsiz','barbour utility jacket','international jacket men','bedale lightweight','lady jane','silver','hunter quilted','pendennis','alnwick','ladies liddesdale','barbour hunter hat','hunter leather','bosun gilet','men\'s international','utility','donegal tweed','cotton touch','barbour bedale','mens wellies','backpack','down jacket','stockman','ladies coats','wax flat cap','barbour men\'s down wax jacket','barbour ladies hampshire coat','a7','dress','polar quilt','storm down','regent motcomb','bedale navy','mens barbour quilted','yellow','duck down','ladies quilted barbour','green hunter boots','tattersall scarf','chiswick','posh wellies','boot jack','bushman','military cap','leather jacket','barbour gore-tex','barbour ladies new polarquilt jacket','mens shorts','barbour cavalry','mwx0020bk91','hilltop','kelso','barbour 　beaufort jacket','fusilier coat','rugby shirt','barbour winter force','barbour rebel','heritage','defence','storm down jacket','black hunter wellies','ladies jackets','lomyland aigle','trapper waxed hat','barbour liddesdale','rhs original','hunter tall navy wellies','footwear','aigle cap','hardwick','herringbone jacket','barbour brogues','ladies gilet','barbour leather gloves','lace up wellies','mens gilets','trials','barbour dog','rebel','half zip storm','mens trousers','ladies neoprene wellies','housesteads','ladies parka','wellington liners','spurn','bolingbroke','international bag','utility mac','tailor quilted jacket','newmarket','saramoon','kids hunter wellies glitter','beaufort jacket','aspen night','lady jane beanie','barbour down jacket','barbour jacket children','hunter welly boot bag','joules bag','thornproof dressing','barbour bristol','shooting jacket','hunter balmoral wellingtons','navy','aigle mens jackets','ladies polarquilt jacket','rhs clog','barbour beaufort','barbour ladies beaufront waxed jacket','purple','barbour gloves','barbour ladies betty interactive liner','barbour border','bushman waxed jacket','ladies brown jacket','carbon','neon pink','moleskin trousers','retriever bag','lomyland','barbour mens classic beaufort waxed jacket','rose utility','barbour fishing','barbour international trials','barbour international mens','barbour duffle','chunky','barbour corbridge','short wellies','helvellyn','derwent','hunter leather wellies','barbour xxs','aspen','hunter wellies violet','scarves','kate waxed','hunter wellies blackberry','chelsea sportsquilt','barbour men\'s duracotton parka jacket','barbour beanie','winter force parka ladies','barbour durham','gloreston','mens xxxl jackets','barbour sapper jacket','classic eskdale','barbour endurance jacket','brogue','barbour betty','hampton','putney sportsquilt','porter','wide','well socks','barbour summer liddesdale','hunter men\'s original short wellington boot','aigle willing','lambswool sweater','check 4','cartridge','heritage fit','orange','white wellies','barbour boots','stockman coat','barbour tarras bag','barbour flyweight','helvellyn parka','wax cap','gamefair','mens liddesdale jacket','barbour ladies grace polarquilt jacket','hunter regent savoy wellington boot','pink wellies','balmoral hawksworth','barbour ladies belsay wax jacket','hunter hat','cardigan','barbour fusilier','red','oak jacket','barbour storm wax hood','barbour parka','eagle','lqu0078ny9110','microfibre','men\'s hunter','kids gloss wellies','a306','barbour mens gloves','argyll bullseye','shooting','barbour retriever bag','mens barbour wax jackets','lindisfarne','warm pile','hunter umbrella','barbour　classic','barbour tote bag','metallic','insulated wellies','barbour longhurst','wide fit','barbour dean','barbour classic fleece jacket','womens shirts','barbour tarras','hunter boot cleaner','barbour international wax','barbour olive trooper jacket','breeks','kate liberty','warm pile lining','duracotton parka','fleece lining','aigle parcours vario','barbour daphne','cameron','caithness','laces','bullseye','linhope','merton','beaufort wax jackets','down explorer','aigle bagham','valerie hat','knitwear','beacon heritage','barbour wax jackets','pile','mens tweed jackets','northumbria jacket','winter jacket','strattford','ladies hats','tarras bag liner','barbour polarquilt utility','notting shirt','mwo0009gy5144','black gloss','lwx0066ol718','barbour tailor quilted jacket','faithfull','barbour burghley','aigle faithful','barbour sapper','sylkoil hood','mwx0004bk51','mac','merino','morton shirt','anniversary','cord flat cap','barbour utility mens jacket','a295','cords','tyne sweater','barbour lightweight liddesdale','hunter festival wellies','barbour ladies international waxed jacket','t244','barbour nation','hunter classic','barbour trooper','barbour warm pile lining','montgomery coat','featherweight','shoes','barbour ladies coat','daphne','aigle ladies','mens barbour international original waxed jacket','barbour ladies hats','berwick tweed','accapi','montgomery duffle coat ladies','barbour merino','barbour ladies international polarquilt jacket','mens wax jackets','classic beaufort','barbour international wax jacket','carnaby','waxed coats mens','aigle trench coat','grace jacket','barbour betty liner','ladies polarquilt','tall','flyweight cavalry','barbour belsay wax jacket','barbour duralinen','purple barbour','ladies new polarquilt','barbour washbag','barbour shoes','drigg jacket','international mens','ladies wellies','barbour tailor','regent st james','mens parka','dark olive hunter wellies','barbour ladies beadnell waxed jacket sage','mens tailored jackets','hunter balmoral neoprene wellington boots','barbour burleigh','cqu0001ny91l','liberty print','navy barbour ladies','a381','mens jacket','motcomb','aigle boaty','barbour ladies hampshire waxed coat','barbour souter','trapper','berkeley','mens hats','bedale jacket','barbour eskdale','parcours','new polarquilt','barbour ladies sapper jacket','barbour ladies liddesdale quilt jacket','barbour gamefair','fairisle','ladies utility polarquilt jacket','waterproof tweed jacket','chelsea quilted jacket','aigle garrano','retriever','tank top','barbour tartans','barbour waxed cotton hood','aigle lakeland','boys barbour','ladies navy quilted jackets','contemporary','ladies utility jacket','blazer','barbour ladies utility waxed jacket','buffer','longhurst','mho 0004','barbour ladies utility','regent montpelier','international original','barbour ladies georgina waxed coat','mli0001gn92','barbour hampton','barbour mens classic northumbria waxed jacket','burghley','thetford','purple barbour jacket','barbour fleece','barbour spurn','stockings','barbour quilted bag','barbour ladies storm down wax quilted jacket','boa hunter tall','hunter regent wellies','hunter pouch','duffle coat ladies red','whitfell','barbour purple wellies','sports coat','mens barbour classic beaufort waterproof jacket','elle','kennelworth','tailored jackets','montgomery duffle','hunter boot bags','sevenstones','burleigh coat','tweed caps','ladies summer liddesdale jacket','hunter welly socks for kids','hunters iris','bobby baker boy hat','sweater','hampshire barbour','tartan scarf','endurance','stanhope','shaped liddesdale','leopard','mens flat cap','a855 zip-liner','montgomery duffle coat','wax cotton hood','barbour ladies cavalry polarquilt jacket black','barbour belsay','aigle gilet','barbour duracotton parka','barbour sally jacket','foreland jacket','collar','womens barbour biker wellingtons','linford wool jacket','lqu0062pu71','landguard','lemon','mens liddesdale','jane','fleece lined wellies','wentworth','hip flask','ladies flyweights tartan beadnell','hunter door mat','75th anniversary','barbour ladies international quilt jacket','cranberry gloss wellies','mens jackets waterproof','violet','barbour jeans','poplin','barbour eskdale quilted jacket','lightweight','tennant','waterproof coats','mens duffle coat','barbour cardigans','ladies utility mac','indigo','barbour lightweight hood','blazer tweed','argyll full knee neoprene','waxed gilet','a825','waxed parka','coventry','warm pile waistcoat','baker boy hat','rebel wax','mens leather gloves','navy wellies','barbour umbrella','short coat','ladies international waxed','ladies barbour international polarquilt jacket navy','flyweight mens','garrano','ladies trousers','mens liners','barbour mens fleece lined waxed hunter hat','a201','hunter lowther','shorts','aigle duffle coat','lezio','belford','hunter lady balmoral','force','barbour georgina','rewax','children gilet','ladies fleece','barter','barbour cameron','lightweight hood','linen mens jacket','ladies barbour flyweight cavalry quilted jacket','barbour derwent jacket','classic duffle','hunter argyll boots','brunton','barbour mens country brogues','barbour waxed cotton retriever bag','cement','barbour duracotton polarquilt','beanie hat','eagle rugby shirt','hunter welly pouch','a70','barbour cashmere scarf','wax sports hat','leather shooting glove','union','lwo0002','kingston','kirkham cable button thru','shoreditch boots','aigle boots','waxed cotton','aigle lezio','duralinen grace','tattersal','womens coats','barbour field jacket','green wellies','leather bags','xxxxl','barbour spey','barbour lady jane','over trousers','linford','barbour trooper jacket','beaufort wax','barbour ladies utility waxed mac','thompson','fitted','waxed utility','knightsbridge','mens belts','barbour mac','rebel jacket','ladies navy wax jacket','quilted bag','hampton quilt','hunter biker wellys','baker','barbour burnished leather insulated gloves','black gloss tall','barbour baker boy hat','barbour berwick','barbour beadnell rose','ladies hunter jacket','barbour rose hat','hunter leather finish','ladies quilts','l1926','willesden','barbour berkeley','antique coastal','barbour ladies utility polarquilt jacket','barbour tote','hunter shearling','barbour interactive','lwx0003bk51','ladies down jackets','barbour riding jacket','barbour quilted waistcoat','barbour ladies red','wool mens sweaters','barbour ladies utility polarquilt jacket black','mens barbour shirts','laptop bag','hunter childrens wellies','aigle artemis','mens polo shirt','barbour ladies shaped liddesdale quilted jacket','hunter original neoprene','bow tie','barbour wax hat','barbour mens wax','men\'s barbour','hunter regent savoy','mfl0002ol71','wax coat','hunter wedge wellies','ladies wellington socks','barbour westmorland','sports hat','barbour mens classic bedale waxed jacket','women polo','barbour emily','aigle mens britton poplin jacket','ladies red barbour jackets','barbour wax holdall','carnaby short','welly clogs','mat','hardy peacoat','short boots','hunter sovereign','ladies international polarquilt','barbour ladies defence waxed jacket','scotland check','stripe','warm wellies','chocolate','barbour durham kagoul','country jacket','mens neoprene wellies','hunter wellington bag','barbour lambswool','aigle polo','covert','ladies waterproof','beret','barbour tattersall','argyl boots','hunter pillar box red','aigle jumper','hunter wellies rhs original wellington boots','ladies barbour international polarquilt jacket red','barbour defence','barbour crossfell','barbour mens wellington socks','corduroy','ladies navy quilt','commander','cotton touch sapper','ladies barbour international polarquilt','headcorn','stud on leggings','barbour classic tartan','wax cotton bag','white waterproof jacket','womens wax jackets','hunter wedge welly','hawthorne','cqu0001bk91m','hunter blue wellies','barbour mens sporting tattersall shirt','hunwick blazer','cuff welly socks','aigle shirt','black biker','ladies duralinen','aigle linen','broom check','lady jane scarf','sport cap','broad','lwx0158ru9110','black hunter wellingtons','barbour duracotton','black velvet event jacket','ladies balmoral neoprene','hampstead short','mens shoes','ladies polo shirt','barbour wax hat with rose','hunter original short boot','barbour ladies socks','barbour shaped','strap','sweat','cord collar','ladies barbour riding jacket','aigle ladies soledo waterproof parka jacket','barbour ladies liddesdale jacket','hunter melrose','aigle budee summer hat','l1925 12','barbour mens ashby jacket','barbour men\'s trooper jacket','barbour childrens classic beaufort waxed jacket','mens country moccasins','aigle ladies iggins waterproof jacket','aigle ladies fadel waterproof jacket','aigle ladies rika trousers','aigle ladies soonest shirt','messenger','barbour storm down','aigle mens lakeland new waterproof jacket','aigle ladies dyxie 3 in 1 waterproof parka jacket','aigle mens gifford waistcoat','womens aigle nastya jersey sweater','aigle ladies asteria linen tailored jacket','ladies boot sock','waxed leather cartridge','wax leather briefcase','waxed baker boy','barbour men gilet','barbour ladies wax','hunter boot accessories','miriam','hunter huntress boot','business bag','storm jacket','with hood','ladies size 12','barbour crieff','barbour mens knightsbridge quilted jacket','barbour ladies linhope tweed jacket','hunter childrens wellingtons','atlantic blue','house shirt','warm parka','mens duralinen','sandstep','barbour thompson','cricket','macklen','lba0091','barbour mens waistcoat','lqu0269','ladies wax','mha0009','mqu0067bk11s','hansworth','soonest','bosun quilt gilet','barbour ladies cameron waxed coat rustic','barbour ladies international wax jacket black','barbour men\'s polarquilt jacket navy mqu0021ny91','barbour ladies shaped liddesdale quilted jacket navy','ladies riding boots','barbour bushman','lwx0153','barbour waxed coat','ladies black quilted jacket','barbour ladies storm down','lqu0015gn53','barbour chelsea boots','sand','huntere wilton boot','hunter kids yellow','leather finish','a-line','bexley stripe','hunter mat','mail bag','hunter balmoral royal','westbury','warbler','barbour leather belt','brookie','barbour flyweight hq jacket','hunter balmoral carbon','barbour ladies beadnell waxed jacket','barbour ladies summer liddesdale quilted jacket','ladies kate','bamboo carbon','mens jeans','breathable','winchester','barbour mens flyweight chelsea quilted jacket','watford','barbour check international','boyd','barbour spring','barbour ladies international antique biker waxed jacket','bottle','barbour vneck jumper','barbour peel','barbour ladies quilted hoodie','hunter balmoral bamboo carbon','baldwine','mca0063sn31','lqu0023bk9120','barbour ladies flyweight','ladies barbour liddesdale','ladies international wellington','barbour scotland stone','bronze','lansbury shirt','barbour ladies featherweight winter grace waterproof jacket','barbour ladies hat rustic','barbour ladies flyweight cavalary quilted jacket','lqu0021bk9112','barbour mens crested liddesdale quilted jacket','barbour mens regular fit flat front cord trousers tan','barbour caithness waterproof green check','ladies scarf','mqu0004','soon','barbour cotton','barbour heavyweight','barbour mens lakeside quilted jackets');
/* $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);
    }
