/* [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','701',jdecode('Page+d%26%23x27%3Baccueil'),jdecode(''), jdecode('%2F701.html'), 'true',[],'',''],
	['PAGE','815',jdecode('Contact'),jdecode(''), jdecode('%2F815.html'), 'true',[],'',''],
	['PAGE','794',jdecode('Agenda'),jdecode(''), jdecode('%2F794%2Findex.html'), 'true',[ 
		['PAGE','20601',jdecode('B%C3%A9nichons+-+Recrotzon+2010'),jdecode(''), jdecode('%2F794%2F20601.html'), 'false',[],'',''],
		['PAGE','857',jdecode('Nuit+de+la+Saint-Sylvestre+2010'),jdecode(''), jdecode('%2F794%2F857.html'), 'false',[],'',''],
		['PAGE','56922',jdecode('Petit+Nouvel-an+2012'),jdecode(''), jdecode('%2F794%2F56922.html'), 'true',[],'',''],
		['PAGE','48101',jdecode('Abbayes+2012'),jdecode(''), jdecode('%2F794%2F48101.html'), 'true',[],'','']
	],'',''],
	['PAGE','9101',jdecode('Discographie+***+nouveau+CD'),jdecode(''), jdecode('%2F9101%2Findex.html'), 'true',[ 
		['PAGE','22201',jdecode('Vente+de+T-shirt'),jdecode(''), jdecode('%2F9101%2F22201.html'), 'true',[],'','']
	],'',''],
	['PAGE','5101',jdecode('Nos+restaurants+habituels'),jdecode(''), jdecode('%2F5101%2Findex.html'), 'true',[ 
		['PAGE','9401',jdecode('Restaurant+du+Centre+de+l%26%23x27%3BIle'),jdecode(''), jdecode('%2F5101%2F9401.html'), 'true',[],'',''],
		['PAGE','9422',jdecode('Restaurant+la+Croix-Blanche'),jdecode(''), jdecode('%2F5101%2F9422.html'), 'false',[],'',''],
		['PAGE','69201',jdecode('Au+Palais+de+la+Danse'),jdecode(''), jdecode('%2F5101%2F69201.html'), 'true',[],'','']
	],'',''],
	['PAGE','6201',jdecode('Galerie'),jdecode(''), jdecode('%2F6201.html'), 'true',[],'',''],
	['PAGE','8006',jdecode('Livre+d%26%23x27%3Bor'),jdecode(''), jdecode('%2F8006%2Findex.html'), 'true',[ 
		['PAGE','8001',jdecode('Entr%C3%A9es'),jdecode(''), jdecode('%2F8006%2F8001.html'), 'false',[],'','']
	],'',''],
	['PAGE','53501',jdecode('Forum'),jdecode(''), jdecode('%2F53501.html'), 'true',[],'',''],
	['PAGE','34101',jdecode('Ecole+de+musique'),jdecode(''), jdecode('%2F34101.html'), 'false',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Kreis';
theSitetree.paletteFamily='D24C59';
theSitetree.keyvisualId='589';
theSitetree.keyvisualName='collage.jpg';
theSitetree.fontsetId='125';
theSitetree.graphicsetId='143';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Kreis',
				paletteFamily: 	'D24C59',
				keyvisualId: 	'589',
				keyvisualName: 	'collage.jpg',
				fontsetId: 		'125',
				graphicsetId: 	'143',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'D24C59',
				b_color: 		'F877A1',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-8006abw0x0in23m3']={
webappId:    '1002',
documentId:  '8006',
internalId:  '8006abw0x0in23m3',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20110128-084721'
};
webappMappings['1003']=webappMappings['1003-abw0x0in23m31180a73dc33']={
webappId:    '1003',
documentId:  '53501',
internalId:  'abw0x0in23m31180a73dc33',
customField: 'fr:FR:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '815',
internalId:  '',
customField: '20070810-223722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20111014-142523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48101',
internalId:  '',
customField: '20111014-142550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20100913-011615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '857',
internalId:  '',
customField: '20101203-112055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56922',
internalId:  '',
customField: '20110909-144114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20100201-233833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22201',
internalId:  '',
customField: '20070626-235450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20110926-110318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20110317-233928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9422',
internalId:  '',
customField: '20100201-234922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20070610-034420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69201',
internalId:  '',
customField: '20111014-142646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8006',
internalId:  '',
customField: '20070520-034919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8001',
internalId:  '',
customField: '20070520-034919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53501',
internalId:  '',
customField: '20080211-224639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34101',
internalId:  '',
customField: '20070923-164328'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN23M3';
var companyName   = 'Orchestre+Les+Gal%C3%A9riens';
var htmlTitle	  = 'Orchestre+Les+Gal%C3%A9riens';
var metaKeywords  = 'Orchestre+Les+Gal%C3%A9riens%2C+Danse%2C+Musique%2C+Bal%2C+Th%C3%A9+dansant%2C+soir%C3%A9e%2C+animation%2C+%C3%A9cole+de+musique%2C+cours+daccord%C3%A9on';
var metaContents  = 'Orchestre+les+Gal%C3%A9riens%2C+Orchestre+de+danse%2C+animation%2C+bal%2C+apr%C3%A8s-soir%C3%A9e%2C+mariage%2C+anniversaire%2C+Abbaye%2C+B%C3%A9nichon%2C+soir%C3%A9e+diverse%2C+gala%2C+Th%C3%A9+dansant%2C+Les+Gal%C3%A9riens%2C+Duo+les+Gal%C3%A9riens%2C+Grand+bal%2C+%C3%A9cole+de+musique%2C+cours+daccord%C3%A9on';
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();
};

