/* [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','4558',jdecode('Willkommen+%21'),jdecode(''),'/4558/index.html','true',[ 
		['PAGE','4615',jdecode('%C3%BCber+Studio+Trix'),jdecode(''),'/4558/4615.html','true',[],'',''],
		['PAGE','4642',jdecode('Der+Betrieb'),jdecode(''),'/4558/4642.html','true',[],'',''],
		['PAGE','4696',jdecode('%C3%BCber+mich'),jdecode(''),'/4558/4696.html','true',[],'','']
	],'',''],
	['PAGE','4723',jdecode('+Haarverl%C3%A4ngerung'),jdecode(''),'/4723/index.html','true',[ 
		['PAGE','4750',jdecode('Hairextension'),jdecode(''),'/4723/4750.html','true',[],'','']
	],'',''],
	['PAGE','164853',jdecode('Great+Lengths'),jdecode(''),'/164853.html','true',[],'',''],
	['PAGE','164862',jdecode('XXL-Lashes'),jdecode(''),'/164862.html','true',[],'',''],
	['PAGE','92175',jdecode('Dies+und+Das'),jdecode(''),'/92175/index.html','true',[ 
		['PAGE','92283',jdecode('Tipps+%26+Tricks'),jdecode(''),'/92175/92283.html','true',[],'',''],
		['PAGE','110707',jdecode('Wellness'),jdecode(''),'/92175/110707.html','true',[],'','']
	],'',''],
	['PAGE','110263',jdecode('M%C3%A4nnersache'),jdecode(''),'/110263/index.html','true',[ 
		['PAGE','92256',jdecode('zur+Sache'),jdecode(''),'/110263/92256.html','true',[],'','']
	],'',''],
	['PAGE','4831',jdecode('Angebote%2CPreise'),jdecode(''),'/4831/index.html','true',[ 
		['PAGE','4777',jdecode('Coiffeur'),jdecode(''),'/4831/4777.html','true',[],'','']
	],'',''],
	['PAGE','4885',jdecode('Termine'),jdecode(''),'/4885.html','true',[],'',''],
	['PAGE','4912',jdecode('Kontakt'),jdecode(''),'/4912/index.html','true',[ 
		['PAGE','4939',jdecode('Adresse%2C+Telefon'),jdecode(''),'/4912/4939.html','true',[],'',''],
		['PAGE','4966',jdecode('So+finden+Sie+uns'),jdecode(''),'/4912/4966.html','true',[],'',''],
		['PAGE','5702',jdecode('Ihr+Weg+zu+uns'),jdecode(''),'/4912/5702.html','true',[],'',''],
		['PAGE','5802',jdecode('Anfahrt'),jdecode(''),'/4912/5802.html','true',[],'','']
	],'',''],
	['PAGE','11023',jdecode('Ihre+Meinung'),jdecode(''),'/11023/index.html','true',[ 
		['PAGE','164871',jdecode('G%C3%A4stebuch'),jdecode(''),'/11023/164871.html','true',[],'','']
	],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Cable';
theSitetree.paletteFamily='D30303';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10575';
theSitetree.graphicsetId='10527';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cable',
				paletteFamily: 	'D30303',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10575',
				graphicsetId: 	'10527',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '5702',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '5802',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4558',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4558',
internalId:  '',
customField: '20100508-233652'
};
webappMappings['7008']=webappMappings['7008-1710']={
webappId:    '7008',
documentId:  '4912',
internalId:  '1710',
customField: 'language:de;country:CH;'
};
webappMappings['1501']=webappMappings['1501-2291264']={
webappId:    '1501',
documentId:  '4558',
internalId:  '2291264',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4615',
internalId:  '',
customField: '20100509-124003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4642',
internalId:  '',
customField: '20071010-153937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4696',
internalId:  '',
customField: '20081204-141459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4723',
internalId:  '',
customField: '20100508-195153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4750',
internalId:  '',
customField: '20071010-190557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4777',
internalId:  '',
customField: '20071010-154146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164853',
internalId:  '',
customField: '20100508-231823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92175',
internalId:  '',
customField: '20071014-131433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92283',
internalId:  '',
customField: '20080524-212515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110707',
internalId:  '',
customField: '20071010-154343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110263',
internalId:  '',
customField: '20080608-133833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92256',
internalId:  '',
customField: '20080820-140247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4885',
internalId:  '',
customField: '20090216-155813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4831',
internalId:  '',
customField: '20100509-130032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4912',
internalId:  '',
customField: '20090216-180215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4939',
internalId:  '',
customField: '20080106-140407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4966',
internalId:  '',
customField: '20041201-084009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5702',
internalId:  '',
customField: '20041016-233653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5802',
internalId:  '',
customField: '20041204-175527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11023',
internalId:  '',
customField: '20080114-195533'
};
webappMappings['1002']=webappMappings['1002-164871abw0x0inxvzp']={
webappId:    '1002',
documentId:  '164871',
internalId:  '164871abw0x0inxvzp',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164862',
internalId:  '',
customField: '20100516-010123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164871',
internalId:  '',
customField: '20100508-195152'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXVZP';
var companyName   = 'HAIR+-++STUDIO+-++TRIX';
var htmlTitle	  = '';
var metaKeywords  = 'Coiffeur%2C+Studio+%2CTrix%2C+Frisur%2C+Farbe%2C+Haarverl%C3%A4ngerung%2C+Trend%2C+Haarschnitt%2C+preiswert%2C+Messer%2C+Haarverdichtung%2C+Damen+und+Herren+Salon%2C+Great+Lengths%2CTop+Extension%2CTomorow+Loks%2C+Echthaar%2C+Hendschiken%2C+Lenzburg%2C+Haarextension%2C+Styling%2CHaar%2CPflege%2CAstro%2CMond+%2C+%2CJungs%2C%2CMesh%2CFarbcreation%2C+Modet%C3%B6ne%2C+Lenzburg%2C+Glanz%2CWimperverl%C3%A4ngerung%2CM%C3%A4nner%2CWildkatzen%2CPrinzessinnen%2C+Blond%2CHochsteckfrisur%2CMondkalender%2CTips+und+Tricks%2CPaul+Mitchel%2CShop%2CHaarprodukte%2CHaarpflege%2CMystisch%2CXXL+Lashes%2CEye+Lashes%2CWimpern';
var metaContents  = 'Hair%2CHairextension%2CGreat+Lengths+top+Extension.Bilder+und+Beschreibung++Coiffeur+Salon+in+Hendschiken%2CFrisur%2CTrend+%2C+Paul+Mitchell%2C+XXL-Lashes%2CWimperverl%C3%A4ngerung%2CHaarverl%C3%A4ngerung%2CHaarverdichtung%2CHaarschnitt.';
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();
};
