/* [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(''),'/501.html','true',[],'',''],
	['PAGE','6001',jdecode('About+us'),jdecode(''),'/6001.html','true',[],'',''],
	['PAGE','36501',jdecode('News'),jdecode(''),'/36501.html','true',[],'',''],
	['PAGE','6043',jdecode('Bands'),jdecode(''),'/6043/index.html','true',[ 
		['PAGE','21401',jdecode('Amerikan+Beauty'),jdecode(''),'/6043/21401.html','true',[],'',''],
		['PAGE','53701',jdecode('Black+Sonic'),jdecode(''),'/6043/53701.html','true',[],'',''],
		['PAGE','13201',jdecode('Demonium'),jdecode(''),'/6043/13201.html','true',[],'',''],
		['PAGE','53001',jdecode('Elis'),jdecode(''),'/6043/53001.html','true',[],'',''],
		['PAGE','6601',jdecode('Hangm%C3%A4n%26%23x27%3Bs+Nooze'),jdecode(''),'/6043/6601.html','true',[],'',''],
		['PAGE','62001',jdecode('Landvogt'),jdecode(''),'/6043/62001.html','true',[],'','']
	],'',''],
	['PAGE','36901',jdecode('Concerts'),jdecode(''),'/36901.html','true',[],'',''],
	['PAGE','48301',jdecode('Reviews'),jdecode(''),'/48301.html','true',[],'',''],
	['PAGE','6127',jdecode('Downloads'),jdecode(''),'/6127/index.html','true',[ 
		['PAGE','6169',jdecode('MP3'),jdecode(''),'/6127/6169.html','true',[],'',''],
		['PAGE','13422',jdecode('Videos'),jdecode(''),'/6127/13422.html','true',[],'','']
	],'',''],
	['PAGE','6106',jdecode('Photography'),jdecode(''),'/6106/index.html','true',[ 
		['PAGE','29601',jdecode('Animals'),jdecode(''),'/6106/29601.html','true',[],'',''],
		['PAGE','68901',jdecode('Art+Or+Illusion'),jdecode(''),'/6106/68901.html','true',[],'',''],
		['PAGE','7201',jdecode('Bands'),jdecode(''),'/6106/7201.html','true',[],'',''],
		['PAGE','60501',jdecode('Children'),jdecode(''),'/6106/60501.html','true',[],'',''],
		['PAGE','63601',jdecode('Model-Men'),jdecode(''),'/6106/63601.html','true',[],'',''],
		['PAGE','63622',jdecode('Model-Woman'),jdecode(''),'/6106/63622.html','true',[],'',''],
		['PAGE','32401',jdecode('Mother+Earth'),jdecode(''),'/6106/32401.html','true',[],'',''],
		['PAGE','33801',jdecode('Mountains'),jdecode(''),'/6106/33801.html','true',[],'',''],
		['PAGE','28601',jdecode('My+Passion'),jdecode(''),'/6106/28601.html','true',[],'',''],
		['PAGE','25001',jdecode('On+Stage'),jdecode(''),'/6106/25001.html','true',[],'',''],
		['PAGE','63301',jdecode('Water'),jdecode(''),'/6106/63301.html','true',[],'','']
	],'',''],
	['PAGE','13443',jdecode('Friends'),jdecode(''),'/13443.html','true',[],'',''],
	['PAGE','13464',jdecode('Partners'),jdecode(''),'/13464.html','true',[],'',''],
	['PAGE','6211',jdecode('Contact'),jdecode(''),'/6211.html','true',[],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Orbit';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='172';
theSitetree.graphicsetId='207';
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: 			'Orbit',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'172',
				graphicsetId: 	'207',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20090910-212621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6043',
internalId:  '',
customField: '20090316-205547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53701',
internalId:  '',
customField: '20091004-155723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21401',
internalId:  '',
customField: '20091004-143848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53001',
internalId:  '',
customField: '20091004-150638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20090512-205420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6106',
internalId:  '',
customField: '20091127-203026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7201',
internalId:  '',
customField: '20090609-221307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13443',
internalId:  '',
customField: '20090525-214120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13464',
internalId:  '',
customField: '20090316-210015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6211',
internalId:  '',
customField: '20090215-210829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20090322-102316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20090407-203117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6127',
internalId:  '',
customField: '20090402-193840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6169',
internalId:  '',
customField: '20090402-202331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13422',
internalId:  '',
customField: '20090512-211403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25001',
internalId:  '',
customField: '20090809-223253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20091112-213245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29601',
internalId:  '',
customField: '20090910-215345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20090609-215342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33801',
internalId:  '',
customField: '20090910-213941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36501',
internalId:  '',
customField: '20091004-145842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36901',
internalId:  '',
customField: '20091117-194113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48301',
internalId:  '',
customField: '20090530-195014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68901',
internalId:  '',
customField: '20091004-185709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60501',
internalId:  '',
customField: '20091127-203929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62001',
internalId:  '',
customField: '20091013-133654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63301',
internalId:  '',
customField: '20091005-212738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63622',
internalId:  '',
customField: '20091116-210725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63601',
internalId:  '',
customField: '20091116-210544'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INE7D5';
var companyName   = 'Rocklady%27s+Rock-Promotion';
var htmlTitle	  = 'Rockladys+Rock-Promotion';
var metaKeywords  = 'Booking%2C+Konzerte%2C+Openairs%2C+Promotion%2C+Photography%2C+Management%2C+';
var metaContents  = 'Rock%2C+Metal%2C+Concerts%2C+Openair%2C+Photography%2C+Booking%2C+Supporter%2C+Club%2C+Bar%2C+ArtofIllusionphotography%2CFotografie%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();
};
