/* Popular phrases - TITLENINE - 10:32:56, Fri Nov 20, 2009 */
__SLI_ClientDefaults =
[
    ['ShowBrandingFooter', false ],
];
var asPhrases=new Array ('life is good','moving comfort','petite','vest','boots','swim','yoga','wool','diana pant','sports bra','hoodie','eureka pant','skirt','tights','tomboy','wow','chamonix','outlet','board shorts','stonewear','cashmoore','winter accessories','champion','petite pants','isis','web only wednesday','watch','swim suits','horney toad','pajamas','socks','bras','swimsuit','wow wednesday','mountain hardwear','eureka','skort','diana','sizing','swimwear','tomboy dress','ibex','sweater','dress','warming trend pant','patagonia','mountain hardware','haiku','tall','smartwool','jacket','perfection pant','yoga pants','merino','dream','fleece','275 sweater','haiku purse','long pants','pants','turtleneck','zen','thumbholes','shorts','go pant','prana','capri','zen pant','hat','warming trend','keen','cashmore','long','wool pants','aviatrix','dream pant','shanti','running tights','commotion','privo','smartwool socks','mendocino','jewelry','275','thermal','marmot','3 reasons','merrell','thumb holes','tunic','membership','moving comfort bra','wallet','henley','coats','jolie','not so tight','harmony','knicker','purse','salomon','recovery tee','organic','sunglasses','corduroy','camelbak','classic rise','metro','dansko','samba','bag','catalog','fleece pants','perfection','champion bra','swim wear','reflective','tankini','headband','sale','rain coat','clearance','shoes','izzi pant','dream capri','frog bra','undercover','diana pant vf','houdini','gift card','singular','yoga clothes','5 barbells','sherpa','recovery pant','toaster vest','rain jacket','neve','merino wool','racer back bra','ac underwire','yoga tops','ski sweater','water bottle','mug','everywear','backpack','cwx','in shape bra','ddd','striped hoodie','bike shorts','recovery','waterproof','whisper','title nine','betty','maternity bra','wool sweater','petite sizes','black dress','dream collection','aaahhh bra','yoga bag','messenger bag','hobo mitts','timbuk2','rosie','haiku bag','front closure bra','harmony top','wednesday wow items','full zip','team t9','go jacket','bra top','rain pants','quick dry','cargo pants','sweatshirt','champion sports bra','stonewear designs','uptown','izzi','blue','cap','running pants','racerback','tomboy fabric','glamorise','go hoody','running bras','life is good tee','down jacket','shipping','r','orange','sleepwear','cord','ibex pants','zen top','travel','moving comfort pants','tank tops','running','snowshoes','light','wireless','ruckus','reversible','waterproof pants','32ddd','bra sizing','burn out','wicking','plus','print harmony','cotton pants','organic cotton','switch back','lucky boots','no worries','harmony wrap','down vest','city','winter','enlighten top','34 dd','print harmony skort','underwear','surf','burnout','pullover bras','3 in 1','fleece jacket','wicking bra','having it all bra','timberland','key pocket','boiled wool','petite yoga pant','fit','tall sizes','thumb','coolmax','clever','soft shell','smart wool','running shorts','enlighten','neve designs','front closure','mens','carve','dream top','gift wrap','hemp pants','contemporary rise','classic rise pants','orchid','zen coverup','whisper vest','34 ddd sports bra','upf','impursenator','bottle','co to ny','indiana jane','racerback bra','pants in long','4 barbells','bikini','privo shoes','tattoo','set it and forget it','cotton','cord skirt','glamorize','snuggle socks','wonder','reflective tights','tank','underwire','dream bra top','singular longsleeve crew','not so tight fitness pant','grey pants','chameleon','horney toad pants','gift card balance','born','soft shell pants','check it out','rain','aventura','back pack','minimizer bra','drawstring','247 bra','33 inseam','icebreaker','rhododendron','ski','cord pants','plus size','bamboo','jane bond','zip neck','catalogue','leather gloves','royal robbins','cycling','sport skirt','wool dress','38 ddd bras','sale pants','bathingsuits','three reasons bra','pearl izumi','microfleece','leash','harmony capri','member','red','wrap','winter boots','titanium','wireless bra','voodoo','recycled','web wednesday','bounce','warm pants','32 dd','petite fitness pants','smart wool socks','ten year tank','check it out dress','flexel','hightime car coat','bornfit','silt','ac bra','everyday bra','lace bra','mountain','snow angel','asics','coffee','forgiving','more','down coat','3 in 1 skirt','32d','lig','merino wool sweater','brands','reversible clever','reflective gear','switch back bra','watermelon','thermal tops','enell','whisper jacket','toad','chameleon shoe','satchel','mittens','stonewear pants','hiking boots','marmot jacket','sleep','lux','dansko boots','harmony wrap tank','fitness pants','waterproof jacket','34 e bra','beach cover up','2-in-1','rash guard','harmony sleeveless','zen collection','harmony bra top','shirt','lw','city slip on','cube','harmony tank','wednesday','dd sports bra','exclusive','shoe sizing','fleece vest','stores','over','mens shorts','web','all cotton','go to','slip on','java','a c bra','wow deal','winter woolies','dark coffee','goretex','burn out top','metro sweater','life','no sweat undies','tool box','black gloves','neve sweater','box o sox','tee','sportsbra','title 9 frogs','snow','underwire bra','pants with pocket','running jacket','jolie top','garnet','3 4','nite ize','answer','comfort bra','pockets','forgiving tankini','tencel','pearl','merrel','in shape','white tank top','moisture wicking','corsica blue','measure for bra','find bra size','clip watch','moonstone','cami','stripe','44d','travel bag','petite running pants','stonewear design pants','three reasons','rhonda sweater','our own','life is good long-sleeve tee','zip sweater','patagonia jacket','keen shoes','sport top','workout pants','sneakers','black boots','no sweat underwear','wool vest','black pants','feel-good','mountain hardwear jacket','cardigan','tarn','hood','tokyobay','dress for success','navy pants','36 dd','black sport bra','v-neck','quicker knicker ii','canvas pants','item','capri running tights','reflective jacket','title nine tanks','corduroy skirt','40ddd','not so tight pant','mother natures best pant','racer back','cashmere','chili','timberland boots','maternity bottoms','soccer','36dd','minimizer','silk','water','feel good longsleeve','38ddd','dream dress','down','sangria','whisper down jacket','longsleeve sweet tee','women swimsuits','henley top','faux wrap','hardwear','running skort','shanti top','warm up','maryjanes','zip','swim coverup','compression','last swimsuit','34 inseam','42 d bra','thumb hole tops','zen bonus bratop','petite bottoms','haiku messenger bag','car','waterproof coat','momentum tank','cold weather pant','boiled wool jackets','wool coat','pjs','cotton sweater','donna karan','lace','carefully crafted','bomber jacket','running sport bra','pajama bottoms','30','kids clothes','bear','rise','tshirt','wonder woolies','cotton bra','donna karan bra','womens shorts','running skirt','encapsulation bra','34ddd','jobs','hand bags','briefs','nursing','champion underwire bra','spandex','mountain hardwear hoody','halterkini','modesty bra','usa','better sweater','barbell bra','36 a','booth','brown capri','running socks','momentum','underwire sports bra','hobo','wool socks','38 ddd','halter dress','rain gear','athletic bra','pink','warmups','synergy tneck','long inseam','warming','mountain hard wear','isis coats','waterproof watch','sprint','black bra','nile blue','sale items','wide leg','life\'s good','minimizer sports bra','long board shorts','racer bra','dash knicker','micro fleece','size xl','wine','leggings','nonstop sneaker','plum','2 in 1','harmony fabric','black sweater','flannel pajamas','36ddd','back closure bras','24 7','ddd bras','suit','crop pants','cycling shorts','grasshopper','synergy tneck sweater','32 b bras','2 in 1 full','deviant 9','striped long sleeve','mother natures best','more bare bra','espresso','pregnant','life is good pjs','tipped zip','no sweat','barbells','reflective vest','bikini top','chamonix graphic','mission pant','nylon pant','classic','disco light','jane','xl','sea glass','reasons','purple','travel dress','44d bras','title nine membership','compression tops','extra small items','outdoor pant','ebony','long fitness pants','employment','sugoi','bliss jacket','sleep wear','super','multitasking','t back bra','mysterioso','95','izumi','long janes','tote','base layer','wool jacket','not-so-tight','lycra pants','dream fabric','running vest','46 dd','iris','biking clothes','black suede clog','viceroy','bunny fleece','petite workout pants','smartwool sox','life is good pants','everywhere skort','eggplant','seamless bra','no bounce sports bra','blow out','polo shirt','42d','rhonda','travel pants','box o socks','reasons sunglasses','hemp','river','48 hour pant','towel','hooded jacket','34dd','gusset','wind','at short','fleece tops','check gift card balance','bounceless bra','urban slip ons','pocket pant','bike skort','big easy','green tea','size 16 skort','short sleeve tee','winter training pant','yellow','thumbhole tops','cwx bra','gloves','34 ddd bra','multi tasking fleece','title 9','edamame','stay-put separates','ibex wool','cashmere pullover','bike','get','tops','water bottle holders','no wire bras','a line','trend','black vest','pack','green sweaters','mother nature','box','pullover','x-small','harmony skort','bra dd cup','carob','down slippers','sleeve tee','blue yonder','long sleeve','balance','mist','bike skirt','titanium watch','crew','size 0','running tank','sport bra 38dd','grey skirt','long tops','boss','book bag','below hip','cold weather tight','quick dry skort','champion jogbra','softshell jacket','wire free','softshell','fit flops','international','5 barbell sport bras','wind pants','5 barbell bra','red jacket','black skirt','isis vest','moving comfort sports bra','hiking','mint','print','frog','quicker knicker','scarves','box of sox','36a bra','black','back slit','corduroy pants','molokai','terry','synergy','32 bra','wet suit','snap','singular long sleeve','white jacket','lunch tote','cashmore top','run cap','shoes black','3 seasons','molded bra','white shirt','dry fast','cashmere pants','peach','all that pant','tipped','wool clothes','organic cotton bra','bliss','harmony wrap top','haight henley','lined pants','wired','activator pant','yoga sale','glass','walking','hallelujah bra','momentum fabric','bra front open','full support','sleeveless tank','sage','zipper pant','cashmoore paprika top','flashlight','cayenne','super dress','answer to','bandeau','quince','nau','wicking socks','princess','grants','running top with pockets','pants 34 inseam','switch','coffee mug','bra fit','coral','lunch','32d bras','flexcel','clogs','32 dd bra','court skirt','ac underwire bra','navy blue','brown jacket','bounce bra','wool worth','chive','deals','wind resistant','horney toad clothes','magazine','jane pant','stay put bikini bottoms','aaahhh','sandys skort','verdigris','cashmore pullover','38 b','nursing bra','cotton sports bra','back closure','commotion jacket','merino vest','bra t strap','hoodie vest','faux fur vest','cherry blossom print','recovery top','urban slipon','spotlight','pomegranate','4 barbell bras','getaway dress','go to pant','wool hoodie','padded sports bra','www','horse','magnets','horney toad tank','small skort','tneck','36 e','natures best','shape bra','denali','sleeveless','neck','mo skort','all weather','indiana','marine','beryl boots','orange hoodie','marmot hoodie','measuring bra size','hair accessories','cross town jane','bike jackets','chocolate','aahhh','brown pants','plaid','modal','pro deal','yolo','aubergine','syrah','print stay put','horney toad tops','workout bras','34b','mother nature\'s','c-cup bra','cold weather fitness pant','sure-bet','cotton jacket','voodoo jacket','cut above hoody','2 petite pant','trail tracker','sage tank','long sleeve tops','just right','capri leggings','dots','travel clothes','athletic pants','only at t9','bras 34ddd','skimp','web only','multi-tasking','cold weather gear','wool worth it','v neck','multi tasking','hiking shoes','not so tight fitness','matchless longsleeve','baltic','last','molded cups','no bounce','hipster rise','less than a','mountain wear','bungie jane','white sweater','pants classic','earth','kimono','orange jacket','cashmoore top','purelime bra','retail stores','42dd','boot leg','marmot fleece','skirt with leggings','fleece bottoms','sleeve pocket','fit and sizing','hot zone','swim bottom','striped stripe','leaf tropics','never jacket','jackets and vest','38dd','pansy','merino sweater','merino wool pants','striped top','side zip','pant leg zipper','lw bra','azure','sleeve','holiday','hooded sweatshirt','carefully','haymaker jacket','title nine exclusive','chase boots','plaid snow stompers','polo','asics running shoes','brown bra','racer','nine','mountain gear','knee pants','horney','long cardigan','black hoodie','last resort bra','fleece cardigan','patagonia r','bluenote','five barbell','water proof shoes','salomon shoes','aerobic shoe','maximum support bra','all day everyday bra','isis jackets','last resort','polyester spandex','petite size pants','modesty','natori','crafted jacket','xs pants','corporate','gray','merrel shoes','azalea','base','capri knicker','merino pants','neutral','reflective power','vintage','winter comfort pant','zip off','size xs','snuggle','moving comfort underwire bra','charcoal','fit guide','prana sweatshirt','sportif','quilted coat','prana hat','gray pants','black coat','petite running','swim tops','microfiber','moving comfort running pants','long sleeve tee shirts','booties','32 inseam','stonewear yoga pant','tie','layer','mesh run cap','isis hoodie','microfleece pants','champion wicking bra','trend pant','check it out skirt','pearl izumi jacket','shiitake','mother','sox','32b','out and aboot','patagonia tops','tomboy tee','panache','classic fit','all','go top','garden','isis whisper hoodie','ten year','fitness shorts','5 barbels','not-so-tight fitness','swim cover up','posture','light lime','teva shoes','mountain gear hardwear','sale bag','short liner','mountain gear jacket','beach towels','glacier','body conscious fit','solid dream','chamois','below the knee skirts','annual sale','good on ya','life is good pajamas','new zealand','cashmoore sweater','reflective power tights','wicking tops','intercontinental','comfort','42d bras','x small','xsmall','remove name','body glide','2','cotton socks','r r','long sleeve wicking','cowgirl','summer short','compression sports bra','blister','real deal bottom','illusion','small','bonnie capri','notabomber','track pants','weights','thumbhole sleeves','merlot','2in1','rashguard','serendipity','crew neck','imagination long sleeve','canmore skirt','checkout','pocketbooks','sale bras','hydration','full support wicking bra','cotton fitness pant','woven','yoga tank','voodoo hoodie','lead','shorts with pockets','shelve bra','belt bag','clearence','size measurements','spruce','go skort','black tank','hooded sweater','ebony jacket','berry','patagonia fleece','fall clothing','chafe','ice blue','cap hats','in sport','made in usa','sand','moisture wicking bras','cotton sweatshirt','m o skort','lined sports bra','bras on sale','high rise','strapless','cotton shorts','stop catalog','treo','harmony bra tank','bra 36 b','extended','long sports bra','champion shape','crossover','loose','black top','x-small pant','solid navy bottom','coffee cup','organic bra','champion underwire sports bra','five barbell bra','bras a cup size','clock','petite xl','salmon','built in bra','stretch capri','sweat','swimsuit top','spandex running shorts','cycling jacket','swim board shorts','buy gift cards','coolmax bra','mountain hardware jacket','brown boots','barely there','beach tote','wrinkle-free','mesh cap','wherever skort','support tops','tanktops','mary jane shoes','smartwool boots','cycling top','bra top white','conditioning wear','cloud','scrunch','title 9 sports','butter soft','morel','might dress','wireless sports bras','swim dd','cotton bottoms','black shorts','casual pants','cotton skort','ten year tank top','surf skirt','cross bra','3in1 super skirt','36 ddd bras','38 d','title nine pants','check it','polyester','size 14','t9 bucks','winter running','stopwatch','print dream bra top','pull over sports bras','small cup bra','charlotte sleeveless','sport bra for larger chested women only','soft','skort size 2','40 d bras','star','caribbean','straight leg pant','samba long sleeve','wicking capri','4','shelf bra dress','caribbean dream','sports bra with underwire','skort 14','pogo short','common','7','solid stay-put','white top','title 9 tank','48 hours','stand','40 b','prana hoodie','bra 40 ddd','solid forgiving','swim capri','36abc','stay-put bikini','swim mini','swim sale','most supportive bra','32 c','masher bra','court short','swimsuit dress','42 dd sport bra','swim tunic','32 b','standout','story','stay put bikini','black tankini','stay','3 way','sport skort','10 year tee','solid stay put','18 skirt length','cotton coverup','size 12','16','sigg','42 c sports bra','shelf bra tops','set-it','pool top','carve designs hoodie','singular longsleeve','contemporary rise skort','canvas','38 dd','contemporary rise shorts','40 a bra','bra 40 dd','c cup swimwear','poly pro','set-it-and-forget-it','superskirt','polyester skort','plum print','sets','tomboy tank','print stay','tegan long sleeve','print forgiving','3 1 skirt','sale shorts','stay put tankini','print harmony skirt','bella','backpacker short','chicory','crunch tank','blue dress','protection','shirt pocket','tanks sale','set it and forget','swim d','crossover bra','cut out','sure bet swim separates','bra 38ddd','capri nylon','sale tops','46 d','seaglass print','beach dress','soccer shorts','cross train','sure','bratank','black tee','stainless','check-it-out-dress','42 d','board skort','milkshake','pink hula','tropics skirt','chocolate tank','cup size','black swim','classic rise bottoms','tee slub','mocha swirl skort','carry-all','print stay-put','solid check it out','classic skorts','100% cotton','molded sports bra','pants with zippers','canvas carry-all','sale capri','3-reasons support bra','training pant','skort 18','36-38bc','solid forgiving bottoms','pants with classic rise','small size dresses','twist tank','melon','sea blue','chocolate port','tide pool print','taupe bras','sandy','42 ddd','3 reasons bra','twirling skirt','mother\'s day','trilogy bra','5 inseam','swim suit cover ups','shark','print check-it-out','title','sale of the day','3 in one','beyond yoga','pool print','tissue tee','microfiber bra','stay-put bikini top','skirt espresso','seamless sports bra','perfect dress','3in1 superskirt','solid bra top','3-reasons support','slit','cool bras','sunglasses straps','m','3 barbell','bra with padding','24 seven bra','3-reasons bra','wicking sports bra','smart hoody','sportif skort','short skirt','capri flower','stayput','38c','short with liner','19 skort','mesh bra','wrap around','bras 34a','sun stopper','back bra','wicking material','workout yoga','capri in size xl','tomboy vneck','swim bra','size dd','sports bra plus','2-1 full','34-36ab','shale','capri with pockets','sunblockers','sage jazz print','32d sports bra','skim fit','basalt','40 d','9 inseam','charcoal skort','slub cotton','skorts on sale','skort 2','sports suits','8 inseam','29 inseam','blue shorts','mountain hardware tank','stonewear top','casper','bliss nutmeg','sport pants','32 d sport bra','3 in one super skirt','cotton jersey','snap tea','2-in-1 full','boardroom','42 c bra','34d sports bra','padded swim','champion sportsbra','cotton spandex','milk','secret pocket','pirate','summer hoodie','sangria fleece','switch back underwire','chocolate pants','5+','seven days skirt','sure bet bottoms','bleached','collection','size d','time out','suede','tomboy top','2-in-1 full support bra','chocolate skirt','capri blue','44 dd bra','charcoal pants','thigh wrap','change color','chocolate shorts','sandys skirt','24','bark','t9 skort','mission capri','bloom','boardwalk dots','shape','mountain hardwear butter','2 xl','major masher','built-in bra','spring sale','seafoam','d+ sports bras','ball','bliss yoga','snacks','silk capri','cup size e','snap-tee','scrunch top','swoon','crunch top capri','42-dd','tactel','moving company','summer pink','bella bra','triple threat','trail','spring','make','triple threat underwire','tug','swoon cover up','super smart hoody','a+ halter','triple','bye bye','bye-bye','cooling trend tank','certificate','super smart','best nursing','30 inseam','bomber','stonewear short','cruiser capri','swoon cover-up','bliss graphic','12teamt9','petit casual pants','blessing','cool blue','shelf','peak performance','blink light','5 reasons sunglasses','saturday','crazy daisy tote','title 9 member','canvas bag','scoopback bra','haight 3 4-sleeve henley','cashmore fleece','back to basic zen','petite diana','classic rise fitness pant','bliss collection','supersmart','stripe-it-rich','compromises','prayers','petite go pant','hold on long','timeless','cushion','can\'t keep','s\'more','brooks running capri','secret tank','high step','hooded fleece');
/* $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);
    }