/* Popular phrases - SMITHANDHAWKEN - 19:22:53, Fri Nov 20, 2009 */
__SLI_ClientDefaults =
[
    ['TextBoxIDCustom', ['headerSearch'] ]
];
var asPhrases=new Array ('string lights','arch trellis','plant trays','copper','plant stand','gazebo','cafe lights','compost','copper firewood','rubber doormat','metal boot tray','garden hutch','copper lights','avignon chairs','window box cages','fountain','planters','copper plant stand','potting bench','pergola','copper bucket','smith hawken\'s biostack composter','battery lights','melamine plates','pavilion','copper mailbox','bulb forcing vases','giverny bench','arch','bali','pots and planters','copper cauldron firepit','window box planter','canterborough','arbor','cedar garden hutch','mercer planter','fire cauldron','metal potting bench','firewood holder','boot tray','dragonfly lights','copper firepit','hampstead chair','spark screen','jolly garden shoes','grand pavilion canopy','teak spa stool','outdoor electric heater','camden court trellis','tuteur','ibiza','vertical garden','barcelona','copper tray','hand carved pigs','teak protector','garden arbor','biostack','bumblebee lights','camden court arch','outdoor string lights','giverny teak bench','giverny collection','fairmont','cloche terrarium','galvanized tray','nantucket island','indoor trees','water chain','monaco collection','vertical plant','hampstead hill','bin','thermometer','rain chain','bonaire collection','heissner gnomes','bird bath','trellises','trellis','terrarium','porch lights','ellington place','potting tray','fiberclay pots','metal gazebo','outdoor furniture covers','whitfield collection','mailbox','avignon round table','saranac chair','teak adirondack','buri bird feeder','del mar modular','wood','halloween','chicken coop storage','hurricane lantern','coir doormats','large furniture covers','garden potting bench','candles on timers','porch mats','fire pit','black bench','teak step','japanese garden knife','furniture covers','canterborough collection','steel boot tray','battery-operated candles','japanese weeder','kids potting bench','gel firepit','outdoor fountain','cast stone','steel bench','mayfield pavilion','oval dining table','avignon','faux','nantucket sling','doormat','tool storage shed','avignon dining chair','monaco table','lenox window box','chaise lounge covers','raised flower beds','japanese tools','teak cleaner kit','eucalyptus','lion statue','gel','chaise lounge','whitfield','pig watering can','teak bench','reclaimed metal rooster','bistro table chairs','twining leaf trellis','lotus','melamine dinnerware','devon rocker','sage','pump','bird feeder','outdoor pillows','guy wolff pots','garden tool bag','fairmont grove','firepit','copper fire pit','avignon lounge chair','black mailbox','compost bin','fire','vertical wall garden','frog hose guide','copper rain chain','bocce','shower stool','lattice','storage cubby','saranac','log','sofa cover','sierra gel firepit','lounge chair cover','birilli set','pot trellis','fleur-de-lys','fiberstone','hunter','giverny','lavender plants','solar path','lavender candle','outdoor firepit','fire rocks','garden hose guides','topiary frame','dried topiary','garden gnome','column planters','toscana','scatter crystals','octagon','canterborough lounge chair','galvanized','teak','gibson heights','vista pavilion','salerno table','storage shed','industrial light string','avignon rocker','mushroom','cauldron cover','led flameless candles','rectangular table','indoor planters','bay','flameless candles','camden arch','reclaimed metal','outdoor flameless candles','hampstead','patio heater','clearance furniture','guy wolff','copper beverage stand','avignon sofa','copper plant tray','indoor herb garden','teak doormat','vienna','chicken coop','reed diffuser','barcelona table','table','birilli lawn bowling','grande pavilion','mud trapper','solar path lights','fireplace','ibiza chaise','sienna table and chairs','hanging planter','saranac lounge','gibson heights armchair','ibiza chair','devon collection','garden kneeling pad','mossy gnome','tabletop fireplace','copper cauldron','metal seed box','tabletop terrarium','garden sculpture','coffee table','outdoor gazebo','narrow trellis','indoor plants','coiled water hose','blue wicker chair','lighting','bronze boot tray','wreath','bonaire lounge','pavilion canopy','permaglass','teak shower stool','outdoor fireplace','stoneware','rain chain basin','hose','arabella fountain','hutch','cauldron','patio furniture','rose gloves','sunbrella','flameless timer candles','rustic fireplaces','monaco firepit','bexley','copper tub','outdoor candle lanterns','classic','boots','orchid subscription','melamine platter','clock thermometer','canterborough table','garden tool tote bag','outdoor torches','womens shoes','nantucket chair','garden hose container','french bistro set','copper hearth bucket','garden statues','croquet set','weed','work bench','mayfield gazebo','turtle stepping stones','pig with wings','plant ladder','teak dining table','garden sunshed','garden shed','mosaic','sling chaise','bulb planter','del mar','mosaic table','stafford planters','biostack compost bin','adirondack chair','outdoor sectional','outdoor fireplace tools','treads','barcelona chairs','outdoor storage','oak leaf spinner','weston','naturemill composter','harbor lounge chair','north park collection','garden tool shed','medallion benches','warwick folding chair','oil lamps','stakes','lavender pot','flutes','clip on','teak care','rectangular','ainsley table','bench anchors','saranac collection','cedar trellis','string light bulbs','teak stool','gel fuel','monet trellis','7.5','bamboo ladder','saranac ottoman','whitfield sofa','bug','bonaire','rubber stair treads','dolce bar chair','rugs','teak dining','clock','pots for indoor plants','metal','nantucket','moss spheres','birdcage','papaver orientale','sienna bistro table','monaco dining set','whitfield table','teak trash bin','bonaire chair','metal bench','shower bench','outdoor curtains','polypropylene rugs','outdoor thermometer','pantel','criss','canterborough chaise','chair covers','garden gate','tree decorations','avignon chaise','kissing ball','monaco','railing window boxes','gardening tools and gloves','galvanized metal magnet board','hadley peak chair','metal rooster','st croix','teak adirondack chair','wall decor','del mar collection','wicker sofa','furniture','outdoor dinnerware','camden window box','ibiza dining table','speakers','cedar shed','personalized olive doormat','teak shower bench','mail box','animal topiary','lynx','cottage garden 5 bench','metal flying pig','ainsley chair','rooster','weston fountain','bali chimes','stackable planter','indoor outdoor clock','swing','metal cubby','hori hori knife','lavender','gazebo canopy','ceiling fan','chicken cubbies','sale bench','guy','rain barrell','backyard firepit cover','outdoor sofa','lockable mailbox','nantucket island chaise','metal tray','tote','tisbury','bench cover','squirrel baffle','copper torchiere','melamine bowl','monaco dining','hose guides','teak outdoor furniture','patio string lights','fleur','cat','victoria dining chair','mens rubber boots','weston collection','umbrella','storage cabinet','dried','copper flower pots','devon swing','moss pots','north park lounge chair','garden cloche','weed tool','wildflower','whitfield dining','curly bamboo','shoes','barrel','peacock','succulent plants','north park','saranac table','storage chest','frog','bat','outdoor fire pit','giverny armchair','teak ottoman','modular structure connectors','devon glider','del mar ottoman','canterborough chairs','spa','buddha statue','table cover','avignon armchair','plant hooks','ibiza armchairs','vine trellis','calla lily torch','lion','goatskin gloves','devon chaise','fabric by the yard','mercury lion','coventry','weather station','cypress potting bench','sun shed','stackable chairs','patio table','teak sectional','set','new','italian countryside','outdoor storage bench','infrared heater','victoria','avignon double chaise','wellies for kids','downspout chains','outdoor carpet','spade','tin','saranac chaise','teak deck squares','patio rug','buri birdfeeder','tabletop heater','pool box','tool shed','copper path lights','hydrangea','garden tote','orchid pot','galvanized potting bench','oval','chaise','bronze solar lantern','teak occasional','metal pig','tv covers','candles','black column planter','vintage garden','outdoor patio heaters','teak steamer','ice bucket','clear cafe','square teak table','saranac recliner','backless bench','tall copper bird bath','pillar candles','kids wellies','fern','polycarbonate','mossy lion','saranac dining','three way meter','wild olive','fish hooks','fuego grill','arabella bird bath','humidity tray','herb pots','copper fire bowl','green house','log conversion','travertine table','avignon rocking','lantern stakes','tisbury window box','bulb planting tool','large table set cover','low light','honeysuckle jasmine','pruner','hampton','money plant','garden planters','potted bulbs','water hose guide','wicker ottoman','wind art','aqua','wide short trellis','devon dining chair','saranac dining table','tomato trellis','trash','sunbrella fabric cleaner','monaco ottoman','grill tool set','strawberry plants','teak pool bench','modular gazebo','oasis','gas fireplace','modular pavilion','rain','solaira','red orchids','decorative hose guides','extending table','outdoor speakers','worm bin','ivory pot','fire pit cover','cauldron firepit cover','shed','weeding tools','indoor gardening windows','cabana veil','minden grill','stack and grow','kit','gas fire','table and chairs','sunlight measure','red window box','sleeping cat','aloe plant','bastille','garden incense','large firepit','copper pig watering can','lynx grill cover','water garden','wood furniture','potting soil storage','teak chest','5 umbrella','sickle','pizza','trellis stakes','pumpkin topiary','conservatory','lumbar pillow','8','stair','saranac extending table','sectional seating','fly','saranac reclining lounge chair','permaglass wine glasses','solar spot','compost filter','rotating pruner','pineapple finial','faux flowers','windowbox','white trellis','worm composter','fuego','outdoor tv','palm','straw','sago','crepe myrtle bonsai','soy candles','smith and hawken','spiral staked','cedar thyme','copper scoop','champagne flutes','soaker','cushions','cedar garden shed','chair cushions','chaise cushion','seat cushions','cushions for benches','cantilever umbrella','cushion storage','chaise lounge cushion','cushions for chaise lounge','sunbrella cushions','shipping','sunbrella umbrella','cantilever','tilting umbrella','chair seat cushions','cushion storage bench','steak','cushions for outdoor furniture','soaker hose','cushions only','teak storage chest','tv\'s','cushions for chairs','small cauldron firepit','collapsible rain barrel','cushions for wicker furniture','sheet moss','chelsea cushions','teak patio chairs','seed sower','striped umbrella','custom cushions','grilling planks','christmas wreaths','swing cushion','small umbrella','three tier basket stand','square umbrella','cantilever umbrella base','small','tuuci','custom pillows','camden court collection','solar light sets','stainless steel','cushion covers','glazed','croton','teak umbrella','custom outdoor cushions','sale cushions','grill set','seashell wreath','shatterproof','copper column','terra cotta saucer','colony bay','care for teak','steamer chair cushion','spreadable','calathea','cedar planter','sofa cushion','train clock','stripe','cactus plants','corner storage','cleaning cushions','cast','self watering','cottage rose','teak screen','stackable units','succulant wall planter','trellis ladder bamboo','copper firebowl','screen house','push','sun','copper bird','sunbrella chair cushions','steak knives','midnight grey','cottage garden cushion','cream mercer pot','microwave','meconopsis','summer wreath','copper box','comp ost','caring for teak furniture','gel rock','metal outdoor table','plant water meter','patio chaise','small bamboo','compost bucket filters','temperature clock','chair and bench cushions','garden steps','monaco cushions','saranac cushions','small table','mounting hardware','garden sun shed','monet bench','copper citronella','side chair','ceiling light','tumbler','sale umbrellas','steamer lounge','porch rocker cushion','care of outdoor furniture','mahogany','green chair','mercer round','stake lights','mesh chairs','plant bracket','cushions dining sets','special order','sensor lights','sun screen','glazed planter','shorts','teak outdoor','spanish moss','chair umbrella','plastic glassware','cube','trellis stand','motion','cushions for rockers','custom fit cushions','pin cushion plant','patio side table','clear','sawdust pellets','square pillow','oval cover','poured butterfly candle','green ceramic','stainless steel torches','cushion storage bag','criss cross','wicker dining','small pot','cedar planks','glass lantern','moisture','wood glider','chelsea garden furniture','sale items','small cloche','blue placemats','spring bulb garden','water gage','mini garden stackable','shatter resistant','steamer chaise cushion','green melamine','single vent octagon umbrella','planter inserts','outdoor entertaining','tool basket','solar lamps','strands','terra cotta ivory','seed dispenser','gift box','gauntlet','white umbrella','music','square copper','cast aluminum benches','sequential','classic bench','pot nanny','copper nest','parts','coco liners','potting be','tomato seeds','patio furniture cushions','cushions for swing','bench seat cushion','chaise replacement cushions','mini monet arch','teak aluminum table','outdoor containers','mini vertical garden','patio dining sets','oriole feeder','beveled glass lantern','grow','corner cover','candle tray','wedding','worm castings','wicker accent table','pourable gel fuel','smith hawken cushions','pellets','coffee table outdoor cover','teak products','weeding hoe','twelve months of flowering plants','stackable garden','black umbrella','garden umbrella','blue plates','faux planter','wax','copper torch wick','buttercup','gazebo fabric','care kit','metal stakes','minden gas grill covers','gardening straw hats','patio oil lamp','twig wreath','stacking trays','seeded','plant cage','per','green plates','cachepots and planters','best of market aluminum umbrella','tabletop beverage stand','grill thermometer','steel gazebo','pewter','grill pizza stone','glider cover','copper backyard firepit','perennials','miltonia','tv stand','smoker','month','bistro collections','metal protector','plant stand liner','garden pruner','gold','star jasmine','plant pot holders','modular pot','medallion outdoor rug','modular wall trellis','tile table','soup bowls','bronze solar','gardening tape','pizza grill','over the rail windowbox','stone containers','premium teak rectangular table','coffe table','cast iron mat','copper fireplace','sling lounge','bbq firepit','plant meter','weather resistant furniture','sanibel fan','piglet','wood bowl','fruit feeder','shell','craftsman','sharpener','purple','trellis for roses','stone pagodas','stacking armchair','white hydrangea','white coffee table','metal and wood','classes','square bistro table','womens wellies','canterborough ottoman','wicker chair cushions','fathers day','piglet watering can','side umbrella','chairs loung outdoor cushions','best-of-market umbrella','gift balance','white wreath','flora rugs','poppy glass torch','copper bowl','scroll','burrageara orchid','marbles','purse','copper planter tray','pathway lighting','black','green serveware oval platter','table top','mission sconce','backyard fire','black window','fire it','poland','wood outdoor tables','primrose','modular wall connectors set of 4','premium','sun umbrella','wreath stand','teak bench cushions','florentine','camden court garden structure','garden wall art','mossy dove','weston step stones','miniature square terrarium','biobag','toscana platter','window cages','chinese','cushions for','campaign table','sweet autumn clematis','solar hanging lantern','patio furniture on sale','cross','toys','garden design','succulent wreath','teak beverage','coal','sale pots','gardening cushion','standing fountain','white pot','fireplace poker','mini planter','granite lid','plant mark','mossy snail','cushions for adirondack chairs','green cushions','tabletop patio heater','mud water trapper','trellis hardware','flat iron','standard trellis','garden saw','fuego modular kitchen','outdoor seating','metal dining set','blades','patio plants','stepp','set of three','propane fire','copper cauldron firepit small','gel can','garden bench cushion','pantel television','wicker chaise','baffle','outdoor fabric cleaner','paperwhite candles','baltimore','wood care','featured gift','garden trellises','patio rocker','freeport stand','sun room','firepit tools','wine nanny','outdoor bistro','octagon umbrella','weston planters round','muscari','classic pruner','outdoor buffet table','outdoor collection','firepit screen cover','sun face','wireless thermometer','bird rain gauge','planting tools','father','cushions for teak chairs','folding saw','steel bucket','cushion cleaner','copper cauldron fire pit','grey pot','monogram','candle time','outdoor end table','premium table','bonaire dining armchair','garden tools weeding','gibson heights dining','teak seat','chair with footrest','glass flower torches','cushion colors','slide','flower gifts','oil lights','cylinder pot','table for 8','wood cleaner','plant basket','transplanter tool','textaline','gibson heights coffee table','out pillows','peruvian','black outdoor furniture','copper solar lights','wire trellis','outdoor patio cushions','microfiber indoor mat','microfiber mat','snail','wagon grill cover','canterborough dining table','galvanized chair','bistro table set','forest green','twining leaf edger','folding side table','cottage garden bench cushion','outdoor wood bench','oriole','cedar grilling planks','mini plants','palisades','garden center','white hops wreath','french bistro','green mini garden','wicker lounge chair','order swatches','post lantern','plantation fireplace','conversion log kit','minden cover','birdsong book','masdevallia','copper plant','pvc','minden griddle','backyard firepit spark screen','belveder','glass torchiere','chicken napkins','copper down spouts','mini teak','garden fireplace','weston pot','wet pot','over','slats','cushions and pillows','teak outdoor tables','weston square','mini-monet arch','free','wood protection','wood patio','blue and white','green minden grill','gardeners eden','men\'s shoes','outdoor finials','bistro table umbrella','biodegradable','camden court trellises','ceramic watering can','fiber clay','outdoor tableware','wreath frame','funnel scoop','teak cleaner and oil','owl feeder','blue bird','stainless steel cart','wreath hang','small flower pots','rain umbrella','peace wreath','granite firepit','square flower pots','bella','metal birdbath stand','wrought iron doormat','platform feeder','stone planters','backyard birdsong guide','coordinating chrome barbeque grill','freestanding trellis','pot caddy','furniture returns','spreadable fleur','coffee table with umbrella','clean burning','copper plant pot','party','bird fountain','canterborough motion chair cushion','backyard firepit accessories','portable firepit','gardening water can','patio dining','sheath','birdfeeder hooks','plant t','baby pig','organic herbs','teak wood cleaner','outdoor flameless','metal umbrella','flora','goldfish','over-the-rail window box brackets','twining leaf arbor','galvanized english keeper','polypropylene outdoor rug','pile turning','flora outdoor rug','wood cart','outdoor planter stands','wireless','rust pimento','climbing','cedar garden arches','seed tin','trellis bench','cushion sets','backyard screen','window box with stand','cushions for wicker love seat and chair','crepe myrtle trees','cactus soil','teak outdoor chairs','teak garden chair','reservoir','meyer','copper sculpture','folding wrought iron chairs','cushion for chaise','chairs for two','flood','climbing vines','rural mail box','monaco chaise cushion','button','pole lights','cushion pattern','teak protecter','brushed copper lantern feeder','striped cushion','redworms 1 lb','clear lights','teak footrest','metal arch','small cauldron firepit cover','wire frame','monaco loveseat','pdf','black spot','wicker seating','garden coil','prairie tabletop','chari cushions','cushion sizes','dwarf fruit','planter saucers','cut','medium','moorish','table with umbrella','dipping bowls','cushion container','square raised planting bed','red cushion','copper gutter chains','wood mat','pocket planter','cast iron stand','fragrance','climbing flowers','teak occasional bench','tangerine','mossy terra','cleaner for cushion','purple flowers','planting shed','plant seeds','classic steamer','black garden bench','oversized','floral rug','carved','staked torch','sunroom ottoman','outdoor trellis','cord','fleur-de-lys garden structure','small twining leaf','flower wreath','patio heat','custom umbrella','guy wolff peabody','red iron mat','metal bistro','sawdust','fiber fountain','organic glass vase','outdoor party lights','mother\'s day gifts','fiber optics grass','blooming plants','metal outdoor chair','sale sconces','table centerpieces','microwave safe','clean pots','tin watering can','teak mini table','salisbury sconce','sand cushion','clematis jackmanii','sustainable','odontoglossum','mustard','outdoor dining chair cushions','copper funnel','bird guide','container trellis','outdoor cantilever umbrella','furniture protector','windowbox liner','baltimore oriole','seat cushion covers','glass watering can','cross creek','sunbrella seat cushions','outdoor drinkware','felco blades','strung lights','organic glass','side t','copper mail','mother\'s day','post for light','fiberclay planters','wicker furniture cushions','food thermometer','pot with saucer','lavender heart wreath','cedar window','ceramic dishes','money plant bonsai tree','weather resistant','metal patio table','cedar hutch double','mother','colorful cachepots','bistro cushion','teak lounge','patio garden','cedar garden','cushion swatches','miniature','grey trellis','living room','wood potting bench','clean umbrellas','patio pots','shoe inserts','toscana tray','grow beds','window pots','folding lounge chair','tiny','teak cushions','freeport freestanding beverage stand','mother\'s day garden','square patio umbrellas','outdoor chaise cushions','campaign side table','fireplace table','sunbrella furniture cushions','outdoor gas grill','wood patio furniture','soil kit','cottage rose wreath','flat iron hanging basket','large copper planters','trellis brackets','fresh cut','spiralis','country','solar walkway lights','muscari bulbs','bronze sconce','battery-powered candles','water spray guns','wolff saucers','clearance cushions','white glove','window box\'s','buri birdhouse','propane grill','bamboo carved pigs','portable teak','rubber plant','care for furniture','dr ruppel','backless','plant trellis','sunset','pyramid trellises','mantel','shrub roses','cedar grill','table inserts','copper window box liners','wood canopy','stop','garden finials','sprouting trays','cilantro','layer pot','topiary trellis','seats 8','monaco sofa cushions','monaco ottoman cushion','gathering height','pimento','strawberry seed kit','portugal','sofas and loveseats','whitfield cushions','black container','cushion collections','teak umbrella stand','twig bird bath','large firepit cover','pinstripe border','large screens','bronze address plaques','cottage garden furniture','sale outdoor cushions','canterborough chaise cushion','giverny chair cushion','cushion for bar stools','teak bistro','outdoor cafe lights','black finish','sale lighting','round teak','rope plant','living accents','dining canopy','black eye susan','burrageara','outdoor dining cushions','green moss','outdoor cushion cleaner','small teak dining table','stackable pots','cleaning fabric','bay leaf wreath','seed tape','curly','wireless rain gauge','glass watering','water storage','plant zone map','blue pillow','plant plate','down','wood lantern','mt pinatubo','whitfield armchair','fragrant','out door cushions','camden collection','outdoor patio rugs','border rug','grow pot','outdoor pendant light','single vent umbrella','three months','striped outdoor umbrella','dieffenbachia','cedar footrest','mini garden terra cotta','orchid mix','climber','growing moss','sun decor','outdoor patio','foliage plants','terra pot','love seat cushion','modular grey','modular stakes','water measure','fleur trellis','double shepherd\'s hook','low profile door mat','minden barbeque','teak door','teak stack chair','butterfly tray','poured candle','outside cushions','fiber windowbox','saranac dining cushion','metal torchiere','garden bins','french lavender','felco #8','miniature orchids','online gift','gibson chair','rocking chair cover','brushed copper oriole feeder','gathering height table','recycled glass','fire cover','cushion care','sprouts boots','sunroom ottoman cushion','copper gutter','outdoor cushion covers','glass bug','battery powered','floor planters','outdoor table umbrella','tiny tin','flowering shrubs','lakeside collection','modular wide trellis','led votive','outdoor pizza oven','garden wreath','cushions for wicker','rose garden','resin pots','burn sticks','copper chimes','red boots','wood preservative','red combination','orange tulip','patio collection','finger','save','outdoor incense','outdoor wood furniture','cushion material','melamine dinner','cast aluminum table','multi tool','wood umbrella stand','white orchid','square accent','fasteners','woven wicker','growing zones','small bistro table','colored pots','three months of orchids','copper log','pink hydrangea','compost accessories','glass holder','bar chair cushion','smart pots','the new terrarium','s&h pots','food umbrella','blue bells','plastic bird','small plant pots','fragrant flowers','red rose wreath','outdoor furniture sets','cream planter','cylinder plant stand','pansy orchid','plant tier','plant h','golden','patio dining furniture','outdoor bench cover','bird sounds book','cedar candle','terrarium rocks','free delivery','may orchid','refill pack for bird nester','post mount outdoor lighting','blue cushions','garden spray','teak table sets','metal storage','work boots','rust pillow','outdoor bushes','flowering vines','bird topiary','planter casters','sun garden','clean copper','melamine sets','flowering jasmine','plant stand with wheels','wood burning fireplaces','cedar wings','ponytail','teak coffe table','coppertop ranch feeder','campaign chaise','drought tolerant','moss hanging basket round','grow up','square cushion','space saver shed','garden gazebo','carbon filter','goldfinch feeder','ornithogalum','watering planters','red planter pot','chais cushions','how to','outdoor reclining chair','original industrial light string','backyard pit','camden court window','terra cotta birdbath','outside chair cushions','garden string lights','teak patio table','half-round mat','bio-stack','ceramic plant stand','canterborough round table','ground','tulip lights','pebble fountain','small square trellis','pink orchid','teak garden set','teak loveseat','store shipping','outdoor fireplace cover','sunbrella fabric cushions','modern gray planter','collapsable rain barrell','sustainably harvested teak','sunbrella bench','fill','fleur-de-lys steel window box','solid cushions','sunbrella swatch','ship to store','sante fe','sienna bistro chair','square outdoor table','coprosma','pink pig','citrus tree planting','plant wheels','garden sconce','rectangular dining table','spring blossom wreath','cast iron turtle stepping stone','round extending table','garden cultivator','metal brackets','round outdoor table and chairs','spanish','moro blood orange','hadley collection','full sun plants','red vine window box','sienna dining chairs','oil torchiere','cover for firepit','fall flowers','cushion fabric','black zinc pot','red umbrella','bar umbrella','double hammock','square wreath','terra cotta cushions','cast aluminum chaise lounge','perennial collections','furniture stain','gas bbq','tabletop wreath stand','copper water tray','fleur-de-lys fan trellis','monaco 7 piece dining set','water plant garden','heather wreath','colors','power','black aluminum','copper care','zone 11','outdoor loveseat wicker','metal dining tables','s&h stafford pots','copper window tray','outdoor spring wreath','bexley loveseat','silver wreath','cut flower container','charms','chef','lightweight hose','mayfield steel','m ailbox','whitfield dining chair cushion','small flower box','rain water catchers','keep','fire grill','zone 10 plants','triple galaxy','cushions for whitfield dining','over the rail window','stafford ivory pot','copper planter pots','pink rose wreath','blue wreath\'s','pot wheels','merit','bonaire sofa cushions','flower order','semi','cube planter','teak and wicker','outdoor loveseat','teak bench swing','camden court large planter','twining leaf small trellis','get pine garden bridge','birch and oregonia wreath','square copper pot','mini azalea','plaque stakes','stone grey large fireplace','rosedale arbor','campaign','odontoglossum orchid','tube feeder','mossy terra cotta statuary lion','waterproof shoes','chais lounge','cedar gate','terra-cotta pots','5 avignon bench cushion','36 outdoor table','wreath container','chair with ottoman','avignon bar table and chairs set','black aralia','conservatory pot','felco 6 pruner','topiary wreath','compact pruner','dwarf jade bonsai','single shed','cedar thyme votive','container stand','lavender square wreaths','harvest wreath','canterborough dining set');
/* $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);
    }