/* [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','301',jdecode('HOME'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','1601',jdecode('%C3%9CBER+MICH'),jdecode(''),'/1601.html','true',[],'',''],
	['PAGE','1643',jdecode('FEUER+FREI+%2F+SCHMUCK'),jdecode(''),'/1643.html','true',[],'',''],
	['PAGE','18743',jdecode('BRONZE-SCHMUCK'),jdecode(''),'/18743.html','true',[],'',''],
	['PAGE','36701',jdecode('SCHMUCK-SET%26%23x27%3BS'),jdecode(''),'/36701.html','true',[],'',''],
	['PAGE','54601',jdecode('ANH%C3%84NGER+HERZ'),jdecode(''),'/54601.html','true',[],'',''],
	['PAGE','54622',jdecode('ANH%C3%84NGER+RUND'),jdecode(''),'/54622.html','true',[],'',''],
	['PAGE','54643',jdecode('ANH%C3%84NGER+OVAL'),jdecode(''),'/54643.html','true',[],'',''],
	['PAGE','54664',jdecode('ANH%C3%84NGER+TROPFEN'),jdecode(''),'/54664.html','true',[],'',''],
	['PAGE','18701',jdecode('ANH%C3%84NGER+DIV.+FORMEN'),jdecode(''),'/18701.html','true',[],'',''],
	['PAGE','18722',jdecode('RINGE'),jdecode(''),'/18722.html','true',[],'',''],
	['PAGE','46601',jdecode('ARMB%C3%84NDER'),jdecode(''),'/46601.html','true',[],'',''],
	['PAGE','31901',jdecode('OHRRINGE'),jdecode(''),'/31901.html','true',[],'',''],
	['PAGE','36722',jdecode('HAARSCHMUCK'),jdecode(''),'/36722.html','true',[],'',''],
	['PAGE','72101',jdecode('KRAFT-BILDER'),jdecode(''),'/72101.html','true',[],'',''],
	['PAGE','1664',jdecode('BILDER'),jdecode(''),'/1664/index.html','true',[ 
		['PAGE','65701',jdecode('2009'),jdecode(''),'/1664/65701.html','true',[],'',''],
		['PAGE','1685',jdecode('2008'),jdecode(''),'/1664/1685.html','true',[],'',''],
		['PAGE','1706',jdecode('2007'),jdecode(''),'/1664/1706.html','true',[],'',''],
		['PAGE','1727',jdecode('2006'),jdecode(''),'/1664/1727.html','true',[],'','']
	],'',''],
	['PAGE','37601',jdecode('AGB%26%23x27%3BS'),jdecode(''),'/37601.html','true',[],'',''],
	['PAGE','1811',jdecode('BERATUNGEN'),jdecode(''),'/1811/index.html','true',[ 
		['PAGE','1832',jdecode('AURA+%26+CHAKRA'),jdecode(''),'/1811/1832.html','true',[],'',''],
		['PAGE','1853',jdecode('MEDIALE+BERATUNG'),jdecode(''),'/1811/1853.html','true',[],'',''],
		['PAGE','1874',jdecode('QUESTICO'),jdecode(''),'/1811/1874.html','true',[],'','']
	],'',''],
	['PAGE','14301',jdecode('ENERGIEWIRBEL'),jdecode(''),'/14301.html','true',[],'',''],
	['PAGE','1769',jdecode('GEDANKEN'),jdecode(''),'/1769.html','true',[],'',''],
	['PAGE','1790',jdecode('MONTAGSGEBET'),jdecode(''),'/1790.html','true',[],'',''],
	['PAGE','1895',jdecode('SCHUTZENGEL'),jdecode(''),'/1895.html','true',[],'',''],
	['PAGE','1937',jdecode('KONTAKT'),jdecode(''),'/1937.html','true',[],'',''],
	['PAGE','1958',jdecode('LINKS'),jdecode(''),'/1958.html','true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Heart';
theSitetree.paletteFamily='6B84D5';
theSitetree.keyvisualId='7760';
theSitetree.keyvisualName='kv_7760.jpg';
theSitetree.fontsetId='16807';
theSitetree.graphicsetId='12278';
theSitetree.contentColor='424277';
theSitetree.contentBGColor='AABBF3';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Heart',
				paletteFamily: 	'6B84D5',
				keyvisualId: 	'7760',
				keyvisualName: 	'kv_7760.jpg',
				fontsetId: 		'16807',
				graphicsetId: 	'12278',
				contentColor: 	'424277',
				contentBGColor: 'AABBF3',
				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['7008']=webappMappings['7008-769']={
webappId:    '7008',
documentId:  '1937',
internalId:  '769',
customField: 'language:de;country:CH;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100719-133510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1601',
internalId:  '',
customField: '20100629-220000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1643',
internalId:  '',
customField: '20100213-030316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18743',
internalId:  '',
customField: '20100713-225829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36701',
internalId:  '',
customField: '20100629-223221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54601',
internalId:  '',
customField: '20100629-223344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54622',
internalId:  '',
customField: '20100629-223538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54643',
internalId:  '',
customField: '20100713-233258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54664',
internalId:  '',
customField: '20100629-223708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20100713-232245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18722',
internalId:  '',
customField: '20100719-132941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46601',
internalId:  '',
customField: '20100629-224252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31901',
internalId:  '',
customField: '20100629-224418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36722',
internalId:  '',
customField: '20100629-224613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1664',
internalId:  '',
customField: '20100101-010005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65701',
internalId:  '',
customField: '20100629-224724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1685',
internalId:  '',
customField: '20100629-224806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1706',
internalId:  '',
customField: '20100629-225226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1727',
internalId:  '',
customField: '20100629-225135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37601',
internalId:  '',
customField: '20100629-214804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1811',
internalId:  '',
customField: '20081203-221504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1832',
internalId:  '',
customField: '20100629-225325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1853',
internalId:  '',
customField: '20100629-225306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1874',
internalId:  '',
customField: '20080906-215549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20100629-225353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1769',
internalId:  '',
customField: '20080830-055714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1790',
internalId:  '',
customField: '20080830-054225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1895',
internalId:  '',
customField: '20080830-052401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1937',
internalId:  '',
customField: '20081021-161914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1958',
internalId:  '',
customField: '20100208-013106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72101',
internalId:  '',
customField: '20100629-224651'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHOPT0IN3L6H';
var companyName   = 'danuser+energy';
var htmlTitle	  = 'danuser+energy%2C+Chur+%2F+Schweiz';
var metaKeywords  = 'art+by+daniela+danuser+energy+badesalz+badezus%C3%A4tze+badew%C3%BCrfel+energiebilder+mutter+maria+erzengel+michael+erzengel+raphael+soulmates+erzengel+metatron+liebesengel+bilder+kohle+pastell+kreide+spirituelle+kunst+seelenbilder+sterling+silber+ringe+ketten+ohrringe+dichroic+glaskunst+bronze+brennofen+glasfusing+glasherz+chur+schweiz+graub%C3%BCnden+danuser+art+chur+photodrucke+kunstdrucke+energiekarten+engelskarten';
var metaContents  = 'art+by+daniela+danuser+energy+badesalz+badezus%C3%A4tze+badew%C3%BCrfel+energiebilder+mutter+maria+erzengel+michael+erzengel+raphael+soulmates+erzengel+metatron+liebesengel+bilder+kohle+pastell+kreide+spirituelle+kunst+seelenbilder+sterling+silber+ringe+ketten+ohrringe+dichroic+glaskunst+bronze+brennofen+glasfusing+glasherz+chur+schweiz+graub%C3%BCnden+danuser+art+chur+photodrucke+kunstdrucke+energiekarten+engelskarten';
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();
};
