/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('About+SLSA+Wales'),jdecode(''),'/552/index.html','true',[ 
		['PAGE','594',jdecode('Board+of+Management'),jdecode(''),'/552/594.html','true',[],''],
		['PAGE','573',jdecode('History'),jdecode(''),'/552/573.html','true',[],''],
		['PAGE','930',jdecode('How+to+Join'),jdecode(''),'/552/930.html','true',[],''],
		['PAGE','783',jdecode('IRB+Commission'),jdecode(''),'/552/783.html','true',[],''],
		['PAGE','7022',jdecode('Sponsors'),jdecode(''),'/552/7022.html','true',[],''],
		['PAGE','804',jdecode('Sports+Commission'),jdecode(''),'/552/804.html','true',[],''],
		['PAGE','846',jdecode('Technical+Commision'),jdecode(''),'/552/846.html','true',[],''],
		['PAGE','825',jdecode('Youth+Commission'),jdecode(''),'/552/825.html','true',[],'']
	],''],
	['PAGE','7043',jdecode('Sun+%26+Beach+Safety'),jdecode(''),'/7043.html','true',[],''],
	['PAGE','867',jdecode('Calendar+of+Events'),jdecode(''),'/867.html','true',[],''],
	['PAGE','7001',jdecode('Clubs'),jdecode(''),'/7001/index.html','true',[ 
		['PAGE','73601',jdecode('Atlantic+College'),jdecode(''),'/7001/73601.html','true',[],''],
		['PAGE','86401',jdecode('Mumbles'),jdecode(''),'/7001/86401.html','true',[],''],
		['PAGE','94801',jdecode('Newport+Pembs'),jdecode(''),'/7001/94801.html','true',[],''],
		['PAGE','190912',jdecode('Porthcawl'),jdecode(''),'/7001/190912.html','true',[],''],
		['PAGE','69101',jdecode('Porthmawr'),jdecode(''),'/7001/69101.html','true',[],''],
		['PAGE','69122',jdecode('Rest+Bay'),jdecode(''),'/7001/69122.html','true',[],''],
		['PAGE','87601',jdecode('Rhoose'),jdecode(''),'/7001/87601.html','true',[],''],
		['PAGE','85101',jdecode('Rhondda+%28Cold+Knap%29'),jdecode(''),'/7001/85101.html','true',[],''],
		['PAGE','72301',jdecode('Southerndown'),jdecode(''),'/7001/72301.html','true',[],'']
	],''],
	['PAGE','951',jdecode('Contact+Us'),jdecode(''),'/951.html','true',[],''],
	['PAGE','54501',jdecode('Coaching+Events'),jdecode(''),'/54501/index.html','true',[ 
		['PAGE','109101',jdecode('Event+Coaching'),jdecode(''),'/54501/109101.html','true',[],''],
		['PAGE','84201',jdecode('Paddle+Coaching'),jdecode(''),'/54501/84201.html','true',[],''],
		['PAGE','54522',jdecode('Technical+Coaching'),jdecode(''),'/54501/54522.html','true',[],'']
	],''],
	['PAGE','79901',jdecode('Communications'),jdecode(''),'/79901/index.html','true',[ 
		['PAGE','110101',jdecode('February+2010'),jdecode(''),'/79901/110101.html','true',[],''],
		['PAGE','130912',jdecode('March+2009'),jdecode(''),'/79901/130912.html','true',[],''],
		['PAGE','136212',jdecode('April+2009'),jdecode(''),'/79901/136212.html','true',[],''],
		['PAGE','140112',jdecode('May+2009'),jdecode(''),'/79901/140112.html','true',[],''],
		['PAGE','141212',jdecode('June+2009'),jdecode(''),'/79901/141212.html','true',[],''],
		['PAGE','155912',jdecode('July+2009'),jdecode(''),'/79901/155912.html','true',[],''],
		['PAGE','157812',jdecode('September+2009'),jdecode(''),'/79901/157812.html','true',[],''],
		['PAGE','160812',jdecode('November+2009'),jdecode(''),'/79901/160812.html','true',[],''],
		['PAGE','167012',jdecode('December+2009'),jdecode(''),'/79901/167012.html','true',[],'']
	],''],
	['PAGE','741',jdecode('Competition'),jdecode(''),'/741/index.html','true',[ 
		['PAGE','159912',jdecode('Caps+Night+2008'),jdecode(''),'/741/159912.html','true',[],''],
		['PAGE','212812',jdecode('Celtic+Challenge+Cup'),jdecode(''),'/741/212812.html','true',[],''],
		['PAGE','97001',jdecode('Doping+Policy'),jdecode(''),'/741/97001.html','true',[],''],
		['PAGE','94101',jdecode('Entry+Forms'),jdecode(''),'/741/94101.html','true',[],''],
		['PAGE','76401',jdecode('Hosseger'),jdecode(''),'/741/76401.html','true',[],''],
		['PAGE','75501',jdecode('Nippers'),jdecode(''),'/741/75501.html','true',[],''],
		['PAGE','105701',jdecode('Results+Archive'),jdecode(''),'/741/105701.html','true',[],''],
		['PAGE','177812',jdecode('Results+2009'),jdecode(''),'/741/177812.html','true',[],''],
		['PAGE','678',jdecode('Senior'),jdecode(''),'/741/678.html','true',[],''],
		['PAGE','657',jdecode('Welsh+Team'),jdecode(''),'/741/657.html','true',[],'']
	],''],
	['PAGE','59101',jdecode('Downloads+%26+Links'),jdecode(''),'/59101/index.html','true',[ 
		['PAGE','122212',jdecode('Competition+Links'),jdecode(''),'/59101/122212.html','true',[],''],
		['PAGE','993',jdecode('Club+Links'),jdecode(''),'/59101/993.html','true',[],''],
		['PAGE','121212',jdecode('Club+Links+International'),jdecode(''),'/59101/121212.html','true',[],''],
		['PAGE','121233',jdecode('Club+Links+GB'),jdecode(''),'/59101/121233.html','true',[],''],
		['PAGE','66701',jdecode('Documents'),jdecode(''),'/59101/66701.html','true',[],''],
		['PAGE','99901',jdecode('Equipment+Links'),jdecode(''),'/59101/99901.html','true',[],''],
		['PAGE','121254',jdecode('Interesting+Links'),jdecode(''),'/59101/121254.html','true',[],''],
		['PAGE','126012',jdecode('IRB+Links'),jdecode(''),'/59101/126012.html','true',[],''],
		['PAGE','121275',jdecode('Organisation+Links'),jdecode(''),'/59101/121275.html','true',[],''],
		['PAGE','123012',jdecode('Surfboat+Links'),jdecode(''),'/59101/123012.html','true',[],''],
		['PAGE','123612',jdecode('Surfski+Links'),jdecode(''),'/59101/123612.html','true',[],'']
	],''],
	['PAGE','106622',jdecode('For+Sale'),jdecode(''),'/106622.html','true',[],''],
	['PAGE','133012',jdecode('GB+News'),jdecode(''),'/133012.html','true',[],''],
	['PAGE','2906',jdecode('Guestbook'),jdecode(''),'/2906/index.html','true',[ 
		['PAGE','2901',jdecode('Read+Guestbook'),jdecode(''),'/2906/2901.html','false',[],'']
	],''],
	['PAGE','59122',jdecode('Inshore+Rescue+Boats'),jdecode(''),'/59122/index.html','true',[ 
		['PAGE','63101',jdecode('IRB+Clothing'),jdecode(''),'/59122/63101.html','true',[],''],
		['PAGE','63701',jdecode('IRB+Locations+and+Details'),jdecode(''),'/59122/63701.html','true',[],''],
		['PAGE','59143',jdecode('IRB+News'),jdecode(''),'/59122/59143.html','true',[],'']
	],''],
	['PAGE','909',jdecode('Photo+Gallery'),jdecode(''),'/909/index.html','true',[ 
		['PAGE','210912',jdecode('Hossegor+2009'),jdecode(''),'/909/210912.html','true',[],''],
		['PAGE','204112',jdecode('IRB+Champs+2009'),jdecode(''),'/909/204112.html','true',[],''],
		['PAGE','212212',jdecode('IRB+European+Champs+2009'),jdecode(''),'/909/212212.html','true',[],''],
		['PAGE','212512',jdecode('IRB+Training+Weekend+2009'),jdecode(''),'/909/212512.html','true',[],''],
		['PAGE','214812',jdecode('Presentation+Night+2009'),jdecode(''),'/909/214812.html','true',[],'']
	],''],
	['PAGE','195912',jdecode('Technical'),jdecode(''),'/195912.html','true',[],''],
	['PAGE','699',jdecode('Youth'),jdecode(''),'/699.html','true',[],'']];
