/* [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','4587',jdecode('Home'),jdecode(''), jdecode('%2F4587.html'), 'true',[],'',''],
	['PAGE','121640',jdecode('PFOTENOASE'),jdecode(''), jdecode('%2F121640.html'), 'true',[],'',''],
	['PAGE','47542',jdecode('MBS+Aktuell'),jdecode(''), jdecode('%2F47542.html'), 'true',[],'',''],
	['PAGE','165140',jdecode('LYONESS'),jdecode(''), jdecode('%2F165140.html'), 'true',[],'',''],
	['PAGE','160840',jdecode('MBS+Vertrieb'),jdecode(''), jdecode('%2F160840.html'), 'true',[],'',''],
	['PAGE','157740',jdecode('MBS+ONLINE+SHOP'),jdecode(''), jdecode('%2F157740.html'), 'true',[],'',''],
	['PAGE','131940',jdecode('MBS+Agentur'),jdecode(''), jdecode('%2F131940%2Findex.html'), 'true',[ 
		['PAGE','4671',jdecode('MBS+Verlag'),jdecode(''), jdecode('%2F131940%2F4671.html'), 'true',[],'','']
	],'',''],
	['PAGE','4698',jdecode('MBS+Grafik'),jdecode(''), jdecode('%2F4698%2Findex.html'), 'true',[ 
		['PAGE','66140',jdecode('MBS+Merchandise'),jdecode(''), jdecode('%2F4698%2F66140.html'), 'true',[],'','']
	],'',''],
	['PAGE','127740',jdecode('MBS+Shooting'),jdecode(''), jdecode('%2F127740.html'), 'true',[],'',''],
	['PAGE','121787',jdecode('MBS+Money'),jdecode(''), jdecode('%2F121787.html'), 'true',[],'',''],
	['PAGE','4860',jdecode('MBS+Links'),jdecode(''), jdecode('%2F4860.html'), 'true',[],'',''],
	['PAGE','127761',jdecode('MBS+Archiv'),jdecode(''), jdecode('%2F127761%2Findex.html'), 'true',[ 
		['PAGE','18800',jdecode('MBS+Events'),jdecode(''), jdecode('%2F127761%2F18800.html'), 'true',[],'',''],
		['PAGE','78140',jdecode('Marleen+Schlagernacht'),jdecode(''), jdecode('%2F127761%2F78140.html'), 'true',[],'',''],
		['PAGE','97340',jdecode('Fotos+Schlagernacht'),jdecode(''), jdecode('%2F127761%2F97340.html'), 'true',[],'','']
	],'',''],
	['PAGE','164740',jdecode('Fanclub+Bilder'),jdecode(''), jdecode('%2F164740%2Findex.html'), 'true',[ 
		['PAGE','164761',jdecode('Party+1'),jdecode(''), jdecode('%2F164740%2F164761.html'), 'true',[],'',''],
		['PAGE','164782',jdecode('Party+2'),jdecode(''), jdecode('%2F164740%2F164782.html'), 'true',[],'',''],
		['PAGE','164803',jdecode('Party+3'),jdecode(''), jdecode('%2F164740%2F164803.html'), 'true',[],'','']
	],'',''],
	['PAGE','130440',jdecode('MBS+Kontakt'),jdecode(''), jdecode('%2F130440.html'), 'true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='003399';
theSitetree.keyvisualId='1231';
theSitetree.keyvisualName='staffelstab.jpg';
theSitetree.fontsetId='193';
theSitetree.graphicsetId='228';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Profile',
				paletteFamily: 	'003399',
				keyvisualId: 	'1231',
				keyvisualName: 	'staffelstab.jpg',
				fontsetId: 		'193',
				graphicsetId: 	'228',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'003399',
				b_color: 		'000066',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-04e84ef912d5f7e94194de80fcf03989']={
webappId:    '7060',
documentId:  '97340',
internalId:  '04e84ef912d5f7e94194de80fcf03989',
customField: 'language:de;country:CH;'
};
webappMappings['1501']=webappMappings['1501-2745154']={
webappId:    '1501',
documentId:  '4587',
internalId:  '2745154',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164782',
internalId:  '',
customField: '20110612-080545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164803',
internalId:  '',
customField: '20110612-080545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4587',
internalId:  '',
customField: '20100804-180033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121640',
internalId:  '',
customField: '20100804-112821'
};
webappMappings['4001']=webappMappings['4001-22874470']={
webappId:    '4001',
documentId:  '157740',
internalId:  '22874470',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157740',
internalId:  '',
customField: '20100131-074733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164761',
internalId:  '',
customField: '20110612-080545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164740',
internalId:  '',
customField: '20110612-080545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47542',
internalId:  '',
customField: '20090624-141033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165140',
internalId:  '',
customField: '20111003-123357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131940',
internalId:  '',
customField: '20090728-105501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4671',
internalId:  '',
customField: '20090707-140539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4698',
internalId:  '',
customField: '20090707-140653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66140',
internalId:  '',
customField: '20070507-161737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160840',
internalId:  '',
customField: '20101208-211602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127740',
internalId:  '',
customField: '20090624-140442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121787',
internalId:  '',
customField: '20090707-140927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4860',
internalId:  '',
customField: '20101208-210551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127761',
internalId:  '',
customField: '20090707-141222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18800',
internalId:  '',
customField: '20080628-082745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78140',
internalId:  '',
customField: '20080828-100705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97340',
internalId:  '',
customField: '20080826-182626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130440',
internalId:  '',
customField: '20090707-141249'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'Ahp010INE09L';
var companyName   = 'MBS+Music+Box+Studio';
var htmlTitle	  = 'mp3';
var metaKeywords  = 'MusicBoxStudioHenauMarleenMusicboxstudioMusic+Box+Music+Box+StudioEventManagementShowSchlager';
var metaContents  = 'MusicBoxStudioHenauMarleenMusicboxstudioMusic+Box+Music+Box+StudioEventManagementShowSchlager';
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();
};

