/* [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','8801',jdecode('home'),jdecode(''),'/8801.html','true',[],'',''],
	['PAGE','11201',jdecode('mission'),jdecode(''),'/11201.html','true',[],'',''],
	['PAGE','11222',jdecode('founder'),jdecode(''),'/11222.html','true',[],'',''],
	['PAGE','20701',jdecode('lm3+%28local+multiplier+3%29'),jdecode(''),'/20701.html','true',[],'',''],
	['PAGE','20722',jdecode('3bl+dashboard'),jdecode(''),'/20722.html','true',[],'',''],
	['PAGE','11264',jdecode('process+consulting'),jdecode(''),'/11264.html','true',[],'',''],
	['PAGE','11327',jdecode('analysis+and+reports'),jdecode(''),'/11327.html','true',[],'',''],
	['PAGE','11306',jdecode('training+and+workshops'),jdecode(''),'/11306.html','true',[],'',''],
	['PAGE','11348',jdecode('case+studies'),jdecode(''),'/11348/index.html','true',[ 
		['PAGE','11369',jdecode('supply2cov'),jdecode(''),'/11348/11369.html','true',[],'',''],
		['PAGE','17001',jdecode('hobson+%26+porter'),jdecode(''),'/11348/17001.html','true',[],'',''],
		['PAGE','11390',jdecode('avra'),jdecode(''),'/11348/11390.html','true',[],'','']
	],'',''],
	['PAGE','10264',jdecode('published+resources'),jdecode(''),'/10264/index.html','true',[ 
		['PAGE','47066',jdecode('books'),jdecode(''),'/10264/47066.html','true',[],'',''],
		['PAGE','11432',jdecode('articles+and+reports'),jdecode(''),'/10264/11432.html','true',[],'',''],
		['PAGE','11453',jdecode('published+references'),jdecode(''),'/10264/11453.html','true',[],'','']
	],'',''],
	['PAGE','11474',jdecode('contact'),jdecode(''),'/11474.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='D72B2B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10556';
theSitetree.graphicsetId='10893';
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: 			'Alpha',
				paletteFamily: 	'D72B2B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10556',
				graphicsetId: 	'10893',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D72B2B',
				e_color: 		'D72B2B',
				f_color: 		'D72B2B',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20100323-141548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10264',
internalId:  '',
customField: '20090811-170308'
};
webappMappings['7008']=webappMappings['7008-1900']={
webappId:    '7008',
documentId:  '11474',
internalId:  '1900',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11474',
internalId:  '',
customField: '20091231-045230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47066',
internalId:  '',
customField: '20090811-173115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11264',
internalId:  '',
customField: '20090725-160907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20701',
internalId:  '',
customField: '20090811-170156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20722',
internalId:  '',
customField: '20090725-160511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11453',
internalId:  '',
customField: '20090803-123759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11432',
internalId:  '',
customField: '20090803-123256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11348',
internalId:  '',
customField: '20090725-162231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20090717-161825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11222',
internalId:  '',
customField: '20090717-152405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11306',
internalId:  '',
customField: '20090722-202319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11327',
internalId:  '',
customField: '20090811-165857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11369',
internalId:  '',
customField: '20090803-154753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11390',
internalId:  '',
customField: '20090725-162800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17001',
internalId:  '',
customField: '20090725-162505'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN330INF0WD';
var companyName   = '%3E%3E+k2a';
var htmlTitle	  = 'K2A+%7C+Knowledge+to+Action';
var metaKeywords  = 'lm3%2C+local+multiplier+3%2C+local+multiplier%2C+local+multiplier+effect%2C+multiplier+effect%2C+local+economic+development%2C+economic+measurement%2C+local+economic+measurement%2C+local+economy%2C+k2a%2C+knowledge+to+action%2C+justin+sacks';
var metaContents  = 'K2A+enables+public%2C+private%2C+and+non-profit+organisations+to+optimise+the+total+value+of+every+penny+they+spend.+We+optimise+value+by+implementing+solutions+that+not+only+reduce+costs+but+also+deliver+local+economic%2C+social%2C+and+environmental+benefits.';
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();
};

