/* [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','5201',jdecode('Home'),jdecode(''), jdecode('%2F5201%2Findex.html'), 'true',[ 
		['PAGE','463623',jdecode('Neuheiten'),jdecode(''), jdecode('%2F5201%2F463623.html'), 'true',[],'','']
	],'',''],
	['PAGE','5315',jdecode('Angebote'),jdecode(''), jdecode('%2F5315.html'), 'true',[],'',''],
	['PAGE','496623',jdecode('Zu+verkaufen%21'),jdecode(''), jdecode('%2F496623.html'), 'true',[],'',''],
	['PAGE','122401',jdecode('Anwendertreffen'),jdecode(''), jdecode('%2F122401%2Findex.html'), 'true',[ 
		['PAGE','5294',jdecode('R%C3%BCckblick'),jdecode(''), jdecode('%2F122401%2F5294.html'), 'true',[],'','']
	],'',''],
	['PAGE','398323',jdecode('Archiv'),jdecode(''), jdecode('%2F398323%2Findex.html'), 'true',[ 
		['PAGE','398344',jdecode('ab+Januar+2010'),jdecode(''), jdecode('%2F398323%2F398344.html'), 'true',[],'',''],
		['PAGE','146222',jdecode('bis+Dezember+2009'),jdecode(''), jdecode('%2F398323%2F146222.html'), 'true',[],'','']
	],'',''],
	['PAGE','400323',jdecode('BERNINA+in+der+Schule'),jdecode(''), jdecode('%2F400323%2Findex.html'), 'true',[ 
		['PAGE','516323',jdecode('BFF+Bern'),jdecode(''), jdecode('%2F400323%2F516323.html'), 'true',[],'',''],
		['PAGE','287612',jdecode('Mode+Design+Schule+Z%C3%BCrich+2009'),jdecode(''), jdecode('%2F400323%2F287612.html'), 'true',[],'',''],
		['PAGE','412223',jdecode('Mode+Design+Schule+Z%C3%BCrich+2010'),jdecode(''), jdecode('%2F400323%2F412223.html'), 'true',[],'',''],
		['PAGE','400344',jdecode('Sch%C3%B6nenberg'),jdecode(''), jdecode('%2F400323%2F400344.html'), 'true',[],'',''],
		['PAGE','400365',jdecode('Schaffhausen'),jdecode(''), jdecode('%2F400323%2F400365.html'), 'true',[],'',''],
		['PAGE','418923',jdecode('Kantonsschule+Seetal'),jdecode(''), jdecode('%2F400323%2F418923.html'), 'true',[],'',''],
		['PAGE','463023',jdecode('swch+'),jdecode(''), jdecode('%2F400323%2F463023.html'), 'true',[],'',''],
		['PAGE','487723',jdecode('PIVA+2010'),jdecode(''), jdecode('%2F400323%2F487723.html'), 'true',[],'',''],
		['PAGE','487823',jdecode('PIVA+2011'),jdecode(''), jdecode('%2F400323%2F487823.html'), 'true',[],'','']
	],'',''],
	['PAGE','5420',jdecode('Events'),jdecode(''), jdecode('%2F5420%2Findex.html'), 'true',[ 
		['PAGE','467523',jdecode('Tag+der+offenen+T%C3%BCr+'),jdecode(''), jdecode('%2F5420%2F467523.html'), 'true',[],'',''],
		['PAGE','160201',jdecode('Umzug+2011'),jdecode(''), jdecode('%2F5420%2F160201.html'), 'true',[],'',''],
		['PAGE','460123',jdecode('Flohmarkt%21'),jdecode(''), jdecode('%2F5420%2F460123.html'), 'true',[],'',''],
		['PAGE','423323',jdecode('T%C3%B6ff-Club'),jdecode(''), jdecode('%2F5420%2F423323.html'), 'true',[],'',''],
		['PAGE','376123',jdecode('Workshop+Sch%C3%BCrze+'),jdecode(''), jdecode('%2F5420%2F376123.html'), 'true',[],'',''],
		['PAGE','231301',jdecode('M%C3%A4nnerkurs'),jdecode(''), jdecode('%2F5420%2F231301.html'), 'true',[],'',''],
		['PAGE','109401',jdecode('Gemeinschaftswerk'),jdecode(''), jdecode('%2F5420%2F109401.html'), 'true',[],'','']
	],'',''],
	['PAGE','109806',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F109806%2Findex.html'), 'true',[ 
		['PAGE','109801',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F109806%2F109801.html'), 'true',[],'','']
	],'',''],
	['PAGE','5336',jdecode('Inhaberin'),jdecode(''), jdecode('%2F5336.html'), 'true',[],'',''],
	['PAGE','438523',jdecode('Kreativtage'),jdecode(''), jdecode('%2F438523%2Findex.html'), 'true',[ 
		['PAGE','513623',jdecode('Kreativtage+Fr%C3%BChling+2012'),jdecode(''), jdecode('%2F438523%2F513623.html'), 'true',[],'',''],
		['PAGE','498423',jdecode('Kreativtage+Herbst+2011'),jdecode(''), jdecode('%2F438523%2F498423.html'), 'true',[],'',''],
		['PAGE','483523',jdecode('Kreativtage+Sommer+2011'),jdecode(''), jdecode('%2F438523%2F483523.html'), 'true',[],'',''],
		['PAGE','475723',jdecode('Kreativtage+Fr%C3%BChling+2011'),jdecode(''), jdecode('%2F438523%2F475723.html'), 'true',[],'',''],
		['PAGE','442623',jdecode('Kreativtage+Herbst+2010'),jdecode(''), jdecode('%2F438523%2F442623.html'), 'true',[],'',''],
		['PAGE','438823',jdecode('Kreativtage+Sommer+2010'),jdecode(''), jdecode('%2F438523%2F438823.html'), 'true',[],'',''],
		['PAGE','363323',jdecode('Kreativtage+Fr%C3%BChling+2010'),jdecode(''), jdecode('%2F438523%2F363323.html'), 'true',[],'',''],
		['PAGE','266112',jdecode('Kreativtage+Herbst+2009'),jdecode(''), jdecode('%2F438523%2F266112.html'), 'true',[],'',''],
		['PAGE','195101',jdecode('Kreativtage+Fr%C3%BChling+2009'),jdecode(''), jdecode('%2F438523%2F195101.html'), 'true',[],'',''],
		['PAGE','142201',jdecode('Kreativtage+Herbst+2008'),jdecode(''), jdecode('%2F438523%2F142201.html'), 'true',[],'','']
	],'',''],
	['PAGE','5399',jdecode('Kurse'),jdecode(''), jdecode('%2F5399%2Findex.html'), 'true',[ 
		['PAGE','5252',jdecode('Laufende+Kurse'),jdecode(''), jdecode('%2F5399%2F5252.html'), 'true',[],'',''],
		['PAGE','480223',jdecode('Sticken'),jdecode(''), jdecode('%2F5399%2F480223.html'), 'true',[],'',''],
		['PAGE','125701',jdecode('Software'),jdecode(''), jdecode('%2F5399%2F125701.html'), 'true',[],'',''],
		['PAGE','396623',jdecode('Kleider+n%C3%A4hen'),jdecode(''), jdecode('%2F5399%2F396623.html'), 'true',[],'',''],
		['PAGE','421123',jdecode('Kinderkleider+n%C3%A4hen'),jdecode(''), jdecode('%2F5399%2F421123.html'), 'true',[],'',''],
		['PAGE','285512',jdecode('Patch-+und+Quiltkurs'),jdecode(''), jdecode('%2F5399%2F285512.html'), 'true',[],'',''],
		['PAGE','487123',jdecode('Handapplizieren'),jdecode(''), jdecode('%2F5399%2F487123.html'), 'true',[],'',''],
		['PAGE','495123',jdecode('Schmusetierchen'),jdecode(''), jdecode('%2F5399%2F495123.html'), 'true',[],'',''],
		['PAGE','138901',jdecode('Overlock'),jdecode(''), jdecode('%2F5399%2F138901.html'), 'true',[],'',''],
		['PAGE','146201',jdecode('Kursanmeldung'),jdecode(''), jdecode('%2F5399%2F146201.html'), 'true',[],'',''],
		['PAGE','126301',jdecode('Privatstunden'),jdecode(''), jdecode('%2F5399%2F126301.html'), 'true',[],'',''],
		['PAGE','455023',jdecode('SHPL'),jdecode(''), jdecode('%2F5399%2F455023.html'), 'true',[],'','']
	],'',''],
	['PAGE','5273',jdecode('Kurszentrum'),jdecode(''), jdecode('%2F5273.html'), 'true',[],'',''],
	['PAGE','5357',jdecode('Lageplan'),jdecode(''), jdecode('%2F5357.html'), 'true',[],'',''],
	['PAGE','42701',jdecode('Links'),jdecode(''), jdecode('%2F42701.html'), 'true',[],'',''],
	['PAGE','129401',jdecode('Stickfaden'),jdecode(''), jdecode('%2F129401%2Findex.html'), 'true',[ 
		['PAGE','129422',jdecode('Isacord'),jdecode(''), jdecode('%2F129401%2F129422.html'), 'true',[],'',''],
		['PAGE','129443',jdecode('Polysheen'),jdecode(''), jdecode('%2F129401%2F129443.html'), 'true',[],'','']
	],'',''],
	['PAGE','266312',jdecode('Chinareise'),jdecode(''), jdecode('%2F266312.html'), 'true',[],'',''],
	['PAGE','315223',jdecode('Frankreichreise'),jdecode(''), jdecode('%2F315223.html'), 'true',[],'',''],
	['PAGE','433523',jdecode('Reise+an+die+Ostsee'),jdecode(''), jdecode('%2F433523.html'), 'true',[],'',''],
	['PAGE','503923',jdecode('Reise+nach+Florida'),jdecode(''), jdecode('%2F503923.html'), 'true',[],'',''],
	['PAGE','381923',jdecode('Handball'),jdecode(''), jdecode('%2F381923.html'), 'true',[],'','']];
var siteelementCount=65;
theSitetree.topTemplateName='Medium';
theSitetree.paletteFamily='01343D';
theSitetree.keyvisualId='2160';
theSitetree.keyvisualName='communication.jpg';
theSitetree.fontsetId='357';
theSitetree.graphicsetId='409';
theSitetree.contentColor='FF0000';
theSitetree.contentBGColor='01343D';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Medium',
				paletteFamily: 	'01343D',
				keyvisualId: 	'2160',
				keyvisualName: 	'communication.jpg',
				fontsetId: 		'357',
				graphicsetId: 	'409',
				contentColor: 	'FF0000',
				contentBGColor: '01343D',
				a_color: 		'01343D',
				b_color: 		'8EBFC6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-109806abw0x0in2g0a']={
webappId:    '1002',
documentId:  '109806',
internalId:  '109806abw0x0in2g0a',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '412223',
internalId:  '',
customField: '20110209-085803'
};
webappMappings['7008']=webappMappings['7008-799']={
webappId:    '7008',
documentId:  '129422',
internalId:  '799',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-800']={
webappId:    '7008',
documentId:  '129443',
internalId:  '800',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460123',
internalId:  '',
customField: '20110130-210516'
};
webappMappings['7008']=webappMappings['7008-801']={
webappId:    '7008',
documentId:  '146201',
internalId:  '801',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20120202-145623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160201',
internalId:  '',
customField: '20110205-110205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5273',
internalId:  '',
customField: '20110207-122851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5315',
internalId:  '',
customField: '20090622-172956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5399',
internalId:  '',
customField: '20110914-205251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146201',
internalId:  '',
customField: '20100114-224549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142201',
internalId:  '',
customField: '20111110-203100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '195101',
internalId:  '',
customField: '20111110-202939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5252',
internalId:  '',
customField: '20111201-183750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125701',
internalId:  '',
customField: '20101129-152803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138901',
internalId:  '',
customField: '20110422-111032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126301',
internalId:  '',
customField: '20100114-224058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129401',
internalId:  '',
customField: '20110318-180229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129422',
internalId:  '',
customField: '20080728-024143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129443',
internalId:  '',
customField: '20080728-024204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5336',
internalId:  '',
customField: '20110410-114346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122401',
internalId:  '',
customField: '20111110-200656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5294',
internalId:  '',
customField: '20110511-144521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5420',
internalId:  '',
customField: '20110330-200211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109401',
internalId:  '',
customField: '20090622-173438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '231301',
internalId:  '',
customField: '20090622-173550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109806',
internalId:  '',
customField: '20090622-173619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109801',
internalId:  '',
customField: '20080430-200001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42701',
internalId:  '',
customField: '20120103-170711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5357',
internalId:  '',
customField: '20110207-122926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146222',
internalId:  '',
customField: '20100114-114249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '463623',
internalId:  '',
customField: '20120202-145219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '463023',
internalId:  '',
customField: '20110205-105520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '455023',
internalId:  '',
customField: '20111206-150452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '442623',
internalId:  '',
customField: '20111110-202602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '438823',
internalId:  '',
customField: '20111110-202647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '438523',
internalId:  '',
customField: '20111201-194654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '433523',
internalId:  '',
customField: '20100803-020224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '423323',
internalId:  '',
customField: '20100508-002732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '421123',
internalId:  '',
customField: '20110112-152510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '418923',
internalId:  '',
customField: '20100426-092458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '400365',
internalId:  '',
customField: '20100124-143355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '400344',
internalId:  '',
customField: '20100124-152310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '400323',
internalId:  '',
customField: '20120126-193120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '398344',
internalId:  '',
customField: '20110501-213802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '398323',
internalId:  '',
customField: '20100901-161233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '315223',
internalId:  '',
customField: '20090522-201752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '287612',
internalId:  '',
customField: '20100329-172646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '285512',
internalId:  '',
customField: '20110407-214808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '266312',
internalId:  '',
customField: '20110318-175408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '266112',
internalId:  '',
customField: '20111110-202849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '467523',
internalId:  '',
customField: '20110410-171234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '475723',
internalId:  '',
customField: '20111110-202543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '480223',
internalId:  '',
customField: '20110918-205249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '483523',
internalId:  '',
customField: '20111110-202455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '487123',
internalId:  '',
customField: '20110914-201749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '487723',
internalId:  '',
customField: '20110831-125227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '487823',
internalId:  '',
customField: '20110831-131144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '495123',
internalId:  '',
customField: '20110914-213306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '496623',
internalId:  '',
customField: '20120103-170751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '498423',
internalId:  '',
customField: '20111110-202319'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '503923',
internalId:  '-',
customField: '20120201-174157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '396623',
internalId:  '',
customField: '20100126-163440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '381923',
internalId:  '',
customField: '20091123-091236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '376123',
internalId:  '',
customField: '20091104-214642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '363323',
internalId:  '',
customField: '20111110-202743'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '513623',
internalId:  '-',
customField: '20120202-170504'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '516323',
internalId:  '-',
customField: '20120126-201733'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2G0A';
var companyName   = 'nso+schaffhausen';
var htmlTitle	  = 'Kurszentrum+NSO';
var metaKeywords  = 'Patchworkkurs%3B+Bernina%3B+NSO%3B+Overlock%3B+Patschwork%3B+Quilten%3B++Sticksoftware%3B++Kurszentrum%3B++Schaffhausen%3B++Schuldienstkurse%3B++Privatstunden%3B++N%3Fhkurse%3B++Schnittmustersoftware%3B+Dora+Amstutz%3B+BERNINA++Kurse+mit+Sticksoftware%3B++Kurse+mit+Overlockmaschinen%3B++BERNINA-Kurse%3B+Softwarekurse%3B+Stickkurs%3B+Sticksoftware%3B';
var metaContents  = 'Patchworkkues%3B+Bernina%3B+Kurse+mit+Sticksoftware%3B++Kurse+mit+Overlockmaschinen%3B++Quilten+mit+dem+BSR%3B+Patchen+mit+dem+Patchworkfuss%3B+BERNINA-Kurse%3B+Softwarekurse%3B+Stickkurs%3B+Sticksoftware%3B++NSO%3B++Overlock%3B++Sticksoftware%3B++Kurszentrum%3B++Schaffhausen%3B++Schuldienstkurse%3B++Privatstunden%3B++N%C3%A4hkurse%3B++Schnittmustersoftware%3B+Dora+Amstutz%3B+BERNINA%3B+My+Label';
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();
};

