/* [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','5001',jdecode('Peeptoe'),jdecode(''), jdecode('%2F5001.html'), 'true',[],'',''],
	['PAGE','5052',jdecode('Angebot+%26+Preise'),jdecode(''), jdecode('%2F5052%2Findex.html'), 'true',[ 
		['PAGE','7801',jdecode('Manik%C3%BCre'),jdecode(''), jdecode('%2F5052%2F7801.html'), 'true',[],'',''],
		['PAGE','7822',jdecode('Pedik%C3%BCre'),jdecode(''), jdecode('%2F5052%2F7822.html'), 'true',[],'',''],
		['PAGE','7843',jdecode('Haarentfernung+%2F+Depilation'),jdecode(''), jdecode('%2F5052%2F7843.html'), 'true',[],'',''],
		['PAGE','41301',jdecode('Massagen+%2F+Rituale'),jdecode(''), jdecode('%2F5052%2F41301.html'), 'true',[],'',''],
		['PAGE','40301',jdecode('Ayurvedische+Massagen'),jdecode(''), jdecode('%2F5052%2F40301.html'), 'true',[],'',''],
		['PAGE','7864',jdecode('Gesichtsbehandlungen'),jdecode(''), jdecode('%2F5052%2F7864.html'), 'true',[],'','']
	],'',''],
	['PAGE','28501',jdecode('Produkte'),jdecode(''), jdecode('%2F28501.html'), 'true',[],'',''],
	['PAGE','11401',jdecode('%C3%96ffnungszeiten'),jdecode(''), jdecode('%2F11401.html'), 'true',[],'',''],
	['PAGE','7885',jdecode('Kontakt'),jdecode(''), jdecode('%2F7885.html'), 'true',[],'',''],
	['PAGE','31401',jdecode('Anl%C3%A4sse'),jdecode(''), jdecode('%2F31401.html'), 'true',[],'',''],
	['PAGE','32901',jdecode('Gutscheine'),jdecode(''), jdecode('%2F32901.html'), 'true',[],'',''],
	['PAGE','9301',jdecode('Lageplan'),jdecode(''), jdecode('%2F9301%2Findex.html'), 'true',[ 
		['PAGE','11501',jdecode('Firmendomizil'),jdecode(''), jdecode('%2F9301%2F11501.html'), 'true',[],'','']
	],'',''],
	['PAGE','30601',jdecode('Presse'),jdecode(''), jdecode('%2F30601.html'), 'true',[],'',''],
	['PAGE','16001',jdecode('%C3%BCber+uns'),jdecode(''), jdecode('%2F16001.html'), 'true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='947333';
theSitetree.keyvisualId='7245';
theSitetree.keyvisualName='kv_7245.jpg';
theSitetree.fontsetId='16409';
theSitetree.graphicsetId='12136';
theSitetree.contentColor='694F1C';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21Y'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Capri',
				paletteFamily: 	'947333',
				keyvisualId: 	'7245',
				keyvisualName: 	'kv_7245.jpg',
				fontsetId: 		'16409',
				graphicsetId: 	'12136',
				contentColor: 	'694F1C',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20120103-111914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5052',
internalId:  '',
customField: '20120103-111951'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20120103-113203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7801',
internalId:  '',
customField: '20120103-112035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7822',
internalId:  '',
customField: '20120103-112052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7843',
internalId:  '',
customField: '20120103-112137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7864',
internalId:  '',
customField: '20120103-112448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7885',
internalId:  '',
customField: '20120103-112648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20120103-112626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20091216-172706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20120103-112823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28501',
internalId:  '',
customField: '20120103-112553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30601',
internalId:  '',
customField: '20120103-113054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31401',
internalId:  '',
customField: '20120103-112728'
};
webappMappings['7008']=webappMappings['7008-2999']={
webappId:    '7008',
documentId:  '32901',
internalId:  '2999',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32901',
internalId:  '',
customField: '20120103-112909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40301',
internalId:  '',
customField: '20120103-112335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41301',
internalId:  '',
customField: '20120103-112255'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHP340INVAXU';
var companyName   = '';
var htmlTitle	  = 'Pedik%C3%BCre+Manik%C3%BCre+Gesichtsbehandlung+Massage+bei+Peeptoe+in+Z%C3%BCrich';
var metaKeywords  = 'Manik%C3%BCre%2C+Pedik%C3%BCre%2C+Gesichtsbehandlung%2C+Massage%2C+Peeptoe%2C+Z%C3%BCrich%2C+Geschenk%2C+Gutschein%2C+Haarentfernung%2C+Depilation%2C+Dr.+Spiller%2C+Selnaustrasse%2C+Fusspflege+Geschenkidee%2C+Sparitual%2C+Spa%2C+Pedicure%2C+Manicure%2C+Manik%C3%BCre%2C+Pedik%C3%BCre%2C+Gesichtsbehandlung%2C+Massage%2C+Peeptoe%2C+Z%C3%BCrich%2C+Geschenk%2C+Gutschein%2C+Haarentfernung%2C+Depilation%2C+Dr.+Spiller%2C+Selnaustrasse%2C+Fusspflege+Geschenkidee%2C+Sparitual%2C+Spa%2C+Pedicure%2C+Manicure%2C+Manik%C3%BCre%2C+Pedik%C3%BCre%2C+Gesichtsbehandlung%2C+Massage%2C+Peeptoe%2C+Z%C3%BCrich%2C+Geschenk%2C+Gutschein%2C+Haarentfernung%2C+Depilation%2C+Dr.+Spiller%2C+Selnaustrasse%2C+Fusspflege+Geschenkidee%2C+Sparitual%2C+Spa%2C+Pedicure%2C+Manicure%2C+ohne+Voranmeldung';
var metaContents  = 'Manik%C3%BCre%2C+Pedik%C3%BCre%2C+Gesichtsbehandlung%2C+Massage%2C+Peeptoe%2C+Z%C3%BCrich%2C+Geschenk%2C+Gutschein%2C+Haarentfernung%2C+Depilation%2C+Dr.+Spiller%2C+Selnaustrasse%2C+Fusspflege+Geschenkidee%2C+Sparitual%2C+Spa%2C+Pedicure%2C+Manicure%2C+Manik%C3%BCre%2C+Pedik%C3%BCre%2C+Gesichtsbehandlung%2C+Massage%2C+Peeptoe%2C+Z%C3%BCrich%2C+Geschenk%2C+Gutschein%2C+Haarentfernung%2C+Depilation%2C+Dr.+Spiller%2C+Selnaustrasse%2C+Fusspflege+Geschenkidee%2CSparitual%2C+Spa%2C+Pedicure%2C+Manicure%2C+Manik%C3%BCre%2C+Pedik%C3%BCre%2C+Gesichtsbehandlung%2C+Massage%2C+Peeptoe%2C+Z%C3%BCrich%2C+Geschenk%2C+Gutschein%2C+Haarentfernung%2C+Depilation%2C+Dr.+Spiller%2C+Selnaustrasse%2C+Fusspflege+Geschenkidee%2C+Sparitual%2C+Spa%2C+Pedicure%2C+Manicure%2C+ohne+Voranmeldung%2C+';
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();
};

