/* [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('BUSCAR'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','147667',jdecode('MAGNICHARTERS+RESERVAS'),jdecode(''),'/147667.html','true',[],'',''],
	['PAGE','4601',jdecode('CIRCUITOS'),jdecode(''),'/4601/index.html','true',[ 
		['PAGE','4622',jdecode('Europa'),jdecode(''),'/4601/4622.html','true',[],'',''],
		['PAGE','4643',jdecode('Medio+Oriente'),jdecode(''),'/4601/4643.html','true',[],'',''],
		['PAGE','4664',jdecode('Asia'),jdecode(''),'/4601/4664.html','true',[],'',''],
		['PAGE','4685',jdecode('Sudamerica'),jdecode(''),'/4601/4685.html','true',[],'',''],
		['PAGE','192567',jdecode('LAS+VEGAS'),jdecode(''),'/4601/192567.html','true',[],'',''],
		['PAGE','193467',jdecode('CANADA'),jdecode(''),'/4601/193467.html','true',[],'','']
	],'',''],
	['PAGE','10201',jdecode('ITINERARIOS'),jdecode(''),'/10201/index.html','true',[ 
		['PAGE','10801',jdecode('Europa+Total'),jdecode(''),'/10201/10801.html','true',[],'',''],
		['PAGE','10822',jdecode('Europa+Fantastica'),jdecode(''),'/10201/10822.html','true',[],'',''],
		['PAGE','10843',jdecode('Europa+a+su+Alcance'),jdecode(''),'/10201/10843.html','true',[],'',''],
		['PAGE','26801',jdecode('Europa+Tur%C3%ADstica'),jdecode(''),'/10201/26801.html','true',[],'',''],
		['PAGE','124767',jdecode('Madrid+-+Londres'),jdecode(''),'/10201/124767.html','true',[],'',''],
		['PAGE','124788',jdecode('Europa+Viva'),jdecode(''),'/10201/124788.html','true',[],'',''],
		['PAGE','124809',jdecode('Paseo+por+Europa'),jdecode(''),'/10201/124809.html','true',[],'',''],
		['PAGE','128488',jdecode('Europa+Monumental'),jdecode(''),'/10201/128488.html','true',[],'',''],
		['PAGE','26822',jdecode('Euopa+para+todos'),jdecode(''),'/10201/26822.html','true',[],'',''],
		['PAGE','26843',jdecode('Madrid%2C+Paris%2C+...'),jdecode(''),'/10201/26843.html','true',[],'',''],
		['PAGE','26864',jdecode('Europa+de+Ensue%C3%B1o'),jdecode(''),'/10201/26864.html','true',[],'',''],
		['PAGE','26885',jdecode('Italia+Tradicional'),jdecode(''),'/10201/26885.html','true',[],'',''],
		['PAGE','26906',jdecode('Perlas+de+Europa'),jdecode(''),'/10201/26906.html','true',[],'',''],
		['PAGE','84967',jdecode('Joyas+de+Europa'),jdecode(''),'/10201/84967.html','true',[],'',''],
		['PAGE','31901',jdecode('OLIMPIA-DELFOS'),jdecode(''),'/10201/31901.html','true',[],'',''],
		['PAGE','42401',jdecode('Grecia+e+Islas'),jdecode(''),'/10201/42401.html','true',[],'',''],
		['PAGE','42422',jdecode('Atenas+y+Mar'),jdecode(''),'/10201/42422.html','true',[],'',''],
		['PAGE','42443',jdecode('Grecia+Cl%C3%A1sica'),jdecode(''),'/10201/42443.html','true',[],'',''],
		['PAGE','42464',jdecode('TURQUIA+DE+ORO'),jdecode(''),'/10201/42464.html','true',[],'',''],
		['PAGE','26927',jdecode('Egipto+con+crucero+'),jdecode(''),'/10201/26927.html','true',[],'',''],
		['PAGE','26948',jdecode('Egipto+al+completo'),jdecode(''),'/10201/26948.html','true',[],'',''],
		['PAGE','26969',jdecode('Gran+circuito+'),jdecode(''),'/10201/26969.html','true',[],'',''],
		['PAGE','26990',jdecode('Antiguas+y+nuevas'),jdecode(''),'/10201/26990.html','true',[],'',''],
		['PAGE','27011',jdecode('Israel+-+Jordania'),jdecode(''),'/10201/27011.html','true',[],'',''],
		['PAGE','27032',jdecode('China+Imperial'),jdecode(''),'/10201/27032.html','true',[],'',''],
		['PAGE','27053',jdecode('Maravillas+de+China'),jdecode(''),'/10201/27053.html','true',[],'',''],
		['PAGE','27074',jdecode('Thailandia+Cl%C3%A1sica+y+C.'),jdecode(''),'/10201/27074.html','true',[],'',''],
		['PAGE','27095',jdecode('Thailandia+Cl%C3%A1sica'),jdecode(''),'/10201/27095.html','true',[],'',''],
		['PAGE','43101',jdecode('Buenos+Aires+-+A+su+medida'),jdecode(''),'/10201/43101.html','true',[],'',''],
		['PAGE','43122',jdecode('Buenos+Aires+y+C'),jdecode(''),'/10201/43122.html','true',[],'',''],
		['PAGE','179667',jdecode('Bariloche+y+Buenos+Aires'),jdecode(''),'/10201/179667.html','true',[],'',''],
		['PAGE','43143',jdecode('Rio+de+Janeiro+-'),jdecode(''),'/10201/43143.html','true',[],'',''],
		['PAGE','43164',jdecode('Mega+Peru'),jdecode(''),'/10201/43164.html','true',[],'',''],
		['PAGE','43185',jdecode('Viaje+al+fin+del+Mundo'),jdecode(''),'/10201/43185.html','true',[],'','']
	],'',''],
	['PAGE','135067',jdecode('PAQUETES+QUINCEA%C3%91ERAS'),jdecode(''),'/135067.html','true',[],'',''],
	['PAGE','8601',jdecode('CRUCEROS'),jdecode(''),'/8601/index.html','true',[ 
		['PAGE','21901',jdecode('Royal+Caribbean'),jdecode(''),'/8601/21901.html','true',[],'',''],
		['PAGE','22201',jdecode('Celebrity+Cruises'),jdecode(''),'/8601/22201.html','true',[],'',''],
		['PAGE','21922',jdecode('Princess+Cruises'),jdecode(''),'/8601/21922.html','true',[],'',''],
		['PAGE','81067',jdecode('Carnival'),jdecode(''),'/8601/81067.html','true',[],'',''],
		['PAGE','81088',jdecode('Costa'),jdecode(''),'/8601/81088.html','true',[],'',''],
		['PAGE','83567',jdecode('Holland+America'),jdecode(''),'/8601/83567.html','true',[],'',''],
		['PAGE','87167',jdecode('Norwegain+Cruise'),jdecode(''),'/8601/87167.html','true',[],'',''],
		['PAGE','96067',jdecode('Cunard'),jdecode(''),'/8601/96067.html','true',[],'',''],
		['PAGE','132867',jdecode('Pullmantur'),jdecode(''),'/8601/132867.html','true',[],'','']
	],'',''],
	['PAGE','8622',jdecode('HOTELES'),jdecode(''),'/8622/index.html','true',[ 
		['PAGE','8643',jdecode('Nacionales'),jdecode(''),'/8622/8643.html','true',[],'',''],
		['PAGE','8664',jdecode('Internacionales'),jdecode(''),'/8622/8664.html','true',[],'','']
	],'',''],
	['PAGE','4706',jdecode('PROMOCIONES'),jdecode(''),'/4706.html','true',[],'',''],
	['PAGE','8685',jdecode('ATRACCIONES'),jdecode(''),'/8685/index.html','true',[ 
		['PAGE','38201',jdecode('Disney+World'),jdecode(''),'/8685/38201.html','true',[],'',''],
		['PAGE','38222',jdecode('Universal+Studios'),jdecode(''),'/8685/38222.html','true',[],'',''],
		['PAGE','38243',jdecode('Sea+World'),jdecode(''),'/8685/38243.html','true',[],'','']
	],'',''],
	['PAGE','8769',jdecode('SEGURO+'),jdecode(''),'/8769.html','true',[],'',''],
	['PAGE','4883',jdecode('RESERVAS+ON-LINE'),jdecode(''),'/4883.html','true',[],'',''],
	['PAGE','4946',jdecode('CONTACTENOS'),jdecode(''),'/4946.html','true',[],'',''],
	['PAGE','68188',jdecode('VISADOS'),jdecode(''),'/68188.html','true',[],'',''],
	['PAGE','68209',jdecode('LINKS'),jdecode(''),'/68209.html','true',[],'',''],
	['PAGE','45801',jdecode('TERMINOS+...'),jdecode(''),'/45801.html','true',[],'',''],
	['PAGE','216267',jdecode('FORO+OMV'),jdecode(''),'/216267.html','true',[],'',''],
	['PAGE','166567',jdecode('BIENVENIDOS'),jdecode(''),'/166567.html','true',[],'','']];
var siteelementCount=71;
theSitetree.topTemplateName='Ocean';
theSitetree.paletteFamily='1E77BA';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33082';
theSitetree.graphicsetId='14054';
theSitetree.contentColor='00386f';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Ocean',
				paletteFamily: 	'1E77BA',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33082',
				graphicsetId: 	'14054',
				contentColor: 	'00386f',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-1741']={
webappId:    '7008',
documentId:  '4883',
internalId:  '1741',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100301-173226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20100118-155111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4622',
internalId:  '',
customField: '20100226-183902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4643',
internalId:  '',
customField: '20100301-125955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4664',
internalId:  '',
customField: '20100301-142438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4685',
internalId:  '',
customField: '20100301-152830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10201',
internalId:  '',
customField: '20091001-153352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10801',
internalId:  '',
customField: '20100121-150112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10822',
internalId:  '',
customField: '20091223-144213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10843',
internalId:  '',
customField: '20091217-185310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26801',
internalId:  '',
customField: '20100121-165110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124767',
internalId:  '',
customField: '20100121-183146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124788',
internalId:  '',
customField: '20100128-183208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124809',
internalId:  '',
customField: '20100128-185934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '179667',
internalId:  '',
customField: '20100119-175047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128488',
internalId:  '',
customField: '20100129-151335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26822',
internalId:  '',
customField: '20100129-193831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26843',
internalId:  '',
customField: '20090909-125127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26864',
internalId:  '',
customField: '20090909-151526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26885',
internalId:  '',
customField: '20100202-172508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26906',
internalId:  '',
customField: '20100203-130850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84967',
internalId:  '',
customField: '20100203-134302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31901',
internalId:  '',
customField: '20100203-171828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42401',
internalId:  '',
customField: '20080712-104423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42422',
internalId:  '',
customField: '20080712-104655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42443',
internalId:  '',
customField: '20090911-122413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42464',
internalId:  '',
customField: '20090911-132239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26927',
internalId:  '',
customField: '20090911-134207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26948',
internalId:  '',
customField: '20091223-151429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26969',
internalId:  '',
customField: '20091228-132707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26990',
internalId:  '',
customField: '20090922-143614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27011',
internalId:  '',
customField: '20090922-145822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27032',
internalId:  '',
customField: '20080708-113900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27053',
internalId:  '',
customField: '20080708-114151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27074',
internalId:  '',
customField: '20090922-133001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27095',
internalId:  '',
customField: '20080708-114645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43101',
internalId:  '',
customField: '20100119-175426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43122',
internalId:  '',
customField: '20080709-114639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43143',
internalId:  '',
customField: '20090922-151722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43164',
internalId:  '',
customField: '20100120-174516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43185',
internalId:  '',
customField: '20090922-152851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20090714-173232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21901',
internalId:  '',
customField: '20090924-161303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22201',
internalId:  '',
customField: '20090925-131214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21922',
internalId:  '',
customField: '20090925-134101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81067',
internalId:  '',
customField: '20090718-134334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81088',
internalId:  '',
customField: '20090730-150450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83567',
internalId:  '',
customField: '20090806-165333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87167',
internalId:  '',
customField: '20080901-140808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96067',
internalId:  '',
customField: '20081020-150549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166567',
internalId:  '',
customField: '20100303-140328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '192567',
internalId:  '',
customField: '20100107-164758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193467',
internalId:  '',
customField: '20100119-181128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8622',
internalId:  '',
customField: '20080722-161339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8643',
internalId:  '',
customField: '20080728-144201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8664',
internalId:  '',
customField: '20080724-131300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4706',
internalId:  '',
customField: '20080722-130809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8685',
internalId:  '',
customField: '20090204-123025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38201',
internalId:  '',
customField: '20080722-103625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38222',
internalId:  '',
customField: '20080722-104122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38243',
internalId:  '',
customField: '20080725-132151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8769',
internalId:  '',
customField: '20080721-140944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4883',
internalId:  '',
customField: '20080721-161322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4946',
internalId:  '',
customField: '20091228-164217'
};
webappMappings['1003']=webappMappings['1003-avec10infp3h1279679f036']={
webappId:    '1003',
documentId:  '216267',
internalId:  'avec10infp3h1279679f036',
customField: 'es:ES'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68188',
internalId:  '',
customField: '20080815-122332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68209',
internalId:  '',
customField: '20100325-125355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45801',
internalId:  '',
customField: '20080709-172250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132867',
internalId:  '',
customField: '20090923-155546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135067',
internalId:  '',
customField: '20090217-185413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147667',
internalId:  '',
customField: '20100316-145115'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '401',
internalId:  'search',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '216267',
internalId:  '',
customField: '20100325-125846'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INFP3H';
var companyName   = 'OPERADOR+MUNDO+DEL+VIAJE+';
var htmlTitle	  = '';
var metaKeywords  = 'agencia+de+viajes';
var metaContents  = 'Agencia+mayorista.+Conoce+nuestras+promociones+Tel.+5560-9554%2C+01800-823-7002';
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();
};

