/* [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','1513',jdecode('Home'),jdecode(''), jdecode('%2F1513%2Findex.html'), 'true',[ 
		['PAGE','1597',jdecode('Angebot'),jdecode(''), jdecode('%2F1513%2F1597.html'), 'true',[],'',''],
		['PAGE','11898',jdecode('Hier+finden+Sie+uns'),jdecode(''), jdecode('%2F1513%2F11898.html'), 'true',[],'',''],
		['PAGE','15476',jdecode('Kontakt'),jdecode(''), jdecode('%2F1513%2F15476.html'), 'true',[],'',''],
		['PAGE','11868',jdecode('Routenplaner'),jdecode(''), jdecode('%2F1513%2F11868.html'), 'true',[],'','']
	],'',''],
	['PAGE','6151',jdecode('Aktuell'),jdecode(''), jdecode('%2F6151.html'), 'true',[],'',''],
	['PAGE','1651',jdecode('Apothekenbereich'),jdecode(''), jdecode('%2F1651%2Findex.html'), 'true',[ 
		['PAGE','41340',jdecode('Medikamente'),jdecode(''), jdecode('%2F1651%2F41340.html'), 'true',[],'',''],
		['PAGE','41367',jdecode('Sanit%C3%A4tsartikel'),jdecode(''), jdecode('%2F1651%2F41367.html'), 'true',[],'',''],
		['PAGE','41394',jdecode('Messungen%2FAnalysen'),jdecode(''), jdecode('%2F1651%2F41394.html'), 'true',[],'',''],
		['PAGE','146801',jdecode('H%C3%B6rger%C3%A4te'),jdecode(''), jdecode('%2F1651%2F146801.html'), 'true',[],'','']
	],'',''],
	['PAGE','44706',jdecode('Gesundheitswesen'),jdecode(''), jdecode('%2F44706.html'), 'true',[],'',''],
	['PAGE','15202',jdecode('Hardhof+Nat%C3%BCrlich'),jdecode(''), jdecode('%2F15202%2Findex.html'), 'true',[ 
		['PAGE','24541',jdecode('Bach-Bl%C3%BCten'),jdecode(''), jdecode('%2F15202%2F24541.html'), 'true',[],'',''],
		['PAGE','24568',jdecode('Wann%2C+f%C3%BCr+was%3F'),jdecode(''), jdecode('%2F15202%2F24568.html'), 'true',[],'',''],
		['PAGE','24622',jdecode('F%C3%BCr+wen%3F+Tarife'),jdecode(''), jdecode('%2F15202%2F24622.html'), 'true',[],'',''],
		['PAGE','24595',jdecode('Dosierung'),jdecode(''), jdecode('%2F15202%2F24595.html'), 'true',[],'',''],
		['PAGE','45948',jdecode('Wer%3F'),jdecode(''), jdecode('%2F15202%2F45948.html'), 'true',[],'',''],
		['PAGE','22641',jdecode('Hom%C3%B6opathie'),jdecode(''), jdecode('%2F15202%2F22641.html'), 'true',[],'',''],
		['PAGE','22668',jdecode('Was%3F'),jdecode(''), jdecode('%2F15202%2F22668.html'), 'true',[],'',''],
		['PAGE','22695',jdecode('Wann%3F'),jdecode(''), jdecode('%2F15202%2F22695.html'), 'true',[],'',''],
		['PAGE','23602',jdecode('Wer%3F'),jdecode(''), jdecode('%2F15202%2F23602.html'), 'true',[],'',''],
		['PAGE','22722',jdecode('Wie%3F'),jdecode(''), jdecode('%2F15202%2F22722.html'), 'true',[],'',''],
		['PAGE','23629',jdecode('Behandlungsablauf'),jdecode(''), jdecode('%2F15202%2F23629.html'), 'true',[],'',''],
		['PAGE','23656',jdecode('Was+kostet+das%3F'),jdecode(''), jdecode('%2F15202%2F23656.html'), 'true',[],'',''],
		['PAGE','23683',jdecode('Hilfe%2FTipps'),jdecode(''), jdecode('%2F15202%2F23683.html'), 'true',[],'',''],
		['PAGE','152801',jdecode('Spagyrik'),jdecode(''), jdecode('%2F15202%2F152801.html'), 'true',[],'',''],
		['PAGE','153701',jdecode('Spagyrik%3A+Aktuell'),jdecode(''), jdecode('%2F15202%2F153701.html'), 'true',[],'','']
	],'',''],
	['PAGE','1678',jdecode('Drogerie'),jdecode(''), jdecode('%2F1678%2Findex.html'), 'true',[ 
		['PAGE','31941',jdecode('Teppichreinigung'),jdecode(''), jdecode('%2F1678%2F31941.html'), 'true',[],'',''],
		['PAGE','31968',jdecode('Textilf%C3%A4rben'),jdecode(''), jdecode('%2F1678%2F31968.html'), 'true',[],'','']
	],'',''],
	['PAGE','72697',jdecode('Reform'),jdecode(''), jdecode('%2F72697.html'), 'true',[],'',''],
	['PAGE','39306',jdecode('Kosmetik'),jdecode(''), jdecode('%2F39306%2Findex.html'), 'true',[ 
		['PAGE','12871',jdecode('Louis+Widmer'),jdecode(''), jdecode('%2F39306%2F12871.html'), 'true',[],'',''],
		['PAGE','137401',jdecode('Av%C3%A8ne'),jdecode(''), jdecode('%2F39306%2F137401.html'), 'true',[],'',''],
		['PAGE','107001',jdecode('La+Roche+Posay'),jdecode(''), jdecode('%2F39306%2F107001.html'), 'true',[],'',''],
		['PAGE','40669',jdecode('Vichy+'),jdecode(''), jdecode('%2F39306%2F40669.html'), 'true',[],'',''],
		['PAGE','129401',jdecode('Weleda'),jdecode(''), jdecode('%2F39306%2F129401.html'), 'true',[],'','']
	],'',''],
	['PAGE','26204',jdecode('Reiseberatung'),jdecode(''), jdecode('%2F26204%2Findex.html'), 'true',[ 
		['PAGE','88101',jdecode('Reiseapotheke'),jdecode(''), jdecode('%2F26204%2F88101.html'), 'true',[],'','']
	],'',''],
	['PAGE','1705',jdecode('Boutique'),jdecode(''), jdecode('%2F1705%2Findex.html'), 'true',[ 
		['PAGE','35236',jdecode('Brillen%2C+Kontaktlinsen'),jdecode(''), jdecode('%2F1705%2F35236.html'), 'true',[],'','']
	],'',''],
	['PAGE','6178',jdecode('Wichtige+Nummern'),jdecode(''), jdecode('%2F6178.html'), 'true',[],'',''],
	['PAGE','16409',jdecode('Links'),jdecode(''), jdecode('%2F16409.html'), 'true',[],'','']];
var siteelementCount=44;
theSitetree.topTemplateName='Seifenblase';
theSitetree.paletteFamily='C8E2FF';
theSitetree.keyvisualId='2351';
theSitetree.keyvisualName='apotheke4.jpg';
theSitetree.fontsetId='379';
theSitetree.graphicsetId='427';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Seifenblase',
				paletteFamily: 	'C8E2FF',
				keyvisualId: 	'2351',
				keyvisualName: 	'apotheke4.jpg',
				fontsetId: 		'379',
				graphicsetId: 	'427',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'6666CC',
				e_color: 		'3333CC',
				f_color: 		'9999CC',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '11868',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '11898',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1513',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1513',
internalId:  '',
customField: '20120201-114726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15476',
internalId:  '',
customField: '20111229-160014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6151',
internalId:  '',
customField: '20120128-153949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1597',
internalId:  '',
customField: '20100408-112722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11898',
internalId:  '',
customField: '20050928-102208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11868',
internalId:  '',
customField: '20051021-102747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1651',
internalId:  '',
customField: '20091115-155927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41340',
internalId:  '',
customField: '20110127-161713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41367',
internalId:  '',
customField: '20110127-161901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41394',
internalId:  '',
customField: '20051028-114835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44706',
internalId:  '',
customField: '20100128-171610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15202',
internalId:  '',
customField: '20120131-093638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24541',
internalId:  '',
customField: '20051229-174150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24568',
internalId:  '',
customField: '20051208-083444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24622',
internalId:  '',
customField: '20051208-083712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24595',
internalId:  '',
customField: '20110127-104731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45948',
internalId:  '',
customField: '20110127-102157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22641',
internalId:  '',
customField: '20051023-155351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22668',
internalId:  '',
customField: '20051023-152339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22695',
internalId:  '',
customField: '20051023-152432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23602',
internalId:  '',
customField: '20051029-113241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22722',
internalId:  '',
customField: '20051023-152458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23629',
internalId:  '',
customField: '20051023-152602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23656',
internalId:  '',
customField: '20051023-152636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23683',
internalId:  '',
customField: '20070214-083224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1678',
internalId:  '',
customField: '20110127-102506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107001',
internalId:  '',
customField: '20100521-162838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31941',
internalId:  '',
customField: '20100123-132055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31968',
internalId:  '',
customField: '20100123-132722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72697',
internalId:  '',
customField: '20110127-102739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39306',
internalId:  '',
customField: '20110505-154115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12871',
internalId:  '',
customField: '20110627-154136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146801',
internalId:  '',
customField: '20111110-110519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40669',
internalId:  '',
customField: '20110407-180200'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '153701',
internalId:  '-',
customField: '20120201-114941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129401',
internalId:  '',
customField: '20110627-154217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137401',
internalId:  '',
customField: '20101213-114013'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '152801',
internalId:  '-',
customField: '20120131-110345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26204',
internalId:  '',
customField: '20100123-133213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88101',
internalId:  '',
customField: '20100123-133605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1705',
internalId:  '',
customField: '20110127-152416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35236',
internalId:  '',
customField: '20100923-171941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6178',
internalId:  '',
customField: '20100128-172237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16409',
internalId:  '',
customField: '20110127-152852'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXSLY';
var companyName   = 'Hardhof+Apotheke';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};

