/* [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','401',jdecode('Vuivra'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','43922',jdecode('News'),jdecode(''),'/43922.html','true',[],'',''],
	['PAGE','43964',jdecode('Pr%C3%A9sentation'),jdecode(''),'/43964/index.html','true',[ 
		['PAGE','113601',jdecode('Lucas'),jdecode(''),'/43964/113601.html','true',[],'',''],
		['PAGE','113622',jdecode('Neil'),jdecode(''),'/43964/113622.html','true',[],'','']
	],'',''],
	['PAGE','115801',jdecode('Nos+serpents'),jdecode(''),'/115801/index.html','true',[ 
		['PAGE','115822',jdecode('Lucas'),jdecode(''),'/115801/115822.html','true',[],'',''],
		['PAGE','59901',jdecode('Neil'),jdecode(''),'/115801/59901.html','true',[],'','']
	],'',''],
	['PAGE','15301',jdecode('Crotalinae'),jdecode(''),'/15301/index.html','true',[ 
		['PAGE','15701',jdecode('Agkistrodon+contortrix+ssp.'),jdecode(''),'/15301/15701.html','true',[],'',''],
		['PAGE','15743',jdecode('Agkistrodon+taylori'),jdecode(''),'/15301/15743.html','true',[],'',''],
		['PAGE','25201',jdecode('Agkistrodon+p.conanti'),jdecode(''),'/15301/25201.html','true',[],'',''],
		['PAGE','15785',jdecode('Calloselasma+rhodostoma'),jdecode(''),'/15301/15785.html','true',[],'',''],
		['PAGE','64301',jdecode('Crotalus+ruber+ruber'),jdecode(''),'/15301/64301.html','true',[],'',''],
		['PAGE','122101',jdecode('Cryptelitrops+albolabris'),jdecode(''),'/15301/122101.html','true',[],'',''],
		['PAGE','15764',jdecode('Deinagkistrodon+acutus'),jdecode(''),'/15301/15764.html','true',[],'',''],
		['PAGE','15890',jdecode('Trimeresurus+venustus'),jdecode(''),'/15301/15890.html','true',[],'','']
	],'',''],
	['PAGE','15322',jdecode('Viperinae'),jdecode(''),'/15322/index.html','true',[ 
		['PAGE','15953',jdecode('Bitis+arietans+'),jdecode(''),'/15322/15953.html','true',[],'',''],
		['PAGE','15911',jdecode('Bitis+caudalis+'),jdecode(''),'/15322/15911.html','true',[],'',''],
		['PAGE','15932',jdecode('Bitis+nasicornis+'),jdecode(''),'/15322/15932.html','true',[],'',''],
		['PAGE','15974',jdecode('Bitis+rhinoceros'),jdecode(''),'/15322/15974.html','true',[],'',''],
		['PAGE','15995',jdecode('Cerastes+cerastes+'),jdecode(''),'/15322/15995.html','true',[],'',''],
		['PAGE','35301',jdecode('Daboia+russelii'),jdecode(''),'/15322/35301.html','true',[],'',''],
		['PAGE','16016',jdecode('Macrovipera+l.obtusa'),jdecode(''),'/15322/16016.html','true',[],'',''],
		['PAGE','108601',jdecode('Macrovipera+mauritanica'),jdecode(''),'/15322/108601.html','true',[],'',''],
		['PAGE','16037',jdecode('Vipera+a.rufoi'),jdecode(''),'/15322/16037.html','true',[],'','']
	],'',''],
	['PAGE','15343',jdecode('Elapidae'),jdecode(''),'/15343/index.html','true',[ 
		['PAGE','82601',jdecode('Acanthophis+sp'),jdecode(''),'/15343/82601.html','true',[],'',''],
		['PAGE','16100',jdecode('Aspidelaps+l.infuscatus'),jdecode(''),'/15343/16100.html','true',[],'',''],
		['PAGE','88001',jdecode('Naja+annulifera'),jdecode(''),'/15343/88001.html','true',[],'',''],
		['PAGE','103301',jdecode('Naja+haje+legionis'),jdecode(''),'/15343/103301.html','true',[],'',''],
		['PAGE','122122',jdecode('Naja+kaouthia'),jdecode(''),'/15343/122122.html','true',[],'',''],
		['PAGE','122143',jdecode('Naja+melanoleuca'),jdecode(''),'/15343/122143.html','true',[],'',''],
		['PAGE','16079',jdecode('Naja+naja'),jdecode(''),'/15343/16079.html','true',[],'',''],
		['PAGE','103322',jdecode('Naja+nigricollis+nigricollis'),jdecode(''),'/15343/103322.html','true',[],'',''],
		['PAGE','93701',jdecode('Naja+nivea'),jdecode(''),'/15343/93701.html','true',[],'',''],
		['PAGE','55601',jdecode('Naja+pallida'),jdecode(''),'/15343/55601.html','true',[],'',''],
		['PAGE','16058',jdecode('Naja+siamensis'),jdecode(''),'/15343/16058.html','true',[],'','']
	],'',''],
	['PAGE','69501',jdecode('Soins'),jdecode(''),'/69501/index.html','true',[ 
		['PAGE','67501',jdecode('Op%C3%A9ration+sur+Agkistrodon+sp'),jdecode(''),'/69501/67501.html','true',[],'',''],
		['PAGE','130301',jdecode('Op%C3%A9ration+sur+N.h.legionis'),jdecode(''),'/69501/130301.html','true',[],'',''],
		['PAGE','112601',jdecode('D%C3%A9c%C3%A8s+et+autopsie+A.taylori'),jdecode(''),'/69501/112601.html','true',[],'',''],
		['PAGE','90001',jdecode('Autopsie+V.ammodytes'),jdecode(''),'/69501/90001.html','true',[],'','']
	],'',''],
	['PAGE','77201',jdecode('Infrastructure'),jdecode(''),'/77201/index.html','true',[ 
		['PAGE','85401',jdecode('Le+local%2C+donn%C3%A9es+de+base'),jdecode(''),'/77201/85401.html','true',[],'',''],
		['PAGE','85422',jdecode('Id%C3%A9es+%C3%A0+mettre+en+place'),jdecode(''),'/77201/85422.html','true',[],'',''],
		['PAGE','85443',jdecode('Les+travaux'),jdecode(''),'/77201/85443.html','true',[],'',''],
		['PAGE','96101',jdecode('Terrariums'),jdecode(''),'/77201/96101.html','true',[],'','']
	],'',''],
	['PAGE','119201',jdecode('Voyage+et+terrain'),jdecode(''),'/119201/index.html','true',[ 
		['PAGE','119222',jdecode('Floride'),jdecode(''),'/119201/119222.html','true',[],'',''],
		['PAGE','127001',jdecode('Bolzano%2FItalie'),jdecode(''),'/119201/127001.html','true',[],'',''],
		['PAGE','125801',jdecode('Croatie%2FSlov%C3%A9nie'),jdecode(''),'/119201/125801.html','true',[],'','']
	],'',''],
	['PAGE','70701',jdecode('Mythes+et+l%C3%A9gendes'),jdecode(''),'/70701/index.html','true',[ 
		['PAGE','70722',jdecode('Asie'),jdecode(''),'/70701/70722.html','true',[],'',''],
		['PAGE','75101',jdecode('Afrique'),jdecode(''),'/70701/75101.html','true',[],'',''],
		['PAGE','74301',jdecode('Am%C3%A9riques'),jdecode(''),'/70701/74301.html','true',[],'',''],
		['PAGE','70764',jdecode('Oc%C3%A9anie'),jdecode(''),'/70701/70764.html','true',[],'',''],
		['PAGE','70806',jdecode('Europe'),jdecode(''),'/70701/70806.html','true',[],'','']
	],'',''],
	['PAGE','100501',jdecode('Ventes%2Fnaissances'),jdecode(''),'/100501/index.html','true',[ 
		['PAGE','123901',jdecode('naissances+2009'),jdecode(''),'/100501/123901.html','true',[],'',''],
		['PAGE','101201',jdecode('Ventes'),jdecode(''),'/100501/101201.html','true',[],'','']
	],'',''],
	['PAGE','42306',jdecode('Livre+d%26%23x27%3Bor'),jdecode(''),'/42306/index.html','true',[ 
		['PAGE','42301',jdecode('Entr%C3%A9es'),jdecode(''),'/42306/42301.html','false',[],'','']
	],'',''],
	['PAGE','44027',jdecode('Contacts+'),jdecode(''),'/44027.html','true',[],'',''],
	['PAGE','65901',jdecode('Liens'),jdecode(''),'/65901.html','true',[],'','']];
var siteelementCount=66;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10892';
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: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10892',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-42306abw0x0in22pu']={
webappId:    '1002',
documentId:  '42306',
internalId:  '42306abw0x0in22pu',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090527-145212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15343',
internalId:  '',
customField: '20071016-091232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43922',
internalId:  '',
customField: '20090614-101607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43964',
internalId:  '',
customField: '20080825-091926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113601',
internalId:  '',
customField: '20080825-092422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113622',
internalId:  '',
customField: '20080825-092436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115801',
internalId:  '',
customField: '20081022-152121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115822',
internalId:  '',
customField: '20081207-202329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59901',
internalId:  '',
customField: '20090910-110140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15301',
internalId:  '',
customField: '20071016-091036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20080712-095650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15743',
internalId:  '',
customField: '20080712-100523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25201',
internalId:  '',
customField: '20090322-124409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15785',
internalId:  '',
customField: '20080518-184322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64301',
internalId:  '',
customField: '20080518-183337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122101',
internalId:  '',
customField: '20090129-172833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15764',
internalId:  '',
customField: '20080716-111823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15890',
internalId:  '',
customField: '20080207-095244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15322',
internalId:  '',
customField: '20071016-091129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15953',
internalId:  '',
customField: '20071209-105935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15911',
internalId:  '',
customField: '20070727-120633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15932',
internalId:  '',
customField: '20070727-120728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15974',
internalId:  '',
customField: '20080201-150116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15995',
internalId:  '',
customField: '20070727-121004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35301',
internalId:  '',
customField: '20080418-102604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16016',
internalId:  '',
customField: '20070505-170858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108601',
internalId:  '',
customField: '20080727-172518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16037',
internalId:  '',
customField: '20070505-171215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82601',
internalId:  '',
customField: '20071212-172157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16100',
internalId:  '',
customField: '20090614-101824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88001',
internalId:  '',
customField: '20080131-114815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103301',
internalId:  '',
customField: '20090706-172903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122122',
internalId:  '',
customField: '20090129-172833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122143',
internalId:  '',
customField: '20090129-172833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16079',
internalId:  '',
customField: '20070505-213332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103322',
internalId:  '',
customField: '20081207-202805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93701',
internalId:  '',
customField: '20090706-174032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55601',
internalId:  '',
customField: '20070727-115920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16058',
internalId:  '',
customField: '20090614-101946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69501',
internalId:  '',
customField: '20090504-104958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67501',
internalId:  '',
customField: '20071122-080907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112601',
internalId:  '',
customField: '20080727-173726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90001',
internalId:  '',
customField: '20080221-215947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77201',
internalId:  '',
customField: '20080113-091306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85401',
internalId:  '',
customField: '20080113-092452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85422',
internalId:  '',
customField: '20080113-094924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85443',
internalId:  '',
customField: '20080801-180506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96101',
internalId:  '',
customField: '20080217-093228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119201',
internalId:  '',
customField: '20090527-115846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119222',
internalId:  '',
customField: '20090122-151439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70701',
internalId:  '',
customField: '20071105-083814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70722',
internalId:  '',
customField: '20071109-183521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75101',
internalId:  '',
customField: '20071109-184622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74301',
internalId:  '',
customField: '20071109-181547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70764',
internalId:  '',
customField: '20071105-104318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70806',
internalId:  '',
customField: '20071109-185709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100501',
internalId:  '',
customField: '20090527-145322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101201',
internalId:  '',
customField: '20090614-102234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42306',
internalId:  '',
customField: '20070511-145843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42301',
internalId:  '',
customField: '20070511-145843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44027',
internalId:  '',
customField: '20090605-175204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65901',
internalId:  '',
customField: '20080504-100248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123901',
internalId:  '',
customField: '20090614-102123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125801',
internalId:  '',
customField: '20090511-095252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127001',
internalId:  '',
customField: '20090511-142209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130301',
internalId:  '',
customField: '20090703-084951'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN22PU';
var companyName   = 'Venomous+reptiles';
var htmlTitle	  = 'vuivra';
var metaKeywords  = 'venimeux%2C+venom%2C+serpents%2C+r%EF%BF%BDptiles%2C+vuivra%2C+elapidae%2C+viperinae%2C+crotalinae%2C+Agkistrodon%2C+conanti%2C+contortrix%2C+pictigaster%2C+Bitis%2C+taylori%2C+Vipera%2C+Naja%2C+Crotalus%2C+Aspidelaps%2C+Macrovipera%2C+Daboia%2C+vip%EF%BF%BDre%2C+cobra%2C+crotale%2C+venin%2C+mocassin%2C+mamushi%2C+Russelli%2C+viper%2C+pitviper%2C+rattlesnake%2C+Atropoides%2C+mexicanus%2C+Echis%2C+ocellatus%2C+pallida%2C+gabonica%2C+arietans%2C+cerastes%2C+oreganus%2C+sputatrix%2C+Deinagkistrodon%2C+acutus%2C+nasicornis%2C+mitchelli%2C+stephensi%2C+lebetina%2C+obtusa%2C+rufoi%2C+annulifera%2C+sistrurus%2C+catenatus%2C+Acanthophis%2C+rugosus%2C+antarcticus%2C+laewis%2C+l%EF%BF%BDgendes%2C+mythes%2C+terrarium%2C+herpetologie%2C+vipera%2C+aspis%2C+photos%2C+photo%2C+crochets%2C+pinces%2C+schweizeri%2C+turanica%2C+mauritanica%2C+latastei%2C+gaditana%2C+meridionalis%2C+annulifera%2C+melanoleuca%2C+kaouthia%2C+pseudocerastes%2C+persicus%2C+fieldi%2C+Atheris%2C+ceratophora%2C+palestinae%2C+raddei%2C+xanthina%2C+Neil%2C+Villard%2C+Lucas%2C+Carretero%2C+herping%2C+Croatie%2C+Slov%EF%BF%BDnie%2C+Croatia%2C+Slovenia%2C+longissima%2C+quatuorlineata%2C+floride%2C+florida%2C+elaphe%2C+Krk+serpents%2C+krk+serpent%2C+Krk+snake%2C+Krk+snakes%2C+Podarcis%2C+';
var metaContents  = 'serpents+venimeux%2C+recherche%2C+%EF%BF%BDchanges+et+ventes.+Fiches+d%EF%BF%BDlevages%2C+terrain%2C+herping.';
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();
};
