/* [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','4597',jdecode('Inicio'),jdecode(''),'/4597.html','true',[],'',''],
	['PAGE','385612',jdecode('Disponibilidad'),jdecode(''),'/385612.html','true',[],'',''],
	['PAGE','4654',jdecode('Casas+en+Cuernavaca'),jdecode(''),'/4654/index.html','true',[ 
		['PAGE','4681',jdecode('Casa+1'),jdecode(''),'/4654/4681.html','true',[],'',''],
		['PAGE','4708',jdecode('Casa+2'),jdecode(''),'/4654/4708.html','true',[],'',''],
		['PAGE','4735',jdecode('Casa+3'),jdecode(''),'/4654/4735.html','true',[],'',''],
		['PAGE','4762',jdecode('Casa+4'),jdecode(''),'/4654/4762.html','true',[],'',''],
		['PAGE','4789',jdecode('Casa+5'),jdecode(''),'/4654/4789.html','true',[],'',''],
		['PAGE','4816',jdecode('Casa+6'),jdecode(''),'/4654/4816.html','true',[],'',''],
		['PAGE','4843',jdecode('Casa+7'),jdecode(''),'/4654/4843.html','true',[],'',''],
		['PAGE','4870',jdecode('Casa+8'),jdecode(''),'/4654/4870.html','true',[],'',''],
		['PAGE','4897',jdecode('Casa+9'),jdecode(''),'/4654/4897.html','true',[],'',''],
		['PAGE','16602',jdecode('Casa+10'),jdecode(''),'/4654/16602.html','true',[],'',''],
		['PAGE','19511',jdecode('Casa+11'),jdecode(''),'/4654/19511.html','true',[],'',''],
		['PAGE','24711',jdecode('Casa+12'),jdecode(''),'/4654/24711.html','true',[],'',''],
		['PAGE','31523',jdecode('Casa+13'),jdecode(''),'/4654/31523.html','true',[],'',''],
		['PAGE','40523',jdecode('Casa+14'),jdecode(''),'/4654/40523.html','true',[],'',''],
		['PAGE','46823',jdecode('Casa+15'),jdecode(''),'/4654/46823.html','true',[],'',''],
		['PAGE','46850',jdecode('Casa+16'),jdecode(''),'/4654/46850.html','true',[],'',''],
		['PAGE','63013',jdecode('Casa+17'),jdecode(''),'/4654/63013.html','true',[],'',''],
		['PAGE','82713',jdecode('Casa+18'),jdecode(''),'/4654/82713.html','true',[],'',''],
		['PAGE','84213',jdecode('Casa+19'),jdecode(''),'/4654/84213.html','true',[],'',''],
		['PAGE','100341',jdecode('Casa+20'),jdecode(''),'/4654/100341.html','true',[],'',''],
		['PAGE','101863',jdecode('Casa+21'),jdecode(''),'/4654/101863.html','true',[],'',''],
		['PAGE','101872',jdecode('Casa+22'),jdecode(''),'/4654/101872.html','true',[],'',''],
		['PAGE','102538',jdecode('Casa+23'),jdecode(''),'/4654/102538.html','true',[],'',''],
		['PAGE','103054',jdecode('Casa+24'),jdecode(''),'/4654/103054.html','true',[],'',''],
		['PAGE','103459',jdecode('Casa+25'),jdecode(''),'/4654/103459.html','true',[],'',''],
		['PAGE','408223',jdecode('Casa+26'),jdecode(''),'/4654/408223.html','true',[],'',''],
		['PAGE','107465',jdecode('Casa+27'),jdecode(''),'/4654/107465.html','true',[],'',''],
		['PAGE','125601',jdecode('Casa+28'),jdecode(''),'/4654/125601.html','true',[],'',''],
		['PAGE','127601',jdecode('Casa+29'),jdecode(''),'/4654/127601.html','true',[],'',''],
		['PAGE','132501',jdecode('Casa+30'),jdecode(''),'/4654/132501.html','true',[],'',''],
		['PAGE','217201',jdecode('Casa+31'),jdecode(''),'/4654/217201.html','true',[],'',''],
		['PAGE','221901',jdecode('Casa+32'),jdecode(''),'/4654/221901.html','true',[],'',''],
		['PAGE','221922',jdecode('Casa+33'),jdecode(''),'/4654/221922.html','true',[],'',''],
		['PAGE','230801',jdecode('Casa+34'),jdecode(''),'/4654/230801.html','true',[],'',''],
		['PAGE','230822',jdecode('Casa+35'),jdecode(''),'/4654/230822.html','true',[],'',''],
		['PAGE','234712',jdecode('Casa+36'),jdecode(''),'/4654/234712.html','true',[],'',''],
		['PAGE','394212',jdecode('Casa+37'),jdecode(''),'/4654/394212.html','true',[],'',''],
		['PAGE','412123',jdecode('Casa+38'),jdecode(''),'/4654/412123.html','true',[],'',''],
		['PAGE','425434',jdecode('Casa+39'),jdecode(''),'/4654/425434.html','true',[],'',''],
		['PAGE','427334',jdecode('casa+40'),jdecode(''),'/4654/427334.html','true',[],'',''],
		['PAGE','440734',jdecode('Casa+41'),jdecode(''),'/4654/440734.html','true',[],'',''],
		['PAGE','444634',jdecode('casa+42'),jdecode(''),'/4654/444634.html','true',[],'',''],
		['PAGE','448134',jdecode('Casa+43'),jdecode(''),'/4654/448134.html','true',[],'',''],
		['PAGE','451334',jdecode('Casa+44'),jdecode(''),'/4654/451334.html','true',[],'',''],
		['PAGE','452534',jdecode('Casa+45'),jdecode(''),'/4654/452534.html','true',[],'',''],
		['PAGE','452555',jdecode('Casa+46'),jdecode(''),'/4654/452555.html','true',[],'',''],
		['PAGE','477645',jdecode('Casa+47'),jdecode(''),'/4654/477645.html','true',[],'',''],
		['PAGE','554245',jdecode('Casa+48'),jdecode(''),'/4654/554245.html','true',[],'',''],
		['PAGE','4924',jdecode('Villas'),jdecode(''),'/4654/4924.html','true',[],'',''],
		['PAGE','221943',jdecode('V+del+Sol'),jdecode(''),'/4654/221943.html','true',[],'',''],
		['PAGE','159501',jdecode('Las+Casitas'),jdecode(''),'/4654/159501.html','true',[],'',''],
		['PAGE','241512',jdecode('V+col.'),jdecode(''),'/4654/241512.html','true',[],'',''],
		['PAGE','414123',jdecode('Casa+con+villas'),jdecode(''),'/4654/414123.html','true',[],'',''],
		['PAGE','101622',jdecode('Hot+Cuau'),jdecode(''),'/4654/101622.html','true',[],'','']
	],'',''],
	['PAGE','465434',jdecode('Valle+de+Bravo'),jdecode(''),'/465434/index.html','true',[ 
		['PAGE','465455',jdecode('Casa+49'),jdecode(''),'/465434/465455.html','true',[],'','']
	],'',''],
	['PAGE','107627',jdecode('Casas+en+Acapulco'),jdecode(''),'/107627/index.html','true',[ 
		['PAGE','107636',jdecode('Suites+club+de+golf'),jdecode(''),'/107627/107636.html','true',[],'',''],
		['PAGE','519545',jdecode('Casa+A1'),jdecode(''),'/107627/519545.html','true',[],'',''],
		['PAGE','107645',jdecode('Casa+A2'),jdecode(''),'/107627/107645.html','true',[],'',''],
		['PAGE','112401',jdecode('Casa+A3'),jdecode(''),'/107627/112401.html','true',[],'','']
	],'',''],
	['PAGE','105965',jdecode('Ubicaci%C3%B3n'),jdecode(''),'/105965.html','true',[],'',''],
	['PAGE','507445',jdecode('Casas+por+costo'),jdecode(''),'/507445.html','true',[],'',''],
	['PAGE','4978',jdecode('Preguntas'),jdecode(''),'/4978/index.html','true',[ 
		['PAGE','35751',jdecode('Preguntas+%28follow+up+page%29'),jdecode(''),'/4978/35751.html','false',[],'','']
	],'',''],
	['PAGE','5005',jdecode('Reservaciones'),jdecode(''),'/5005/index.html','true',[ 
		['PAGE','36227',jdecode('Reservaciones+%28follow+up+page%29'),jdecode(''),'/5005/36227.html','false',[],'','']
	],'',''],
	['PAGE','24738',jdecode('Cancelaciones'),jdecode(''),'/24738.html','true',[],'',''],
	['PAGE','11602',jdecode('Seguridad'),jdecode(''),'/11602.html','true',[],'',''],
	['PAGE','35623',jdecode('Servicios+adicionales'),jdecode(''),'/35623/index.html','true',[ 
		['PAGE','35923',jdecode('Servicios+adicionales+%28follow+up+page%29'),jdecode(''),'/35623/35923.html','false',[],'','']
	],'',''],
	['PAGE','282613',jdecode('Nosotros'),jdecode(''),'/282613.html','true',[],'',''],
	['PAGE','512745',jdecode('Tarjetas'),jdecode(''),'/512745.html','true',[],'',''],
	['PAGE','546745',jdecode('Cita+para+ver+casas'),jdecode(''),'/546745.html','true',[],'','']];
var siteelementCount=77;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='BB9C60';
theSitetree.keyvisualId='2230';
theSitetree.keyvisualName='hotels1.jpg';
theSitetree.fontsetId='364';
theSitetree.graphicsetId='417';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='BB9C60';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'BB9C60',
				keyvisualId: 	'2230',
				keyvisualName: 	'hotels1.jpg',
				fontsetId: 		'364',
				graphicsetId: 	'417',
				contentColor: 	'000000',
				contentBGColor: 'BB9C60',
				a_color: 		'BB9C60',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				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:  '546745',
internalId:  '',
customField: '20091207-224831'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4597',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-6488']={
webappId:    '7008',
documentId:  '35623',
internalId:  '6488',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '477645',
internalId:  '',
customField: '20100310-101719'
};
webappMappings['7008']=webappMappings['7008-6489']={
webappId:    '7008',
documentId:  '5005',
internalId:  '6489',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '465455',
internalId:  '',
customField: '20090605-175934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '465434',
internalId:  '',
customField: '20090805-104314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4597',
internalId:  '',
customField: '20091111-001546'
};
webappMappings['7008']=webappMappings['7008-13541']={
webappId:    '7008',
documentId:  '546745',
internalId:  '13541',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132501',
internalId:  '',
customField: '20090605-193721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4924',
internalId:  '',
customField: '20090922-124940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4681',
internalId:  '',
customField: '20091117-211959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4843',
internalId:  '',
customField: '20090420-132856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24711',
internalId:  '',
customField: '20090213-001647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31523',
internalId:  '',
customField: '20090213-010150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46850',
internalId:  '',
customField: '20090605-205123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63013',
internalId:  '',
customField: '20091210-150238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82713',
internalId:  '',
customField: '20091111-165532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '241512',
internalId:  '',
customField: '20091215-161839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '221943',
internalId:  '',
customField: '20091110-162107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '507445',
internalId:  '',
customField: '20091121-012848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4708',
internalId:  '',
customField: '20091117-212357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4735',
internalId:  '',
customField: '20091117-212712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4762',
internalId:  '',
customField: '20100104-113807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4897',
internalId:  '',
customField: '20100122-144842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4654',
internalId:  '',
customField: '20100310-083009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19511',
internalId:  '',
customField: '20090922-005815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40523',
internalId:  '',
customField: '20090605-225815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46823',
internalId:  '',
customField: '20090922-005815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84213',
internalId:  '',
customField: '20090605-232623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101863',
internalId:  '',
customField: '20091210-150446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102538',
internalId:  '',
customField: '20090611-182933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103459',
internalId:  '',
customField: '20090611-185814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127601',
internalId:  '',
customField: '20091006-133355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '221922',
internalId:  '',
customField: '20090611-232030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '230822',
internalId:  '',
customField: '20090612-000928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '234712',
internalId:  '',
customField: '20091027-142037'
};
webappMappings['4001']=webappMappings['4001-14364044']={
webappId:    '4001',
documentId:  '512745',
internalId:  '14364044',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4789',
internalId:  '',
customField: '20100104-113553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4870',
internalId:  '',
customField: '20091215-162156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16602',
internalId:  '',
customField: '20100122-144643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100341',
internalId:  '',
customField: '20081222-131116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101872',
internalId:  '',
customField: '20090929-153515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '408223',
internalId:  '',
customField: '20100202-164956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '221901',
internalId:  '',
customField: '20090817-133128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '230801',
internalId:  '',
customField: '20081222-131619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159501',
internalId:  '',
customField: '20091116-003301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101622',
internalId:  '',
customField: '20090805-092145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4816',
internalId:  '',
customField: '20100309-132858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103054',
internalId:  '',
customField: '20090609-152359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125601',
internalId:  '',
customField: '20091215-162533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '512745',
internalId:  '',
customField: '20090925-230519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '519545',
internalId:  '',
customField: '20091210-152355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107465',
internalId:  '',
customField: '20090721-124452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217201',
internalId:  '',
customField: '20091203-154934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107627',
internalId:  '',
customField: '20091126-022246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107636',
internalId:  '',
customField: '20090519-111204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107645',
internalId:  '',
customField: '20081113-013912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112401',
internalId:  '',
customField: '20081113-013912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105965',
internalId:  '',
customField: '20091030-195525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4978',
internalId:  '',
customField: '20080515-203607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35751',
internalId:  '',
customField: '20050928-052515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5005',
internalId:  '',
customField: '20091030-194033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36227',
internalId:  '',
customField: '20051002-034210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24738',
internalId:  '',
customField: '20090427-142049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11602',
internalId:  '',
customField: '20080509-165628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35623',
internalId:  '',
customField: '20080509-165428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35923',
internalId:  '',
customField: '20050928-060738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '282613',
internalId:  '',
customField: '20080509-165246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '385612',
internalId:  '',
customField: '20100310-101938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '394212',
internalId:  '',
customField: '20090817-132519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '440734',
internalId:  '',
customField: '20090805-151701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '412123',
internalId:  '',
customField: '20090805-151932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '414123',
internalId:  '',
customField: '20090923-214552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '425434',
internalId:  '',
customField: '20090605-201409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '427334',
internalId:  '',
customField: '20090922-140629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '444634',
internalId:  '',
customField: '20090616-105257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '448134',
internalId:  '',
customField: '20090612-015802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '451334',
internalId:  '',
customField: '20100218-165100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452555',
internalId:  '',
customField: '20091222-124611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452534',
internalId:  '',
customField: '20091201-160549'
};
webappMappings['7008']=webappMappings['7008-6487']={
webappId:    '7008',
documentId:  '4978',
internalId:  '6487',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '554245',
internalId:  '',
customField: '20100203-091901'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXXA4';
var companyName   = 'Cuernavacasas.com.mx';
var htmlTitle	  = 'Casas+en+renta+para+vacaciones+en+Cuernavaca';
var metaKeywords  = 'casas+cuernavaca+vacaciones+fin+de+semana+villas+residencias+casa+alberca+morelos+mexico+renta+alquiler+semana+mes';
var metaContents  = 'El+sistema+seguro+y+f%C3%A1cil+de+rentar+casas+en+Cuernavaca+para+vacaciones+o+fin+de+semana';
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();
};
