/* [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('HOME'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','27822',jdecode('BIOLOGIE'),jdecode(''),'/27822/index.html','true',[ 
		['PAGE','34501',jdecode('Taxinomie'),jdecode(''),'/27822/34501.html','true',[],'',''],
		['PAGE','27801',jdecode('R%C3%A9partition+g%C3%A9ographique'),jdecode(''),'/27822/27801.html','true',[],'','']
	],'',''],
	['PAGE','79301',jdecode('GALERIE'),jdecode(''),'/79301/index.html','true',[ 
		['PAGE','223101',jdecode('Chelus'),jdecode(''),'/79301/223101.html','true',[],'',''],
		['PAGE','67501',jdecode('Hydromedusa'),jdecode(''),'/79301/67501.html','true',[],'',''],
		['PAGE','27843',jdecode('Phrynops'),jdecode(''),'/79301/27843.html','true',[],'',''],
		['PAGE','60001',jdecode('Platemys'),jdecode(''),'/79301/60001.html','true',[],'',''],
		['PAGE','210501',jdecode('Acanthochelys'),jdecode(''),'/79301/210501.html','true',[],'','']
	],'',''],
	['PAGE','27864',jdecode('BIBLIOGRAPHIE'),jdecode(''),'/27864/index.html','true',[ 
		['PAGE','34543',jdecode('Auteurs%3A+A+-+M'),jdecode(''),'/27864/34543.html','true',[],'',''],
		['PAGE','34564',jdecode('Auteurs%3A+N+-+Z'),jdecode(''),'/27864/34564.html','true',[],'','']
	],'',''],
	['PAGE','169501',jdecode('CONSERVATION'),jdecode(''),'/169501/index.html','true',[ 
		['PAGE','171901',jdecode('Projet+%5BAM%5D'),jdecode(''),'/169501/171901.html','true',[],'',''],
		['PAGE','173001',jdecode('Financement'),jdecode(''),'/169501/173001.html','true',[],'','']
	],'',''],
	['PAGE','34606',jdecode('FORUM'),jdecode(''),'/34606.html','true',[],'',''],
	['PAGE','84901',jdecode('MISES+A+JOUR'),jdecode(''),'/84901.html','true',[],'',''],
	['PAGE','85901',jdecode('LIENS'),jdecode(''),'/85901.html','true',[],'',''],
	['PAGE','27927',jdecode('CONTACT'),jdecode(''),'/27927/index.html','true',[ 
		['PAGE','40601',jdecode('A+PROPOS%28follow+up+page%29'),jdecode(''),'/27927/40601.html','false',[],'','']
	],'',''],
	['PAGE','187101',jdecode('RECHERCHE'),jdecode(''),'/187101.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Card';
theSitetree.paletteFamily='990000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='428';
theSitetree.graphicsetId='479';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Card',
				paletteFamily: 	'990000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'428',
				graphicsetId: 	'479',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
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: '20100403-151341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223101',
internalId:  '',
customField: '20100101-173901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '210501',
internalId:  '',
customField: '20100101-174114'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '187101',
internalId:  'search',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '187101',
internalId:  '',
customField: '20090222-131058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34501',
internalId:  '',
customField: '20100101-173748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27822',
internalId:  '',
customField: '20100101-173721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79301',
internalId:  '',
customField: '20100101-173834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67501',
internalId:  '',
customField: '20100101-173930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60001',
internalId:  '',
customField: '20100101-174046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27801',
internalId:  '',
customField: '20100101-173807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27864',
internalId:  '',
customField: '20100403-151039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34543',
internalId:  '',
customField: '20100403-150938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169501',
internalId:  '',
customField: '20100101-174411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34606',
internalId:  '',
customField: '20090223-172205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27843',
internalId:  '',
customField: '20100101-174019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34564',
internalId:  '',
customField: '20100403-150905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171901',
internalId:  '',
customField: '20100101-174440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27927',
internalId:  '',
customField: '20100101-173555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '173001',
internalId:  '',
customField: '20100101-174455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84901',
internalId:  '',
customField: '20100403-151305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85901',
internalId:  '',
customField: '20100101-174521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40601',
internalId:  '',
customField: '20070101-152921'
};
webappMappings['7008']=webappMappings['7008-6421']={
webappId:    '7008',
documentId:  '27927',
internalId:  '6421',
customField: 'language:fr;country:FR;'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2R9M';
var companyName   = 'www.chelidae.com';
var htmlTitle	  = '';
var metaKeywords  = 'tortue%2C+chelidae%2C+chelus%2C+platemys%2C+acanthochelys%2C+phrynops%2C+hydromedusa%2C+Batrachemys%2C+Bufocephala%2C+Mesoclemmys%2C+Ranacephala%2C+Rhinemys%2C+Amerique+du+sud%2C+turtles%2C+turtle%2C+turtles%2C+tortoise%2C+tortoises%2C+twist-necked+turtle%2C+Argentine%2C+Paraguay%2C+Bresil%2C+Guyane%2C+Guyana%2C+Colombie%2C+Equateur%2C+Bolivie%2C+Surinam%2C+Venezuela%2C+Uruguay%2C+voyage%2C+exploration%2C+conservation%2C+%C3%A9levage%2C+geographie%2C+systematique%2C+galerie%2C+photo%2C+article%2C+reproduction%2C+ecologie%2C+Journey%2C+investigation%2C+conservation%2C+breeding%2C+geographie%2C+systematique%2C+gallery%2C+photo%2C+article%2C+reproduction%2C+ecologie%2C+wokgroupe%2C+chelidae%2C+forum%2C+workgroup%2C+groupe+d%C3%A9levage+FFEPT';
var metaContents  = 'Pr%C3%A9sentation+de+toutes+les+esp%C3%A8ces+de+tortues+aquatiques+%C3%A0+cou+de+serpent+amerique+du+sud.+Actualisation+r%C3%A9guli%C3%A8re+de+la+distribution+g%C3%A9ographique%2C+de+la+taxinomie%2C+de+photo%2C+de+la+bibliographie+scientifique%2C+des+liens+et+du+forum+de+discussion.+Presentation+of+all+the+watery+species+of+tortoises+with+neck+of+snake+of+South+America.+Regular+actualization+of+the+geographical+distribution%2C+taxonomy%2C+photograph%2C+the+scientific+bibliography%2C+the+bonds+and+the+forum+of+discussion.';
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();
};
