/* [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','1367',jdecode('Biography'),jdecode(''), jdecode('%2F1367.html'), 'true',[],'',''],
	['PAGE','6622',jdecode('Links'),jdecode(''), jdecode('%2F6622%2Findex.html'), 'true',[ 
		['PAGE','37829',jdecode('Michael'),jdecode(''), jdecode('%2F6622%2F37829.html'), 'true',[],'','']
	],'',''],
	['PAGE','1346',jdecode('Music'),jdecode(''), jdecode('%2F1346%2Findex.html'), 'true',[ 
		['PAGE','4922',jdecode('Curriculum+Vitae'),jdecode(''), jdecode('%2F1346%2F4922.html'), 'true',[],'',''],
		['PAGE','4901',jdecode('Discography'),jdecode(''), jdecode('%2F1346%2F4901.html'), 'true',[],'',''],
		['PAGE','4701',jdecode('Influences'),jdecode(''), jdecode('%2F1346%2F4701.html'), 'true',[],'','']
	],'',''],
	['PAGE','44129',jdecode('News'),jdecode(''), jdecode('%2F44129.html'), 'true',[],'',''],
	['PAGE','6601',jdecode('Press'),jdecode(''), jdecode('%2F6601.html'), 'true',[],'',''],
	['PAGE','70340',jdecode('Story'),jdecode(''), jdecode('%2F70340%2Findex.html'), 'true',[ 
		['PAGE','73740',jdecode('Education'),jdecode(''), jdecode('%2F70340%2F73740.html'), 'true',[],'',''],
		['PAGE','74061',jdecode('Family'),jdecode(''), jdecode('%2F70340%2F74061.html'), 'true',[],'',''],
		['PAGE','74940',jdecode('Theatre'),jdecode(''), jdecode('%2F70340%2F74940.html'), 'true',[],'',''],
		['PAGE','76640',jdecode('Travels'),jdecode(''), jdecode('%2F70340%2F76640.html'), 'true',[],'',''],
		['PAGE','79140',jdecode('Various'),jdecode(''), jdecode('%2F70340%2F79140.html'), 'true',[],'',''],
		['PAGE','74040',jdecode('Work'),jdecode(''), jdecode('%2F70340%2F74040.html'), 'true',[],'','']
	],'',''],
	['PAGE','1441',jdecode('Contact'),jdecode(''), jdecode('%2F1441.html'), 'true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Noble';
theSitetree.paletteFamily='7B7A7A';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17226';
theSitetree.graphicsetId='12670';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7B7A7A';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'webland',
  product: 'WSCSYSSSSLY0XFFS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Noble',
				paletteFamily: 	'7B7A7A',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17226',
				graphicsetId: 	'12670',
				contentColor: 	'FFFFFF',
				contentBGColor: '7B7A7A',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-0ca664bbe12b36c1d95fa631fb172283']={
webappId:    '7060',
documentId:  '37829',
internalId:  '0ca664bbe12b36c1d95fa631fb172283',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4922',
internalId:  '',
customField: '20111015-192923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20110619-203134'
};
webappMappings['7008']=webappMappings['7008-3358']={
webappId:    '7008',
documentId:  '1441',
internalId:  '3358',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1346',
internalId:  '',
customField: '20110911-115915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1367',
internalId:  '',
customField: '20110911-122738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20110530-122150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6622',
internalId:  '',
customField: '20110911-195551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1441',
internalId:  '',
customField: '20101030-234709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20111009-120103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37829',
internalId:  '',
customField: '20100214-180633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44129',
internalId:  '',
customField: '20111015-192852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70340',
internalId:  '',
customField: '20111004-230808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73740',
internalId:  '',
customField: '20110711-151404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74061',
internalId:  '',
customField: '20110711-163330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74040',
internalId:  '',
customField: '20110911-120147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74940',
internalId:  '',
customField: '20110710-134051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76640',
internalId:  '',
customField: '20111009-120143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79140',
internalId:  '',
customField: '20111031-184423'
};
var webAppHostname = 'wsc-app.webland.ch:80';
var canonHostname = 'wsc01.webland.ch';
var accountId     = 'AWB010IN2CGH';
var companyName   = 'STEPHEN+DAVID+LEUENBERGER';
var htmlTitle	  = 'stephenleuenberger.ch';
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();
};

