/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','473',jdecode('Wir+%C3%BCber+uns'),jdecode(''), jdecode('%2F473.html'), 'true',[],'',''],
	['PAGE','22501',jdecode('Team'),jdecode(''), jdecode('%2F22501.html'), 'true',[],'',''],
	['PAGE','557',jdecode('Produkt%2C+DL%2C+Preise'),jdecode(''), jdecode('%2F557%2Findex.html'), 'true',[ 
		['PAGE','578',jdecode('Preise+unserer+Dienstleistungen'),jdecode(''), jdecode('%2F557%2F578.html'), 'true',[],'','']
	],'',''],
	['PAGE','78101',jdecode('Prozentbuch'),jdecode(''), jdecode('%2F78101.html'), 'true',[],'',''],
	['PAGE','100823',jdecode('Presse'),jdecode(''), jdecode('%2F100823%2Findex.html'), 'true',[ 
		['PAGE','100844',jdecode('Bericht+Beat+Schori'),jdecode(''), jdecode('%2F100823%2F100844.html'), 'true',[],'',''],
		['PAGE','100865',jdecode('Swisscom+KMU+Magazin'),jdecode(''), jdecode('%2F100823%2F100865.html'), 'true',[],'',''],
		['PAGE','108923',jdecode('Bericht+Zaira+'),jdecode(''), jdecode('%2F100823%2F108923.html'), 'true',[],'','']
	],'',''],
	['PAGE','662',jdecode('Events+am+Theaterplatz'),jdecode(''), jdecode('%2F662.html'), 'true',[],'',''],
	['PAGE','101523',jdecode('misshandicap2009'),jdecode(''), jdecode('%2F101523.html'), 'true',[],'',''],
	['PAGE','106723',jdecode('Miss+Model+Hair+2010+'),jdecode(''), jdecode('%2F106723.html'), 'true',[],'',''],
	['PAGE','114323',jdecode('Miss+Model+Hair+2011'),jdecode(''), jdecode('%2F114323.html'), 'true',[],'',''],
	['PAGE','98723',jdecode('Fotos+'),jdecode(''), jdecode('%2F98723%2Findex.html'), 'true',[ 
		['PAGE','98744',jdecode('Vorher%2FNachher+2007'),jdecode(''), jdecode('%2F98723%2F98744.html'), 'true',[],'','']
	],'',''],
	['PAGE','26801',jdecode('M+H+und+D%C3%A4llebach'),jdecode(''), jdecode('%2F26801.html'), 'true',[],'',''],
	['PAGE','123723',jdecode('Aktuelles+bei+Model+Hair'),jdecode(''), jdecode('%2F123723.html'), 'true',[],'',''],
	['PAGE','75601',jdecode('Aktuelles+bei+Tscharner+'),jdecode(''), jdecode('%2F75601.html'), 'true',[],'',''],
	['PAGE','28401',jdecode('Knigge+goes+Color'),jdecode(''), jdecode('%2F28401.html'), 'true',[],'',''],
	['PAGE','767',jdecode('Terminanfrage%2FKontakt'),jdecode(''), jdecode('%2F767.html'), 'true',[],'',''],
	['PAGE','5301',jdecode('Ihr+Weg+zu+uns'),jdecode(''), jdecode('%2F5301.html'), 'true',[],'',''],
	['PAGE','20301',jdecode('Lage'),jdecode(''), jdecode('%2F20301.html'), 'true',[],'',''],
	['PAGE','20206',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F20206%2Findex.html'), 'true',[ 
		['PAGE','20201',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F20206%2F20201.html'), 'false',[],'','']
	],'',''],
	['PAGE','28422',jdecode('Links'),jdecode(''), jdecode('%2F28422.html'), 'true',[],'',''],
	['PAGE','107923',jdecode('Kultur+%28Theater+Matte%29'),jdecode(''), jdecode('%2F107923.html'), 'true',[],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='Natural';
theSitetree.paletteFamily='666699';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='155';
theSitetree.graphicsetId='168';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FCFCF4';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Natural',
				paletteFamily: 	'666699',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'155',
				graphicsetId: 	'168',
				contentColor: 	'000000',
				contentBGColor: 'FCFCF4',
				a_color: 		'666699',
				b_color: 		'91A5C1',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '5301',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['7008']=webappMappings['7008-746']={
webappId:    '7008',
documentId:  '767',
internalId:  '746',
customField: 'language:de;country:CH;'
};
webappMappings['1002']=webappMappings['1002-20206abw1x0in2f1r']={
webappId:    '1002',
documentId:  '20206',
internalId:  '20206abw1x0in2f1r',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '20301',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1501']=webappMappings['1501-16539152']={
webappId:    '1501',
documentId:  '401',
internalId:  '16539152',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-747']={
webappId:    '7008',
documentId:  '662',
internalId:  '747',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-748']={
webappId:    '7008',
documentId:  '28401',
internalId:  '748',
customField: 'language:de;country:CH;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20120212-150452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100321-151542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22501',
internalId:  '',
customField: '20120205-144824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20120205-144237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20120205-144524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78101',
internalId:  '',
customField: '20120205-145743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106723',
internalId:  '',
customField: '20110717-175339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100823',
internalId:  '',
customField: '20100321-151916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20120220-184559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26801',
internalId:  '',
customField: '20120205-150916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75601',
internalId:  '',
customField: '20090215-165522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28401',
internalId:  '',
customField: '20100321-152417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '767',
internalId:  '',
customField: '20100321-152436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20070909-173437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20301',
internalId:  '',
customField: '20100321-152503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20206',
internalId:  '',
customField: '20100321-152528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20201',
internalId:  '',
customField: '20070901-191636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28422',
internalId:  '',
customField: '20101128-173229'
};
webappMappings['7060']=webappMappings['7060-57e1b564abc281a398661725d234ad18']={
webappId:    '7060',
documentId:  '98744',
internalId:  '57e1b564abc281a398661725d234ad18',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98744',
internalId:  '',
customField: '20100321-152308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98723',
internalId:  '',
customField: '20100321-152242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100844',
internalId:  '',
customField: '20100522-163629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100865',
internalId:  '',
customField: '20100321-152025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101523',
internalId:  '',
customField: '20100321-152209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107923',
internalId:  '',
customField: '20110717-180811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108923',
internalId:  '',
customField: '20100522-163756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114323',
internalId:  '',
customField: '20110717-175704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123723',
internalId:  '',
customField: '20120205-153556'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW1X0IN2F1R';
var companyName   = 'Coiffeur+Model+Hair';
var htmlTitle	  = 'Coiffeur+Model+Hair';
var metaKeywords  = 'Hoebenstreit%2C+Model+Hair%2C+Schwarzkopf%2C+Priska+Trachsel%2C+Andr%C3%A9+Streit%2C+Patricia+Sch%C3%A4r%2C+Patricia+Schaer%2C+Silvia+Dini%2C+Jana+Uehlinger%2C+Cornelia+Hoebenstreit%2C+Emilie+Kobel%2C+Timo+Dahinden%2C+Seah%2C+Bonacure%2C+Osis%2C+Coiffeur%2C+Model+Hair%2C+Bern%2C+Visacard%2C+Mastercard%2C+Maestrocard%2C+Postcard%2C+Irene+B%C3%BChler%2C+Theaterplatz%2C+Casino%2C+Coiffeur+Bern%2C+Coiffure+Bern%2C+Haute+Coiffure%2C+Hochzeitsfrisuren%2C+Wellness%2C+Stefanie+Studer%2C+misshandicap%2C+Zaira+Civitillo%2C++Manuela+Leemann%2C+Tamara+Liechti%2C+Pietro+Mennonna%2C+Beauty+Day%2C+Event%2C+Vorher-+Nachher%2C+Erlebnis+Beruf';
var metaContents  = 'Coiffeurdienstleistungen%2C+Beatuy%2C+misshandicap%2C+Miss+Model+Hair%2C+Wabern%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();
};

