/* [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','4556',jdecode('Home'),jdecode(''),'/4556.html','true',[],'',''],
	['PAGE','9022',jdecode('%C3%9Cber+uns'),jdecode(''),'/9022/index.html','true',[ 
		['PAGE','9049',jdecode('Naturdrogerie'),jdecode(''),'/9022/9049.html','true',[],'',''],
		['PAGE','29595',jdecode('Team'),jdecode(''),'/9022/29595.html','true',[],'',''],
		['PAGE','29604',jdecode('%C3%96ffnungszeiten'),jdecode(''),'/9022/29604.html','true',[],'',''],
		['PAGE','12102',jdecode('Anfahrt'),jdecode(''),'/9022/12102.html','true',[],'',''],
		['PAGE','10304',jdecode('Routenplaner'),jdecode(''),'/9022/10304.html','true',[],'','']
	],'',''],
	['PAGE','9503',jdecode('Die+Drogerie'),jdecode(''),'/9503.html','true',[],'',''],
	['PAGE','9530',jdecode('Eigenspezialit%C3%A4ten'),jdecode(''),'/9530/index.html','true',[ 
		['PAGE','13203',jdecode('Erste-Hilfe-Spray'),jdecode(''),'/9530/13203.html','true',[],'',''],
		['PAGE','13230',jdecode('Mineralsalzmischung'),jdecode(''),'/9530/13230.html','true',[],'',''],
		['PAGE','13257',jdecode('Hausgemachte+Salben'),jdecode(''),'/9530/13257.html','true',[],'','']
	],'',''],
	['PAGE','9557',jdecode('Heidak+Spagyrik'),jdecode(''),'/9557/index.html','true',[ 
		['PAGE','14403',jdecode('Was+ist+Spagyrik%3F'),jdecode(''),'/9557/14403.html','true',[],'',''],
		['PAGE','14430',jdecode('Individualit%C3%A4t'),jdecode(''),'/9557/14430.html','true',[],'',''],
		['PAGE','14457',jdecode('Beispiele'),jdecode(''),'/9557/14457.html','true',[],'','']
	],'',''],
	['PAGE','26603',jdecode('Aromatherapie'),jdecode(''),'/26603/index.html','true',[ 
		['PAGE','26630',jdecode('Aromatherapie%3F'),jdecode(''),'/26603/26630.html','true',[],'',''],
		['PAGE','26657',jdecode('Beispiele'),jdecode(''),'/26603/26657.html','true',[],'','']
	],'',''],
	['PAGE','9611',jdecode('Gesundheitszentrum'),jdecode(''),'/9611/index.html','true',[ 
		['PAGE','9638',jdecode('Individuelle+Beratungen'),jdecode(''),'/9611/9638.html','true',[],'',''],
		['PAGE','9692',jdecode('Hom%C3%B6opathie'),jdecode(''),'/9611/9692.html','true',[],'',''],
		['PAGE','29183',jdecode('TCM-Praxis'),jdecode(''),'/9611/29183.html','true',[],'',''],
		['PAGE','9719',jdecode('Massagestudio'),jdecode(''),'/9611/9719.html','true',[],'','']
	],'',''],
	['PAGE','9773',jdecode('Aktuelles'),jdecode(''),'/9773/index.html','true',[ 
		['PAGE','9800',jdecode('Vortr%C3%A4ge'),jdecode(''),'/9773/9800.html','true',[],'',''],
		['PAGE','24521',jdecode('Cellulitebehandlung'),jdecode(''),'/9773/24521.html','true',[],'',''],
		['PAGE','29025',jdecode('Ferien-Tscheggliste'),jdecode(''),'/9773/29025.html','true',[],'',''],
		['PAGE','24548',jdecode('Raucherentw%C3%B6hnung'),jdecode(''),'/9773/24548.html','true',[],'',''],
		['PAGE','24847',jdecode('Entschlackung'),jdecode(''),'/9773/24847.html','true',[],'',''],
		['PAGE','27221',jdecode('Heuschnupfen'),jdecode(''),'/9773/27221.html','true',[],'',''],
		['PAGE','9827',jdecode('Links'),jdecode(''),'/9773/9827.html','true',[],'','']
	],'',''],
	['PAGE','11802',jdecode('G%C3%A4stebuch'),jdecode(''),'/11802/index.html','true',[ 
		['PAGE','11803',jdecode('Eintr%C3%A4ge'),jdecode(''),'/11802/11803.html','false',[],'','']
	],'',''],
	['PAGE','9854',jdecode('Kontakt'),jdecode(''),'/9854/index.html','true',[ 
		['PAGE','9881',jdecode('Adresse%2C+Telefon'),jdecode(''),'/9854/9881.html','true',[],'',''],
		['PAGE','9908',jdecode('E-Mail+an+uns'),jdecode(''),'/9854/9908.html','true',[],'','']
	],'',''],
	['PAGE','29312',jdecode('Shop'),jdecode(''),'/29312.html','true',[],'','']];
var siteelementCount=38;
theSitetree.topTemplateName='Elemental';
theSitetree.paletteFamily='AAA9A9';
theSitetree.keyvisualId='11594';
theSitetree.keyvisualName='kv_11594.jpg';
theSitetree.fontsetId='32911';
theSitetree.graphicsetId='13981';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Elemental',
				paletteFamily: 	'AAA9A9',
				keyvisualId: 	'11594',
				keyvisualName: 	'kv_11594.jpg',
				fontsetId: 		'32911',
				graphicsetId: 	'13981',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '10304',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9022',
internalId:  '',
customField: '20070131-105929'
};
webappMappings['1002']=webappMappings['1002-11802ABW0X0INXX5I']={
webappId:    '1002',
documentId:  '11802',
internalId:  '11802ABW0X0INXX5I',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '12102',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4556',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-534310']={
webappId:    '1501',
documentId:  '4556',
internalId:  '534310',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20091029-082558'
};
webappMappings['4001']=webappMappings['4001-M7eV_xoF2_j23G_m']={
webappId:    '4001',
documentId:  '29312',
internalId:  'M7eV_xoF2_j23G_m',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9049',
internalId:  '',
customField: '20080621-134903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29595',
internalId:  '',
customField: '20090213-114534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29604',
internalId:  '',
customField: '20090213-114646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12102',
internalId:  '',
customField: '20040703-133526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10304',
internalId:  '',
customField: '20040612-104628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9503',
internalId:  '',
customField: '20060701-141240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9530',
internalId:  '',
customField: '20090213-114815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13203',
internalId:  '',
customField: '20080920-133344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13230',
internalId:  '',
customField: '20071017-081757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13257',
internalId:  '',
customField: '20090213-114907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9557',
internalId:  '',
customField: '20090213-114934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14403',
internalId:  '',
customField: '20090213-114952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14430',
internalId:  '',
customField: '20090213-115424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14457',
internalId:  '',
customField: '20090213-115119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26603',
internalId:  '',
customField: '20090213-115453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26630',
internalId:  '',
customField: '20090213-115514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26657',
internalId:  '',
customField: '20081029-113707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9611',
internalId:  '',
customField: '20090213-115627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9638',
internalId:  '',
customField: '20090213-115650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9692',
internalId:  '',
customField: '20060701-142619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29183',
internalId:  '',
customField: '20071210-081422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9719',
internalId:  '',
customField: '20060701-142753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9773',
internalId:  '',
customField: '20080920-132946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9800',
internalId:  '',
customField: '20081029-113249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24521',
internalId:  '',
customField: '20060701-143124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29025',
internalId:  '',
customField: '20060701-144445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24548',
internalId:  '',
customField: '20050802-153430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24847',
internalId:  '',
customField: '20050802-154007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27221',
internalId:  '',
customField: '20060328-182439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9827',
internalId:  '',
customField: '20040731-133443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11802',
internalId:  '',
customField: '20040618-105438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11803',
internalId:  '',
customField: '20040618-105438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9854',
internalId:  '',
customField: '20040731-133420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9881',
internalId:  '',
customField: '20040618-104811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9908',
internalId:  '',
customField: '20040618-104903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29312',
internalId:  '',
customField: '20061220-084330'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXX5I';
var companyName   = 'Naturdrogerie+Oesch';
var htmlTitle	  = 'Naturdrogerie+Oesch+-+Ihr+kompetenter+Gesundheitsberater';
var metaKeywords  = '';
var metaContents  = 'GesundheitNaturNaturheilmittelHom%C3%B6opathieSpagyrikHeidakBioresonanzBehandlungErste-Hilfe-SprayProbleml%C3%B6sungBachbl%C3%BCtenDrogerieGesundheitspartnerKompetenzzentrum';
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();
};

