/* [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(''), jdecode('%2F501%2Findex.html'), 'true',[ 
		['PAGE','229822',jdecode('++++++++++++++Universit%C3%A9s'),jdecode(''), jdecode('%2F501%2F229822.html'), 'true',[],'',''],
		['PAGE','247401',jdecode('++++++++++++Biblioth%C3%A8ques'),jdecode(''), jdecode('%2F501%2F247401.html'), 'true',[],'',''],
		['PAGE','238501',jdecode('+++++++++++++++++Polices'),jdecode(''), jdecode('%2F501%2F238501.html'), 'true',[],'',''],
		['PAGE','730201',jdecode('+++++++++++++++++Courriel'),jdecode(''), jdecode('%2F501%2F730201.html'), 'true',[],'','']
	],'',''],
	['PAGE','5401',jdecode('Annonces'),jdecode(''), jdecode('%2F5401%2Findex.html'), 'true',[ 
		['PAGE','242001',jdecode('+++++++++++Cop%26%23x27%3B+ticurieux'),jdecode(''), jdecode('%2F5401%2F242001.html'), 'true',[],'',''],
		['PAGE','238522',jdecode('++++++++++++++Archives'),jdecode(''), jdecode('%2F5401%2F238522.html'), 'true',[],'','']
	],'',''],
	['PAGE','223222',jdecode('+Textes+'),jdecode(''), jdecode('%2F223222%2Findex.html'), 'true',[ 
		['PAGE','220701',jdecode('++++++++++Traductions'),jdecode(''), jdecode('%2F223222%2F220701.html'), 'true',[],'',''],
		['PAGE','223201',jdecode('+++++++++++++Indices'),jdecode(''), jdecode('%2F223222%2F223201.html'), 'true',[],'',''],
		['PAGE','30501',jdecode('+++++++++++++++++%C2%A9+'),jdecode(''), jdecode('%2F223222%2F30501.html'), 'true',[],'','']
	],'',''],
	['PAGE','222501',jdecode('+Documents'),jdecode(''), jdecode('%2F222501%2Findex.html'), 'true',[ 
		['PAGE','222901',jdecode('++++++++++++++Sources'),jdecode(''), jdecode('%2F222501%2F222901.html'), 'true',[],'',''],
		['PAGE','222922',jdecode('+++++++++Bibliographies'),jdecode(''), jdecode('%2F222501%2F222922.html'), 'true',[],'',''],
		['PAGE','685101',jdecode('++++++++++++++Articles'),jdecode(''), jdecode('%2F222501%2F685101.html'), 'true',[],'',''],
		['PAGE','512801',jdecode('++++++++++++Manuscrits'),jdecode(''), jdecode('%2F222501%2F512801.html'), 'true',[],'',''],
		['PAGE','618201',jdecode('+++++++++++++++Videos'),jdecode(''), jdecode('%2F222501%2F618201.html'), 'true',[],'','']
	],'',''],
	['PAGE','7301',jdecode('Liens'),jdecode(''), jdecode('%2F7301%2Findex.html'), 'true',[ 
		['PAGE','229401',jdecode('+++++++++++Associations'),jdecode(''), jdecode('%2F7301%2F229401.html'), 'true',[],'',''],
		['PAGE','229422',jdecode('+++++++++++Instrumenta'),jdecode(''), jdecode('%2F7301%2F229422.html'), 'true',[],'',''],
		['PAGE','229801',jdecode('++++Revues+et+collections'),jdecode(''), jdecode('%2F7301%2F229801.html'), 'true',[],'',''],
		['PAGE','229443',jdecode('++++++++++++Manuscrits'),jdecode(''), jdecode('%2F7301%2F229443.html'), 'true',[],'',''],
		['PAGE','229843',jdecode('+++++++++++++++Mus%C3%A9es'),jdecode(''), jdecode('%2F7301%2F229843.html'), 'true',[],'','']
	],'',''],
	['PAGE','260901',jdecode('Sites'),jdecode(''), jdecode('%2F260901%2Findex.html'), 'true',[ 
		['PAGE','297701',jdecode('++++++++++++Basse-Egypte'),jdecode(''), jdecode('%2F260901%2F297701.html'), 'true',[],'',''],
		['PAGE','303901',jdecode('++++++++++++Sina%C3%AF+et+Gaza'),jdecode(''), jdecode('%2F260901%2F303901.html'), 'true',[],'',''],
		['PAGE','297722',jdecode('++++++++++++++++Fayoum'),jdecode(''), jdecode('%2F260901%2F297722.html'), 'true',[],'',''],
		['PAGE','297743',jdecode('++++++++++Moyenne-Egypte'),jdecode(''), jdecode('%2F260901%2F297743.html'), 'true',[],'',''],
		['PAGE','297764',jdecode('++++++++++++Haute-Egypte'),jdecode(''), jdecode('%2F260901%2F297764.html'), 'true',[],'',''],
		['PAGE','297785',jdecode('++++++++++++++++++Oasis'),jdecode(''), jdecode('%2F260901%2F297785.html'), 'true',[],'',''],
		['PAGE','297806',jdecode('++++++++++++++++++Nubie'),jdecode(''), jdecode('%2F260901%2F297806.html'), 'true',[],'','']
	],'',''],
	['PAGE','5801',jdecode('Biblio'),jdecode(''), jdecode('%2F5801%2Findex.html'), 'true',[ 
		['PAGE','235501',jdecode('+++++++++En+pr%C3%A9paration'),jdecode(''), jdecode('%2F5801%2F235501.html'), 'true',[],'','']
	],'','']];
var siteelementCount=34;
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 prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
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: '20120131-104502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '222501',
internalId:  '',
customField: '20120131-104747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '222901',
internalId:  '',
customField: '20111218-180150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223222',
internalId:  '',
customField: '20120131-111530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229822',
internalId:  '',
customField: '20110521-135437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '247401',
internalId:  '',
customField: '20111217-095258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20120127-160652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '238522',
internalId:  '',
customField: '20110921-110448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '238501',
internalId:  '',
customField: '20111112-111518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '242001',
internalId:  '',
customField: '20111222-110915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223201',
internalId:  '',
customField: '20111216-161807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '220701',
internalId:  '',
customField: '20111216-161750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '222922',
internalId:  '',
customField: '20111106-201916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20111027-172854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229401',
internalId:  '',
customField: '20100414-100041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229422',
internalId:  '',
customField: '20120119-142102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229443',
internalId:  '',
customField: '20111216-162015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229801',
internalId:  '',
customField: '20111218-180448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229843',
internalId:  '',
customField: '20111217-101636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '260901',
internalId:  '',
customField: '20120119-143437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297701',
internalId:  '',
customField: '20110906-170003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '303901',
internalId:  '',
customField: '20090221-181547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297722',
internalId:  '',
customField: '20101111-084507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297743',
internalId:  '',
customField: '20110906-165847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297764',
internalId:  '',
customField: '20110906-165413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297785',
internalId:  '',
customField: '20100422-152030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297806',
internalId:  '',
customField: '20110703-141954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20110719-113700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '235501',
internalId:  '',
customField: '20110828-173519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30501',
internalId:  '',
customField: '20111101-082820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '730201',
internalId:  '',
customField: '20110301-085409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '618201',
internalId:  '',
customField: '20120101-172253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '685101',
internalId:  '',
customField: '20111202-093629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '512801',
internalId:  '',
customField: '20110526-213938'
};
webappMappings['7060']=webappMappings['7060-964c092705c92de950d9654e8eab994c']={
webappId:    '7060',
documentId:  '512801',
internalId:  '964c092705c92de950d9654e8eab994c',
customField: 'language:fr;country:FR;'
};
webappMappings['7008']=webappMappings['7008-11748']={
webappId:    '7008',
documentId:  '730201',
internalId:  '11748',
customField: 'language:fr;country:FR;'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
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();
};

