/* [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','4599',jdecode('HOME'),jdecode(''), jdecode('%2F4599.html'), 'true',[],'',''],
	['PAGE','89197',jdecode('BEAUTY'),jdecode(''), jdecode('%2F89197.html'), 'true',[],'',''],
	['PAGE','4930',jdecode('MASSAGE'),jdecode(''), jdecode('%2F4930.html'), 'true',[],'',''],
	['PAGE','57942',jdecode('KONTAKT'),jdecode(''), jdecode('%2F57942.html'), 'true',[],'',''],
	['PAGE','4984',jdecode('NEWS+%26+LINKS'),jdecode(''), jdecode('%2F4984.html'), 'true',[],'',''],
	['PAGE','115701',jdecode('KUNSTHANDWERK'),jdecode(''), jdecode('%2F115701.html'), 'true',[],'',''],
	['PAGE','80443',jdecode('Fotoinspirationen'),jdecode(''), jdecode('%2F80443.html'), 'true',[],'','']];
var siteelementCount=7;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='FF9F21';
theSitetree.keyvisualId='2246';
theSitetree.keyvisualName='reisebueros1.jpg';
theSitetree.fontsetId='364';
theSitetree.graphicsetId='418';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='FF9F21';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2QE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'FF9F21',
				keyvisualId: 	'2246',
				keyvisualName: 	'reisebueros1.jpg',
				fontsetId: 		'364',
				graphicsetId: 	'418',
				contentColor: 	'FFFFFF',
				contentBGColor: 'FF9F21',
				a_color: 		'FF9F21',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4599',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89197',
internalId:  '',
customField: '20111023-213420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4599',
internalId:  '',
customField: '20111023-213454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4930',
internalId:  '',
customField: '20111023-213526'
};
webappMappings['7008']=webappMappings['7008-4486']={
webappId:    '7008',
documentId:  '57942',
internalId:  '4486',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57942',
internalId:  '',
customField: '20111023-214923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4984',
internalId:  '',
customField: '20111023-213741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115701',
internalId:  '',
customField: '20111023-215032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80443',
internalId:  '',
customField: '20111023-215125'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXEXJ';
var companyName   = 'BEAUTY+.+WELLNESS+.+THERAPIE';
var htmlTitle	  = 'KOSMETIK+%26+Med.MASSAGEN+-+079-753+75+77';
var metaKeywords  = 'Ayurveda%3BR%3Fschlikon%3BGesundheits%3BMassage%3BAroma%3BFussreflexzonen%3BLymphdrainage%3BR%3Fckenschmerzen%3AR%3Fckenprobleme%3BTherapie%3BAromatherapie%3B%3Ftherische+Essenzen%3B%3Ftherische+%3Fle%3BGesundheitsvorsorge%3BGesundheit%3BGesundheitspraxis%3BNaturheilkunde%3BSchwangerschaft%3BFarfalla-Produkte%3BWohlf%3Fhlen%3BEnergie%3Benergetisch%3BSport%3BWellness%3BWohlbefinden%3BRessourcen%3B8038+Z%3Frich%3BWollishofen%3B8803+R%3Fschlikon%3B8802+Kilchberg%3BThalwil%3Blinkes+Seeufer%3BZimmerberg%3BDuftladen%3BPraxis%3BAlavida%3BKatharina+Boos%3BManualtherapie%3Bmanuelle+Therapie%3BTherapeutin%3BBerufsmasseurin%3BHotel+Alexander+am+See%3BZ%3Frich%3BAntistress%3BErholung%3BKosmetik%3B+Gesichtsbehandlung%3B+Fusspflege%3B+Pedicure%3B+Manicure%3B+Gesichtspflege%3BMake-Up%3B+Makeup%3B+Hochzeitsmake-Up%3B+Hochzeitsmakeup%3B+Schminken%3B+Beauty%3BBIOMARIS%3B+Stimulaxer%3B+Biomaris%3B+P%3Fdicure%3B+Fusspflege%3B+Kosmetik%3B+Meerestiefwasser%3B+Kopfmassage+Ger%3Ft%2C+Nail%2C+Nagelkosmetik%2C+Nagelmodelage%2C+Gelnail%2C+Geln%3Fgel%2C+Nailart%2C+Frenchnail%2C+American+Nail%2C+Schmuck%2C+Silber%2C+Silberschmuck%2C+Fingerring%2C+Silberring%2C+Ohrring%2C+Halskette%2C+Colier%2C+Kunsthandwerk%2C+Teelicht%2C+Teelichter%2C+Glashandwerk';
var metaContents  = 'Kosmetik%3B+Gesichtsbehandlung%3B+Fusspflege%3B+Pedicure%3B+Manicure%3B+Gesichtspflege%3B+Make-Up%3B+Makeup%3B+Hochzeitsmake-Up%3B+Hochzeitsmakeup%3B+Schminken%3B+Ayurveda+R%3Fschlikon%3BGesundheits%3BMassage%3BAroma+Massage%3BFussreflexzonen%3BLymphdrainage%3BR%3Fckenschmerzen%3BR%3Fckenprobleme%3BTherapie%3BAromatherapie%3B%3Ftherische+Essenzen%3B%3Ftherische+%3Fle%3BGesundheitsvorsorge%3BGesundheit%3BGesundheitspraxis%3BNaturheilkunde%3BSchwangerschaft%3BFarfalla-Produkte%3BWohlf%3Fhlen%3BEnergie%3Benergetisch%3BSport%3BWellness%3BWohlbefinden%3BRessourcen%3B8038+Z%3Frich%3BWollishofen%3B8803+R%3Fschlikon%3B8802+Kilchberg%3BThalwil%3Blinkes+Seeufer%3BZimmerberg%3BDuftladen%3BPraxis%3BAlavida%3BKatharina+Boos%3BManualtherapie%3Bmanuelle+Therapie%3BTherapeutin%3BBerufsmasseurin%3BHotel+Alexander+am+See%3BZ%3Frich%3BAntistress%3BErholung%3BBeauty%3B+BIOMARIS%3B+Stimulaxer%3B+Biomaris%3B+P%3Fdicure%3B+Fusspflege%3B+Kosmetik%3B+Meerestiefwasser%3B+Kopfmassage+Ger%3Ft%2C+Nail%2C+Nagelkosmetik%2C+Nagelmodelage%2C+Gelnail%2C+Geln%3Fgel%2C+Nailart%2C+Frenchnail%2C+American+Nail%2C+Schmuck%2C+Silber%2C+Silberschmuck%2C+Fingerring%2C+Silberring%2C+Ohrring%2C+Halskette%2C+Colier%2C+Kunsthandwerk%2C+Teelicht%2C+Teelichter%2C+Glashandwerk';
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();
};

