/* [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','501',jdecode('Home'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','111401',jdecode('Portr%C3%A4t'),jdecode(''), jdecode('%2F111401.html'), 'true',[],'',''],
	['PAGE','14901',jdecode('Yogakurse+allg.'),jdecode(''), jdecode('%2F14901.html'), 'true',[],'',''],
	['PAGE','14922',jdecode('Kinderyoga'),jdecode(''), jdecode('%2F14922.html'), 'true',[],'',''],
	['PAGE','109601',jdecode('Yoga+f%C3%BCr+Jugendliche'),jdecode(''), jdecode('%2F109601.html'), 'true',[],'',''],
	['PAGE','28922',jdecode('SeniorInnen'),jdecode(''), jdecode('%2F28922.html'), 'true',[],'',''],
	['PAGE','40301',jdecode('Einzelunterricht'),jdecode(''), jdecode('%2F40301.html'), 'true',[],'',''],
	['PAGE','28943',jdecode('KlangEntspannung'),jdecode(''), jdecode('%2F28943.html'), 'true',[],'',''],
	['PAGE','14943',jdecode('Tageskurse'),jdecode(''), jdecode('%2F14943.html'), 'true',[],'',''],
	['PAGE','40322',jdecode('Philosophie'),jdecode(''), jdecode('%2F40322.html'), 'true',[],'','']];
var siteelementCount=10;
theSitetree.topTemplateName='Bloom';
theSitetree.paletteFamily='FBE098';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33065';
theSitetree.graphicsetId='14049';
theSitetree.contentColor='df5b27';
theSitetree.contentBGColor='FBE098';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Bloom',
				paletteFamily: 	'FBE098',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33065',
				graphicsetId: 	'14049',
				contentColor: 	'df5b27',
				contentBGColor: 'FBE098',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20111129-075523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28943',
internalId:  '',
customField: '20111121-215628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14943',
internalId:  '',
customField: '20111201-135009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40322',
internalId:  '',
customField: '20111121-215905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14901',
internalId:  '',
customField: '20111201-102631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14922',
internalId:  '',
customField: '20111201-102855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28922',
internalId:  '',
customField: '20111201-103436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40301',
internalId:  '',
customField: '20110603-102436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109601',
internalId:  '',
customField: '20111201-133907'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '111401',
internalId:  '-',
customField: '20111130-215549'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INED0O';
var companyName   = 'PADAYAM++yogaschule';
var htmlTitle	  = 'Yoga';
var metaKeywords  = 'padayam%2C+Yoga%2C+Gruppenunterricht%2C+Einzelunterricht%2C+Meditation%2CKinderyoga%2C+Seniorenyoga%2C+Meditation%2CYoga+Nidra%2C+Willisau%2C+Altb%C3%BCron%2C+Langenthal%2C+Grossdietwil%2C+Fischbach%2C+Zell%2C+Ufhusen%2C++Schritte%2C+Erfahrung%2C+Bewusstsein%2C+Heilkraft%2C+Vogel%2COttiger%2C++Daniela%2C+Klangschalen%2C+Teenageryoga%2C+Jugendliche+und+Yoga%2C+Entspannung%2C+Bewusstsein%2C+Ruhe%2C+Kr%C3%A4fte';
var metaContents  = 'padayam+Yoga+Kinderyoga+Meditation+Seniorenyoga+Yoga-Nidra+Schritte+zur+Erfahrung+zum+Bewusst+sein+zur+Heilkraft+Kinderyoga++Seniorinnenyoga+SeniorInnenyoga+Yoga+f%C3%BCr+Jugendliche+Klangschalen+Ruhe+Entspannung+Kr%C3%A4fte+';
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();
};

