/* [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','501',jdecode('Home'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','6301',jdecode('Das+bin+Ich'),jdecode(''), jdecode('%2F6301.html'), 'true',[],'',''],
	['PAGE','7201',jdecode('Meine+Leute+'),jdecode(''), jdecode('%2F7201.html'), 'true',[],'',''],
	['PAGE','29901',jdecode('Mitbewohner'),jdecode(''), jdecode('%2F29901%2Findex.html'), 'true',[ 
		['PAGE','237101',jdecode('Lace'),jdecode(''), jdecode('%2F29901%2F237101.html'), 'true',[],'',''],
		['PAGE','237143',jdecode('Ice'),jdecode(''), jdecode('%2F29901%2F237143.html'), 'true',[],'',''],
		['PAGE','237164',jdecode('Sambuca+%2F+Ph%C3%B6nix+%2F+Electra'),jdecode(''), jdecode('%2F29901%2F237164.html'), 'true',[],'',''],
		['PAGE','446501',jdecode('Mamba'),jdecode(''), jdecode('%2F29901%2F446501.html'), 'true',[],'','']
	],'',''],
	['PAGE','6322',jdecode('Sport'),jdecode(''), jdecode('%2F6322%2Findex.html'), 'true',[ 
		['PAGE','221301',jdecode('Weiterbildung'),jdecode(''), jdecode('%2F6322%2F221301.html'), 'true',[],'',''],
		['PAGE','106901',jdecode('IPO+Pr%C3%BCfungsordnung'),jdecode(''), jdecode('%2F6322%2F106901.html'), 'true',[],'',''],
		['PAGE','89001',jdecode('Gedankenecke'),jdecode(''), jdecode('%2F6322%2F89001.html'), 'true',[],'','']
	],'',''],
	['PAGE','6822',jdecode('Links'),jdecode(''), jdecode('%2F6822.html'), 'true',[],'',''],
	['PAGE','202101',jdecode('Regenbogenbr%C3%BCcke'),jdecode(''), jdecode('%2F202101.html'), 'true',[],'',''],
	['PAGE','126422',jdecode('Internet+%26+Sportfreunde'),jdecode(''), jdecode('%2F126422.html'), 'true',[],'',''],
	['PAGE','126401',jdecode('Awards+'),jdecode(''), jdecode('%2F126401.html'), 'true',[],'',''],
	['PAGE','169701',jdecode('Geschenke'),jdecode(''), jdecode('%2F169701%2Findex.html'), 'true',[ 
		['PAGE','181106',jdecode('Gr%C3%BCsse'),jdecode(''), jdecode('%2F169701%2F181106.html'), 'true',[],'',''],
		['PAGE','181022',jdecode('Wochenstartgr%C3%BCsse'),jdecode(''), jdecode('%2F169701%2F181022.html'), 'true',[],'',''],
		['PAGE','181043',jdecode('Wochentagsgr%C3%BCsse'),jdecode(''), jdecode('%2F169701%2F181043.html'), 'true',[],'',''],
		['PAGE','181001',jdecode('Wochenendgr%C3%BCsse'),jdecode(''), jdecode('%2F169701%2F181001.html'), 'true',[],'',''],
		['PAGE','181064',jdecode('Valentinstag+'),jdecode(''), jdecode('%2F169701%2F181064.html'), 'true',[],'',''],
		['PAGE','181085',jdecode('Karneval+'),jdecode(''), jdecode('%2F169701%2F181085.html'), 'true',[],'',''],
		['PAGE','195301',jdecode('Ostern+'),jdecode(''), jdecode('%2F169701%2F195301.html'), 'true',[],'',''],
		['PAGE','217501',jdecode('Pfingsten+'),jdecode(''), jdecode('%2F169701%2F217501.html'), 'true',[],'',''],
		['PAGE','262701',jdecode('Halloween+'),jdecode(''), jdecode('%2F169701%2F262701.html'), 'true',[],'',''],
		['PAGE','262722',jdecode('Weihnacht+'),jdecode(''), jdecode('%2F169701%2F262722.html'), 'true',[],'',''],
		['PAGE','262743',jdecode('Neujahr+'),jdecode(''), jdecode('%2F169701%2F262743.html'), 'true',[],'','']
	],'',''],
	['PAGE','402801',jdecode('Zitate+%26+Gedichte'),jdecode(''), jdecode('%2F402801.html'), 'true',[],'',''],
	['PAGE','6706',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F6706%2Findex.html'), 'true',[ 
		['PAGE','6701',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F6706%2F6701.html'), 'false',[],'','']
	],'',''],
	['PAGE','201701',jdecode('Updates'),jdecode(''), jdecode('%2F201701.html'), 'true',[],'',''],
	['PAGE','81401',jdecode('Kontakt'),jdecode(''), jdecode('%2F81401.html'), 'true',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='291';
theSitetree.graphicsetId='355';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='333F65';
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: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'291',
				graphicsetId: 	'355',
				contentColor: 	'DDDDDD',
				contentBGColor: '333F65',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-6706abw0x0in2wtk']={
webappId:    '1002',
documentId:  '6706',
internalId:  '6706abw0x0in2wtk',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20090114-194207'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-7070744']={
webappId:    '1501',
documentId:  '501',
internalId:  '7070744',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20080930-175813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7201',
internalId:  '',
customField: '20080930-220945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29901',
internalId:  '',
customField: '20120108-151617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '237101',
internalId:  '',
customField: '20111001-202428'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '446501',
internalId:  '-',
customField: '20120109-115147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '237143',
internalId:  '',
customField: '20100103-120820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '237164',
internalId:  '',
customField: '20120109-114239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6322',
internalId:  '',
customField: '20120108-161149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '221301',
internalId:  '',
customField: '20080930-092153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106901',
internalId:  '',
customField: '20080930-203724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89001',
internalId:  '',
customField: '20080930-204129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6822',
internalId:  '',
customField: '20110125-133555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '202101',
internalId:  '',
customField: '20120108-154442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126422',
internalId:  '',
customField: '20090422-122033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126401',
internalId:  '',
customField: '20080930-211041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169701',
internalId:  '',
customField: '20080930-212056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181106',
internalId:  '',
customField: '20080326-185224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181022',
internalId:  '',
customField: '20080326-185553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181043',
internalId:  '',
customField: '20080326-184447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181001',
internalId:  '',
customField: '20080326-185753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181064',
internalId:  '',
customField: '20090104-151536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181085',
internalId:  '',
customField: '20080326-184322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '195301',
internalId:  '',
customField: '20090104-151648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217501',
internalId:  '',
customField: '20080612-223152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '262701',
internalId:  '',
customField: '20080326-184224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '262722',
internalId:  '',
customField: '20090104-154408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '262743',
internalId:  '',
customField: '20090104-155959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '402801',
internalId:  '',
customField: '20090114-193910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6706',
internalId:  '',
customField: '20080929-190748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6701',
internalId:  '',
customField: '20070226-131053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201701',
internalId:  '',
customField: '20120108-155634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81401',
internalId:  '',
customField: '20080930-220024'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2WTK';
var companyName   = 'Meine+Welt';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};

