/* [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 theSitetree=[ 
	['PAGE','4558',jdecode('Home'),jdecode(''),'/4558.html','true',[],''],
	['PAGE','4615',jdecode('Page+d%26%23x27%3Baccueil'),jdecode(''),'/4615.html','true',[],''],
	['PAGE','4642',jdecode('Galerie'),jdecode(''),'/4642.html','true',[],''],
	['PAGE','4669',jdecode('Presse'),jdecode(''),'/4669.html','true',[],''],
	['PAGE','4696',jdecode('Contact'),jdecode(''),'/4696.html','true',[],''],
	['PAGE','4723',jdecode('Les+filles+de+Shiva'),jdecode(''),'/4723.html','true',[],''],
	['PAGE','4750',jdecode('Le+saviez-vous%3F'),jdecode(''),'/4750.html','true',[],''],
	['PAGE','6115',jdecode('Le+monde+de+l%C2%B4Op%C3%A9ra'),jdecode(''),'/6115.html','true',[],''],
	['PAGE','7848',jdecode('Mon+blog'),jdecode(''),'/7848.html','true',[],''],
	['PAGE','10408',jdecode('Sculptures'),jdecode(''),'/10408.html','true',[],''],
	['PAGE','10435',jdecode('Eurafrique'),jdecode(''),'/10435.html','true',[],'']];
var siteelementCount=11;
theSitetree.topTemplateName='Activate';
theSitetree.paletteFamily='1E3A6F';
theSitetree.keyvisualId='2027';
theSitetree.keyvisualName='blumen.jpg';
theSitetree.fontsetId='337';
theSitetree.graphicsetId='396';
theSitetree.contentColor='00C9C7';
theSitetree.contentBGColor='1E3A6F';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				name: 			'Activate',
				paletteFamily: 	'1E3A6F',
				keyvisualId: 	'2027',
				keyvisualName: 	'blumen.jpg',
				fontsetId: 		'337',
				graphicsetId: 	'396',
				contentColor: 	'00C9C7',
				contentBGColor: '1E3A6F',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'1E3A6F',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				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:  '4558',
internalId:  '1006',
customField: '1006'
};
webappMappings['7050']=webappMappings['7050-597']={
webappId:    '7050',
documentId:  '7848',
internalId:  '597',
customField: 'language:fr;country:FR;'
};
webappMappings['1501']=webappMappings['1501-585641']={
webappId:    '1501',
documentId:  '4558',
internalId:  '585641',
customField: '1501'
};
webappMappings['1003']=webappMappings['1003-abw0x0inxxaf10c2d7c279f']={
webappId:    '1003',
documentId:  '4723',
internalId:  'abw0x0inxxaf10c2d7c279f',
customField: 'fr:FR:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4558',
internalId:  '',
customField: '20090422-075439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4615',
internalId:  '',
customField: '20060704-070952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4642',
internalId:  '',
customField: '20061218-081223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4669',
internalId:  '',
customField: '20060810-062509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4696',
internalId:  '',
customField: '20060329-055105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4723',
internalId:  '',
customField: '20060329-055558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4750',
internalId:  '',
customField: '20060528-043047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6115',
internalId:  '',
customField: '20060606-055401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7848',
internalId:  '',
customField: '20090424-043944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10408',
internalId:  '',
customField: '20060317-063137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10435',
internalId:  '',
customField: '20060425-072704'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXXAF';
var companyName   = 'Diamor%3A+Art+et+M%C3%A9ditation';
var htmlTitle	  = 'Diamor%3A+Art+et+M%C3%A9ditation';
var metaKeywords  = 'Art%2C+M%C3%A9ditation%2C+Eurafrique+chr%C3%A9tienne+et+animiste%2C+Loas%2C+Europe+jud%C3%A9o-chr%C3%A9tienne%2C+Humanisme%2C+Id%C3%A9es+re%C3%A7ues%2C+Curiosit%C3%A9s+historiques%2C+Isra%C3%ABl%2C+Op%C3%A9ra%2C+Scala%2C+Op%C3%A9ra+de+Paris%2C+Vienne%2C+Orange%2C+Covent+Garden';
var metaContents  = 'Art+et+M%C3%A9ditation%2C+Pr%C3%A9sentation+de+quelques+uns+de+mes+tableaux+et+sculptures.+Pour+en+acqu%C3%A9rir%2C+sannoncer+%C3%A0+nospam-ophelia%40bluewin.chD%C2%B4autre+part%2C+il+y+aura+quelques+morceaux+choisis+de+mon+roman+Les+filles+de+Shiva%2C+sous+forme+de+feuilleton.+Blog%3A+opinions+sur+des+faits+d%C2%B4actualit%C3%A9.+J%C2%B4attends+aussi+les+v%C3%B4tres+sur+le+forum.';
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();
};
