/* Popular phrases - STEP2 - 20:31:35, Fri Nov 20, 2009 */
__SLI_ClientDefaults =
[
    ['Alignment', true ]
];
var asPhrases=new Array ('kitchen','train table','vanity','slide','toy box','dollhouse','desk','table','workbench','wagon','roller coaster','table and chairs','easel','doll house','playhouse','shopping cart','table and chair sets','kitchen sets','bed','climbers','tool bench','picnic table','train','kangaroo climber','motorcycle','fresh market kitchen','vanity set','replacement parts','toy chest','toy box with book shelf','neat and tidy cottage','chair','dream kitchen','sandbox','play food','tool workbench','clearance','work bench','fantasy vanity','promotion codes','extreme coaster','kitchen play set','choo choo wagon','grocery cart','train table with lid','puppet theater','workshop','bouncer','pirate ship','mailbox','coupons','art desk','play kitchen','castle','playmats','stool','woodland climber','coaster','deluxe canyon road train track table','food','real projects workshop','pastry chef','diner','easel for two','wagon for two','party time kitchen','swing set','clubhouse climber','train and track table','shopping cart with food','car','cafe barista','whisper ride buggy','buggy','new traditions kitchen','toddler slide','tools','swing','ice cream parlor','cart','cupcake','order replacement parts','toddler bed','free shipping items','rosebud dollhouse','gourmet cafe kitchen','tower of doom','barista','deluxe kitchen','coupon code','cottage','pots and pans set','water table','skyward summit','all star sports climber','bookcase','all around art tower','golf','market kitchen','art master activity desk','parts','clearance items','canyon road train track table','art table','write desk','neighborhood fun center','storybook cottage playhouse','push around buggy','sink','creative projects table','storage','toybox','lego building table','sale','doorway playhouse','twin bed','sweetheart playhouse','car table','toy storage','free shipping','sand box','play house','lift and hide bookcase storage chest','coupe','race car bed','home depot workbench','rosebud','grand walk in kitchen','bistro grill','sand and water table','roller coaster ride','climber slide','dishes','art tower','fire engine toddler bed','naturally playful','tower of doom castle','kitchen accessories','train and car table','up and down roller coaster','extreme roller coaster','sand table','puppet','canada store','main street village','toddler climber','real projects workshop tool bench','welcome home playhouse','wagon for 3','market','push buggy','black friday','fresh market','car bed','rock climbing wall','cottage playhouse','video center','train sets','ice cream','flip and doodle easle desk','doorway','house','toolbench','action train table','lookout treehouse','partytime kitchen','grand balcony dollhouse','pink toy box','castle of doom','mat','infantino','play food assortment','gourmet kitchen','folding slide','deluxe action train table with lid','50s diner','lifestyle deluxe kitchen','umbrella','sports bouncer','sports climber','fun flow play sink','treehouse','toddler swing','koala climber','toy chest with shelves','play mat','7248','storage toy box','climber with slide','art easel','castle bed','picnic table with umbrella','table with chairs','play table','kitchen parts','kangaroo','rocking horse','magic fountain cottage','mailminder','turtle desk','mainstreet village','grocery','doll house furniture','wood castle','skyward summit climber','new traditions table and chairs','book shelf','food for play kitchen','whopper bouncer','sand and water','lifestyle dream kitchen','easle','sand','fairy','easel desk','playhouse door','deluxe train table','activity table','sand and water activity center','nature station playhouse','canopy wagon','toddle tune coupe','assembly instructions','safari wagon','four seasons playhouse','canyon','art','sale items','step2 write desk','slide sets','employment opportunities','sandbox picnic table','dream castle convertible bed','choo choo wagon trailer','flip doodle easel desk','bouncer with slide','cafe barista set','magical shoe fairy cottage','train table accessories','water wheel play table','door','princess vanity','swingset','picnic','pots and pans','wagon for two plus','workshop bench','contest','fairy cottage','crabbie sandbox','neighborhood wagon','sweetheart cottage','woodland','play up gym set','front porch playhouse','water','thinkativity','stainless steel pots and pans','horse','table track','project table','slide with basketball hoop','refrigerator','catalog request','clubhouse','folding chairs','race car twin bed','sandbox with lid','cafe','pastry','big folding slide','pirate','chalkboard easel','infantino shop&play','big climber','inflatable bouncers','climbing wall','video game organizer','scribble center','stroller','home depot','bounce','doll','bench','step 2 lifestyle custom kitchen','easel for 2','7363','golf course','storybook cottage','naturally playful sandbox','safety','7248kr','playhouse climber','video game center','soft and sturdy jumbo blocks','shipping','tool chest dresser','climb and slide','princess castle','dream castle bed','grand walk-in kitchen','piano','mail box','wagon with canopy','summit','grand kitchen','cooking essentials','desk for two','chalkboard','7434','doll playhouse','rollercoaster','7384kr','picnic play table','vanity mirror','win dream kitchen','sit doodle turtle desk','art master','race car dresser','summertime play center','toy box with book shelf pink','guitar','neat and tidy','dream','puzzles','home depot tool bench','durafoam','neat and tidy playhouse','triplet wagon','foam blocks','naturally playful playhouse climber','tv center','bridge tunnel clubhouse climber','7758','kitchen with lights and sounds','food set','careers','walker','new traditions','play door','little helpers workbench','dollhouse accessories','walker wagon','kidalert','fire engine bed','roller','choo choo','dresser','naturally playful clubhouse climber','triplets','country kitchen','drum','7627','outdoor playhouse','big slide','welcome home','lift and hide','patches','turtle','all-star sports climber','floor mats','fire truck','sand and water transportation station','slow children at play','door toy','walk in kitchen','kitchen food','zoo cruiser','kitchen tables','step2 fantasy vanity','toybox with book shelf','summit climber','7547','trash cans','7560','canyon road','climb','giant blocks','little tikes','wagons for triplets','50\'s diner play kitchen','interlocking floor mats','speedway storage chest','naturally','tool workshop','storage bench','little helper grocery cart','naturally playful welcome home playhouse','outdoor storage bench','pots','whisper','adventure lodge play center','traditional kitchen','water and sand box','7822','all around art table','lifestyle twin bed','puppet show','sand and water cart','patches the rocking horse','mix and match cupcakes','extreme','fold and store slide','canyon road train table','train track','activity desk','highchair','art center','bookcase toybox','catalog','sports','sink pump','cooking set','replacement','plastic pool with slide','little helpers complete kitchen','combo','ride on toys','climbing toys','8858','rosebud dollhouse collection','pans','flip and doodle','modern lines kitchen','7263','discount coupons','fairy wonderland','all around art center','waterwheel play table','big splash center','deluxe video center','wagon for 2','storage chest','7923','step2 fire engine toddler bed','tag along trailer','recall','8913','kitchen and grill set','puppet stage','pond','tower','mini golf','bistro','four seasons pink and purple','rock n fold','shipping costs','partytime','assembly','table set','toy kitchen','four seasons','roller coaster car','retro diner','7362','music in motion roller coaster','frog sandbox','easel board','adventure lodge','step2 chairs','glider for swing set','battery','doll cradle','neighborhood fun house','safety sign','water rush quarry','big climber slide','50 diner','work','road train and track table','7450','new kitchen','50','mix and make cupcakes','animals','7220','mini golf set','board','new traditions chairs','7579','table play set','convertible bed','8852','101 piece play food assortment','8856','arctic splash water table','master activity desk','gourmet cafe','hudson','tool chest','slingrider','7261','storybook','canyon table','art master desk','coffee pot','8913kr','real projects','transportation','drum set','decals','rock wall','allstar sports climber','kitchen diner','cafe kitchen','7901','slow','game center','fire','basic rhythms guitar','baking set','toys','deluxe','car track','push','playhouse floor','farm','7855','doodle','magic fountain','lifestyle kitchen accessories','snow runner','flip','tool set','skyward summitt','walker wagon with blocks','book','theater','bedroom bookcase','mailmaster plus mailbox','mailmaster mailbox','lookout','7989','deluxe canyon','sweetheart','children at play','rock and fold','sandbox umbrella','8960','rosebud doll house','naturally playful lookout treehouse','outdoor toy storage','step2 car','crab sandbox','video','naturally playful adventure lodge','5433kr','glider','step 2 roller coaster','grand balcony','water activity table','outdoor kitchen','playground','8820','grand balcony doll house','basic piano','train and table sets','telephone','gaming chair','7903','playhouse with doorbell','fun center','7854','party','naturally playful playhouse climber swing extension','7746','inflatable','garden hopper','7474','kangaroo slide','camper','play stove','7684','fountain','car table track','7695kr','magnetic chalkboard','ball','rugged roll work seat','trailer','water toys','markers','plates','construction site sandbox','balcony dollhouse','tidy cottage','chest','8910ta','all sports climber','play mailbox','8833','tv','naturally playful front porch playhouse','blue canyon','kitchen stool','7728','ride on fire truck','push and ride','magnets','doom','sit and doodle turtle','chef','toddler','slide for pool','garden','8937','floor','all around art','diner set','front porch','maraca','made in usa','track','stock car convertible bed','little helpers','7678','basic rhythms','naturally playful kangaroo climber','shoe','ride on motorcycle','sleigh bed','11 stool','mini golf course','par 3 mini golf course','firetruck','big 60','24 playmats','bakery kitchen set','welcome home play house','accessories','art desk easel','adobe playhouse','step2 stool','princess','doorway play house','5402','shelf','7987','7488kr','barn','party time','modern kitchen','cooking essentials stool','umbrella for sandbox','cart cover','bus','stove','bookshelf','boot','broom','timberline mailbox','7714','gourmet','bedroom','gym set','naturally playful summertime play center','round art table','mattress','rock climbing','wood foam blocks','7810','car toy table','infantino play cook kitchen','shoe fairy cottage','8910','fun flow sink','toddler swing set','grand dollhouse','lifestyle bed','push around','7213kr','nature station','hot wheels table','modern','swing seat','traditions','employment','water and sand table with umbrella','kangaroo climber assembly','stackable storage','8821','parlor','canyon road train and track','up','crib','outdoor riding toys','basic','7972','baking','swing and slide','7975','7973','7769','real projects work bench','naturally playful storybook cottage','shopping basket','turtle easel','water table parts','magical shoe fairy','instructions climber','play up gym','durafoam wood','8815','playhouse slide','step2 naturally playful sand table','7220kr','deluxe canyon track','7543','new traditions table','7384','7941','naturally playful sand table','little helpers kitchen','pink','7818','twin','8866','modern lines','step2 neat tidy cottage','8941','mailmaster plus','naturally playful slide','wagon with blocks','wood pieces','naturally playhouse','climber naturally woodland','toddler sleigh bed','bridge','step2 wagon for two','crabbie','7834','toy box book','mixer','par 3','play sink','infant swing','retro kitchen','kitchen stove','pretend food','espresso','storybook cottage accessories','coffe pot','50s','stock car','waterwheel activity','folding','racing room combo','7744kr','play up','step2 market-fresh kitchen','7482','bongo drums','bongo','fridge','infantino puzzles','recycle','flip and doodle desk','ladybug sandbox','rosebud dolls','gym','shoe fairy','7959','perfect pair','neighborhood','rock n fold lx','bookcase storage chest','zip and zoom','8812','sit doodle','7869','8921','cube','choo','8907','shop&play','kitchen phone','play and shade','grand doll house','wood','dream kitchen play set','umbrella for sand and water table','home depot work','matchbox table','deluxe canyon road train','7538','golf set','snooze and cruise','all around','5660','7988','four seasons playhouse pink and purple','climber and swing','real workshop','football toys','doorway toy','7114','basketball slide','all star','step2 new traditions table and chairs set','mailmaster deluxe','whisper buggy','fun flow','7220b4','fairy toys','princess toddler bed','lodge','stock car bed','rosebud van','splash center','table toys','7708','8609','8911','step2 four seasons playhouse','7994','toddler desk','life style dream kitchen','push wagon','waterwheel','deluxe action train table','seat','whisper ride buggy canopy','lifestyle deluxe desk','doorway house','basketball goal','8966','fairy set','kitchen dishes','whisper ride','electronic key pad','river run','pretend play storyteller','tool rack','foam wood','step2 naturally playful kangaroo climber','naturally playful perfect pair combo','step2 deluxe video center','tune coupe','bucket swing','8867ta','whopper','step2 deluxe kitchen','jungle gym','water fountain cottage','7671','activity gym','car seat cover','life style','step2 dream kitchen','repair kit','pretend market','7950','basic rhythms piano','neat and tidy cottage playhouse','dresser chest','step2 four seasons playhouse pink and purple','playground sets','7a1900','play set combos','teether','order catalog','skyward climber','8609kr','7972kr','family','naturally playful big folding slide','shoe cottage','zoo','walking wagon','light and sound safari','large sandbox','cart safari','sports slide','pet','neat','video chair','river run waterpark','snooze','lifestyle pots pans','step2 sweetheart playhouse','7668kr','frog','step2 stock car convertible bed','sit and doodle desk','4 seasons playhouse','utensils','traditions table and chair set','water play','glider swing','garden seat','water cart','naturally playful extension','ring toss','barista set','step 2 lifestyle kitchen','crayons','6201','happy home playhouse','tool bench set','naturally playful neat and tidy','rhythm guitar','dry erase','musical instruments','naturally playful gazebo','neat and tidy kitchen','action table','seat belt','step2 lift hide bookcase storage chest pink','little helpers shopping cart','blue canyon construction site','7745','step2 push around buggy sport','shed','activity triangle','golf toys','7736','dishes and food','party kitchen','seatbelt','junior mailbox','kids kitchen','rugged roll','8909','grand walk-in','8867','infantino gym','infant toys','deluxe canyon road','lodge play center','table&chairs','secure mailbox','activity','visual warning','patio set','mail','shipping to canada','grill and umbrella','food cart','lead','computer desk','discount','home play','balance','step2 vanity','international delivery','turtle art desk','battery operated train','star','canyon road table','fire engine toddler bed instructions','deluxe play kitchen','with slide','cargo wagon','step2 action train','truck shipping','truck delivery','7956','par 3 mini golf course step2','red bookcase','par 3 mini course','sports jumper','artist table','learning cube','swing for two','shipping cart','8953','step2 up down roller coaster','project workshop','frying pan and pot','game table','work station','play climber','order form','7887','step2 video center','porch playhouse','play it up gym','sunshine playhouse','5433','water wheel','ladybug','scribble','new','step2 doorway playhouse','sand water transportation','trains for train table','pink table','new art master desk','step 3','indoor bouncer','8862','doodle desk','address numbers','step2 lifestyle kitchen','mirror','canyon train','toddler time coupe','step 2 play up gym set','five alarm fun center','pretend kitchen','work table','silent push around buggy','infantino loopapalooza','play dish set','mix make','dungeon','step 2 look about treehouse','picnic on the patio','magnetic easel','train table parts','inflatable slide','creative table','storage table','fountain cottage','winter','infantino shopping cart cover','walk','naturally playful magic fountain cottage','flip and doodle art desk','step2 extreme coaster','step','jungle toys','7213','outdoor play houses','ride','thomas','easle for 2','sand box with lid','wall','lift','large mailbox','train activity table','step2 store','dream bed','buggy around','designer kitchen','artist','motor cycle','rosebud dollhouse family','model number','building set','lifestyle dining room and pots pans set','sand box with table and umbrella','kitchen store','squares','room combo','family tree','villager plus','step2 umbrella','step2 work bench','twin swing','neat and tidy cottage accessories','step 2 basic rhythms maracas','step2 big slide','cooking stool','warning','skyward','storemore mailbox','real','step2 naturally playful lookout treehouse','fun','quarry','car convertible bed','toddle','speedway','naturally playful sand and water table','summertime','7443','outdoor flooring','playful cottage','step2 art master activity desk','step 2 up and down roller coaster','neighborhood playhouse','toy work bench','sandbox blue canyon','bobsled','chime','water transportation','step2 all-star climber','climber with slide and playhouse','sports toys','step2 canyon road train track table','large slide','entertainment stand','vws','step2 lift hide bookcase storage chest','step2 toddle tune coupe','merry monkey gym','accessories food','rock climber','7594','step2 deluxe canyon road train and track table','green table','balcony','dry erase easel','pretend cupcakes','returns','3 corner playhouse','play and build workshop','real projects workbench','periscope','murdough','warranty','canyon road and track','fun cube','rosebud dollhouse luxury living collection','lift hide bookcase','doctor','koala slide','pink car','outside play house','8967','go diego go','patio','science','step2 water table','fantasy castle','step 2 play and shade patio set','todays kids','bat','fantasy bedroom','garden bench','monkey','basic rhythms maracas','swing along','all-star sports climber step2','7664','naturally playful adventure lodge play center','7986','loop','7341','flow sink','trimline mailbox','alert','ramp','step2 action train table','porch','play cottage','water wheel table','fresh','play sand','toddler tune coupe','step2 wagon for two plus','pad','neighborhood fun center playhouse','paper for easel','jumbo','soft play','7a0000','naturally playful perfect pair','golf balls','carry back chair','water rush','canyon train table','8831','timberline plus','road and train table','step2 workshop','rhythm','skyward summit step2','step2','step2 naturally playful sandbox','magic','doodle board','wooden desk','rosebud busy basics','sandbox with table','childrens kitchens','bug house','infantino playtime activity center','jungle giraffe band','part time kitchen','ride on fish','playful picnic','toddler bikes','play and cook','sand activity','drill','dream castle convertible','wagon for two plus willow green','princess toy box','8956','barn shape sorter','usa','5a0000','art activity','hole in one','art master desk and stool','par three mini golf','5402 mailbox','sell','kids shopping cart','imagine play musical pets','step2 shopping cart','7439','playhouse with seating','sturdy','deluxe train','grand walkin kitchen','trimline','allstar','grand walk','8951','pick up claws','lifescapes','art easle','barn shape','first color puzzle','quiet','step2 nature station playhouse','step 2 shopping cart','extreme coaster car','step2 bistro','walkin','pink book shelves','clubhouse climber parts','about','for season playhouse','step2 rock n fold video rocker lx','sound','toddler kitchen set','walkin kitchen','ice','stock car convertible','imagine and learn musical mixer','5436','stainless steel','deluxe table','pump manual assembly','jittery pal vintage','wrist rattles','childs piano','patches the rocking','dr squeaks the mouse','weekly organizer','claw','dinner','welcome','sand box with umbrella','table with lid','naturally playful welcome','cottage play house','rope ladder','links','kitchen free shipping','molded swing','toddler easel','kids outdoor pools','deluxe canyon train table','tool dresser','crabbie sand box','mulch','all picnic tables','kindergarten','triple','car and train track','sound safari','round','zoo rider','whisper ride buggy parts','little desk','65-piece accessory','step2 gourmet cafe kitchen','hide','tommy tour bus','playful clubhouse','step2 neighborhood fun center playhouse','childrens work bench','ship playhouse','carry','climb and hide','courage','60','used','mailmaster stone hill','soccer game','step 2 naturally playful welcome home playhouse','toy bench','42 umbrella','playful playhouse','11 in stools','wall climber','mailmaster villager','shipping price','step2 naturally playful big folding slide','work tools','two','toddler chalk board','tool table','big kid play houses','busy basics','deluxe canyon road train track','step2 new art master desk','step2 art master desk and stool','water picnic table','sort and spin hippo','step2 basic rhythms bongos','child\'s desk','50s kitchen','soft','toy slide','playful summertime play center','symphony and lights crib toy','win kitchen','step2 easel','infantino jittery pal','double sided kitchen','rosebud house','toybox with shelf','step2 naturally playful storybook cottage','step2 woodland climber','stacking','doorway doors','step 2 fire truck','playtime kitchen','room','pink house','step2 car bed','step2 castle bed','sweetheart play','toddler roller coaster','peek-a-boo rattle','step 2 coaster','pink bookcase toybox','triple comfort rider','play house climber','road table','step2 naturally playful neat tidy cottage','stakes','table parts','four','playhouse climber with swing extension','play coffee maker','childrens wagons','walk-in','step2 naturally playful neighborhood fun center','toy tool bench','triplets choo choo wagon','play groceries','feed and learn singing croc','product idea','test','step2 bookcase storage chest','sunny sunshine','play market','8823','7531','step2 flip doodle art desk','childs shopping cart','convertible toddler swing','step2 magic fountain cottage playhouse','service','step2 bookcase','101-piece play food assortment','transportation center','caf barista','croc','station','stained glass','play mobile','play tool bench','step 2 guitar','step2 home','up&down roller coaster','surf pets','toy trains','stock car twin bed','stock bed','storybook cottage playhouse accessories','toys for car','corner','step2 neighborhood fun house','step2 art master activity desk teal','play diner','step2 real projects workshop tool bench','step2 naturally playful front porch playhouse','2 wagon','play cube','stylerider','step2 dream castle convertible toddler bed','timberline standard','playhouse with balls','crawl','#7248kr','product materials','spa','step 2 train set','up&down','sandbox sand','step 2 golf','toss','plug','step2 tag along trailer','step2 naturally playful sand water center','step2 naturally playful 162 front porch playhouse','club','step2 naturally playful playhouse climber and swing','151-301','stainless pots','train play station','pink toys','star sports climber','cart mat','playful koala','101 piece food','step2 up down roller coaster ride-on','step2 101-piece play food assortment','step2 tire','cottage climber','canyon train tracks','childrens swings','step2 walker wagon','3 car wagon','sink stove','child size mailbox','step2 bed','step2 dream castle bed','step2 snooze and cruise toddler bed','table lid','flip&doodle easel desk','step2 train set','climbing ladder','play house roof','step2 playhouse','step2 50\'s diner','policy','toy piano','console','toy of the year','playhouse with fountain','step2 river run waterpark','step2 toy box','playful sand table','step 2 pool','playful kangaroo climber','toy workbench','step2 whisper ride','silent','sand for sandbox','step2 naturally playful welcome home playhouse','step2 naturally playful adventure lodge play center with glider','step2 frog sandbox','toddler push toys','158-236','158-240','158-242','cream','sand ans water table','step2 workbench','step2 mail box','play house picnic table','sound kitchen','sand trucks','playful adventure lodge play center','playful sink','step2 naturally playful outdoor storage bench','50s dine','step2 lifescapes vertical storage shed','step2 naturally playful picnic table with umbrella','300 lbs sand','sand and water accessories','playful umbrella','step2 naturally playful sand and water activity table','step2 toddle tune coupe in pink','step2 arctic splash water wheel table','step2 naturally playful sand water activity center','single slides','step2 welcome home playhouse','playful house','step2 naturally playful woodland','step2 sand and water table','sand and water combo','step2 main street village','sand center','step2 swingset','step2 naturally playful storybook cottage playhouse','set up instructions','step2 lifestyle 162 partytime kitchen','step2 lift hide bookcase storage chest with red lid','step2 naturally playful umbrella','childrens playhouse','step2 naturally playful playhouse climber with swing extension','canned food','step2 deluxe canyon','step2 toys','case closed','step2 for 2','play workshop','symphony','step2 naturally playful lookout playhouse','step2 adventure lodge center with ball toss','step2 naturally playful adventure lodge play center','step2 mailbox','toy play house','playful sand and water','step2 lifestyle dream kitchen with maroon countertop','step2 climbing play castle','step2 sink','play area with slide','step2 naturally playful playhouse climber','toy mat','play combo','sand and picnic','public relations','toy for office','t win bed','playhouse and swing set','peak','step2 naturally playful summertime','3046','wipe','step2 electronic kitchen deluxe','step2 speedway storage chest and toy box','consumer product safety','step2 101-piece food assortment','printer','step grill','8 x 8','step2 cooking essentials stainless steel set','step2 pink storage chest','play figures','printable order form','children\'s slide','step2 naturally playful summertime center');
/* $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);
    }