/* [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(''),'/4598.html','true',[],'',''],
	['PAGE','4863',jdecode('Angebot'),jdecode(''),'/4863/index.html','true',[ 
		['PAGE','34001',jdecode('Trauma-L%C3%B6sungen'),jdecode(''),'/4863/34001.html','true',[],'',''],
		['PAGE','34028',jdecode('Geburtstrauma'),jdecode(''),'/4863/34028.html','true',[],'',''],
		['PAGE','34055',jdecode('Reinkarnationstherapie'),jdecode(''),'/4863/34055.html','true',[],'',''],
		['PAGE','34082',jdecode('Systemische-L%C3%B6sungen'),jdecode(''),'/4863/34082.html','true',[],'',''],
		['PAGE','34109',jdecode('Astrologische+Begleitung'),jdecode(''),'/4863/34109.html','true',[],'',''],
		['PAGE','34136',jdecode('Fragen+%2F+News'),jdecode(''),'/4863/34136.html','true',[],'',''],
		['PAGE','57818',jdecode('Kosten'),jdecode(''),'/4863/57818.html','true',[],'','']
	],'',''],
	['PAGE','4890',jdecode('Seminare'),jdecode(''),'/4890/index.html','true',[ 
		['PAGE','59871',jdecode('Links'),jdecode(''),'/4890/59871.html','true',[],'','']
	],'',''],
	['PAGE','4917',jdecode('Supervision+%2F+Coaching'),jdecode(''),'/4917.html','true',[],'',''],
	['PAGE','4944',jdecode('Ueber+mich'),jdecode(''),'/4944.html','true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Animal';
theSitetree.paletteFamily='3468BD';
theSitetree.keyvisualId='4318';
theSitetree.keyvisualName='kv_4318.jpg';
theSitetree.fontsetId='10791';
theSitetree.graphicsetId='11209';
theSitetree.contentColor='313F73';
theSitetree.contentBGColor='D8E0ED';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Animal',
				paletteFamily: 	'3468BD',
				keyvisualId: 	'4318',
				keyvisualName: 	'kv_4318.jpg',
				fontsetId: 		'10791',
				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:'Verdana, 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: '20100225-124553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4863',
internalId:  '',
customField: '20080213-174321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4917',
internalId:  '',
customField: '20100413-142550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4890',
internalId:  '',
customField: '20100413-142315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34136',
internalId:  '',
customField: '20100413-142737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34109',
internalId:  '',
customField: '20081019-165038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34001',
internalId:  '',
customField: '20100413-143117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34028',
internalId:  '',
customField: '20090722-122418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34055',
internalId:  '',
customField: '20091226-161239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34082',
internalId:  '',
customField: '20090805-155554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57818',
internalId:  '',
customField: '20100225-125020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4944',
internalId:  '',
customField: '20100806-124931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59871',
internalId:  '',
customField: '20091001-175053'
};
var canonHostname = 'hptworkerdb01b.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+www.dorothe-grau.ch%2C+Trauma-+und+Systemtherapie%2C+Systemtherapie%2C+Aufstellungen%2C+Systemische+Therapie%2C+Trauma+l%C3%B6sen%2C+Familienstellen';
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+und+Energiearbeit.';
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();
};