var siteelementCount=76;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='AC2323';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='356';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AC2323';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'AC2323',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'356',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AC2323',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'AC2323',
				b_color: 		'480F0F',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-2906abri10in2cns']={
webappId:    '1002',
documentId:  '2906',
internalId:  '2906abri10in2cns',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100308-165535'
};
webappMappings['1501']=webappMappings['1501-6218493']={
webappId:    '1501',
documentId:  '501',
internalId:  '6218493',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '210912',
internalId:  '',
customField: '20091011-102336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20070530-203631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20100109-070337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20070530-210310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '930',
internalId:  '',
customField: '20080323-132951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20071215-114403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7022',
internalId:  '',
customField: '20080122-160032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '804',
internalId:  '',
customField: '20070529-094749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '846',
internalId:  '',
customField: '20080107-153019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '825',
internalId:  '',
customField: '20071215-114624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7043',
internalId:  '',
customField: '20090816-083536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '867',
internalId:  '',
customField: '20100308-165626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20100206-093027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73601',
internalId:  '',
customField: '20080123-032359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86401',
internalId:  '',
customField: '20071201-133225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94801',
internalId:  '',
customField: '20080111-143141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69101',
internalId:  '',
customField: '20090610-154248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69122',
internalId:  '',
customField: '20071201-132154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87601',
internalId:  '',
customField: '20071203-125300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85101',
internalId:  '',
customField: '20071126-031008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72301',
internalId:  '',
customField: '20071029-130551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '951',
internalId:  '',
customField: '20080505-111841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54501',
internalId:  '',
customField: '20080706-142806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109101',
internalId:  '',
customField: '20080305-123823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84201',
internalId:  '',
customField: '20071125-081353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54522',
internalId:  '',
customField: '20091011-114554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79901',
internalId:  '',
customField: '20100109-072739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '195912',
internalId:  '',
customField: '20090917-122136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110101',
internalId:  '',
customField: '20100301-153302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130912',
internalId:  '',
customField: '20090407-150126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136212',
internalId:  '',
customField: '20100301-152452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140112',
internalId:  '',
customField: '20090524-161214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141212',
internalId:  '',
customField: '20090602-160023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155912',
internalId:  '',
customField: '20090621-082012'
};
webappMappings['7060']=webappMappings['7060-7c7a71a36718e6726295f113a44bbad1']={
webappId:    '7060',
documentId:  '210912',
internalId:  '7c7a71a36718e6726295f113a44bbad1',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157812',
internalId:  '',
customField: '20090930-154124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160812',
internalId:  '',
customField: '20100109-073239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20100305-114357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159912',
internalId:  '',
customField: '20080930-160940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97001',
internalId:  '',
customField: '20080113-083959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94101',
internalId:  '',
customField: '20090711-050028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76401',
internalId:  '',
customField: '20090214-091212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75501',
internalId:  '',
customField: '20100307-070036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177812',
internalId:  '',
customField: '20090825-141948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105701',
internalId:  '',
customField: '20080821-143030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20080122-160844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20080122-161300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20090507-125059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59101',
internalId:  '',
customField: '20100303-154952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122212',
internalId:  '',
customField: '20090215-074351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '993',
internalId:  '',
customField: '20080323-083915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121212',
internalId:  '',
customField: '20080326-142653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121233',
internalId:  '',
customField: '20080326-112414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66701',
internalId:  '',
customField: '20100303-160150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190912',
internalId:  '',
customField: '20090621-075752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99901',
internalId:  '',
customField: '20090131-093637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121254',
internalId:  '',
customField: '20080718-053946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126012',
internalId:  '',
customField: '20080325-152931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121275',
internalId:  '',
customField: '20080325-155000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123012',
internalId:  '',
customField: '20080323-094428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123612',
internalId:  '',
customField: '20080323-133340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106622',
internalId:  '',
customField: '20100207-104913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133012',
internalId:  '',
customField: '20100109-075157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2906',
internalId:  '',
customField: '20060805-053423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20060805-053423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59122',
internalId:  '',
customField: '20090407-031840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63101',
internalId:  '',
customField: '20080122-161526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63701',
internalId:  '',
customField: '20081127-122003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59143',
internalId:  '',
customField: '20090407-023826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '909',
internalId:  '',
customField: '20091025-082444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '204112',
internalId:  '',
customField: '20090915-164049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167012',
internalId:  '',
customField: '20100109-073957'
};
webappMappings['7060']=webappMappings['7060-ee78cf36c4d1e48ed0ebc3813d62ac88']={
webappId:    '7060',
documentId:  '204112',
internalId:  'ee78cf36c4d1e48ed0ebc3813d62ac88',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-92f78f1b77428a56408d83d8e0477f9b']={
webappId:    '7060',
documentId:  '212212',
internalId:  '92f78f1b77428a56408d83d8e0477f9b',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212212',
internalId:  '',
customField: '20091011-104605'
};
webappMappings['7060']=webappMappings['7060-efafe380981fd7da85e4359e2da76016']={
webappId:    '7060',
documentId:  '212512',
internalId:  'efafe380981fd7da85e4359e2da76016',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212512',
internalId:  '',
customField: '20091011-105405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212812',
internalId:  '',
customField: '20091011-110148'
};
webappMappings['7060']=webappMappings['7060-6a426fb0ac05e2ddd8de4603b8375784']={
webappId:    '7060',
documentId:  '214812',
internalId:  '6a426fb0ac05e2ddd8de4603b8375784',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '214812',
internalId:  '',
customField: '20091023-103139'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABRI10IN2CNS';
var companyName   = 'Surf+Life+Saving+Wales';
var htmlTitle	  = 'S.L.S.A+Wales';
var metaKeywords  = 'SLSA%2C+SLSA+Wales%2C+Surf+Life+Rescue%2C+Surfing';
var metaContents  = '';
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();
};
