/* [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','1508',jdecode('Home'),jdecode(''),'/1508.html','true',[],'',''],
	['PAGE','1565',jdecode('Kontakt'),jdecode(''),'/1565/index.html','true',[ 
		['PAGE','1592',jdecode('Vorstand'),jdecode(''),'/1565/1592.html','true',[],'',''],
		['PAGE','1619',jdecode('TrainerInnen'),jdecode(''),'/1565/1619.html','true',[],'',''],
		['PAGE','9802',jdecode('Assistenz-TrainerInnen'),jdecode(''),'/1565/9802.html','false',[],'','']
	],'',''],
	['PAGE','1673',jdecode('Aikido'),jdecode(''),'/1673/index.html','true',[ 
		['PAGE','1700',jdecode('Geschichte'),jdecode(''),'/1673/1700.html','true',[],'',''],
		['PAGE','1727',jdecode('Pr%C3%BCfungen'),jdecode(''),'/1673/1727.html','true',[],'',''],
		['PAGE','6664',jdecode('Begriffe'),jdecode(''),'/1673/6664.html','true',[],'','']
	],'',''],
	['PAGE','6691',jdecode('Ueber+uns'),jdecode(''),'/6691/index.html','true',[ 
		['PAGE','6772',jdecode('Vereinsgeschichte'),jdecode(''),'/6691/6772.html','true',[],'',''],
		['PAGE','6799',jdecode('Trainings'),jdecode(''),'/6691/6799.html','true',[],'',''],
		['PAGE','6745',jdecode('Lageplan'),jdecode(''),'/6691/6745.html','true',[],'',''],
		['PAGE','6853',jdecode('Presse'),jdecode(''),'/6691/6853.html','false',[],'',''],
		['PAGE','6880',jdecode('Kosten'),jdecode(''),'/6691/6880.html','true',[],'','']
	],'',''],
	['PAGE','6907',jdecode('Agenda'),jdecode(''),'/6907/index.html','true',[ 
		['PAGE','6934',jdecode('Vereinsaktivit%C3%A4ten'),jdecode(''),'/6907/6934.html','true',[],'',''],
		['PAGE','6961',jdecode('Kurse'),jdecode(''),'/6907/6961.html','true',[],'',''],
		['PAGE','6988',jdecode('ACSA-Kalender'),jdecode(''),'/6907/6988.html','true',[],'',''],
		['PAGE','29701',jdecode('Pfingsttreffen'),jdecode(''),'/6907/29701.html','true',[],'','']
	],'',''],
	['PAGE','7015',jdecode('Partner'),jdecode(''),'/7015/index.html','true',[ 
		['PAGE','7042',jdecode('Partnerdojos'),jdecode(''),'/7015/7042.html','true',[],'',''],
		['PAGE','7069',jdecode('IG+AIKIDO+JUGEND'),jdecode(''),'/7015/7069.html','true',[],'',''],
		['PAGE','7096',jdecode('ACSA'),jdecode(''),'/7015/7096.html','true',[],'','']
	],'',''],
	['PAGE','7123',jdecode('Links'),jdecode(''),'/7123/index.html','true',[ 
		['PAGE','7150',jdecode('Schweiz'),jdecode(''),'/7123/7150.html','true',[],'',''],
		['PAGE','7177',jdecode('Deutschland'),jdecode(''),'/7123/7177.html','false',[],'',''],
		['PAGE','7204',jdecode('Oesterreich'),jdecode(''),'/7123/7204.html','false',[],'','']
	],'',''],
	['PAGE','7231',jdecode('Downloads'),jdecode(''),'/7231.html','true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Activate';
theSitetree.paletteFamily='1E3A6F';
theSitetree.keyvisualId='2026';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='338';
theSitetree.graphicsetId='396';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='1E3A6F';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Activate',
				paletteFamily: 	'1E3A6F',
				keyvisualId: 	'2026',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'338',
				graphicsetId: 	'396',
				contentColor: 	'FFFFFF',
				contentBGColor: '1E3A6F',
				a_color: 		'1E3A6F',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-161']={
webappId:    '7008',
documentId:  '29701',
internalId:  '161',
customField: 'language:de;country:CH;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1508',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1508',
internalId:  '',
customField: '20100411-161918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1565',
internalId:  '',
customField: '20050815-180227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1592',
internalId:  '',
customField: '20100115-032622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1619',
internalId:  '',
customField: '20100115-031725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9802',
internalId:  '',
customField: '20090422-134750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1673',
internalId:  '',
customField: '20050815-180420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1700',
internalId:  '',
customField: '20060719-202958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1727',
internalId:  '',
customField: '20090422-134903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6664',
internalId:  '',
customField: '20060719-203515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6691',
internalId:  '',
customField: '20051213-194957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6772',
internalId:  '',
customField: '20060720-104827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6799',
internalId:  '',
customField: '20100411-162232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6745',
internalId:  '',
customField: '20051213-195848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6853',
internalId:  '',
customField: '20060202-183424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6880',
internalId:  '',
customField: '20090422-134524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6907',
internalId:  '',
customField: '20070511-083354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6934',
internalId:  '',
customField: '20100531-221230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6961',
internalId:  '',
customField: '20100115-020749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6988',
internalId:  '',
customField: '20100115-021034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29701',
internalId:  '',
customField: '20100411-161518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7015',
internalId:  '',
customField: '20051213-211044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7042',
internalId:  '',
customField: '20090422-134248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7069',
internalId:  '',
customField: '20070116-004240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7096',
internalId:  '',
customField: '20051213-211837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7123',
internalId:  '',
customField: '20060720-110326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7150',
internalId:  '',
customField: '20060720-110247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7177',
internalId:  '',
customField: '20051003-213320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7204',
internalId:  '',
customField: '20060202-190005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7231',
internalId:  '',
customField: '20060720-110450'
};
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'Ahp010INE1PS';
var companyName   = '';
var htmlTitle	  = 'AIKIDO+APPENZELL';
var metaKeywords  = 'aikido%2C+appenzell%2C+schweiz%2C+kampfkunst%2C+kampfsport%2C+verein%2C+vereine%2C+freizeit%2C+sport%2C+japan%2C+japanisch%2C+ki%2C+do%2C+ai%2C+innerhoden%2C+ausserhoden%2C+fritz+heuscher%2C+langenthal%2C+ig+aikido+jugend%2C+kinder%2C+erwachsene%2C+trainings';
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();
};
