/* [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','2301',jdecode('Home'),jdecode(''),'/2301/index.html','true',[ 
		['PAGE','49501',jdecode('Current+Events%21%21%21'),jdecode(''),'/2301/49501.html','true',[],'',''],
		['PAGE','11101',jdecode('Tuition+and+Enrollment'),jdecode(''),'/2301/11101.html','true',[],'',''],
		['PAGE','60267',jdecode('Activities+and+Events'),jdecode(''),'/2301/60267.html','true',[],'',''],
		['PAGE','4685',jdecode('Class+Descriptions'),jdecode(''),'/2301/4685.html','true',[],'',''],
		['PAGE','4769',jdecode('Student+Handbook'),jdecode(''),'/2301/4769.html','true',[],'',''],
		['PAGE','4790',jdecode('Recital+Guidelines'),jdecode(''),'/2301/4790.html','true',[],'',''],
		['PAGE','4706',jdecode('Meet+the+Staff'),jdecode(''),'/2301/4706.html','true',[],'',''],
		['PAGE','54101',jdecode('SUMMER+HOURS%21%21'),jdecode(''),'/2301/54101.html','true',[],'','']
	],'',''],
	['PAGE','6001',jdecode('Schedules'),jdecode(''),'/6001/index.html','true',[ 
		['PAGE','13501',jdecode('Free+Trial+Class+Coupon'),jdecode(''),'/6001/13501.html','true',[],'',''],
		['PAGE','61563',jdecode('2010+Summer+Classes'),jdecode(''),'/6001/61563.html','true',[],'',''],
		['PAGE','61520',jdecode('10-11+Elmira+Heights'),jdecode(''),'/6001/61520.html','true',[],'',''],
		['PAGE','61529',jdecode('10-11+Watkins+Glen'),jdecode(''),'/6001/61529.html','true',[],'',''],
		['PAGE','59308',jdecode('09-10+Watkins+Glen+'),jdecode(''),'/6001/59308.html','false',[],'',''],
		['PAGE','59299',jdecode('09-10+Elmira+Heights'),jdecode(''),'/6001/59299.html','false',[],'',''],
		['PAGE','53101',jdecode('08-09+Watkins+Glen+Schedule'),jdecode(''),'/6001/53101.html','false',[],'',''],
		['PAGE','53122',jdecode('08-09+Elmira+Heights+Schedule'),jdecode(''),'/6001/53122.html','false',[],'',''],
		['PAGE','59290',jdecode('2009+Summer+Schedule'),jdecode(''),'/6001/59290.html','false',[],'',''],
		['PAGE','51601',jdecode('07-08+Summer+Schedule'),jdecode(''),'/6001/51601.html','false',[],'',''],
		['PAGE','4601',jdecode('07-08+Watkins+Glen+Schedule'),jdecode(''),'/6001/4601.html','false',[],'',''],
		['PAGE','4622',jdecode('07-08+Elmira+Heights+Schedule'),jdecode(''),'/6001/4622.html','false',[],'',''],
		['PAGE','50701',jdecode('07-08+Makeup+Classes+'),jdecode(''),'/6001/50701.html','false',[],'','']
	],'',''],
	['PAGE','21601',jdecode('Other+Programs+thru+LSD'),jdecode(''),'/21601/index.html','true',[ 
		['PAGE','7522',jdecode('Dance+Camp+at+Watson+Homestead'),jdecode(''),'/21601/7522.html','true',[],'',''],
		['PAGE','59399',jdecode('Princess+and+Ballet+Camp'),jdecode(''),'/21601/59399.html','true',[],'',''],
		['PAGE','61574',jdecode('Rockstar+Camp'),jdecode(''),'/21601/61574.html','true',[],'',''],
		['PAGE','61583',jdecode('All-Star+Dance+Camp'),jdecode(''),'/21601/61583.html','true',[],'',''],
		['PAGE','61592',jdecode('Musical+Theater+Camp'),jdecode(''),'/21601/61592.html','true',[],'',''],
		['PAGE','61601',jdecode('Strength+and+Conditioning+Camp'),jdecode(''),'/21601/61601.html','true',[],'',''],
		['PAGE','61610',jdecode('Ballet+Camp'),jdecode(''),'/21601/61610.html','true',[],'',''],
		['PAGE','4748',jdecode('Florida+Trip'),jdecode(''),'/21601/4748.html','true',[],'',''],
		['PAGE','59408',jdecode('Festivals+%26+Performances'),jdecode(''),'/21601/59408.html','true',[],'',''],
		['PAGE','7501',jdecode('Moscow+Ballet+Camp'),jdecode(''),'/21601/7501.html','false',[],'',''],
		['PAGE','4643',jdecode('Competition+Team'),jdecode(''),'/21601/4643.html','true',[],'',''],
		['PAGE','60079',jdecode('Nationals+2009'),jdecode(''),'/21601/60079.html','true',[],'',''],
		['PAGE','6901',jdecode('Competition+Team+Handbook'),jdecode(''),'/21601/6901.html','false',[],'',''],
		['PAGE','58793',jdecode('Payment+Coupon'),jdecode(''),'/21601/58793.html','false',[],'',''],
		['PAGE','12664',jdecode('So+You+Think+Your+Ready+For+a+Solo%3F'),jdecode(''),'/21601/12664.html','true',[],'',''],
		['PAGE','12685',jdecode('Essentials+For+a+Dance+Competition'),jdecode(''),'/21601/12685.html','true',[],'',''],
		['PAGE','12706',jdecode('Competition+Schedule'),jdecode(''),'/21601/12706.html','false',[],'',''],
		['PAGE','8401',jdecode('Competition+Team+Photo+Album'),jdecode(''),'/21601/8401.html','true',[],'','']
	],'',''],
	['PAGE','4832',jdecode('Newsletters+%26+P.R.'),jdecode(''),'/4832/index.html','true',[ 
		['PAGE','59381',jdecode('Press+Release'),jdecode(''),'/4832/59381.html','true',[],'',''],
		['PAGE','59390',jdecode('Fall+2009+Newsletter'),jdecode(''),'/4832/59390.html','false',[],'',''],
		['PAGE','32801',jdecode('Halloween+Day+-+Classes'),jdecode(''),'/4832/32801.html','false',[],'',''],
		['PAGE','43001',jdecode('February+Newsletter'),jdecode(''),'/4832/43001.html','false',[],'',''],
		['PAGE','48201',jdecode('Spring+Newsletter'),jdecode(''),'/4832/48201.html','false',[],'',''],
		['PAGE','61345',jdecode('February+2010+Newsletter'),jdecode(''),'/4832/61345.html','true',[],'','']
	],'',''],
	['PAGE','4664',jdecode('The+Dance+Shoppe'),jdecode(''),'/4664.html','true',[],'',''],
	['PAGE','25701',jdecode('Birthday+Parties%21%21'),jdecode(''),'/25701.html','true',[],'',''],
	['PAGE','8901',jdecode('Photo+Album+%26+Guestbook'),jdecode(''),'/8901/index.html','true',[ 
		['PAGE','3806',jdecode('Guestbook'),jdecode(''),'/8901/3806.html','true',[],'',''],
		['PAGE','3801',jdecode('Read+Guestbook'),jdecode(''),'/8901/3801.html','true',[],'',''],
		['PAGE','60507',jdecode('1st+Annual+Tea+Party'),jdecode(''),'/8901/60507.html','true',[],'',''],
		['PAGE','61778',jdecode('Past+Recital+Pictures'),jdecode(''),'/8901/61778.html','true',[],'',''],
		['PAGE','58947',jdecode('Halloween+Parties'),jdecode(''),'/8901/58947.html','true',[],'','']
	],'',''],
	['PAGE','59345',jdecode('Miscellaneous'),jdecode(''),'/59345/index.html','true',[ 
		['PAGE','4811',jdecode('How+to+Make+The+Perfect+Bun'),jdecode(''),'/59345/4811.html','true',[],'',''],
		['PAGE','59354',jdecode('Famous+Dance+Quotes'),jdecode(''),'/59345/59354.html','true',[],'',''],
		['PAGE','59363',jdecode('National+Dance+Week+Events'),jdecode(''),'/59345/59363.html','true',[],'',''],
		['PAGE','59372',jdecode('Dance+Related+Resources'),jdecode(''),'/59345/59372.html','true',[],'',''],
		['PAGE','60984',jdecode('Leslie+School+of+Dance+Student+Quotes'),jdecode(''),'/59345/60984.html','true',[],'','']
	],'',''],
	['PAGE','61205',jdecode('Recognitions%2FAwards'),jdecode(''),'/61205/index.html','true',[ 
		['PAGE','61215',jdecode('The+Splits+Club'),jdecode(''),'/61205/61215.html','true',[],'',''],
		['PAGE','61224',jdecode('Tea+Party+2010'),jdecode(''),'/61205/61224.html','true',[],'',''],
		['PAGE','61856',jdecode('Perfect+Attendance'),jdecode(''),'/61205/61856.html','true',[],'',''],
		['PAGE','61865',jdecode('Other+Awards+and+Achievements'),jdecode(''),'/61205/61865.html','true',[],'','']
	],'',''],
	['PAGE','18601',jdecode('Contact+Us%2FHow+to+Find+Us'),jdecode(''),'/18601.html','true',[],'','']];
var siteelementCount=69;
theSitetree.topTemplateName='Snapshot';
theSitetree.paletteFamily='67845B';
theSitetree.keyvisualId='3619';
theSitetree.keyvisualName='kv_3619.jpg';
theSitetree.fontsetId='10458';
theSitetree.graphicsetId='10877';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='67845B';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Snapshot',
				paletteFamily: 	'67845B',
				keyvisualId: 	'3619',
				keyvisualName: 	'kv_3619.jpg',
				fontsetId: 		'10458',
				graphicsetId: 	'10877',
				contentColor: 	'FFFFFF',
				contentBGColor: '67845B',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FC5E7B',
				e_color: 		'BFBFBF',
				f_color: 		'050001',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-3806AHW050IN2UXC']={
webappId:    '1002',
documentId:  '3806',
internalId:  '3806AHW050IN2UXC',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-659390']={
webappId:    '1501',
documentId:  '2301',
internalId:  '659390',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61215',
internalId:  '',
customField: '20100610-134319'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61865',
internalId:  '',
customField: '20100610-210049'
};
webappMappings['7060']=webappMappings['7060-ca34d111c957445e62880bdca153cb44']={
webappId:    '7060',
documentId:  '8401',
internalId:  'ca34d111c957445e62880bdca153cb44',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61778',
internalId:  '',
customField: '20100610-134956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20100619-104414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21601',
internalId:  '',
customField: '20100610-120921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20080222-150900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3806',
internalId:  '',
customField: '20070720-174029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58947',
internalId:  '',
customField: '20081119-232234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49501',
internalId:  '',
customField: '20100610-113433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60984',
internalId:  '',
customField: '20100323-103422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20100610-113643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61205',
internalId:  '',
customField: '20100610-205837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4685',
internalId:  '',
customField: '20091230-151425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4769',
internalId:  '',
customField: '20100610-115230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4790',
internalId:  '',
customField: '20100609-203813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4811',
internalId:  '',
customField: '20070809-233518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4706',
internalId:  '',
customField: '20100619-104354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54101',
internalId:  '',
customField: '20100609-204007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20091230-152634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53101',
internalId:  '',
customField: '20080829-182914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53122',
internalId:  '',
customField: '20080610-215710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51601',
internalId:  '',
customField: '20080610-205551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20080222-160021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4622',
internalId:  '',
customField: '20080222-160305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50701',
internalId:  '',
customField: '20080410-161852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20090829-175845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4643',
internalId:  '',
customField: '20100610-122318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20091230-153449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58793',
internalId:  '',
customField: '20080928-223351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12664',
internalId:  '',
customField: '20070912-172010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12685',
internalId:  '',
customField: '20080201-161239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12706',
internalId:  '',
customField: '20090304-143359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20080921-230845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4664',
internalId:  '',
customField: '20091230-152855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25701',
internalId:  '',
customField: '20090829-181302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61574',
internalId:  '',
customField: '20100609-211528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20090624-181424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7522',
internalId:  '',
customField: '20100609-210424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60079',
internalId:  '',
customField: '20090729-161253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4748',
internalId:  '',
customField: '20100610-121926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4832',
internalId:  '',
customField: '20100610-122626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59290',
internalId:  '',
customField: '20090624-181220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32801',
internalId:  '',
customField: '20071024-130624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43001',
internalId:  '',
customField: '20080222-155036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48201',
internalId:  '',
customField: '20080410-160748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61856',
internalId:  '',
customField: '20100610-210049'
};
webappMappings['7060']=webappMappings['7060-564157fa55e73278b4b7f0bf547b1520']={
webappId:    '7060',
documentId:  '61778',
internalId:  '564157fa55e73278b4b7f0bf547b1520',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3801',
internalId:  '',
customField: '20070720-174029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20070824-004017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59299',
internalId:  '',
customField: '20090623-152345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59308',
internalId:  '',
customField: '20090623-155617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59390',
internalId:  '',
customField: '20090623-160039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59381',
internalId:  '',
customField: '20090829-180227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59399',
internalId:  '',
customField: '20100609-211104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59408',
internalId:  '',
customField: '20100610-122109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59345',
internalId:  '',
customField: '20100610-205640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59354',
internalId:  '',
customField: '20100610-141354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59363',
internalId:  '',
customField: '20100610-142121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59372',
internalId:  '',
customField: '20100610-142057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60267',
internalId:  '',
customField: '20100610-122027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60507',
internalId:  '',
customField: '20100610-133700'
};
webappMappings['7008']=webappMappings['7008-7012']={
webappId:    '7008',
documentId:  '18601',
internalId:  '7012',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61224',
internalId:  '',
customField: '20100610-134111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61345',
internalId:  '',
customField: '20100330-202044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61520',
internalId:  '',
customField: '20100610-160252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61529',
internalId:  '',
customField: '20100610-160452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61563',
internalId:  '',
customField: '20100609-210145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61583',
internalId:  '',
customField: '20100609-212248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61592',
internalId:  '',
customField: '20100609-212535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61601',
internalId:  '',
customField: '20100609-212859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61610',
internalId:  '',
customField: '20100609-214518'
};
webappMappings['7060']=webappMappings['7060-5a76c1bbbdeb6f6688f57eb51d1e8eef']={
webappId:    '7060',
documentId:  '60507',
internalId:  '5a76c1bbbdeb6f6688f57eb51d1e8eef',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050IN2UXC';
var companyName   = 'Leslie+School+of+Dance';
var htmlTitle	  = 'Leslie+School+of+Dance';
var metaKeywords  = '%2Fdance%2C+%2Fballet%2C+%2Fjazz%2C+%2Ftap%2C+%2Flyrical%2C+%2Fhip+hop%2C+%2Facro%2C+%2Fcompetition+team%2C+%2Fdance+camps%2C+%2Fbirthday+parties%2C+%2Fsummer+programs%2C+%2Fstudio+trip+to+Florida+2009%2C+%2Fdance+clothing+store%2C+%2Felmira+heights%2C+%2Fdance+studio';
var metaContents  = 'ballet+jazz+tap+lyrical+hip+hop+acro+competition+team......+Dance+Classes+for+All+ages+and+All+levels.+Register+anytime%2C+all+year%21%21+Birthday+Parties%21%21+Located+in+Elmira+Heights%2C+NY+and+Watkins+Glen%2C+NY.+Contact+at+607-737-9014+at+the+Elmira+Heights+Studio+or+607-535-5350+at+the+Watkins+Glen+Studio';
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();
};
