/* [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','32',jdecode('Home'),jdecode(''),'/32.html','true',[],'',''],
	['PAGE','10301',jdecode('About+us+and+the+way+we+BBQ'),jdecode(''),'/10301/index.html','true',[ 
		['PAGE','10401',jdecode('What+is+American+BBQ%3F'),jdecode(''),'/10301/10401.html','true',[],'',''],
		['PAGE','11401',jdecode('A+bit+of+BBQ+History'),jdecode(''),'/10301/11401.html','true',[],'','']
	],'',''],
	['PAGE','404',jdecode('Our+Business+Partners'),jdecode(''),'/404.html','true',[],'',''],
	['PAGE','422',jdecode('Traeger+Wood+Pellet+BBQ%26%23x27%3Bs'),jdecode(''),'/422/index.html','true',[ 
		['PAGE','3426',jdecode('How+it+Works'),jdecode(''),'/422/3426.html','true',[],'',''],
		['PAGE','1226',jdecode('The+Lil%26%23x27%3B+Tex'),jdecode(''),'/422/1226.html','true',[],'',''],
		['PAGE','1235',jdecode('The+Texas+Style'),jdecode(''),'/422/1235.html','true',[],'',''],
		['PAGE','1621',jdecode('General+Operating+Tips'),jdecode(''),'/422/1621.html','true',[],'',''],
		['PAGE','3435',jdecode('Cleaning+and+Maintenance'),jdecode(''),'/422/3435.html','true',[],'',''],
		['PAGE','3444',jdecode('Cold+Weather+Cooking'),jdecode(''),'/422/3444.html','true',[],'',''],
		['PAGE','3612',jdecode('Warm+Weather+Cooking'),jdecode(''),'/422/3612.html','true',[],'','']
	],'',''],
	['PAGE','1244',jdecode('100%25+Hardwood+Pellets'),jdecode(''),'/1244/index.html','true',[ 
		['PAGE','5750',jdecode('Environmental+Info'),jdecode(''),'/1244/5750.html','true',[],'','']
	],'',''],
	['PAGE','856',jdecode('Fast+Eddy+Wood+Pellet+Smokers'),jdecode(''),'/856/index.html','true',[ 
		['PAGE','1904',jdecode('FEC100'),jdecode(''),'/856/1904.html','true',[],'',''],
		['PAGE','5407',jdecode('FEC300'),jdecode(''),'/856/5407.html','true',[],'',''],
		['PAGE','1913',jdecode('FEC500'),jdecode(''),'/856/1913.html','true',[],'',''],
		['PAGE','1922',jdecode('FEC750'),jdecode(''),'/856/1922.html','true',[],'','']
	],'',''],
	['PAGE','413',jdecode('Cookshack+Electric+Smokers'),jdecode(''),'/413/index.html','true',[ 
		['PAGE','838',jdecode('Smokette'),jdecode(''),'/413/838.html','true',[],'',''],
		['PAGE','847',jdecode('SuperSmoker+50'),jdecode(''),'/413/847.html','true',[],'',''],
		['PAGE','2239',jdecode('SmartSmoker+070'),jdecode(''),'/413/2239.html','true',[],'',''],
		['PAGE','2248',jdecode('SmartSmoker+100'),jdecode(''),'/413/2248.html','true',[],'',''],
		['PAGE','2257',jdecode('SmartSmoker+200'),jdecode(''),'/413/2257.html','true',[],'',''],
		['PAGE','2266',jdecode('SmartSmoker+300'),jdecode(''),'/413/2266.html','true',[],'','']
	],'',''],
	['PAGE','14201',jdecode('Cookshack+Pellet+CharBroilers'),jdecode(''),'/14201.html','true',[],'',''],
	['PAGE','910',jdecode('Recipes'),jdecode(''),'/910/index.html','true',[ 
		['PAGE','3621',jdecode('Food+Hygiene'),jdecode(''),'/910/3621.html','true',[],'',''],
		['PAGE','2971',jdecode('Slow+Smoked+Beef+Brisket'),jdecode(''),'/910/2971.html','true',[],'',''],
		['PAGE','16601',jdecode('Beef+Ribs'),jdecode(''),'/910/16601.html','true',[],'',''],
		['PAGE','4730',jdecode('Rum+Soaked+Hot+Smoked+Salmon'),jdecode(''),'/910/4730.html','true',[],'',''],
		['PAGE','2980',jdecode('Baby+Back+Pork+Ribs'),jdecode(''),'/910/2980.html','true',[],'',''],
		['PAGE','17101',jdecode('Stuffed+Pork+Tenderloin'),jdecode(''),'/910/17101.html','true',[],'',''],
		['PAGE','2989',jdecode('Smoked+Turkey'),jdecode(''),'/910/2989.html','true',[],'',''],
		['PAGE','3007',jdecode('Sublime+Smoked+Walnuts'),jdecode(''),'/910/3007.html','true',[],'','']
	],'',''],
	['PAGE','919',jdecode('Press+%26+Podcasts'),jdecode(''),'/919.html','true',[],'',''],
	['PAGE','928',jdecode('Links'),jdecode(''),'/928.html','true',[],'',''],
	['PAGE','431',jdecode('Contact+Us'),jdecode(''),'/431.html','true',[],'',''],
	['PAGE','8401',jdecode('.'),jdecode(''),'/8401.html','true',[],'',''],
	['PAGE','8422',jdecode('*'),jdecode(''),'/8422.html','true',[],'',''],
	['PAGE','8201',jdecode('Kent+Cupcakes'),jdecode(''),'/8201/index.html','true',[ 
		['PAGE','8801',jdecode('Cupcake+Gallery'),jdecode(''),'/8201/8801.html','true',[],'',''],
		['PAGE','8822',jdecode('Contact'),jdecode(''),'/8201/8822.html','true',[],'','']
	],'','']];
var siteelementCount=45;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='364EB6';
theSitetree.keyvisualId='7125';
theSitetree.keyvisualName='kv_7125.jpg';
theSitetree.fontsetId='16397';
theSitetree.graphicsetId='12129';
theSitetree.contentColor='364EB6';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blossom',
				paletteFamily: 	'364EB6',
				keyvisualId: 	'7125',
				keyvisualName: 	'kv_7125.jpg',
				fontsetId: 		'16397',
				graphicsetId: 	'12129',
				contentColor: 	'364EB6',
				contentBGColor: 'E5E2E2',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20100601-143446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '910',
internalId:  '',
customField: '20100524-064139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2989',
internalId:  '',
customField: '20100524-064314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '404',
internalId:  '',
customField: '20100227-030226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20100524-064224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '422',
internalId:  '',
customField: '20080303-124158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3426',
internalId:  '',
customField: '20100227-030257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1226',
internalId:  '',
customField: '20100601-143251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1235',
internalId:  '',
customField: '20100601-143319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1244',
internalId:  '',
customField: '20100601-045452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1621',
internalId:  '',
customField: '20060601-110048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3435',
internalId:  '',
customField: '20060601-110532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3444',
internalId:  '',
customField: '20060601-105955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3612',
internalId:  '',
customField: '20060601-110444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '856',
internalId:  '',
customField: '20080303-124326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1904',
internalId:  '',
customField: '20100227-030951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5407',
internalId:  '',
customField: '20100227-031802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1913',
internalId:  '',
customField: '20100227-031857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1922',
internalId:  '',
customField: '20100227-031925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '413',
internalId:  '',
customField: '20080303-124850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '838',
internalId:  '',
customField: '20090607-114016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '847',
internalId:  '',
customField: '20090607-114050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2239',
internalId:  '',
customField: '20100227-031519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2248',
internalId:  '',
customField: '20100227-031535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2257',
internalId:  '',
customField: '20100227-031548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2266',
internalId:  '',
customField: '20100227-031603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3621',
internalId:  '',
customField: '20080303-122839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2971',
internalId:  '',
customField: '20100524-064203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4730',
internalId:  '',
customField: '20100524-053334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2980',
internalId:  '',
customField: '20100524-064243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3007',
internalId:  '',
customField: '20100524-054024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5750',
internalId:  '',
customField: '20100227-030853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '919',
internalId:  '',
customField: '20090528-063738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '928',
internalId:  '',
customField: '20080303-110057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '431',
internalId:  '',
customField: '20080303-110856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20090911-092757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20090420-040757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8422',
internalId:  '',
customField: '20090420-040757'
};
webappMappings['7060']=webappMappings['7060-9393ad2bdf38e335b8f0deb4fa7970f1']={
webappId:    '7060',
documentId:  '8801',
internalId:  '9393ad2bdf38e335b8f0deb4fa7970f1',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20090526-111455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8822',
internalId:  '',
customField: '20090526-112413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20100601-143125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10401',
internalId:  '',
customField: '20100227-030124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20090528-050322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20100227-024951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20100524-064302'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN37JP';
var companyName   = 'The+American+BBQ+Company';
var htmlTitle	  = 'The+American+BBQ+Company';
var metaKeywords  = 'bbq%2C+barbeque%2C+barbecue%2C+smoker%2C+smokers%2C+food%2C+cookshack%2C+traeger%2C+traegar%2C+fast+eddy%2C+wood%2C+pellet%2C+chips%2C+world%2C+champions%2C+cooker%2C+american%2C+seasoning%2C+spices%2C+recipes%2C+electric%2C+rubs%2C+sauce%2C+style%2C+commercial%2C+residential%2C+home%2C+how+to%2C+ribs%2C+brisket%2C+steak%2C+pork%2C+chicken%2C+sausage%2C+burger%2C+vegetable%2C+veggie%2C+charbroiler%2C+chargrill%2C+char%2C+charcoal%2C+broiler%2C+grill%2C+FEC%2C+';
var metaContents  = 'The+American+BBQ+Company+-+Suppliers+and+manufacturers+of+American+barbeques%2C+bbq+smokers%2C+wood+pellet+bbq+%2F++smokers+and+electric+smokers.++Why+not+try+our+selection+of+wood+pellets%2C+bbq+seasoning+rubs+and+bbq+sauces.';
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();
};
