/* [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','4599',jdecode('HOME'),jdecode(''),'/4599.html','true',[],'',''],
	['PAGE','9052',jdecode('LICHT+UND+FARBEN'),jdecode(''),'/9052.html','true',[],'',''],
	['PAGE','9079',jdecode('FARBTHERAPIE'),jdecode(''),'/9079.html','true',[],'',''],
	['PAGE','9106',jdecode('VORTR%C3%84GE+UND+KURSE'),jdecode(''),'/9106/index.html','true',[ 
		['PAGE','9133',jdecode('VORTR%C3%84GE'),jdecode(''),'/9106/9133.html','true',[],'',''],
		['PAGE','9160',jdecode('TAGESSEMINAR'),jdecode(''),'/9106/9160.html','true',[],'',''],
		['PAGE','11303',jdecode('GESCH%C3%84FTSSEMINAR'),jdecode(''),'/9106/11303.html','true',[],'',''],
		['PAGE','9187',jdecode('REFERENZLISTE'),jdecode(''),'/9106/9187.html','true',[],'','']
	],'',''],
	['PAGE','98701',jdecode('FARBEN-SEELENPOTENTIAL'),jdecode(''),'/98701.html','true',[],'',''],
	['PAGE','9214',jdecode('FERIENSEMINAR'),jdecode(''),'/9214.html','true',[],'',''],
	['PAGE','9241',jdecode('FARBTHERAPIE+BEI+TIEREN'),jdecode(''),'/9241.html','true',[],'',''],
	['PAGE','100201',jdecode('HILFE+F%C3%9CR+TIERE'),jdecode(''),'/100201.html','true',[],'',''],
	['PAGE','49503',jdecode('NEWS'),jdecode(''),'/49503.html','true',[],'',''],
	['PAGE','9025',jdecode('ZU+MEINER+PERSON'),jdecode(''),'/9025.html','true',[],'',''],
	['PAGE','9268',jdecode('KONTAKT+%2F+LINKS'),jdecode(''),'/9268.html','true',[],'',''],
	['PAGE','12702',jdecode('G%C3%84STEBUCH'),jdecode(''),'/12702/index.html','true',[ 
		['PAGE','12703',jdecode('EINTR%C3%84GE'),jdecode(''),'/12702/12703.html','false',[],'','']
	],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='FFCC33';
theSitetree.keyvisualId='938';
theSitetree.keyvisualName='seerose.jpg';
theSitetree.fontsetId='168';
theSitetree.graphicsetId='199';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'NewYork',
				paletteFamily: 	'FFCC33',
				keyvisualId: 	'938',
				keyvisualName: 	'seerose.jpg',
				fontsetId: 		'168',
				graphicsetId: 	'199',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				a_color: 		'000066',
				b_color: 		'FFCC33',
				c_color: 		'000000',
				d_color: 		'406BC0',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4599',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9052',
internalId:  '',
customField: '20100125-220548'
};
webappMappings['1002']=webappMappings['1002-12702ABW0X0INXX8K']={
webappId:    '1002',
documentId:  '12702',
internalId:  '12702ABW0X0INXX8K',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4599',
internalId:  '',
customField: '20100217-220900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9106',
internalId:  '',
customField: '20100202-143136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9214',
internalId:  '',
customField: '20100125-221130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9079',
internalId:  '',
customField: '20100217-220035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9133',
internalId:  '',
customField: '20100218-131658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9160',
internalId:  '',
customField: '20100125-222254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11303',
internalId:  '',
customField: '20100125-221034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9187',
internalId:  '',
customField: '20100125-221101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9241',
internalId:  '',
customField: '20100202-143401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49503',
internalId:  '',
customField: '20100217-225957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9025',
internalId:  '',
customField: '20100125-221453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9268',
internalId:  '',
customField: '20100125-221527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12702',
internalId:  '',
customField: '20100125-221601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12703',
internalId:  '',
customField: '20050621-152157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98701',
internalId:  '',
customField: '20100301-110606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100201',
internalId:  '',
customField: '20100301-110639'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXX8K';
var companyName   = 'Praxis+f%C3%BCr+Farbtherapie';
var htmlTitle	  = 'Praxis+f%C3%BCr+Farbtherapie';
var metaKeywords  = 'Farbtherapie%2C+Therapie+mit+Farben%2C+Farben%2C+Karin+Kuhn%2C+Farbtherapeutin%2C+Farbenergien%2C+Farbschwingung%2C+Lichttherapie%2C+Licht%2C+Tier-Therapien%2C+Licht+und+Farben%2C+Farb-Ferienkurse%2C+Farbseminare%2C+Farbvortr%C3%A4ge%2C+Farbpunktur%2C+Farbakupunktur%2C+Farbmassagen%2C+Bachbl%C3%BCten%2C+Farbbrillen%2C+Farbzeichnungen%2C+farbtherapeutisches+Gespr%C3%A4ch%2C+heilen%2C+behandeln%2C+Regenbogenfarben%2C+Farbspektrum%2C+Spektralfarben+';
var metaContents  = 'Farbtherapie%2C+Therapie+mit+Farben%2C+Farben%2C+Karin+Kuhn%2C+Farbtherapeutin%2C+Farbenergien%2C+Farbschwingung%2C+Lichttherapie%2C+Licht%2C+Tier-Therapien%2C+Licht+und+Farben%2C+Farb-Ferienkurse%2C+Farbseminare%2C+Farbvortr%C3%A4ge%2C+Farbpunktur%2C+Farbakupunktur%2C+Farbmassagen%2C+Bachbl%C3%BCten%2C+Farbbrillen%2C+Farbzeichnungen%2C+Farbtherapeutisches+Gespr%C3%A4ch%2C+heilen%2C+behandeln%2C+Regenbogenfarben%2C+Farbspektrum%2C+Spektralfarben';
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();
};
