/* [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','601',jdecode('Home'),jdecode(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','49722',jdecode('%C3%9Cber+uns'),jdecode(''), jdecode('%2F49722.html'), 'false',[],'',''],
	['PAGE','652',jdecode('Gesundheit'),jdecode(''), jdecode('%2F652.html'), 'true',[],'',''],
	['PAGE','673',jdecode('Kosmetik'),jdecode(''), jdecode('%2F673.html'), 'true',[],'',''],
	['PAGE','51301',jdecode('Bilder'),jdecode(''), jdecode('%2F51301.html'), 'true',[],'',''],
	['PAGE','52001',jdecode('Lux+Lightness+Massage'),jdecode(''), jdecode('%2F52001.html'), 'true',[],'',''],
	['PAGE','17743',jdecode('Bodysugaring'),jdecode(''), jdecode('%2F17743.html'), 'true',[],'',''],
	['PAGE','17701',jdecode('Ultratone'),jdecode(''), jdecode('%2F17701.html'), 'true',[],'',''],
	['PAGE','17722',jdecode('Gipsformen'),jdecode(''), jdecode('%2F17722.html'), 'true',[],'',''],
	['PAGE','49701',jdecode('Kurse'),jdecode(''), jdecode('%2F49701.html'), 'true',[],'',''],
	['PAGE','52501',jdecode('Shop'),jdecode(''), jdecode('%2F52501.html'), 'true',[],'',''],
	['PAGE','43201',jdecode('Links'),jdecode(''), jdecode('%2F43201.html'), 'true',[],'',''],
	['PAGE','57901',jdecode('Archiv'),jdecode(''), jdecode('%2F57901.html'), 'false',[],'',''],
	['PAGE','43801',jdecode('so+finden+Sie+uns'),jdecode(''), jdecode('%2F43801.html'), 'true',[],'',''],
	['PAGE','51001',jdecode('Apilus+Nadelepilation'),jdecode(''), jdecode('%2F51001.html'), 'false',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='FFD375';
theSitetree.keyvisualId='1964';
theSitetree.keyvisualName='blumen2.jpg';
theSitetree.fontsetId='329';
theSitetree.graphicsetId='385';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stylus',
				paletteFamily: 	'FFD375',
				keyvisualId: 	'1964',
				keyvisualName: 	'blumen2.jpg',
				fontsetId: 		'329',
				graphicsetId: 	'385',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFD375',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20111121-211009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20111228-181703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20111121-212852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17743',
internalId:  '',
customField: '20100120-185024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17701',
internalId:  '',
customField: '20090123-181246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17722',
internalId:  '',
customField: '20090316-173812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43801',
internalId:  '',
customField: '20090120-200800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43201',
internalId:  '',
customField: '20091102-150417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49701',
internalId:  '',
customField: '20111121-213655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57901',
internalId:  '',
customField: '20110111-155125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49722',
internalId:  '',
customField: '20100101-124822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51001',
internalId:  '',
customField: '20090616-214602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51301',
internalId:  '',
customField: '20111121-213159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52501',
internalId:  '',
customField: '20111115-211730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52001',
internalId:  '',
customField: '20100107-191104'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2Y59';
var companyName   = 'Praxis+f%C3%BCr+Naturheilkunde+und+Kosmetik';
var htmlTitle	  = '';
var metaKeywords  = 'Bodysugaring%3B+Bodysugaring%3B+Bodysugaring%3B+Bodysugaring%3B+Body+sugaring%3B+Body+sugaring%3B+Body+sugaring%3B+Body+sugaring%3B+Body+sugaring%3B+Body+sugaring%3B+Body+sugaring%3B+Body+sugaring%3B+Body+sugaring%3B+Body+sugaring%3B+Body+sugaring%3B+Body+sugaring%3B+Praxis%3B+Gesundheit%3B+Massage%3B+Kosmetik%3B+Kosmetik%3B+Matis%3B+Naturheilkunde%3B+B%C3%B6gli%3B++B%C3%B6gli%3B+B%C3%B6gli%3B+B%3Fgli%3B+Barbara%3B+Daniel%3B+Sisselkissen%3B+Strath%3B+Nadeleppilation%3B+Apilus%3B+Intimfrisur%3B+Wachsen%3B+Gesichtspflege%3B+Spa%3B+K%3Frperpeeling%3B+Ayurveda%3B+Hotstone%3B+Brasilwaxing%3B+Intimenthaaren%3B+K%3Frperpackungen%3B+Zucker%3B+Bodysugaring%3B+Intim%3B+Intim%3B+Intim%3B+Intim%3B+Intim%3B+Intim%3B+Ultraton%3B+K%3Frperformen%3B+Gipsabdr%3Fcke%3B+Kosmetik%3B+Kosmetik%3B+Kosmetik%3B+Kosmetik%3B+Kosmetik%3B+Bodysugaring%3B++Body+sugaring%3B+Body+sugaring%3B++Intimenthaaren%3B+Intimenthaaren%3B+Intimenthaaren%3B+Intimenthaaren%3B+Intimenthaaren%3B+Intimenthaaren%3B+Intimenthaaren%3B+Intimenthaaren%3B+Intimenthaaren%3B+Definitive+Haarentfernung%3B+Definitive+Haarentfernung%3B+Definitive+Haarentfernung%3B+Definitive+Haarentfernung%3B+Definitive+Haarentfernung%3B';
var metaContents  = 'B%C3%B6gli+Barbara+Daniel+Praxis+f%C3%BCr+Naturheilkunde+und+Kosmetik+-+Wellness+Body+Sugaring++3612+Steffisburg+Thun+Massagen%3B+Body+Sugaring%3B+Brasilwax%3B+Hotstone%3B+Kreuterstempel%3B+Intim+enthaarung%3B+Bodysugarin%3B+Haarentfernung+mit+Zuckerpaste%3B+Ganzk%C3%B6rper+Haarentfernung+Intim%3B+intimzone%3B+Gipsformen';
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();
};

