/* [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','4598',jdecode('Home'),jdecode(''), jdecode('%2F4598.html'), 'true',[],'',''],
	['PAGE','4863',jdecode('Angebot'),jdecode(''), jdecode('%2F4863%2Findex.html'), 'true',[ 
		['PAGE','34001',jdecode('Trauma-L%C3%B6sungen'),jdecode(''), jdecode('%2F4863%2F34001.html'), 'true',[],'',''],
		['PAGE','34028',jdecode('Geburtstrauma'),jdecode(''), jdecode('%2F4863%2F34028.html'), 'true',[],'',''],
		['PAGE','34055',jdecode('Reinkarnationstherapie'),jdecode(''), jdecode('%2F4863%2F34055.html'), 'true',[],'',''],
		['PAGE','34082',jdecode('Systemische-L%C3%B6sungen'),jdecode(''), jdecode('%2F4863%2F34082.html'), 'true',[],'',''],
		['PAGE','34109',jdecode('Astrologische+Begleitung'),jdecode(''), jdecode('%2F4863%2F34109.html'), 'true',[],'',''],
		['PAGE','60367',jdecode('Matrix+Energetics'),jdecode(''), jdecode('%2F4863%2F60367.html'), 'true',[],'',''],
		['PAGE','34136',jdecode('Fragen+%2F+News'),jdecode(''), jdecode('%2F4863%2F34136.html'), 'true',[],'',''],
		['PAGE','57818',jdecode('Kosten'),jdecode(''), jdecode('%2F4863%2F57818.html'), 'true',[],'','']
	],'',''],
	['PAGE','4890',jdecode('Seminare'),jdecode(''), jdecode('%2F4890%2Findex.html'), 'true',[ 
		['PAGE','59871',jdecode('Links'),jdecode(''), jdecode('%2F4890%2F59871.html'), 'true',[],'',''],
		['PAGE','65783',jdecode('Meditationen'),jdecode(''), jdecode('%2F4890%2F65783.html'), 'true',[],'','']
	],'',''],
	['PAGE','4917',jdecode('Supervision+%2F+Coaching'),jdecode(''), jdecode('%2F4917.html'), 'true',[],'',''],
	['PAGE','4944',jdecode('Ueber+mich'),jdecode(''), jdecode('%2F4944.html'), 'true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Animal';
theSitetree.paletteFamily='3468BD';
theSitetree.keyvisualId='4300';
theSitetree.keyvisualName='kv_4300.jpg';
theSitetree.fontsetId='10789';
theSitetree.graphicsetId='11209';
theSitetree.contentColor='313F73';
theSitetree.contentBGColor='D8E0ED';
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: 			'Animal',
				paletteFamily: 	'3468BD',
				keyvisualId: 	'4300',
				keyvisualName: 	'kv_4300.jpg',
				fontsetId: 		'10789',
				graphicsetId: 	'11209',
				contentColor: 	'313F73',
				contentBGColor: 'D8E0ED',
				a_color: 		'3468BD',
				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:  '4598',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20120123-164951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4863',
internalId:  '',
customField: '20101117-184451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4917',
internalId:  '',
customField: '20101229-144155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4890',
internalId:  '',
customField: '20120103-170221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34136',
internalId:  '',
customField: '20110825-105836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34109',
internalId:  '',
customField: '20101117-184204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34001',
internalId:  '',
customField: '20110201-164755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34028',
internalId:  '',
customField: '20100809-103838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34055',
internalId:  '',
customField: '20110201-165701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34082',
internalId:  '',
customField: '20120103-170512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57818',
internalId:  '',
customField: '20120103-171032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4944',
internalId:  '',
customField: '20120123-165053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59871',
internalId:  '',
customField: '20110711-131002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60367',
internalId:  '',
customField: '20110615-140652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65783',
internalId:  '',
customField: '20110211-161357'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXX8V';
var companyName   = 'PRAXIS+DOROTHE+GRAU';
var htmlTitle	  = 'Praxis+Dorothe+Grau%3A+die+Praxis+f%C3%BCr+Reinkarnations-+und+Traumatherapie';
var metaKeywords  = 'R%C3%BCckf%C3%BChrungstherapie%2C+Reinkarnationstherapie%2C+Traumatherapie%2C++Trauma%2C+Geburtsr%C3%BCckf%C3%BChrungen%2C+Systemische-L%C3%B6sungen%2C+Pr%C3%A4nataltherapie%2C++Reinkarnation%2C++Trauma-L%C3%B6sungen%2C+Traumal%C3%B6sungen%2C+Spirituelle+Psychologie%2C+Tiefenpsychologie%2C+www.dorothegrau.ch%2C+Dorothe+Grau%2C++5600+Lenzburg%2C++Trauma-+und+Systemtherapie%2C+Systemtherapie%2C+Aufstellungen%2C+Systemische+Therapie%2C+Trauma+l%C3%B6sen%2C+Familienstellen%2C+Matrix+Energetics%2C+Zwei-Punkte-Methode%2C+Quanten+Heilung.';
var metaContents  = 'Die+Praxis+f%C3%BCr+Reinkarnations-%2C++Trauma-+und+Systemtherapie+wird+von+der+Therapeutin+Dorothe+Grau+seit+1995+gef%C3%BChrt.++Ziele+der+Therapien+sind+Trauma-L%C3%B6sungen%2C+Systemische-L%C3%B6sungen%2C+Karma-L%C3%B6sungen+und+das+umfassende+Gebiet+der+spirituellen+Psychologie%2C+Energiearbeit+und+Matrix+Energetics.';
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();
};

