/* [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','2101',jdecode('Home'),jdecode(''),'/2101.html','true',[],'',''],
	['PAGE','2152',jdecode('Our+Products'),jdecode(''),'/2152/index.html','true',[ 
		['PAGE','2173',jdecode('T-shirts'),jdecode(''),'/2152/2173.html','true',[],'',''],
		['PAGE','2194',jdecode('Caps+and+Hats'),jdecode(''),'/2152/2194.html','true',[],'',''],
		['PAGE','2215',jdecode('Mugs'),jdecode(''),'/2152/2215.html','true',[],'',''],
		['PAGE','2236',jdecode('Flags'),jdecode(''),'/2152/2236.html','true',[],'',''],
		['PAGE','2257',jdecode('Pet+Supplies'),jdecode(''),'/2152/2257.html','true',[],'',''],
		['PAGE','2278',jdecode('Key+Chains'),jdecode(''),'/2152/2278.html','true',[],'',''],
		['PAGE','2299',jdecode('Pins'),jdecode(''),'/2152/2299.html','true',[],'',''],
		['PAGE','2320',jdecode('Military'),jdecode(''),'/2152/2320.html','true',[],'',''],
		['PAGE','2341',jdecode('Posters'),jdecode(''),'/2152/2341.html','true',[],'',''],
		['PAGE','2362',jdecode('Misc'),jdecode(''),'/2152/2362.html','true',[],'','']
	],'',''],
	['PAGE','2383',jdecode('American+Innovation'),jdecode(''),'/2383/index.html','true',[ 
		['PAGE','2404',jdecode('Great+American+Inventors'),jdecode(''),'/2383/2404.html','true',[],'',''],
		['PAGE','2425',jdecode('Great+American+Entrepreneurs'),jdecode(''),'/2383/2425.html','true',[],'',''],
		['PAGE','2446',jdecode('List+of+American+Manufacturers'),jdecode(''),'/2383/2446.html','true',[],'',''],
		['PAGE','2467',jdecode('How+To+Obtain+a+Patent'),jdecode(''),'/2383/2467.html','true',[],'',''],
		['PAGE','2488',jdecode('How+to+Obtain+a+Copyright'),jdecode(''),'/2383/2488.html','true',[],'',''],
		['PAGE','2509',jdecode('How+to+Obtain+a+Trademark'),jdecode(''),'/2383/2509.html','true',[],'',''],
		['PAGE','2530',jdecode('Keep+America+Working+-+Post+a+Job'),jdecode(''),'/2383/2530.html','true',[],'','']
	],'',''],
	['PAGE','2551',jdecode('American+Spirit'),jdecode(''),'/2551/index.html','true',[ 
		['PAGE','2572',jdecode('Great+American+Minority+Contributors'),jdecode(''),'/2551/2572.html','true',[],'',''],
		['PAGE','2593',jdecode('Resources+for+Americans'),jdecode(''),'/2551/2593.html','true',[],'',''],
		['PAGE','2614',jdecode('The+Jefferson+Memorial'),jdecode(''),'/2551/2614.html','true',[],'','']
	],'',''],
	['PAGE','2635',jdecode('American+Voice'),jdecode(''),'/2635/index.html','true',[ 
		['PAGE','2656',jdecode('What%26%23x27%3Bs+on+Your+Mind%3F'),jdecode(''),'/2635/2656.html','true',[],'',''],
		['PAGE','2677',jdecode('American+Entrepreneur%26%23x27%3Bs+Forum'),jdecode(''),'/2635/2677.html','true',[],'',''],
		['PAGE','2698',jdecode('American+Inventor%26%23x27%3Bs+Forum'),jdecode(''),'/2635/2698.html','true',[],'','']
	],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Americanlife';
theSitetree.paletteFamily='50529E';
theSitetree.keyvisualId='4249';
theSitetree.keyvisualName='kv_4249.jpg';
theSitetree.fontsetId='10673';
theSitetree.graphicsetId='11188';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7B7CB4';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Americanlife',
				paletteFamily: 	'50529E',
				keyvisualId: 	'4249',
				keyvisualName: 	'kv_4249.jpg',
				fontsetId: 		'10673',
				graphicsetId: 	'11188',
				contentColor: 	'FFFFFF',
				contentBGColor: '7B7CB4',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1003']=webappMappings['1003-aendu0inzl0h12e3abab5d0']={
webappId:    '1003',
documentId:  '2530',
internalId:  'aendu0inzl0h12e3abab5d0',
customField: 'en:US'
};
webappMappings['1003']=webappMappings['1003-aendu0inzl0h12e3abab644']={
webappId:    '1003',
documentId:  '2656',
internalId:  'aendu0inzl0h12e3abab644',
customField: 'en:US'
};
webappMappings['1003']=webappMappings['1003-aendu0inzl0h12e3abab679']={
webappId:    '1003',
documentId:  '2677',
internalId:  'aendu0inzl0h12e3abab679',
customField: 'en:US'
};
webappMappings['1003']=webappMappings['1003-aendu0inzl0h12e3abab6a6']={
webappId:    '1003',
documentId:  '2698',
internalId:  'aendu0inzl0h12e3abab6a6',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20110218-171234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2152',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2194',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2215',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2236',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2257',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2278',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2299',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2320',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2341',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2362',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2383',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2404',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2425',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2446',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2467',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2488',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2509',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2530',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2551',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2572',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2593',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2614',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2635',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2656',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2677',
internalId:  '',
customField: '20110218-164358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2698',
internalId:  '',
customField: '20110218-164358'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INZL0H';
var companyName   = 'www.usa-stuff.com';
var htmlTitle	  = '';
var metaKeywords  = 'USA+merchandise%2CU.S.A.+merchandise%2CU.S.A.+t-shirt%2CUSA+t-shirt%2CUSA+product%2CU.S.A+product%2CAmerican+t-shirt%2CAmerican+apparel%2CAmerican+product%2Cpatriotic+products%2Cfreedom+t-shirt%2Cfreedom+products%2Cusa+merchandise%2Camerican+merchandise%2Cfreedom%2Cdemocracy%2Camerican+pride%2Camerican+spirit%2Camerican+voice%2Cinnovation%2Cinvention%2Ctrademark%2Ccopyright%2Cpatent';
var metaContents  = 'USA+merchandise%2CU.S.A.+merchandise%2CU.S.A.+t-shirt%2CUSA+t-shirt%2CUSA+product%2CU.S.A+product%2CAmerican+t-shirt%2CAmerican+apparel%2CAmerican+product%2Cpatriotic+products%2Cfreedom+t-shirt%2Cfreedom+products%2Cusa+merchandise%2Camerican+merchandise%2Cfreedom%2Cdemocracy%2Camerican+pride%2Camerican+spirit%2Camerican+voice%2Cinnovation%2Cinvention%2Ctrademark%2Ccopyright%2Cpatent';
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();
};

