/* [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','1801',jdecode('Home'),jdecode(''),'/1801.html','true',[],'',''],
	['PAGE','28329',jdecode('Services'),jdecode(''),'/28329/index.html','true',[ 
		['PAGE','99934',jdecode('Appeal+Center'),jdecode(''),'/28329/99934.html','true',[],'',''],
		['PAGE','84029',jdecode('Need+IIPP%3F'),jdecode(''),'/28329/84029.html','true',[],'',''],
		['PAGE','88429',jdecode('Hidden+Fees%3F%21'),jdecode(''),'/28329/88429.html','true',[],'',''],
		['PAGE','82029',jdecode('Basic'),jdecode(''),'/28329/82029.html','false',[],'',''],
		['PAGE','82050',jdecode('Premium'),jdecode(''),'/28329/82050.html','false',[],'',''],
		['PAGE','82071',jdecode('Ultimate'),jdecode(''),'/28329/82071.html','false',[],'',''],
		['PAGE','82092',jdecode('Basic+Q.'),jdecode(''),'/28329/82092.html','false',[],'',''],
		['PAGE','82113',jdecode('Premium+Q.'),jdecode(''),'/28329/82113.html','false',[],'',''],
		['PAGE','105234',jdecode('VPP+%28OSHA%29'),jdecode(''),'/28329/105234.html','false',[],'',''],
		['PAGE','99955',jdecode('Cal-OSHA'),jdecode(''),'/28329/99955.html','false',[],'',''],
		['PAGE','99976',jdecode('State+B.of+E.'),jdecode(''),'/28329/99976.html','false',[],'','']
	],'',''],
	['PAGE','82134',jdecode('Training'),jdecode(''),'/82134/index.html','true',[ 
		['PAGE','82197',jdecode('OSHA+10hrs.'),jdecode(''),'/82134/82197.html','true',[],'',''],
		['PAGE','139621',jdecode('OSHA+30hrs.'),jdecode(''),'/82134/139621.html','true',[],'',''],
		['PAGE','128651',jdecode('OSHA+Online'),jdecode(''),'/82134/128651.html','true',[],'',''],
		['PAGE','142321',jdecode('CPR+First+Aid+AED'),jdecode(''),'/82134/142321.html','true',[],'',''],
		['PAGE','82155',jdecode('Forklift+Permit'),jdecode(''),'/82134/82155.html','true',[],'',''],
		['PAGE','82176',jdecode('HazCom+Training'),jdecode(''),'/82134/82176.html','true',[],'',''],
		['PAGE','122651',jdecode('LockOut%2FTagOut'),jdecode(''),'/82134/122651.html','true',[],'',''],
		['PAGE','142521',jdecode('Online+Safety'),jdecode(''),'/82134/142521.html','true',[],'',''],
		['PAGE','127751',jdecode('Feedback'),jdecode(''),'/82134/127751.html','true',[],'','']
	],'',''],
	['PAGE','144121',jdecode('DOSH+Standards'),jdecode(''),'/144121/index.html','true',[ 
		['PAGE','146221',jdecode('Ear+Protection'),jdecode(''),'/144121/146221.html','true',[],'',''],
		['PAGE','146021',jdecode('Electrical+Grl.+%C2%A72320'),jdecode(''),'/144121/146021.html','true',[],'',''],
		['PAGE','147521',jdecode('E.+Medical+Record'),jdecode(''),'/144121/147521.html','true',[],'',''],
		['PAGE','146242',jdecode('Exits'),jdecode(''),'/144121/146242.html','true',[],'',''],
		['PAGE','149521',jdecode('First+Aid+CPR'),jdecode(''),'/144121/149521.html','true',[],'',''],
		['PAGE','151921',jdecode('Forklift+Training'),jdecode(''),'/144121/151921.html','true',[],'',''],
		['PAGE','146042',jdecode('Grinder'),jdecode(''),'/144121/146042.html','true',[],'',''],
		['PAGE','146063',jdecode('Hzrd+Communication'),jdecode(''),'/144121/146063.html','true',[],'',''],
		['PAGE','146721',jdecode('IIPP'),jdecode(''),'/144121/146721.html','true',[],'',''],
		['PAGE','146263',jdecode('Ladders'),jdecode(''),'/144121/146263.html','true',[],'',''],
		['PAGE','171921',jdecode('Lockout%2FBlockout'),jdecode(''),'/144121/171921.html','true',[],'',''],
		['PAGE','146284',jdecode('Machine+Guarding'),jdecode(''),'/144121/146284.html','true',[],'',''],
		['PAGE','146305',jdecode('Other+PPE'),jdecode(''),'/144121/146305.html','true',[],'',''],
		['PAGE','146084',jdecode('Reporting+Accidents'),jdecode(''),'/144121/146084.html','true',[],'',''],
		['PAGE','146105',jdecode('Respirators'),jdecode(''),'/144121/146105.html','true',[],'','']
	],'',''],
	['PAGE','82323',jdecode('Safety+On+Demand'),jdecode(''),'/82323/index.html','true',[ 
		['PAGE','94529',jdecode('Compressor+Permits'),jdecode(''),'/82323/94529.html','false',[],'',''],
		['PAGE','99434',jdecode('Fire+Dep.+Requirements'),jdecode(''),'/82323/99434.html','false',[],'',''],
		['PAGE','1957',jdecode('Free+Documents'),jdecode(''),'/82323/1957.html','true',[],'',''],
		['PAGE','161621',jdecode('Free+Training'),jdecode(''),'/82323/161621.html','true',[],'',''],
		['PAGE','96129',jdecode('OSHA+300Log'),jdecode(''),'/82323/96129.html','true',[],'',''],
		['PAGE','23401',jdecode('Newsletter'),jdecode(''),'/82323/23401.html','false',[],'',''],
		['PAGE','82344',jdecode('OSHA+News'),jdecode(''),'/82323/82344.html','false',[],'',''],
		['PAGE','25001',jdecode('Safety+Photo+Gallery'),jdecode(''),'/82323/25001.html','false',[],'',''],
		['PAGE','108939',jdecode('H%26S+News'),jdecode(''),'/82323/108939.html','true',[],'',''],
		['PAGE','161642',jdecode('Safety+Calculator'),jdecode(''),'/82323/161642.html','true',[],'',''],
		['PAGE','153421',jdecode('Safety+Signs'),jdecode(''),'/82323/153421.html','true',[],'',''],
		['PAGE','132521',jdecode('Safety+Videos'),jdecode(''),'/82323/132521.html','true',[],'',''],
		['PAGE','102234',jdecode('S%26H+Blog'),jdecode(''),'/82323/102234.html','true',[],'','']
	],'',''],
	['PAGE','150621',jdecode('OSHA+Sponsorship'),jdecode(''),'/150621/index.html','true',[ 
		['PAGE','151621',jdecode('Golden+Gate'),jdecode(''),'/150621/151621.html','true',[],'',''],
		['PAGE','150421',jdecode('SHARP'),jdecode(''),'/150621/150421.html','true',[],'',''],
		['PAGE','151642',jdecode('VPP'),jdecode(''),'/150621/151642.html','true',[],'','']
	],'',''],
	['PAGE','84229',jdecode('Contact+Us'),jdecode(''),'/84229/index.html','true',[ 
		['PAGE','82386',jdecode('Jobs'),jdecode(''),'/84229/82386.html','true',[],'','']
	],'',''],
	['PAGE','23701',jdecode('About+us'),jdecode(''),'/23701/index.html','true',[ 
		['PAGE','82407',jdecode('Our+team'),jdecode(''),'/23701/82407.html','true',[],'','']
	],'',''],
	['PAGE','84829',jdecode('Disclaimer'),jdecode(''),'/84829.html','true',[],'',''],
	['PAGE','82929',jdecode('S.A.+%C2%A1En+Espa%C3%B1ol%21'),jdecode(''),'/82929/index.html','false',[ 
		['PAGE','82950',jdecode('Servicios'),jdecode(''),'/82929/82950.html','true',[],'',''],
		['PAGE','82971',jdecode('B%C3%A1sico+Mensual'),jdecode(''),'/82929/82971.html','true',[],'',''],
		['PAGE','82992',jdecode('Especial+Mensual'),jdecode(''),'/82929/82992.html','true',[],'',''],
		['PAGE','83013',jdecode('Super+Especial+Mensual'),jdecode(''),'/82929/83013.html','true',[],'',''],
		['PAGE','83034',jdecode('B%C3%A1sico+Trimestral'),jdecode(''),'/82929/83034.html','true',[],'',''],
		['PAGE','83055',jdecode('Trimestral+Especial'),jdecode(''),'/82929/83055.html','true',[],'',''],
		['PAGE','83076',jdecode('Seminarios+de+Seguridad'),jdecode(''),'/82929/83076.html','true',[],'',''],
		['PAGE','83097',jdecode('Desarrollo+del+Empleado'),jdecode(''),'/82929/83097.html','true',[],'',''],
		['PAGE','84529',jdecode('%C2%A1Cont%C3%A1ctenos%21'),jdecode(''),'/82929/84529.html','true',[],'','']
	],'','']];
var siteelementCount=72;
theSitetree.topTemplateName='Renovation';
theSitetree.paletteFamily='E6EFD2';
theSitetree.keyvisualId='11738';
theSitetree.keyvisualName='kv_11738.jpg';
theSitetree.fontsetId='33010';
theSitetree.graphicsetId='14015';
theSitetree.contentColor='333333';
theSitetree.contentBGColor='E6EFD2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Renovation',
				paletteFamily: 	'E6EFD2',
				keyvisualId: 	'11738',
				keyvisualName: 	'kv_11738.jpg',
				fontsetId: 		'33010',
				graphicsetId: 	'14015',
				contentColor: 	'333333',
				contentBGColor: 'E6EFD2',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20110429-194546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23401',
internalId:  '',
customField: '20090308-170001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84529',
internalId:  '',
customField: '20090306-190946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88429',
internalId:  '',
customField: '20101114-015210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20110408-005432'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '82344',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28329',
internalId:  '',
customField: '20100829-173539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23701',
internalId:  '',
customField: '20090403-191604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25001',
internalId:  '',
customField: '20091217-034435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84829',
internalId:  '',
customField: '20090403-192211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82134',
internalId:  '',
customField: '20110401-202743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144121',
internalId:  '',
customField: '20101114-130438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132521',
internalId:  '',
customField: '20100725-031250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82029',
internalId:  '',
customField: '20091125-221253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82050',
internalId:  '',
customField: '20090823-013757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82071',
internalId:  '',
customField: '20091125-222539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82092',
internalId:  '',
customField: '20090823-013916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82113',
internalId:  '',
customField: '20090403-182845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82155',
internalId:  '',
customField: '20100830-203537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82176',
internalId:  '',
customField: '20100830-203930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82197',
internalId:  '',
customField: '20110401-202712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142321',
internalId:  '',
customField: '20100830-214009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127751',
internalId:  '',
customField: '20091129-125517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128651',
internalId:  '',
customField: '20101007-213410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82323',
internalId:  '',
customField: '20100829-015653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82344',
internalId:  '',
customField: '20091129-022657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82386',
internalId:  '',
customField: '20090403-192057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82407',
internalId:  '',
customField: '20100829-185837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82929',
internalId:  '',
customField: '20090308-170535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82950',
internalId:  '',
customField: '20090306-172733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82971',
internalId:  '',
customField: '20090306-172733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82992',
internalId:  '',
customField: '20090306-172733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83013',
internalId:  '',
customField: '20090306-172733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83034',
internalId:  '',
customField: '20090306-172733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83055',
internalId:  '',
customField: '20090306-172733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83076',
internalId:  '',
customField: '20090306-172733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83097',
internalId:  '',
customField: '20090306-172733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84029',
internalId:  '',
customField: '20101114-014802'
};
webappMappings['7008']=webappMappings['7008-14329']={
webappId:    '7008',
documentId:  '84229',
internalId:  '14329',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84229',
internalId:  '',
customField: '20110408-005105'
};
webappMappings['7008']=webappMappings['7008-14331']={
webappId:    '7008',
documentId:  '84529',
internalId:  '14331',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142521',
internalId:  '',
customField: '20100830-205942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122651',
internalId:  '',
customField: '20100830-204555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139621',
internalId:  '',
customField: '20110401-204246'
};
webappMappings['7050']=webappMappings['7050-6294']={
webappId:    '7050',
documentId:  '102234',
internalId:  '6294',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171921',
internalId:  '',
customField: '20110401-234900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161621',
internalId:  '',
customField: '20101001-131258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108939',
internalId:  '',
customField: '20110402-174243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161642',
internalId:  '',
customField: '20101001-133827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94529',
internalId:  '',
customField: '20110401-200653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96129',
internalId:  '',
customField: '20101121-210232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99434',
internalId:  '',
customField: '20090313-002525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99934',
internalId:  '',
customField: '20101114-010732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99976',
internalId:  '',
customField: '20090313-200738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99955',
internalId:  '',
customField: '20090404-013818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102234',
internalId:  '',
customField: '20090403-230716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105234',
internalId:  '',
customField: '20091125-222947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146221',
internalId:  '',
customField: '20101114-034147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146021',
internalId:  '',
customField: '20110401-230143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146242',
internalId:  '',
customField: '20110402-024355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146042',
internalId:  '',
customField: '20100829-220700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146063',
internalId:  '',
customField: '20100829-220700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146263',
internalId:  '',
customField: '20100829-221546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146284',
internalId:  '',
customField: '20100829-221546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146305',
internalId:  '',
customField: '20100829-221546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146084',
internalId:  '',
customField: '20100829-220700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146105',
internalId:  '',
customField: '20100829-220700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153421',
internalId:  '',
customField: '20110402-155940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146721',
internalId:  '',
customField: '20101114-131252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147521',
internalId:  '',
customField: '20101114-030106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149521',
internalId:  '',
customField: '20100830-214850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150421',
internalId:  '',
customField: '20100916-232725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150621',
internalId:  '',
customField: '20100914-215143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151921',
internalId:  '',
customField: '20100914-211537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151621',
internalId:  '',
customField: '20100914-213830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151642',
internalId:  '',
customField: '20100914-213625'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN23GB';
var companyName   = 'Welcome+to+Safety+Achievement+llc';
var htmlTitle	  = 'Your+Safety+Achievement+is+our+GOAL%21';
var metaKeywords  = 'safety%2C+consultation%2C+compliance%2C+OSHA%2C+ex+mod%2C+experience+modification%2C+accidents.+worker+compensation%2C+DOSH%2C+Calosha%2C+Cal-OSHA%2C+forklift%2C+safety+standard%2C+CPR%2C+AED%2C+First+Aid%2C+Consultant%2C+safety+consultant%2C+safety+consultation%2C+exmod%2C+citation%2C+OSHA+citation%2C+appeal%2C+appeal+process%2C+OSHA+appeal%2C+Calosha+appeal%2C+Cal-OSHA+appeal%2C+calosha+citation%2C+Cal-OSHA+citation%2C+safety+services%2C+AHA%2C+American+Heart+Association%2C+Forklift+certification%2C+industrial+truck%2C+industrial+truck+certification%2C+powered+industrial+truck+certification%2C+powered+industrial+truck%2C+Lockout+Tagout%2C+blockout+tagout%2C+Lock+out%2C+tag+out%2C+lock+out%2C+Tag+out%2C+hazcom%2C+online+training%2C+hazard+communication';
var metaContents  = 'Safety+Achievement+llc%2C+Safety+Consultation+Services.++IIPP%2C+compliance+inspections+and+employee+training+%28English-Spanish%29%2C+CPR%2C+First+Aid+and+EAD+certification.+';
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();
};

