/* [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','4482',jdecode('HOME'),jdecode(''), jdecode('%2F4482.html'), 'true',[],'',''],
	['PAGE','56551',jdecode('Angebote'),jdecode(''), jdecode('%2F56551%2Findex.html'), 'true',[ 
		['PAGE','270901',jdecode('Kontaktformular'),jdecode(''), jdecode('%2F56551%2F270901.html'), 'true',[],'','']
	],'',''],
	['PAGE','332801',jdecode('M+U+S+I+K++aktuell+2012'),jdecode(''), jdecode('%2F332801.html'), 'true',[],'',''],
	['PAGE','333401',jdecode('Barbett'),jdecode(''), jdecode('%2F333401.html'), 'true',[],'',''],
	['PAGE','334201',jdecode('pommelHORSE'),jdecode(''), jdecode('%2F334201.html'), 'true',[],'',''],
	['PAGE','305001',jdecode('M+U+S+I+K++2011'),jdecode(''), jdecode('%2F305001%2Findex.html'), 'true',[ 
		['PAGE','324601',jdecode('Eliane+Amherd'),jdecode(''), jdecode('%2F305001%2F324601.html'), 'true',[],'',''],
		['PAGE','329501',jdecode('ashes+to+beauty'),jdecode(''), jdecode('%2F305001%2F329501.html'), 'true',[],'',''],
		['PAGE','312201',jdecode('Bateau+Ivre'),jdecode(''), jdecode('%2F305001%2F312201.html'), 'true',[],'',''],
		['PAGE','328301',jdecode('BluePearl'),jdecode(''), jdecode('%2F305001%2F328301.html'), 'true',[],'',''],
		['PAGE','321501',jdecode('Enzo+Canelli'),jdecode(''), jdecode('%2F305001%2F321501.html'), 'true',[],'',''],
		['PAGE','301201',jdecode('Charlotte+Parfois+'),jdecode(''), jdecode('%2F305001%2F301201.html'), 'true',[],'',''],
		['PAGE','323301',jdecode('Daliah'),jdecode(''), jdecode('%2F305001%2F323301.html'), 'true',[],'',''],
		['PAGE','311201',jdecode('EEVal'),jdecode(''), jdecode('%2F305001%2F311201.html'), 'true',[],'',''],
		['PAGE','302401',jdecode('Fabio+Pinto'),jdecode(''), jdecode('%2F305001%2F302401.html'), 'true',[],'',''],
		['PAGE','320901',jdecode('George+Hug'),jdecode(''), jdecode('%2F305001%2F320901.html'), 'true',[],'',''],
		['PAGE','283501',jdecode('Jacobee'),jdecode(''), jdecode('%2F305001%2F283501.html'), 'true',[],'',''],
		['PAGE','305022',jdecode('J%C3%A9rome+Mevis'),jdecode(''), jdecode('%2F305001%2F305022.html'), 'true',[],'',''],
		['PAGE','307401',jdecode('Leef'),jdecode(''), jdecode('%2F305001%2F307401.html'), 'true',[],'',''],
		['PAGE','313201',jdecode('mellowtone'),jdecode(''), jdecode('%2F305001%2F313201.html'), 'true',[],'',''],
		['PAGE','317301',jdecode('Markus+Gisin+Blues+Band'),jdecode(''), jdecode('%2F305001%2F317301.html'), 'true',[],'',''],
		['PAGE','309101',jdecode('minimal+brother'),jdecode(''), jdecode('%2F305001%2F309101.html'), 'true',[],'',''],
		['PAGE','326001',jdecode('Ossi+Robertson+%26+Friends'),jdecode(''), jdecode('%2F305001%2F326001.html'), 'true',[],'',''],
		['PAGE','331701',jdecode('Rockets'),jdecode(''), jdecode('%2F305001%2F331701.html'), 'true',[],'',''],
		['PAGE','305043',jdecode('SAMU+Project'),jdecode(''), jdecode('%2F305001%2F305043.html'), 'true',[],'',''],
		['PAGE','330801',jdecode('Trottoir'),jdecode(''), jdecode('%2F305001%2F330801.html'), 'true',[],'',''],
		['PAGE','318601',jdecode('Michael+Wespi'),jdecode(''), jdecode('%2F305001%2F318601.html'), 'true',[],'','']
	],'',''],
	['PAGE','290401',jdecode('B+%C3%9C+C+H+E+R+'),jdecode(''), jdecode('%2F290401%2Findex.html'), 'true',[ 
		['PAGE','290501',jdecode('Thomas+Br%C3%A4ndle'),jdecode(''), jdecode('%2F290401%2F290501.html'), 'true',[],'',''],
		['PAGE','294801',jdecode('Alex+Gfeller'),jdecode(''), jdecode('%2F290401%2F294801.html'), 'true',[],'','']
	],'',''],
	['PAGE','35160',jdecode('Vergangenes'),jdecode(''), jdecode('%2F35160.html'), 'true',[],'',''],
	['PAGE','56818',jdecode('Partner'),jdecode(''), jdecode('%2F56818.html'), 'true',[],'',''],
	['PAGE','57384',jdecode('UEBER+UNS'),jdecode(''), jdecode('%2F57384%2Findex.html'), 'true',[ 
		['PAGE','258843',jdecode('Kontakt%2C+Lageplan'),jdecode(''), jdecode('%2F57384%2F258843.html'), 'true',[],'',''],
		['PAGE','270501',jdecode('Routenplaner'),jdecode(''), jdecode('%2F57384%2F270501.html'), 'true',[],'','']
	],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='1018';
theSitetree.keyvisualName='studio.jpg';
theSitetree.fontsetId='168';
theSitetree.graphicsetId='197';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
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: 			'NewYork',
				paletteFamily: 	'660000',
				keyvisualId: 	'1018',
				keyvisualName: 	'studio.jpg',
				fontsetId: 		'168',
				graphicsetId: 	'197',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'660000',
				c_color: 		'000000',
				d_color: 		'990000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4482',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4482',
internalId:  '',
customField: '20110304-131106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56551',
internalId:  '',
customField: '20120102-112433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '258843',
internalId:  '',
customField: '20100306-004212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35160',
internalId:  '',
customField: '20120102-105424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56818',
internalId:  '',
customField: '20110518-113433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57384',
internalId:  '',
customField: '20120102-111128'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '270501',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '270501',
internalId:  '',
customField: '20100128-201209'
};
webappMappings['7008']=webappMappings['7008-8839']={
webappId:    '7008',
documentId:  '270901',
internalId:  '8839',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '270901',
internalId:  '',
customField: '20100128-202227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '283501',
internalId:  '',
customField: '20101216-115851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '290401',
internalId:  '',
customField: '20110304-012850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '290501',
internalId:  '',
customField: '20100921-102941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '328301',
internalId:  '',
customField: '20110725-150740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '294801',
internalId:  '',
customField: '20101018-123110'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '332801',
internalId:  '-',
customField: '20120102-110530'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '333401',
internalId:  '-',
customField: '20120122-193827'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '334201',
internalId:  '-',
customField: '20120122-195500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301201',
internalId:  '',
customField: '20101125-124805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '302401',
internalId:  '',
customField: '20101206-100023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '305001',
internalId:  '',
customField: '20120102-110012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '305022',
internalId:  '',
customField: '20110110-095528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '305043',
internalId:  '',
customField: '20110323-114236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '307401',
internalId:  '',
customField: '20110323-111322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '309101',
internalId:  '',
customField: '20110707-133929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '311201',
internalId:  '',
customField: '20110321-214724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '312201',
internalId:  '',
customField: '20110215-194711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '313201',
internalId:  '',
customField: '20110303-011131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '317301',
internalId:  '',
customField: '20110318-012613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '318601',
internalId:  '',
customField: '20110321-102519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '320901',
internalId:  '',
customField: '20110330-101252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '321501',
internalId:  '',
customField: '20110518-111925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '323301',
internalId:  '',
customField: '20110623-125242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '324601',
internalId:  '',
customField: '20111212-161008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '326001',
internalId:  '',
customField: '20110629-113618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '329501',
internalId:  '',
customField: '20110816-124747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '330801',
internalId:  '',
customField: '20111010-094951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '331701',
internalId:  '',
customField: '20111013-190854'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INX2CD';
var companyName   = 'CWPromotion';
var htmlTitle	  = '+Musikpromotion+bei+Radio+und+Presse%2C+Newcomer';
var metaKeywords  = 'Musik%2C+Promotion%2C+Radio%2C+Presse%2C+Newcomer%2C+Musikpromotion%2C+Medienarbeiten%2C+Release%2C+';
var metaContents  = 'Musikpromotion+bei+Radio-+Presse-+und+TV%2C+Newcomer%2C+Release%2C+Medienarbeiten%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();
};

