/* [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 theSitetree=[ 
	['PAGE','401',jdecode('HOME'),jdecode(''),'/401/index.html','true',[ 
		['PAGE','536',jdecode('Why+Do+This%3F'),jdecode(''),'/401/536.html','true',[],''],
		['PAGE','64806',jdecode('Why+Use+JCC%3F'),jdecode(''),'/401/64806.html','true',[],'']
	],''],
	['PAGE','125901',jdecode('KNOWLEDGE+AREAS'),jdecode(''),'/125901/index.html','true',[ 
		['PAGE','36401',jdecode('Lean+Accounting'),jdecode(''),'/125901/36401.html','true',[],''],
		['PAGE','65285',jdecode('Lean+HR'),jdecode(''),'/125901/65285.html','true',[],''],
		['PAGE','36443',jdecode('Lean+IT+and+IS'),jdecode(''),'/125901/36443.html','true',[],''],
		['PAGE','115501',jdecode('Lean+Metrics'),jdecode(''),'/125901/115501.html','true',[],''],
		['PAGE','125922',jdecode('Lean+Back+Office'),jdecode(''),'/125901/125922.html','true',[],'']
	],''],
	['PAGE','9701',jdecode('LEAN+PRODUCTS'),jdecode(''),'/9701/index.html','true',[ 
		['PAGE','64701',jdecode('Presentations'),jdecode(''),'/9701/64701.html','true',[],''],
		['PAGE','64722',jdecode('Workshops'),jdecode(''),'/9701/64722.html','true',[],''],
		['PAGE','64743',jdecode('Bus+Process+Kaizens'),jdecode(''),'/9701/64743.html','true',[],''],
		['PAGE','64764',jdecode('Strategic+Planning'),jdecode(''),'/9701/64764.html','true',[],''],
		['PAGE','64785',jdecode('Assessment'),jdecode(''),'/9701/64785.html','true',[],''],
		['PAGE','65222',jdecode('Roadmap'),jdecode(''),'/9701/65222.html','true',[],''],
		['PAGE','65243',jdecode('Walk-About'),jdecode(''),'/9701/65243.html','true',[],''],
		['PAGE','65264',jdecode('IT+Migration'),jdecode(''),'/9701/65264.html','true',[],'']
	],''],
	['PAGE','89401',jdecode('LEAN+LEARNING'),jdecode(''),'/89401/index.html','true',[ 
		['PAGE','36422',jdecode('Bus+Process+Kaizens'),jdecode(''),'/89401/36422.html','true',[],''],
		['PAGE','36464',jdecode('Strategic+Planning'),jdecode(''),'/89401/36464.html','true',[],''],
		['PAGE','77801',jdecode('Books'),jdecode(''),'/89401/77801.html','true',[],''],
		['PAGE','129601',jdecode('Documents'),jdecode(''),'/89401/129601.html','true',[],''],
		['PAGE','515',jdecode('Published+Articles'),jdecode(''),'/89401/515.html','true',[],''],
		['PAGE','65306',jdecode('Links+to+Providers'),jdecode(''),'/89401/65306.html','true',[],'']
	],''],
	['PAGE','36485',jdecode('EVENTS'),jdecode(''),'/36485/index.html','true',[ 
		['PAGE','36506',jdecode('Scheduled'),jdecode(''),'/36485/36506.html','true',[],''],
		['PAGE','36548',jdecode('Recent+Past'),jdecode(''),'/36485/36548.html','true',[],'']
	],''],
	['PAGE','57901',jdecode('ABOUT+US'),jdecode(''),'/57901/index.html','true',[ 
		['PAGE','60701',jdecode('Goals'),jdecode(''),'/57901/60701.html','true',[],''],
		['PAGE','473',jdecode('Staff'),jdecode(''),'/57901/473.html','true',[],''],
		['PAGE','36569',jdecode('Clients'),jdecode(''),'/57901/36569.html','true',[],''],
		['PAGE','452',jdecode('History'),jdecode(''),'/57901/452.html','true',[],'']
	],''],
	['PAGE','148601',jdecode('NEWSLETTER'),jdecode(''),'/148601.html','true',[],''],
	['PAGE','75201',jdecode('CONTACT+US'),jdecode(''),'/75201.html','true',[],'']];
var siteelementCount=35;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='336699';
theSitetree.keyvisualId='1223';
theSitetree.keyvisualName='buero.jpg';
theSitetree.fontsetId='192';
theSitetree.graphicsetId='230';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Profile',
				paletteFamily: 	'336699',
				keyvisualId: 	'1223',
				keyvisualName: 	'buero.jpg',
				fontsetId: 		'192',
				graphicsetId: 	'230',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'336699',
				b_color: 		'336699',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-18']={
webappId:    '7008',
documentId:  '75201',
internalId:  '18',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090803-085314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36506',
internalId:  '',
customField: '20100216-153727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20090512-141137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64806',
internalId:  '',
customField: '20090413-175816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125901',
internalId:  '',
customField: '20090413-181503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36401',
internalId:  '',
customField: '20090413-180027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65285',
internalId:  '',
customField: '20090413-180108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36443',
internalId:  '',
customField: '20090501-082102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115501',
internalId:  '',
customField: '20090413-180242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125922',
internalId:  '',
customField: '20090413-180337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20090413-181525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64701',
internalId:  '',
customField: '20090413-192141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64722',
internalId:  '',
customField: '20090413-182730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64743',
internalId:  '',
customField: '20090413-183902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64764',
internalId:  '',
customField: '20090413-183933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64785',
internalId:  '',
customField: '20090413-183959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65222',
internalId:  '',
customField: '20090413-184116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65243',
internalId:  '',
customField: '20090413-184143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65264',
internalId:  '',
customField: '20090413-184228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89401',
internalId:  '',
customField: '20090413-182133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36422',
internalId:  '',
customField: '20090413-184302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36464',
internalId:  '',
customField: '20090413-184341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77801',
internalId:  '',
customField: '20090413-184404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129601',
internalId:  '',
customField: '20091021-154339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20091021-153842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65306',
internalId:  '',
customField: '20090413-184527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36485',
internalId:  '',
customField: '20090413-182052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36548',
internalId:  '',
customField: '20100126-134700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57901',
internalId:  '',
customField: '20090413-182033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60701',
internalId:  '',
customField: '20090413-191004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20090816-120437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36569',
internalId:  '',
customField: '20091021-121703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090413-190921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75201',
internalId:  '',
customField: '20090413-182108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148601',
internalId:  '',
customField: '20090820-143819'
};
var canonHostname = 'cm4all.aplus.net';
var accountId     = 'AAPLU0IN3Q4L';
var companyName   = 'Building+LEAN+Beyond+Manufacturing';
var htmlTitle	  = 'Lean+Accounting%2C+Lean+IT%2C+Lean+HR%2C+Lean+Beyond+Manufacturing%2C+Jean+Cunningham+Consulting';
var metaKeywords  = 'lean+accounting%2C+lean+IT%2C+lean+HR%2C+lean+consulting%2C+productivity%2C+real+numbers%2C+easier+simpler+faster%2C+lantech%2C+shingo%2C+kaizen%2C+jean%2C+jean+cunningham%2C+finance%2C+lean+manufacturing';
var metaContents  = 'lean+accounting%2C+lean+IT%2C+lean+HR%2C+consulting%2C+productivity%2C+real+numbers%2C+easier+simpler+faster%2C+lantech%2C+shingo%2C+kaizen%2C+jean%2C+jean+cunningham%2C+finance%2C+lean+manufacturing';
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();
};
