/* [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(''), jdecode('%2F301.html'), 'true',[],'',''],
	['PAGE','86712',jdecode('ATELIER+NEWS'),jdecode(''), jdecode('%2F86712.html'), 'true',[],'',''],
	['PAGE','1601',jdecode('%C3%9CBER+MICH'),jdecode(''), jdecode('%2F1601.html'), 'true',[],'',''],
	['PAGE','1643',jdecode('FEUER+FREI+%2F+SCHMUCK'),jdecode(''), jdecode('%2F1643.html'), 'true',[],'',''],
	['PAGE','18743',jdecode('BRONZE-SCHMUCK'),jdecode(''), jdecode('%2F18743.html'), 'true',[],'',''],
	['PAGE','36701',jdecode('SCHMUCK-SET%26%23x27%3BS'),jdecode(''), jdecode('%2F36701.html'), 'true',[],'',''],
	['PAGE','54601',jdecode('ANH%C3%84NGER+HERZ'),jdecode(''), jdecode('%2F54601.html'), 'true',[],'',''],
	['PAGE','54622',jdecode('ANH%C3%84NGER+RUND'),jdecode(''), jdecode('%2F54622.html'), 'true',[],'',''],
	['PAGE','54643',jdecode('ANH%C3%84NGER+OVAL'),jdecode(''), jdecode('%2F54643.html'), 'true',[],'',''],
	['PAGE','54664',jdecode('ANH%C3%84NGER+TROPFEN'),jdecode(''), jdecode('%2F54664.html'), 'true',[],'',''],
	['PAGE','18701',jdecode('ANH%C3%84NGER+DIV.+FORMEN'),jdecode(''), jdecode('%2F18701.html'), 'true',[],'',''],
	['PAGE','18722',jdecode('RINGE'),jdecode(''), jdecode('%2F18722.html'), 'true',[],'',''],
	['PAGE','46601',jdecode('ARMB%C3%84NDER'),jdecode(''), jdecode('%2F46601.html'), 'true',[],'',''],
	['PAGE','31901',jdecode('OHRRINGE'),jdecode(''), jdecode('%2F31901.html'), 'true',[],'',''],
	['PAGE','72101',jdecode('KRAFT-BILDER'),jdecode(''), jdecode('%2F72101.html'), 'true',[],'',''],
	['PAGE','1664',jdecode('BILDER'),jdecode(''), jdecode('%2F1664%2Findex.html'), 'true',[ 
		['PAGE','80312',jdecode('2010'),jdecode(''), jdecode('%2F1664%2F80312.html'), 'true',[],'',''],
		['PAGE','65701',jdecode('2009'),jdecode(''), jdecode('%2F1664%2F65701.html'), 'true',[],'',''],
		['PAGE','1685',jdecode('2008'),jdecode(''), jdecode('%2F1664%2F1685.html'), 'true',[],'',''],
		['PAGE','1706',jdecode('2007'),jdecode(''), jdecode('%2F1664%2F1706.html'), 'true',[],'',''],
		['PAGE','1727',jdecode('2006'),jdecode(''), jdecode('%2F1664%2F1727.html'), 'true',[],'','']
	],'',''],
	['PAGE','37601',jdecode('AGB%26%23x27%3BS'),jdecode(''), jdecode('%2F37601.html'), 'true',[],'',''],
	['PAGE','1811',jdecode('BERATUNGEN'),jdecode(''), jdecode('%2F1811%2Findex.html'), 'true',[ 
		['PAGE','1832',jdecode('AURA+%26+CHAKRA'),jdecode(''), jdecode('%2F1811%2F1832.html'), 'true',[],'',''],
		['PAGE','1853',jdecode('MEDIALE+BERATUNG'),jdecode(''), jdecode('%2F1811%2F1853.html'), 'true',[],'',''],
		['PAGE','1874',jdecode('QUESTICO'),jdecode(''), jdecode('%2F1811%2F1874.html'), 'true',[],'','']
	],'',''],
	['PAGE','14301',jdecode('ENERGIEWIRBEL'),jdecode(''), jdecode('%2F14301.html'), 'true',[],'',''],
	['PAGE','1769',jdecode('GEDANKEN'),jdecode(''), jdecode('%2F1769.html'), 'true',[],'',''],
	['PAGE','1895',jdecode('SCHUTZENGEL'),jdecode(''), jdecode('%2F1895.html'), 'true',[],'',''],
	['PAGE','1937',jdecode('KONTAKT'),jdecode(''), jdecode('%2F1937.html'), 'true',[],'',''],
	['PAGE','1958',jdecode('LINKS'),jdecode(''), jdecode('%2F1958.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 prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
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: '20110701-104910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1601',
internalId:  '',
customField: '20120110-223043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1643',
internalId:  '',
customField: '20100213-020316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18743',
internalId:  '',
customField: '20110613-094415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36701',
internalId:  '',
customField: '20110701-105602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54601',
internalId:  '',
customField: '20110701-105633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54622',
internalId:  '',
customField: '20110701-105655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54643',
internalId:  '',
customField: '20110701-105707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54664',
internalId:  '',
customField: '20110701-105721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20110701-105736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18722',
internalId:  '',
customField: '20120110-222824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46601',
internalId:  '',
customField: '20110701-105808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31901',
internalId:  '',
customField: '20111025-121537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86712',
internalId:  '',
customField: '20111025-121457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1664',
internalId:  '',
customField: '20120110-223142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65701',
internalId:  '',
customField: '20100629-204724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1685',
internalId:  '',
customField: '20110701-105937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1706',
internalId:  '',
customField: '20110701-105920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1727',
internalId:  '',
customField: '20100629-205135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37601',
internalId:  '',
customField: '20100629-194804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1811',
internalId:  '',
customField: '20081203-211504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1832',
internalId:  '',
customField: '20100806-211301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1853',
internalId:  '',
customField: '20100806-211340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1874',
internalId:  '',
customField: '20080906-195549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20100629-205353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1769',
internalId:  '',
customField: '20080830-035714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1895',
internalId:  '',
customField: '20080830-032401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80312',
internalId:  '',
customField: '20100930-222507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1937',
internalId:  '',
customField: '20081021-141914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1958',
internalId:  '',
customField: '20100926-200652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72101',
internalId:  '',
customField: '20100629-204651'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0IN3L6H';
var companyName   = 'danuser+energy';
var htmlTitle	  = 'danuser+energy%2C+Chur+%2F+Schweiz';
var metaKeywords  = 'art+by+daniela+danuser+energy+energiebilder+mutter+maria+erzengel+michael+erzengel+raphael+soulmates+erzengel+metatron+liebesengel+bilder+kohle+pastell+kreide+spirituelle+kunst+seelenbilder+sterling+silber+bronze+zirkonia+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+energiebilder+mutter+maria+erzengel+michael+erzengel+raphael+soulmates+erzengel+metatron+liebesengel+bilder+kohle+pastell+kreide+spirituelle+kunst+seelenbilder+sterling+silber+bronze+zirkonia+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();
};

