/* [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','5101',jdecode('Home'),jdecode(''),'/5101.html','true',[],'',''],
	['PAGE','31501',jdecode('History'),jdecode(''),'/31501.html','true',[],'',''],
	['PAGE','16101',jdecode('Lobster+Houses'),jdecode(''),'/16101/index.html','true',[ 
		['PAGE','58513',jdecode('Villa+Ortega%26%23x27%3Bs'),jdecode(''),'/16101/58513.html','true',[],'',''],
		['PAGE','58492',jdecode('RosaMar'),jdecode(''),'/16101/58492.html','true',[],'',''],
		['PAGE','40001',jdecode('Puerto+Nuevo+II'),jdecode(''),'/16101/40001.html','true',[],'',''],
		['PAGE','40022',jdecode('Puerto+Nuevo+I'),jdecode(''),'/16101/40022.html','true',[],'',''],
		['PAGE','58629',jdecode('Patio+de+la+Langosta'),jdecode(''),'/16101/58629.html','true',[],'',''],
		['PAGE','40064',jdecode('Ortega%26%23x27%3Bs+Patio'),jdecode(''),'/16101/40064.html','true',[],'',''],
		['PAGE','58471',jdecode('Original+Ortega%26%23x27%3Bs'),jdecode(''),'/16101/58471.html','true',[],'',''],
		['PAGE','58429',jdecode('Mariscos+Pto+Nvo'),jdecode(''),'/16101/58429.html','true',[],'',''],
		['PAGE','109549',jdecode('La+Escondido'),jdecode(''),'/16101/109549.html','true',[],'',''],
		['PAGE','98839',jdecode('Mermaid+Cafe'),jdecode(''),'/16101/98839.html','true',[],'','']
	],'',''],
	['PAGE','17601',jdecode('More+Local+Eateries'),jdecode(''),'/17601/index.html','true',[ 
		['PAGE','99139',jdecode('Bahia+Cantiles'),jdecode(''),'/17601/99139.html','true',[],'',''],
		['PAGE','60229',jdecode('El+Pescador'),jdecode(''),'/17601/60229.html','true',[],'',''],
		['PAGE','132063',jdecode('Mongolian+BBQ'),jdecode(''),'/17601/132063.html','true',[],'',''],
		['PAGE','99160',jdecode('Splash'),jdecode(''),'/17601/99160.html','true',[],'','']
	],'',''],
	['PAGE','127463',jdecode('Rosarito+Restaurants'),jdecode(''),'/127463/index.html','true',[ 
		['PAGE','127484',jdecode('Suzanna%26%23x27%3Bs'),jdecode(''),'/127463/127484.html','true',[],'',''],
		['PAGE','127505',jdecode('Cousteau%26%23x27%3Bs+French+Bistro'),jdecode(''),'/127463/127505.html','true',[],'',''],
		['PAGE','127526',jdecode('El+Nido+Steak+House'),jdecode(''),'/127463/127526.html','true',[],'',''],
		['PAGE','127547',jdecode('La+Estancia'),jdecode(''),'/127463/127547.html','true',[],'',''],
		['PAGE','127568',jdecode('Mongolian+BBQ'),jdecode(''),'/127463/127568.html','true',[],'',''],
		['PAGE','127589',jdecode('Plan+B'),jdecode(''),'/127463/127589.html','true',[],'',''],
		['PAGE','127610',jdecode('Country+Kitchen'),jdecode(''),'/127463/127610.html','true',[],'',''],
		['PAGE','127631',jdecode('La+Casa+de+la+Crepa'),jdecode(''),'/127463/127631.html','true',[],'','']
	],'',''],
	['PAGE','136596',jdecode('Artisan+Row'),jdecode(''),'/136596.html','true',[],'',''],
	['PAGE','132463',jdecode('Best+Pit+Stops'),jdecode(''),'/132463.html','true',[],'',''],
	['PAGE','136496',jdecode('Baja+Coastal+Cuisine'),jdecode(''),'/136496.html','true',[],'',''],
	['PAGE','125563',jdecode('Road+Trips'),jdecode(''),'/125563.html','true',[],'',''],
	['PAGE','16185',jdecode('Accommodations'),jdecode(''),'/16185/index.html','true',[ 
		['PAGE','41143',jdecode('Poco+Cielo'),jdecode(''),'/16185/41143.html','true',[],'',''],
		['PAGE','41122',jdecode('Grand+Baja+Resort'),jdecode(''),'/16185/41122.html','true',[],'',''],
		['PAGE','41164',jdecode('Las+Rocas+'),jdecode(''),'/16185/41164.html','true',[],'',''],
		['PAGE','41185',jdecode('Hotel+Calafia'),jdecode(''),'/16185/41185.html','true',[],'',''],
		['PAGE','60429',jdecode('La+Misi%C3%B3n'),jdecode(''),'/16185/60429.html','true',[],'',''],
		['PAGE','41322',jdecode('La+Fonda'),jdecode(''),'/16185/41322.html','true',[],'','']
	],'',''],
	['PAGE','61329',jdecode('Private+Homes'),jdecode(''),'/61329/index.html','true',[ 
		['PAGE','126563',jdecode('Baja+Sand+Castle'),jdecode(''),'/61329/126563.html','true',[],'',''],
		['PAGE','126584',jdecode('Hacienda+De+Las+Olas'),jdecode(''),'/61329/126584.html','true',[],'','']
	],'',''],
	['PAGE','29701',jdecode('Coupons+%26+Specials'),jdecode(''),'/29701.html','true',[],'',''],
	['PAGE','16206',jdecode('Directions'),jdecode(''),'/16206.html','true',[],'',''],
	['PAGE','29722',jdecode('Vehicle+Insurance+'),jdecode(''),'/29722.html','true',[],'',''],
	['PAGE','16143',jdecode('Real+Estate'),jdecode(''),'/16143/index.html','true',[ 
		['PAGE','41501',jdecode('Gibbs+%26+Associates'),jdecode(''),'/16143/41501.html','true',[],'',''],
		['PAGE','65429',jdecode('Homes+for+Sale'),jdecode(''),'/16143/65429.html','true',[],'',''],
		['PAGE','97139',jdecode('Real+Estate+Contact'),jdecode(''),'/16143/97139.html','true',[],'','']
	],'',''],
	['PAGE','83939',jdecode('Spas'),jdecode(''),'/83939/index.html','true',[ 
		['PAGE','84039',jdecode('Spa+Las+Rocas'),jdecode(''),'/83939/84039.html','true',[],'',''],
		['PAGE','105049',jdecode('La+Vid+Spa'),jdecode(''),'/83939/105049.html','true',[],'','']
	],'',''],
	['PAGE','17701',jdecode('Other+Activities'),jdecode(''),'/17701.html','true',[],'',''],
	['PAGE','125584',jdecode('Dancing'),jdecode(''),'/125584.html','true',[],'',''],
	['PAGE','125605',jdecode('Entertainment'),jdecode(''),'/125605.html','true',[],'',''],
	['PAGE','125626',jdecode('Lobsterfest'),jdecode(''),'/125626.html','true',[],'',''],
	['PAGE','16122',jdecode('Pharmacies'),jdecode(''),'/16122.html','true',[],'',''],
	['PAGE','29764',jdecode('Safety'),jdecode(''),'/29764.html','true',[],'',''],
	['PAGE','16164',jdecode('Shopping'),jdecode(''),'/16164.html','true',[],'',''],
	['PAGE','125163',jdecode('Medical+Services'),jdecode(''),'/125163.html','true',[],'',''],
	['PAGE','125184',jdecode('Banking'),jdecode(''),'/125184.html','true',[],'',''],
	['PAGE','125205',jdecode('Car+Trouble'),jdecode(''),'/125205.html','true',[],'',''],
	['PAGE','54929',jdecode('Contest+Survey'),jdecode(''),'/54929.html','true',[],'',''],
	['PAGE','54229',jdecode('Forum'),jdecode(''),'/54229.html','true',[],'',''],
	['PAGE','54029',jdecode('Guestbook'),jdecode(''),'/54029.html','true',[],'',''],
	['PAGE','29743',jdecode('YouTube'),jdecode(''),'/29743.html','true',[],'',''],
	['PAGE','98339',jdecode('Press+Room'),jdecode(''),'/98339.html','true',[],'',''],
	['PAGE','16269',jdecode('Contact+Us'),jdecode(''),'/16269.html','true',[],'','']];
var siteelementCount=67;
theSitetree.topTemplateName='Human';
theSitetree.paletteFamily='0D3E6B';
theSitetree.keyvisualId='11451';
theSitetree.keyvisualName='kv_11451.jpg';
theSitetree.fontsetId='31983';
theSitetree.graphicsetId='13816';
theSitetree.contentColor='3C3D3C';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Human',
				paletteFamily: 	'0D3E6B',
				keyvisualId: 	'11451',
				keyvisualName: 	'kv_11451.jpg',
				fontsetId: 		'31983',
				graphicsetId: 	'13816',
				contentColor: 	'3C3D3C',
				contentBGColor: 'FFFFFF',
				a_color: 		'0D3E6B',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20100731-114234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16206',
internalId:  '',
customField: '20100703-224016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20100731-114539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16122',
internalId:  '',
customField: '20100703-230618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16164',
internalId:  '',
customField: '20100714-080214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16143',
internalId:  '',
customField: '20090915-074812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16185',
internalId:  '',
customField: '20090915-063921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17701',
internalId:  '',
customField: '20090917-101928'
};
webappMappings['1003']=webappMappings['1003-aen330inzpcm122b82619ae']={
webappId:    '1003',
documentId:  '54229',
internalId:  'aen330inzpcm122b82619ae',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16269',
internalId:  '',
customField: '20100710-133607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29722',
internalId:  '',
customField: '20100716-142336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17601',
internalId:  '',
customField: '20100717-093604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29701',
internalId:  '',
customField: '20100731-130619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29743',
internalId:  '',
customField: '20090915-082629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31501',
internalId:  '',
customField: '20091111-110733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29764',
internalId:  '',
customField: '20100704-073707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40001',
internalId:  '',
customField: '20100714-134740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40022',
internalId:  '',
customField: '20090915-073429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40064',
internalId:  '',
customField: '20090915-073258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125563',
internalId:  '',
customField: '20100704-132534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20090915-075301'
};
webappMappings['7008']=webappMappings['7008-2372']={
webappId:    '7008',
documentId:  '97139',
internalId:  '2372',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41122',
internalId:  '',
customField: '20100108-082745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41143',
internalId:  '',
customField: '20100716-125746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41164',
internalId:  '',
customField: '20090917-100010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41322',
internalId:  '',
customField: '20090917-100409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41185',
internalId:  '',
customField: '20090917-100225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61329',
internalId:  '',
customField: '20100704-121135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58429',
internalId:  '',
customField: '20090915-073135'
};
webappMappings['1002']=webappMappings['1002-54029aen330inzpcm']={
webappId:    '1002',
documentId:  '54029',
internalId:  '54029aen330inzpcm',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58629',
internalId:  '',
customField: '20090915-073340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54229',
internalId:  '',
customField: '20090917-085006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54029',
internalId:  '',
customField: '20090726-114300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54929',
internalId:  '',
customField: '20090726-121909'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5101',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-1942']={
webappId:    '7008',
documentId:  '54929',
internalId:  '1942',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58471',
internalId:  '',
customField: '20090915-073220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58492',
internalId:  '',
customField: '20100714-110521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58513',
internalId:  '',
customField: '20100723-134022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60229',
internalId:  '',
customField: '20090915-073056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60429',
internalId:  '',
customField: '20090915-071822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65429',
internalId:  '',
customField: '20090919-135727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83939',
internalId:  '',
customField: '20090915-082221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84039',
internalId:  '',
customField: '20090930-101831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97139',
internalId:  '',
customField: '20090919-135206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98339',
internalId:  '',
customField: '20100729-095718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98839',
internalId:  '',
customField: '20090921-121803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99139',
internalId:  '',
customField: '20100714-134440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99160',
internalId:  '',
customField: '20100714-113315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105049',
internalId:  '',
customField: '20091111-084255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109549',
internalId:  '',
customField: '20091105-104340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125584',
internalId:  '',
customField: '20100717-092759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125605',
internalId:  '',
customField: '20100713-135034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125626',
internalId:  '',
customField: '20100708-155634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125163',
internalId:  '',
customField: '20100704-071406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125184',
internalId:  '',
customField: '20100704-071406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125205',
internalId:  '',
customField: '20100704-071406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126563',
internalId:  '',
customField: '20100704-122114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126584',
internalId:  '',
customField: '20100704-120426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127463',
internalId:  '',
customField: '20100717-095733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127484',
internalId:  '',
customField: '20100704-142454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127505',
internalId:  '',
customField: '20100717-100443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127526',
internalId:  '',
customField: '20100704-142454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127547',
internalId:  '',
customField: '20100704-142454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127568',
internalId:  '',
customField: '20100704-142454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127589',
internalId:  '',
customField: '20100717-103210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127610',
internalId:  '',
customField: '20100704-142454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127631',
internalId:  '',
customField: '20100704-142454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132063',
internalId:  '',
customField: '20100714-111714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132463',
internalId:  '',
customField: '20100714-131637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136596',
internalId:  '',
customField: '20100731-083502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136496',
internalId:  '',
customField: '20100729-083329'
};
webappMappings['1501']=webappMappings['1501-20997382']={
webappId:    '1501',
documentId:  '5101',
internalId:  '20997382',
customField: '1501'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN330INZPCM';
var companyName   = 'www.PuertoNuevo.com';
var htmlTitle	  = 'Puerto+Nuevo+Lobster+Village%2C+Baja%2C+Mexico';
var metaKeywords  = 'Puerto+Nuevo%2C+Baja%2C+Rosarito%2C+Mexico%2C+lobster%2C+lobster+village%2C+puerto+nuevo+map%2C+puerto+nuevo+restaurants%2C+surfing';
var metaContents  = '+Puerto+Nuevo%2C+Rosarito%2C++Lobster+Village%2C+Baja+California%2C+Mexico+just+south+of+San+Diego%2C+Baja+Real+Estate';
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();
};
