/* [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','4521',jdecode('Home'),jdecode(''),'/4521.html','true',[],'',''],
	['PAGE','4605',jdecode('Dojo'),jdecode(''),'/4605/index.html','true',[ 
		['PAGE','17251',jdecode('Kleine+Fotogalerie'),jdecode(''),'/4605/17251.html','true',[],'',''],
		['PAGE','6831',jdecode('Preise'),jdecode(''),'/4605/6831.html','true',[],'',''],
		['PAGE','6858',jdecode('Links'),jdecode(''),'/4605/6858.html','true',[],'',''],
		['PAGE','9632',jdecode('Lageplan'),jdecode(''),'/4605/9632.html','true',[],'',''],
		['PAGE','16199',jdecode('Anfahrtsplaner'),jdecode(''),'/4605/16199.html','true',[],'','']
	],'',''],
	['PAGE','5856',jdecode('Trainer'),jdecode(''),'/5856.html','true',[],'',''],
	['PAGE','4848',jdecode('Trainingszeiten'),jdecode(''),'/4848.html','true',[],'',''],
	['PAGE','4578',jdecode('Aikido'),jdecode(''),'/4578/index.html','true',[ 
		['PAGE','5802',jdecode('mehr+%C3%BCber+Aikido'),jdecode(''),'/4578/5802.html','true',[],'','']
	],'',''],
	['PAGE','4767',jdecode('Qi+gong'),jdecode(''),'/4767/index.html','true',[ 
		['PAGE','5937',jdecode('mehr+%C3%BCber+Qi+gong'),jdecode(''),'/4767/5937.html','true',[],'','']
	],'',''],
	['PAGE','4794',jdecode('Tai+ji+quan'),jdecode(''),'/4794/index.html','true',[ 
		['PAGE','6045',jdecode('mehr+%C3%BCber+Tai+ji+quan'),jdecode(''),'/4794/6045.html','true',[],'','']
	],'',''],
	['PAGE','6153',jdecode('Allgemeines'),jdecode(''),'/6153.html','true',[],'',''],
	['PAGE','4902',jdecode('Aktuell'),jdecode(''),'/4902/index.html','true',[ 
		['PAGE','20001',jdecode('Tag+der+offenen+T%C3%BCr'),jdecode(''),'/4902/20001.html','false',[],'',''],
		['PAGE','4875',jdecode('Trainingsterminplan'),jdecode(''),'/4902/4875.html','true',[],'',''],
		['PAGE','16272',jdecode('Aktivit%C3%A4ten'),jdecode(''),'/4902/16272.html','true',[],'',''],
		['PAGE','16281',jdecode('Einf%C3%BChrungskurs+2010'),jdecode(''),'/4902/16281.html','true',[],'','']
	],'',''],
	['PAGE','4929',jdecode('Kontakt'),jdecode(''),'/4929.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Seifenblase';
theSitetree.paletteFamily='C8E2FF';
theSitetree.keyvisualId='2353';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='379';
theSitetree.graphicsetId='427';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Seifenblase',
				paletteFamily: 	'C8E2FF',
				keyvisualId: 	'2353',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'379',
				graphicsetId: 	'427',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'6666CC',
				e_color: 		'3333CC',
				f_color: 		'9999CC',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '9632',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4521',
internalId:  '1006',
customField: '1006'
};
webappMappings['1009']=webappMappings['1009-6730023']={
webappId:    '1009',
documentId:  '12485',
internalId:  '6730023',
customField: 'isFollowupPage:true;documentId:4929;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4521',
internalId:  '',
customField: '20090407-010840'
};
webappMappings['1501']=webappMappings['1501-935757']={
webappId:    '1501',
documentId:  '4521',
internalId:  '935757',
customField: '1501'
};
webappMappings['2002']=webappMappings['2002-location']={
webappId:    '2002',
documentId:  '16199',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['7008']=webappMappings['7008-4418']={
webappId:    '7008',
documentId:  '4929',
internalId:  '4418',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4605',
internalId:  '',
customField: '20100203-151159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17251',
internalId:  '',
customField: '20100203-153424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6831',
internalId:  '',
customField: '20091023-125721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6858',
internalId:  '',
customField: '20090407-011246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9632',
internalId:  '',
customField: '20091023-130336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16199',
internalId:  '',
customField: '20091023-130307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5856',
internalId:  '',
customField: '20100203-140146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4848',
internalId:  '',
customField: '20091023-131251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4578',
internalId:  '',
customField: '20060623-231930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5802',
internalId:  '',
customField: '20060624-172240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4767',
internalId:  '',
customField: '20060927-014211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5937',
internalId:  '',
customField: '20060623-013306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4794',
internalId:  '',
customField: '20060927-014639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6045',
internalId:  '',
customField: '20060411-175010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6153',
internalId:  '',
customField: '20060411-175010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4902',
internalId:  '',
customField: '20090407-021155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16281',
internalId:  '',
customField: '20100203-154337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16272',
internalId:  '',
customField: '20100203-154001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4875',
internalId:  '',
customField: '20081221-222353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4929',
internalId:  '',
customField: '20060624-000123'
};
webappMappings['7008']=webappMappings['7008-4420']={
webappId:    '7008',
documentId:  '12485',
internalId:  '4420',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12485',
internalId:  '',
customField: '20060623-235951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20001',
internalId:  '',
customField: '20100203-153921'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXXP4';
var companyName   = 'Aikido+Glarnerland';
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();
};
