/* [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','77549',jdecode('Donna+BeautyCenter'),jdecode(''), jdecode('%2F77549.html'), 'true',[],'',''],
	['PAGE','4736',jdecode('Beratung'),jdecode(''), jdecode('%2F4736.html'), 'true',[],'',''],
	['PAGE','4709',jdecode('Produkte+und+Partner'),jdecode(''), jdecode('%2F4709.html'), 'true',[],'',''],
	['PAGE','77604',jdecode('Gesichtsbehandlungen'),jdecode(''), jdecode('%2F77604.html'), 'true',[],'',''],
	['PAGE','77613',jdecode('K%C3%B6rperbehandlungen'),jdecode(''), jdecode('%2F77613.html'), 'true',[],'',''],
	['PAGE','77622',jdecode('Wellness'),jdecode(''), jdecode('%2F77622.html'), 'true',[],'',''],
	['PAGE','4598',jdecode('Permanent+Make-up'),jdecode(''), jdecode('%2F4598.html'), 'true',[],'',''],
	['PAGE','77754',jdecode('Definitive+Haarentfernung'),jdecode(''), jdecode('%2F77754.html'), 'true',[],'',''],
	['PAGE','4817',jdecode('Body+Sugaring'),jdecode(''), jdecode('%2F4817.html'), 'true',[],'',''],
	['PAGE','77763',jdecode('M%C3%A4nnersache'),jdecode(''), jdecode('%2F77763.html'), 'true',[],'',''],
	['PAGE','77772',jdecode('Speziell+f%C3%BCr+Jugendliche'),jdecode(''), jdecode('%2F77772.html'), 'true',[],'',''],
	['PAGE','5403',jdecode('Behandlungspreise'),jdecode(''), jdecode('%2F5403.html'), 'true',[],'',''],
	['PAGE','79594',jdecode('Aktuell'),jdecode(''), jdecode('%2F79594.html'), 'true',[],'',''],
	['PAGE','4790',jdecode('Kontakt'),jdecode(''), jdecode('%2F4790.html'), 'true',[],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='B5D3B5';
theSitetree.keyvisualId='1977';
theSitetree.keyvisualName='lippenstift.jpg';
theSitetree.fontsetId='328';
theSitetree.graphicsetId='384';
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: 	'B5D3B5',
				keyvisualId: 	'1977',
				keyvisualName: 	'lippenstift.jpg',
				fontsetId: 		'328',
				graphicsetId: 	'384',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'B5D3B5',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '77549',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79594',
internalId:  '',
customField: '20111123-215023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77549',
internalId:  '',
customField: '20111023-174613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4736',
internalId:  '',
customField: '20071104-111701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4709',
internalId:  '',
customField: '20111008-163632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77604',
internalId:  '',
customField: '20111007-210639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77613',
internalId:  '',
customField: '20090104-123347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77622',
internalId:  '',
customField: '20090104-123539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20111006-004048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77754',
internalId:  '',
customField: '20090104-124153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4817',
internalId:  '',
customField: '20111008-163755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77763',
internalId:  '',
customField: '20111023-181645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77772',
internalId:  '',
customField: '20111007-212307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5403',
internalId:  '',
customField: '20111109-231556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4790',
internalId:  '',
customField: '20111008-163848'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXVIR';
var companyName   = 'DONNA+BeautyCenter';
var htmlTitle	  = 'Kosmetik+Olten+DONNA+BeautyCenter';
var metaKeywords  = 'kosmetik+olten%2Cbiomaris+deynic+ayurveda+haarentfernung+algenpackungen+visagistik+massage+kosmetik+beauty+beautycenter+pedicure+manicure+k%C3%B6rperbehandlungen+sauerstoffbehandlung+centro+lostorf+gesichtsbehandlung+sch%C3%B6nheit+kettner+alparom+psoriasis+ultraschallbehandlung+ultraschall+sportmassage+donna+deynique+alvarez+center+angst+uschi+schminkkurs+sch%C3%A4lbehandlung+massage+gesichtsbehandlung+k%C3%B6rperbehandlung+studio+akne+makeup+sauerstoffbehandlung+sauerstoff+wellness+schminken+fusspflege++';
var metaContents  = 'Kosmetik+Olten+Relaxen%2C+geniessen%2C+entdecken+in+den+neuen+stilvollen+R%C3%A4umlichkeiten+in+Lostorf';
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();
};

