/* [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','100201',jdecode('%3A%3A%3A+SPECIAL+OFFERS+%3A%3A%3A'),jdecode(''), jdecode('%2F100201.html'), 'true',[],'',''],
	['PAGE','901',jdecode('WELCOME'),jdecode(''), jdecode('%2F901.html'), 'true',[],'',''],
	['PAGE','952',jdecode('POST-CAREER'),jdecode(''), jdecode('%2F952.html'), 'true',[],'',''],
	['PAGE','89401',jdecode('Why+Post-Career%3F'),jdecode(''), jdecode('%2F89401.html'), 'true',[],'',''],
	['PAGE','106201',jdecode('LEADERSHIP+DEVELOPMENT'),jdecode(''), jdecode('%2F106201.html'), 'false',[],'',''],
	['PAGE','90001',jdecode('How+Does+It+Work%3F'),jdecode(''), jdecode('%2F90001.html'), 'true',[],'',''],
	['PAGE','973',jdecode('Methodology+%3A%3A%3A+Tests'),jdecode(''), jdecode('%2F973.html'), 'true',[],'',''],
	['PAGE','994',jdecode('RSP%C2%AE+%3A%3A%3A+15+Factors'),jdecode(''), jdecode('%2F994.html'), 'true',[],'',''],
	['PAGE','1015',jdecode('MBTI%C2%AE'),jdecode(''), jdecode('%2F1015.html'), 'true',[],'',''],
	['PAGE','1036',jdecode('FIRO-B%C2%AE'),jdecode(''), jdecode('%2F1036.html'), 'true',[],'',''],
	['PAGE','95801',jdecode('Sample+Reports'),jdecode(''), jdecode('%2F95801.html'), 'true',[],'',''],
	['PAGE','1057',jdecode('About+Susan'),jdecode(''), jdecode('%2F1057.html'), 'true',[],'',''],
	['PAGE','72701',jdecode('Order+%3A%3A%3A+Contact+Us%21'),jdecode(''), jdecode('%2F72701.html'), 'true',[],'',''],
	['PAGE','78101',jdecode('Newsletter'),jdecode(''), jdecode('%2F78101.html'), 'true',[],'',''],
	['PAGE','82001',jdecode('Recommend+This+Site'),jdecode(''), jdecode('%2F82001.html'), 'true',[],'',''],
	['PAGE','83001',jdecode('---+Give+Me+A+Break%21+---'),jdecode(''), jdecode('%2F83001.html'), 'true',[],'',''],
	['PAGE','74201',jdecode('Compensation+%26+Benefits+Consulting'),jdecode(''), jdecode('%2F74201.html'), 'false',[],'',''],
	['PAGE','114801',jdecode('Blog'),jdecode(''), jdecode('%2F114801.html'), 'false',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='336699';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='73';
theSitetree.graphicsetId='95';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21Y'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Galerie',
				paletteFamily: 	'336699',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'73',
				graphicsetId: 	'95',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'336699',
				b_color: 		'D8F8F8',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '952',
internalId:  '',
customField: '20110918-082700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20110918-082905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74201',
internalId:  '',
customField: '20110216-141646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '994',
internalId:  '',
customField: '20110918-083117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1015',
internalId:  '',
customField: '20110918-083154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1036',
internalId:  '',
customField: '20110918-083233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '973',
internalId:  '',
customField: '20110918-083047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1057',
internalId:  '',
customField: '20110918-083415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72701',
internalId:  '',
customField: '20110918-083444'
};
webappMappings['7008']=webappMappings['7008-1250']={
webappId:    '7008',
documentId:  '72701',
internalId:  '1250',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-1307']={
webappId:    '7008',
documentId:  '78101',
internalId:  '1307',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78101',
internalId:  '',
customField: '20110918-083726'
};
webappMappings['7008']=webappMappings['7008-1825']={
webappId:    '7008',
documentId:  '82001',
internalId:  '1825',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82001',
internalId:  '',
customField: '20110918-083624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83001',
internalId:  '',
customField: '20110918-083601'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89401',
internalId:  '',
customField: '20110918-082935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90001',
internalId:  '',
customField: '20110918-083011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114801',
internalId:  '',
customField: '20110421-181312'
};
webappMappings['7050']=webappMappings['7050-356']={
webappId:    '7050',
documentId:  '114801',
internalId:  '356',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95801',
internalId:  '',
customField: '20110918-083316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100201',
internalId:  '',
customField: '20120131-094556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106201',
internalId:  '',
customField: '20110312-223544'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHOPT0INV994';
var companyName   = '...from+retired+life+to...+POST-CAREER+EFFECTIVENESS%21';
var htmlTitle	  = 'Retirement+Coaching%2C+Post-Career+Effectiveness%2C+Susan+Aftanis';
var metaKeywords  = 'retirement+coaching%2C+retirement+counseling%2C+retirement+counselling%2C+retirement%2C+coaching%2C+counseling%2C+counselling%2C+Myers-Briggs+Type+Indicator%2C+Myers-Briggs%2C+MBTI%2C+personality+test%2C+personality+assessment%2C+Firo-B%2C+Ruhestand%2C+Altersr%C3%BCcktritt%2C+retraite%2C+AHV%2C+AVS%2C+emotional+intelligence%2C+life+quality%2C+happiness';
var metaContents  = 'Are+you+planning+to+retire+and+feel+you+need+a+lasting+attitude+change.+Our+Program+provides+you+with+a+strategic+approach+and+proven+methodology+to+achieve+this%21';
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();
};

