/* [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','1701',jdecode('Inicial'),jdecode(''),'/1701.html','true',[],''],
	['PAGE','8912',jdecode('Dicion%C3%A1rio'),jdecode(''),'/8912/index.html','true',[ 
		['PAGE','16612',jdecode('Abstin%C3%AAncia'),jdecode(''),'/8912/16612.html','true',[],''],
		['PAGE','17212',jdecode('Abuso'),jdecode(''),'/8912/17212.html','true',[],''],
		['PAGE','17312',jdecode('Adic%C3%A7%C3%A3o'),jdecode(''),'/8912/17312.html','true',[],''],
		['PAGE','17333',jdecode('Adicto'),jdecode(''),'/8912/17333.html','true',[],''],
		['PAGE','17354',jdecode('Alcal%C3%B3ide'),jdecode(''),'/8912/17354.html','true',[],''],
		['PAGE','19912',jdecode('Alucina%C3%A7%C3%A3o'),jdecode(''),'/8912/19912.html','true',[],''],
		['PAGE','17512',jdecode('Analg%C3%A9sico'),jdecode(''),'/8912/17512.html','true',[],''],
		['PAGE','20212',jdecode('Anest%C3%A9sico'),jdecode(''),'/8912/20212.html','true',[],''],
		['PAGE','17533',jdecode('Anorex%C3%ADgeno'),jdecode(''),'/8912/17533.html','true',[],''],
		['PAGE','17612',jdecode('Ansiol%C3%ADtico'),jdecode(''),'/8912/17612.html','true',[],''],
		['PAGE','17712',jdecode('Antiepl%C3%A9tico'),jdecode(''),'/8912/17712.html','true',[],''],
		['PAGE','17812',jdecode('Automedica%C3%A7%C3%A3o'),jdecode(''),'/8912/17812.html','true',[],''],
		['PAGE','20812',jdecode('Comportamento+adictivo'),jdecode(''),'/8912/20812.html','true',[],''],
		['PAGE','18212',jdecode('Craving'),jdecode(''),'/8912/18212.html','true',[],''],
		['PAGE','21012',jdecode('Depend%C3%AAncia'),jdecode(''),'/8912/21012.html','true',[],''],
		['PAGE','17833',jdecode('Depend%C3%AAncia+f%C3%ADsica'),jdecode(''),'/8912/17833.html','true',[],''],
		['PAGE','17854',jdecode('Depend%C3%AAncia+ps%C3%ADquica'),jdecode(''),'/8912/17854.html','true',[],''],
		['PAGE','23312',jdecode('Dependente'),jdecode(''),'/8912/23312.html','true',[],''],
		['PAGE','18412',jdecode('Depressor'),jdecode(''),'/8912/18412.html','true',[],''],
		['PAGE','15412',jdecode('Droga'),jdecode(''),'/8912/15412.html','true',[],''],
		['PAGE','15512',jdecode('Drogadic%C3%A7%C3%A3o'),jdecode(''),'/8912/15512.html','true',[],''],
		['PAGE','15533',jdecode('Drogadicto'),jdecode(''),'/8912/15533.html','true',[],''],
		['PAGE','15633',jdecode('Drogas+il%C3%ADcitas'),jdecode(''),'/8912/15633.html','true',[],''],
		['PAGE','15612',jdecode('Drogas+l%C3%ADcitas'),jdecode(''),'/8912/15612.html','true',[],''],
		['PAGE','15712',jdecode('Entorpecente'),jdecode(''),'/8912/15712.html','true',[],''],
		['PAGE','15733',jdecode('F%C3%A1rmaco'),jdecode(''),'/8912/15733.html','true',[],''],
		['PAGE','15812',jdecode('Farmacodepend%C3%AAncia'),jdecode(''),'/8912/15812.html','true',[],''],
		['PAGE','15833',jdecode('Farmacodependente'),jdecode(''),'/8912/15833.html','true',[],''],
		['PAGE','18233',jdecode('Fissura'),jdecode(''),'/8912/18233.html','true',[],''],
		['PAGE','15912',jdecode('Hipn%C3%B3tico'),jdecode(''),'/8912/15912.html','true',[],''],
		['PAGE','15933',jdecode('Intoxica%C3%A7%C3%A3o'),jdecode(''),'/8912/15933.html','true',[],''],
		['PAGE','18254',jdecode('Lapso'),jdecode(''),'/8912/18254.html','true',[],''],
		['PAGE','24112',jdecode('Medicamento'),jdecode(''),'/8912/24112.html','true',[],''],
		['PAGE','15954',jdecode('Narc%C3%B3tico'),jdecode(''),'/8912/15954.html','true',[],''],
		['PAGE','15975',jdecode('Overdose'),jdecode(''),'/8912/15975.html','true',[],''],
		['PAGE','15996',jdecode('Placebo'),jdecode(''),'/8912/15996.html','true',[],''],
		['PAGE','16112',jdecode('Preven%C3%A7%C3%A3o'),jdecode(''),'/8912/16112.html','true',[],''],
		['PAGE','16212',jdecode('Psicoativos'),jdecode(''),'/8912/16212.html','true',[],''],
		['PAGE','16312',jdecode('Psicotr%C3%B3picos'),jdecode(''),'/8912/16312.html','true',[],''],
		['PAGE','16412',jdecode('Sedativo'),jdecode(''),'/8912/16412.html','true',[],''],
		['PAGE','16512',jdecode('Sindrome'),jdecode(''),'/8912/16512.html','true',[],''],
		['PAGE','16633',jdecode('Toler%C3%A2ncia'),jdecode(''),'/8912/16633.html','true',[],''],
		['PAGE','16712',jdecode('Toxicidade'),jdecode(''),'/8912/16712.html','true',[],''],
		['PAGE','16812',jdecode('T%C3%B3xico'),jdecode(''),'/8912/16812.html','true',[],''],
		['PAGE','16912',jdecode('Toxicologia'),jdecode(''),'/8912/16912.html','true',[],''],
		['PAGE','17012',jdecode('Toxicomania'),jdecode(''),'/8912/17012.html','true',[],''],
		['PAGE','23412',jdecode('Toxicomano'),jdecode(''),'/8912/23412.html','true',[],''],
		['PAGE','23712',jdecode('Tranquilizante'),jdecode(''),'/8912/23712.html','true',[],''],
		['PAGE','17112',jdecode('Uso'),jdecode(''),'/8912/17112.html','true',[],''],
		['PAGE','17033',jdecode('Usu%C3%A1rio'),jdecode(''),'/8912/17033.html','true',[],'']
	],''],
	['PAGE','8933',jdecode('Tipos+de+drogas'),jdecode(''),'/8933/index.html','true',[ 
		['PAGE','14112',jdecode('Alcool'),jdecode(''),'/8933/14112.html','true',[],''],
		['PAGE','14133',jdecode('Maconha'),jdecode(''),'/8933/14133.html','true',[],''],
		['PAGE','14154',jdecode('Coca%C3%ADna'),jdecode(''),'/8933/14154.html','true',[],''],
		['PAGE','14175',jdecode('Anfetaminas'),jdecode(''),'/8933/14175.html','true',[],''],
		['PAGE','14196',jdecode('Ansioliticos'),jdecode(''),'/8933/14196.html','true',[],''],
		['PAGE','14217',jdecode('Barbituricos'),jdecode(''),'/8933/14217.html','true',[],''],
		['PAGE','14238',jdecode('Inalantes'),jdecode(''),'/8933/14238.html','true',[],''],
		['PAGE','14259',jdecode('LSD+e+Ecstasy'),jdecode(''),'/8933/14259.html','true',[],''],
		['PAGE','14280',jdecode('Tabaco'),jdecode(''),'/8933/14280.html','true',[],''],
		['PAGE','14301',jdecode('Hero%C3%ADna'),jdecode(''),'/8933/14301.html','true',[],'']
	],''],
	['PAGE','9212',jdecode('Tratamentos'),jdecode(''),'/9212.html','true',[],''],
	['PAGE','8954',jdecode('Cl%C3%ADnicas'),jdecode(''),'/8954.html','true',[],''],
	['PAGE','8975',jdecode('Not%C3%ADcias'),jdecode(''),'/8975.html','true',[],''],
	['PAGE','8996',jdecode('Livro+de+Visitas'),jdecode(''),'/8996.html','true',[],''],
	['PAGE','18512',jdecode('Contato'),jdecode(''),'/18512.html','true',[],''],
	['PAGE','9017',jdecode('Links'),jdecode(''),'/9017.html','true',[],''],
	['PAGE','9038',jdecode('Literatura'),jdecode(''),'/9038.html','true',[],''],
	['PAGE','2801',jdecode('Quem+somos'),jdecode(''),'/2801.html','true',[],'']];
var siteelementCount=71;
theSitetree.topTemplateName='Global';
theSitetree.paletteFamily='333399';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='85';
theSitetree.graphicsetId='105';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				name: 			'Global',
				paletteFamily: 	'333399',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'85',
				graphicsetId: 	'105',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'242E8A',
				b_color: 		'FF9900',
				c_color: 		'000000',
				d_color: 		'EAEAEA',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1701',
internalId:  '',
customField: '20090728-225028'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20090709-135015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8912',
internalId:  '',
customField: '20090710-195556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8933',
internalId:  '',
customField: '20090709-191057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9212',
internalId:  '',
customField: '20090709-191234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8954',
internalId:  '',
customField: '20090709-191057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8975',
internalId:  '',
customField: '20090709-191057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8996',
internalId:  '',
customField: '20090710-195032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9017',
internalId:  '',
customField: '20090709-191057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9038',
internalId:  '',
customField: '20090709-191057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14112',
internalId:  '',
customField: '20090710-165512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14133',
internalId:  '',
customField: '20090710-165512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14154',
internalId:  '',
customField: '20090710-165512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14175',
internalId:  '',
customField: '20090710-165512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14196',
internalId:  '',
customField: '20090710-165512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14217',
internalId:  '',
customField: '20090710-165512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14238',
internalId:  '',
customField: '20090710-165512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14259',
internalId:  '',
customField: '20090710-165512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14280',
internalId:  '',
customField: '20090710-165512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20090710-165512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16612',
internalId:  '',
customField: '20090726-221334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17212',
internalId:  '',
customField: '20090726-221629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17312',
internalId:  '',
customField: '20090726-221701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17333',
internalId:  '',
customField: '20090726-222716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17354',
internalId:  '',
customField: '20090718-214151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17512',
internalId:  '',
customField: '20090718-215118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17533',
internalId:  '',
customField: '20090718-215756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17612',
internalId:  '',
customField: '20090726-223600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17712',
internalId:  '',
customField: '20090726-223659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17812',
internalId:  '',
customField: '20090726-224149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17833',
internalId:  '',
customField: '20090718-221523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17854',
internalId:  '',
customField: '20090718-221703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15412',
internalId:  '',
customField: '20090710-185620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15512',
internalId:  '',
customField: '20090718-222236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15533',
internalId:  '',
customField: '20090718-222344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15612',
internalId:  '',
customField: '20090718-222539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15633',
internalId:  '',
customField: '20090718-222643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15712',
internalId:  '',
customField: '20090710-190019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15733',
internalId:  '',
customField: '20090710-190019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15812',
internalId:  '',
customField: '20090710-190147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15833',
internalId:  '',
customField: '20090710-190147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15912',
internalId:  '',
customField: '20090710-190331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15933',
internalId:  '',
customField: '20090710-190331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15954',
internalId:  '',
customField: '20090710-190331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15975',
internalId:  '',
customField: '20090710-190331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15996',
internalId:  '',
customField: '20090710-190331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16112',
internalId:  '',
customField: '20090710-190639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16212',
internalId:  '',
customField: '20090710-190707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16312',
internalId:  '',
customField: '20090710-190729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16412',
internalId:  '',
customField: '20090710-190800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16512',
internalId:  '',
customField: '20090710-190827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16633',
internalId:  '',
customField: '20090710-190942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16712',
internalId:  '',
customField: '20090710-191003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16812',
internalId:  '',
customField: '20090710-191030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16912',
internalId:  '',
customField: '20090710-191057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17012',
internalId:  '',
customField: '20090710-191200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17112',
internalId:  '',
customField: '20090710-191231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17033',
internalId:  '',
customField: '20090710-191200'
};
webappMappings['1002']=webappMappings['1002-8996avfl30inht9b']={
webappId:    '1002',
documentId:  '8996',
internalId:  '8996avfl30inht9b',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18212',
internalId:  '',
customField: '20090726-225451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18412',
internalId:  '',
customField: '20090710-193059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18233',
internalId:  '',
customField: '20090710-193011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18254',
internalId:  '',
customField: '20090710-193011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18512',
internalId:  '',
customField: '20090710-195211'
};
webappMappings['7008']=webappMappings['7008-9252']={
webappId:    '7008',
documentId:  '18512',
internalId:  '9252',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19912',
internalId:  '',
customField: '20090718-214742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20212',
internalId:  '',
customField: '20090718-215556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20812',
internalId:  '',
customField: '20090726-224710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21012',
internalId:  '',
customField: '20090726-230656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23712',
internalId:  '',
customField: '20090726-223450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23412',
internalId:  '',
customField: '20090726-222510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24112',
internalId:  '',
customField: '20090726-223952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23312',
internalId:  '',
customField: '20090726-222421'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHT9B';
var companyName   = 'Portal+Sem+Drogas';
var htmlTitle	  = 'Portal+Sem+Drogas';
var metaKeywords  = 'drogasal+coolismo';
var metaContents  = 'O+Portal+da+Depend%C3%AAncia+Qu%C3%ADmica+do+Brasil';
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();
};
