/* [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','4556',jdecode('Accueil'),jdecode(''), jdecode('%2F4556.html'), 'true',[],'',''],
	['PAGE','75964',jdecode('Historique'),jdecode(''), jdecode('%2F75964.html'), 'true',[],'',''],
	['PAGE','33718',jdecode('Le+Comit%C3%A9'),jdecode(''), jdecode('%2F33718.html'), 'true',[],'',''],
	['PAGE','9627',jdecode('Notre+Directeur'),jdecode(''), jdecode('%2F9627.html'), 'true',[],'',''],
	['PAGE','9654',jdecode('R%C3%A9p%C3%A9titions'),jdecode(''), jdecode('%2F9654.html'), 'true',[],'',''],
	['PAGE','87567',jdecode('Pose+de+voix'),jdecode(''), jdecode('%2F87567.html'), 'true',[],'',''],
	['PAGE','9681',jdecode('Prochain+concert'),jdecode(''), jdecode('%2F9681.html'), 'true',[],'',''],
	['PAGE','80928',jdecode('Concerts+suivants'),jdecode(''), jdecode('%2F80928.html'), 'true',[],'',''],
	['PAGE','9708',jdecode('Concerts+pr%C3%A9c%C3%A9dents'),jdecode(''), jdecode('%2F9708.html'), 'true',[],'',''],
	['PAGE','75991',jdecode('R%C3%A9pertoire+A-L'),jdecode(''), jdecode('%2F75991.html'), 'true',[],'',''],
	['PAGE','77228',jdecode('R%C3%A9pertoire+M-Z'),jdecode(''), jdecode('%2F77228.html'), 'true',[],'',''],
	['PAGE','52358',jdecode('Photos'),jdecode(''), jdecode('%2F52358.html'), 'true',[],'',''],
	['PAGE','80228',jdecode('Communications'),jdecode(''), jdecode('%2F80228.html'), 'true',[],'',''],
	['PAGE','33745',jdecode('Liens'),jdecode(''), jdecode('%2F33745.html'), 'true',[],'',''],
	['PAGE','9735',jdecode('Contact'),jdecode(''), jdecode('%2F9735%2Findex.html'), 'true',[ 
		['PAGE','19352',jdecode('Contact+%28Folgeseite%29'),jdecode(''), jdecode('%2F9735%2F19352.html'), 'false',[],'','']
	],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Guitar';
theSitetree.paletteFamily='274073';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16777';
theSitetree.graphicsetId='12268';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CB863F';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Guitar',
				paletteFamily: 	'274073',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16777',
				graphicsetId: 	'12268',
				contentColor: 	'000000',
				contentBGColor: 'CB863F',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4556',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20111218-221757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9681',
internalId:  '',
customField: '20111218-123812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87567',
internalId:  '',
customField: '20110621-232138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75964',
internalId:  '',
customField: '20110621-230925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33718',
internalId:  '',
customField: '20110622-075959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9627',
internalId:  '',
customField: '20111218-122559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9654',
internalId:  '',
customField: '20111218-221900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80928',
internalId:  '',
customField: '20110621-234331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9708',
internalId:  '',
customField: '20110622-173641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75991',
internalId:  '',
customField: '20110621-232714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77228',
internalId:  '',
customField: '20110621-234352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52358',
internalId:  '',
customField: '20101108-053853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80228',
internalId:  '',
customField: '20110622-191230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33745',
internalId:  '',
customField: '20110627-215458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9735',
internalId:  '',
customField: '20110622-192811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19352',
internalId:  '',
customField: '20050626-165402'
};
webappMappings['7008']=webappMappings['7008-3657']={
webappId:    '7008',
documentId:  '9735',
internalId:  '3657',
customField: 'language:fr;country:FR;'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXFGB';
var companyName   = 'Soci%C3%A9t%C3%A9+de+Chant+Sacr%C3%A9+de+Gen%C3%A8ve';
var htmlTitle	  = 'Soci%C3%A9t%C3%A9+de+chant+sacr%C3%A9+de+Gen%C3%A8ve';
var metaKeywords  = 'chorale+choeur+chant+musique+sacr%C3%A9e+musique+classique+musique+contemporaine+association+Gen%C3%A8ve+Romain+Mayor+Gen%C3%A8ve+Genf+Geneva%2C+Laudi%2C+Suter';
var metaContents  = 'Pr%C3%A9sentation+de+la+Soci%C3%A9t%C3%A9+de+chant+sacr%C3%A9+de+Gen%C3%A8ve.+Comit%C3%A9%2C+Directeur+Romain+Mayor%2C+prochains+concerts%2C+concerts+pr%C3%A9c%C3%A9dents%2C+Laudi%2C+Suter';
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();
};

