/* [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','701',jdecode('Home'),jdecode(''), jdecode('%2F701.html'), 'true',[],'',''],
	['PAGE','836',jdecode('About+us'),jdecode(''), jdecode('%2F836.html'), 'true',[],'',''],
	['PAGE','815',jdecode('Our+approach'),jdecode(''), jdecode('%2F815.html'), 'true',[],'',''],
	['PAGE','752',jdecode('Our+methods'),jdecode(''), jdecode('%2F752%2Findex.html'), 'true',[ 
		['PAGE','9122',jdecode('Open+Space+Technology'),jdecode(''), jdecode('%2F752%2F9122.html'), 'true',[],'',''],
		['PAGE','9143',jdecode('World+Cafe'),jdecode(''), jdecode('%2F752%2F9143.html'), 'true',[],'',''],
		['PAGE','9164',jdecode('Future+Search'),jdecode(''), jdecode('%2F752%2F9164.html'), 'true',[],'',''],
		['PAGE','9185',jdecode('Appreciative+Inquiry'),jdecode(''), jdecode('%2F752%2F9185.html'), 'true',[],'',''],
		['PAGE','40501',jdecode('Dynamic+Facilitation+'),jdecode(''), jdecode('%2F752%2F40501.html'), 'true',[],'',''],
		['PAGE','41001',jdecode('Metaplan+Facilitation'),jdecode(''), jdecode('%2F752%2F41001.html'), 'true',[],'',''],
		['PAGE','41022',jdecode('Effective+Facilitation'),jdecode(''), jdecode('%2F752%2F41022.html'), 'true',[],'',''],
		['PAGE','12401',jdecode('Logical+Framework+%28PCM%29'),jdecode(''), jdecode('%2F752%2F12401.html'), 'true',[],'','']
	],'',''],
	['PAGE','857',jdecode('Trainings+%26+Events'),jdecode(''), jdecode('%2F857.html'), 'true',[],'',''],
	['PAGE','54501',jdecode('With+whom+we+work+'),jdecode(''), jdecode('%2F54501.html'), 'true',[],'',''],
	['PAGE','36301',jdecode('Our+Social+Responsiblity'),jdecode(''), jdecode('%2F36301.html'), 'true',[],'',''],
	['PAGE','878',jdecode('Resources'),jdecode(''), jdecode('%2F878%2Findex.html'), 'true',[ 
		['PAGE','9206',jdecode('Downloads'),jdecode(''), jdecode('%2F878%2F9206.html'), 'true',[],'',''],
		['PAGE','9248',jdecode('Recommended+Links'),jdecode(''), jdecode('%2F878%2F9248.html'), 'true',[],'','']
	],'',''],
	['PAGE','41501',jdecode('FAQs'),jdecode(''), jdecode('%2F41501.html'), 'true',[],'',''],
	['PAGE','899',jdecode('Contact+us'),jdecode(''), jdecode('%2F899.html'), 'true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Dots';
theSitetree.paletteFamily='E7E9D5';
theSitetree.keyvisualId='407';
theSitetree.keyvisualName='handschlag1.jpg';
theSitetree.fontsetId='44';
theSitetree.graphicsetId='50';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E7E9D5';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'aplus',
  product: 'WSCSYSSSSLYTCPLI'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Dots',
				paletteFamily: 	'E7E9D5',
				keyvisualId: 	'407',
				keyvisualName: 	'handschlag1.jpg',
				fontsetId: 		'44',
				graphicsetId: 	'50',
				contentColor: 	'000000',
				contentBGColor: 'E7E9D5',
				a_color: 		'E7E9D5',
				b_color: 		'CCCCCC',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-11999382']={
webappId:    '1501',
documentId:  '701',
internalId:  '11999382',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-23']={
webappId:    '7008',
documentId:  '899',
internalId:  '23',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20110921-013127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20110507-045639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '815',
internalId:  '',
customField: '20090213-202035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20090730-010225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9122',
internalId:  '',
customField: '20090730-171817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9143',
internalId:  '',
customField: '20090730-171926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9164',
internalId:  '',
customField: '20090316-195359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9185',
internalId:  '',
customField: '20090316-195852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41001',
internalId:  '',
customField: '20100308-013415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12401',
internalId:  '',
customField: '20090621-024826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '857',
internalId:  '',
customField: '20110921-022123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36301',
internalId:  '',
customField: '20090707-224331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54501',
internalId:  '',
customField: '20110507-045924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '878',
internalId:  '',
customField: '20100104-012750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9206',
internalId:  '',
customField: '20090212-155553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9248',
internalId:  '',
customField: '20090212-155553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '899',
internalId:  '',
customField: '20110222-225802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40501',
internalId:  '',
customField: '20090621-023813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41022',
internalId:  '',
customField: '20090621-025228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20090707-220900'
};
var webAppHostname = 'cm4all.aplus.net:80';
var canonHostname = 'cm4all01.carrierzone.com';
var accountId     = 'AAPLU0INZKB4';
var companyName   = 'The+Change+Initiative+++';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};

