/* [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('Accueil'),jdecode(''),'/501/index.html','true',[ 
		['PAGE','30501',jdecode('+++++++++++++++++++++%C2%A9+'),jdecode(''),'/501/30501.html','true',[],'',''],
		['PAGE','238501',jdecode('+++++++++++++++++Polices'),jdecode(''),'/501/238501.html','true',[],'',''],
		['PAGE','229822',jdecode('++++++++++++++Egyptologie'),jdecode(''),'/501/229822.html','true',[],'',''],
		['PAGE','247401',jdecode('++++++++++++Biblioth%C3%A8ques'),jdecode(''),'/501/247401.html','true',[],'','']
	],'',''],
	['PAGE','5401',jdecode('Annonces'),jdecode(''),'/5401/index.html','true',[ 
		['PAGE','238522',jdecode('++++++++++++++Archives'),jdecode(''),'/5401/238522.html','true',[],'',''],
		['PAGE','242001',jdecode('+++++++++++Cop%26%23x27%3B+ticurieux'),jdecode(''),'/5401/242001.html','true',[],'','']
	],'',''],
	['PAGE','223222',jdecode('+Textes+'),jdecode(''),'/223222/index.html','true',[ 
		['PAGE','220701',jdecode('++++++++++Traductions'),jdecode(''),'/223222/220701.html','true',[],'',''],
		['PAGE','223201',jdecode('+++++++++++++Indices'),jdecode(''),'/223222/223201.html','true',[],'','']
	],'',''],
	['PAGE','222501',jdecode('+Documents'),jdecode(''),'/222501/index.html','true',[ 
		['PAGE','222901',jdecode('++++++++++++++Sources'),jdecode(''),'/222501/222901.html','true',[],'',''],
		['PAGE','222922',jdecode('+++++++++Bibliographies'),jdecode(''),'/222501/222922.html','true',[],'',''],
		['PAGE','512801',jdecode('++++++++++++Manuscrits'),jdecode(''),'/222501/512801.html','true',[],'',''],
		['PAGE','618201',jdecode('+++++++++++++++Videos'),jdecode(''),'/222501/618201.html','true',[],'','']
	],'',''],
	['PAGE','7301',jdecode('Liens'),jdecode(''),'/7301/index.html','true',[ 
		['PAGE','229401',jdecode('++++++++++Associations'),jdecode(''),'/7301/229401.html','true',[],'',''],
		['PAGE','229422',jdecode('+++++++++++Instrumenta'),jdecode(''),'/7301/229422.html','true',[],'',''],
		['PAGE','229801',jdecode('++++Revues+et+collections'),jdecode(''),'/7301/229801.html','true',[],'',''],
		['PAGE','229443',jdecode('++++++++++++Manuscrits'),jdecode(''),'/7301/229443.html','true',[],'',''],
		['PAGE','229843',jdecode('+++++++++++++++Mus%C3%A9es'),jdecode(''),'/7301/229843.html','true',[],'','']
	],'',''],
	['PAGE','260901',jdecode('Sites'),jdecode(''),'/260901/index.html','true',[ 
		['PAGE','297701',jdecode('++++++++++++Basse-Egypte'),jdecode(''),'/260901/297701.html','true',[],'',''],
		['PAGE','303901',jdecode('++++++++++++Sina%C3%AF+et+Gaza'),jdecode(''),'/260901/303901.html','true',[],'',''],
		['PAGE','297722',jdecode('++++++++++++++++Fayoum'),jdecode(''),'/260901/297722.html','true',[],'',''],
		['PAGE','297743',jdecode('++++++++++Moyenne-Egypte'),jdecode(''),'/260901/297743.html','true',[],'',''],
		['PAGE','297764',jdecode('++++++++++++Haute-Egypte'),jdecode(''),'/260901/297764.html','true',[],'',''],
		['PAGE','297785',jdecode('++++++++++++++++++Oasis'),jdecode(''),'/260901/297785.html','true',[],'',''],
		['PAGE','297806',jdecode('++++++++++++++++++Nubie'),jdecode(''),'/260901/297806.html','true',[],'','']
	],'',''],
	['PAGE','5801',jdecode('Biblio'),jdecode(''),'/5801/index.html','true',[ 
		['PAGE','235501',jdecode('+++++++++En+pr%C3%A9paration'),jdecode(''),'/5801/235501.html','true',[],'','']
	],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Cuy';
theSitetree.paletteFamily='F7FDFD';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='387';
theSitetree.graphicsetId='438';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F7FDFD';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cuy',
				paletteFamily: 	'F7FDFD',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'387',
				graphicsetId: 	'438',
				contentColor: 	'000000',
				contentBGColor: 'F7FDFD',
				a_color: 		'F7FDFD',
				b_color: 		'E4E5C0',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
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: '20100906-092321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '222501',
internalId:  '',
customField: '20100823-083326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '222901',
internalId:  '',
customField: '20100823-084913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223222',
internalId:  '',
customField: '20100830-083828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229822',
internalId:  '',
customField: '20081218-183543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '247401',
internalId:  '',
customField: '20100831-085057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20100906-092252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '238522',
internalId:  '',
customField: '20100823-084554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '238501',
internalId:  '',
customField: '20100826-143635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '242001',
internalId:  '',
customField: '20100828-085028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223201',
internalId:  '',
customField: '20100818-090834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '220701',
internalId:  '',
customField: '20100823-085703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '222922',
internalId:  '',
customField: '20100830-084451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20100711-201145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229401',
internalId:  '',
customField: '20100414-100041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229422',
internalId:  '',
customField: '20100816-091352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229443',
internalId:  '',
customField: '20100830-080658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229801',
internalId:  '',
customField: '20100602-144748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229843',
internalId:  '',
customField: '20100830-085213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '260901',
internalId:  '',
customField: '20090819-171125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297701',
internalId:  '',
customField: '20100623-142532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '303901',
internalId:  '',
customField: '20090221-181547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297722',
internalId:  '',
customField: '20100422-145804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297743',
internalId:  '',
customField: '20100125-084114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297764',
internalId:  '',
customField: '20100422-152006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297785',
internalId:  '',
customField: '20100422-152030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297806',
internalId:  '',
customField: '20100421-094120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20100521-092905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '235501',
internalId:  '',
customField: '20090816-144626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30501',
internalId:  '',
customField: '20100815-160800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '618201',
internalId:  '',
customField: '20100616-204850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '512801',
internalId:  '',
customField: '20090826-144625'
};
webappMappings['7060']=webappMappings['7060-964c092705c92de950d9654e8eab994c']={
webappId:    '7060',
documentId:  '512801',
internalId:  '964c092705c92de950d9654e8eab994c',
customField: 'language:fr;country:FR;'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2NNL';
var companyName   = '+++C++++O++++P++++T++++I++++C++++A++++++++++++++++++++++++++++++++++++++++++++++++++++++';
var htmlTitle	  = 'COPTICA+-+Cherix';
var metaKeywords  = 'coptica+copticherix+copte+lexique+cherix+geneve+unige+koptisch+coptic++';
var metaContents  = 'Copte%2C+langue+et+litt%3Frature+%3A+documents%2C+textes+et+indices+en+libre+acc%3Fs++';
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();
};
