/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var POS_TARGET=8;
var theSitetree=[ 
	['PAGE','119312',jdecode('Home+page'),jdecode(''),'/119312/index.html','true',[ 
		['PAGE','11985',jdecode('Gardening+101%3A+Watering+Techniques'),jdecode(''),'/119312/11985.html','true',[],'',''],
		['PAGE','56412',jdecode('Summer+Care+for+Wildlife'),jdecode(''),'/119312/56412.html','true',[],'',''],
		['PAGE','122512',jdecode('Lawn+Care'),jdecode(''),'/119312/122512.html','true',[],'',''],
		['PAGE','12048',jdecode('How+to+find+us'),jdecode(''),'/119312/12048.html','true',[],'',''],
		['PAGE','14401',jdecode('Contact+Us'),jdecode(''),'/119312/14401.html','true',[],'',''],
		['PAGE','12069',jdecode('Exciting+Plants+for+2010'),jdecode(''),'/119312/12069.html','true',[],'','']
	],'',''],
	['PAGE','124912',jdecode('Know+Your+Grubs'),jdecode(''),'/124912.html','true',[],'',''],
	['PAGE','126212',jdecode('September+Reminders'),jdecode(''),'/126212/index.html','true',[ 
		['PAGE','11901',jdecode('September+Lawn+Care+'),jdecode(''),'/126212/11901.html','true',[],'',''],
		['PAGE','12111',jdecode('2010+Plants'),jdecode(''),'/126212/12111.html','true',[],'',''],
		['PAGE','48301',jdecode('Garden+Products'),jdecode(''),'/126212/48301.html','true',[],'',''],
		['PAGE','11922',jdecode('5+yr+Tree+Guarantee'),jdecode(''),'/126212/11922.html','true',[],'',''],
		['PAGE','36201',jdecode('Birds+%26+Nature'),jdecode(''),'/126212/36201.html','true',[],'','']
	],'',''],
	['PAGE','35422',jdecode('Landscape+Design'),jdecode(''),'/35422/index.html','true',[ 
		['PAGE','38701',jdecode('In-Store+Lanscape+Services'),jdecode(''),'/35422/38701.html','true',[],'',''],
		['PAGE','12006',jdecode('Outdoor+Living'),jdecode(''),'/35422/12006.html','true',[],'',''],
		['PAGE','12027',jdecode('Build+This+Garden'),jdecode(''),'/35422/12027.html','true',[],'',''],
		['PAGE','11964',jdecode('Square+Ft.+Calculator'),jdecode(''),'/35422/11964.html','true',[],'','']
	],'',''],
	['PAGE','10201',jdecode('Best+Rewards+Club'),jdecode(''),'/10201/index.html','true',[ 
		['PAGE','135012',jdecode('About+Us'),jdecode(''),'/10201/135012.html','true',[],'','']
	],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Collage';
theSitetree.paletteFamily='F9C116';
theSitetree.keyvisualId='2453';
theSitetree.keyvisualName='garten.jpg';
theSitetree.fontsetId='403';
theSitetree.graphicsetId='459';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Collage',
				paletteFamily: 	'F9C116',
				keyvisualId: 	'2453',
				keyvisualName: 	'garten.jpg',
				fontsetId: 		'403',
				graphicsetId: 	'459',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'F9C116',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124912',
internalId:  '',
customField: '20100902-142530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10201',
internalId:  '',
customField: '20100501-115931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11922',
internalId:  '',
customField: '20100401-115304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12048',
internalId:  '',
customField: '20100301-091132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126212',
internalId:  '',
customField: '20100902-141352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20100902-142546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12111',
internalId:  '',
customField: '20100312-111700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20100902-142434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135012',
internalId:  '',
customField: '20100501-115351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35422',
internalId:  '',
customField: '20100401-105432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11985',
internalId:  '',
customField: '20100902-140808'
};
webappMappings['7008']=webappMappings['7008-7015']={
webappId:    '7008',
documentId:  '14401',
internalId:  '7015',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122512',
internalId:  '',
customField: '20100702-104820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12027',
internalId:  '',
customField: '20100318-081004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11964',
internalId:  '',
customField: '20090321-151529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38701',
internalId:  '',
customField: '20100501-121503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36201',
internalId:  '',
customField: '20090322-105616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12006',
internalId:  '',
customField: '20090323-100949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12069',
internalId:  '',
customField: '20100501-123912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48301',
internalId:  '',
customField: '20090802-205604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56412',
internalId:  '',
customField: '20100604-165517'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '12048',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['7008']=webappMappings['7008-6885']={
webappId:    '7008',
documentId:  '14401',
internalId:  '6885',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119312',
internalId:  '',
customField: '20100902-142755'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INL9C0';
var companyName   = 'Best+Feeds+Garden+Centers';
var htmlTitle	  = 'Best+Feeds+Garden+Centers';
var metaKeywords  = 'Garden+Centers%2C+Garden+Centers+Pittsburgh%2C+Trees%2C+Shrubs%2C+Organic+Fertilizer%2C+Landscape+Design%2C+Garden+Products%2C+Seeds';
var metaContents  = 'Your+favorite+one+stop+garden+shop.++We+supply+all+the+professional+products+and+support+you+need+to+design+and+maintain+the+garden+of+your+dreams.++See+us+for+garden+design+and+landscape+construction.+';
theSitetree.getById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		if (ar[i][POS_ID] == id){
			return ar[i];
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getParentById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {
			if (ar[i][POS_CHILDS][j][POS_ID] == id) {
				// child found
				return ar[i];
			}
			var result=this.getParentById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getName = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAME];
	}
	return null;
};

theSitetree.getNavigationText = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAVIGATIONTEXT];
	}
	return null;
};

theSitetree.getHREF = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_HREF];
	}
	return null;
};

theSitetree.getIsNavigation = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_ISNAVIGATION];
	}
	return null;
};

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {
	if (typeof(lastTemplateName) == 'undefined'){
		lastTemplateName = this.topTemplateName;
	}
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		var actTemplateName = ar[i][POS_TEMPLATENAME];
		if (actTemplateName == ''){
			actTemplateName = lastTemplateName;
		}
		if (ar[i][POS_ID] == id) {
			return actTemplateName;
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};
