/* [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','4518',jdecode('Home'),jdecode(''),'/4518.html','true',[],'',''],
	['PAGE','29537',jdecode('Billy'),jdecode(''),'/29537.html','true',[],'',''],
	['PAGE','206301',jdecode('Angie'),jdecode(''),'/206301.html','true',[],'',''],
	['PAGE','692901',jdecode('Bounty'),jdecode(''),'/692901.html','true',[],'',''],
	['PAGE','776267',jdecode('Chumani'),jdecode(''),'/776267.html','true',[],'',''],
	['PAGE','776309',jdecode('Cherokee'),jdecode(''),'/776309.html','true',[],'',''],
	['PAGE','892320',jdecode('Daisy'),jdecode(''),'/892320.html','true',[],'',''],
	['PAGE','901820',jdecode('Discovery'),jdecode(''),'/901820.html','true',[],'',''],
	['PAGE','946720',jdecode('Hope'),jdecode(''),'/946720.html','true',[],'',''],
	['PAGE','206343',jdecode('Ela'),jdecode(''),'/206343.html','true',[],'',''],
	['PAGE','990020',jdecode('Elaine'),jdecode(''),'/990020.html','true',[],'',''],
	['PAGE','990041',jdecode('Energy-Fly'),jdecode(''),'/990041.html','true',[],'',''],
	['PAGE','990083',jdecode('Empire'),jdecode(''),'/990083.html','true',[],'',''],
	['PAGE','284201',jdecode('A-Wurf'),jdecode(''),'/284201.html','true',[],'',''],
	['PAGE','436301',jdecode('B-Wurf'),jdecode(''),'/436301.html','true',[],'',''],
	['PAGE','757501',jdecode('C-Wurf'),jdecode(''),'/757501.html','true',[],'',''],
	['PAGE','912120',jdecode('D-Wurf'),jdecode(''),'/912120.html','true',[],'',''],
	['PAGE','978220',jdecode('E-Wurf'),jdecode(''),'/978220.html','true',[],'',''],
	['PAGE','676201',jdecode('B-Wurf+Fotos'),jdecode(''),'/676201.html','true',[],'',''],
	['PAGE','766901',jdecode('C-Wurf+Fotos+1'),jdecode(''),'/766901.html','true',[],'',''],
	['PAGE','794620',jdecode('C-Wurf+Fotos+2'),jdecode(''),'/794620.html','true',[],'',''],
	['PAGE','801920',jdecode('C-Wurf+Fotos+3'),jdecode(''),'/801920.html','true',[],'',''],
	['PAGE','918420',jdecode('D-Wurf+Fotos+1'),jdecode(''),'/918420.html','true',[],'',''],
	['PAGE','923920',jdecode('D-Wurf+Fotos+2'),jdecode(''),'/923920.html','true',[],'',''],
	['PAGE','932120',jdecode('D-Wurf+Fotos+3'),jdecode(''),'/932120.html','true',[],'',''],
	['PAGE','992220',jdecode('E-Wurf+Fotos+1'),jdecode(''),'/992220.html','true',[],'',''],
	['PAGE','998620',jdecode('E-Wurf+Fotos+2'),jdecode(''),'/998620.html','true',[],'',''],
	['PAGE','1013620',jdecode('E-Wurf+Fotos+3'),jdecode(''),'/1013620.html','true',[],'',''],
	['PAGE','718101',jdecode('Billy+im+Agility'),jdecode(''),'/718101.html','true',[],'',''],
	['PAGE','970320',jdecode('Cherokee+im+Agility'),jdecode(''),'/970320.html','true',[],'',''],
	['PAGE','983520',jdecode('Collies+im+Agility'),jdecode(''),'/983520.html','true',[],'',''],
	['PAGE','692922',jdecode('Apache'),jdecode(''),'/692922.html','true',[],'',''],
	['PAGE','692943',jdecode('Benji'),jdecode(''),'/692943.html','true',[],'',''],
	['PAGE','776288',jdecode('Cochise'),jdecode(''),'/776288.html','true',[],'',''],
	['PAGE','840920',jdecode('Charity'),jdecode(''),'/840920.html','true',[],'',''],
	['PAGE','943262',jdecode('Dakota'),jdecode(''),'/943262.html','true',[],'',''],
	['PAGE','943220',jdecode('Dragonheart'),jdecode(''),'/943220.html','true',[],'',''],
	['PAGE','943241',jdecode('Dreamcatcher'),jdecode(''),'/943241.html','true',[],'',''],
	['PAGE','943283',jdecode('Denim'),jdecode(''),'/943283.html','true',[],'',''],
	['PAGE','990062',jdecode('Everglade'),jdecode(''),'/990062.html','true',[],'',''],
	['PAGE','990104',jdecode('Easley'),jdecode(''),'/990104.html','true',[],'',''],
	['PAGE','990125',jdecode('Easy+Rider'),jdecode(''),'/990125.html','true',[],'',''],
	['PAGE','454901',jdecode('Regenbogenbr%C3%BCcke'),jdecode(''),'/454901.html','true',[],'',''],
	['PAGE','206322',jdecode('Shiva'),jdecode(''),'/206322.html','true',[],'',''],
	['PAGE','770701',jdecode('Familientreffen'),jdecode(''),'/770701.html','true',[],'',''],
	['PAGE','118001',jdecode('Freunde'),jdecode(''),'/118001.html','true',[],'',''],
	['PAGE','379201',jdecode('Awards'),jdecode(''),'/379201.html','true',[],'',''],
	['PAGE','34780',jdecode('Agility-Erfolge+'),jdecode(''),'/34780.html','true',[],'',''],
	['PAGE','48001',jdecode('Agility-Platz'),jdecode(''),'/48001.html','true',[],'',''],
	['PAGE','822820',jdecode('Black+Jet+Teams'),jdecode(''),'/822820.html','true',[],'',''],
	['PAGE','43526',jdecode('Fotoalbum+1'),jdecode(''),'/43526.html','true',[],'',''],
	['PAGE','594601',jdecode('Fotoalbum+2'),jdecode(''),'/594601.html','true',[],'',''],
	['PAGE','596301',jdecode('Fotoalbum+3'),jdecode(''),'/596301.html','true',[],'',''],
	['PAGE','596322',jdecode('Fotoalbum+4'),jdecode(''),'/596322.html','true',[],'',''],
	['PAGE','691501',jdecode('Fotoalbum+5'),jdecode(''),'/691501.html','true',[],'',''],
	['PAGE','737101',jdecode('Fotoalbum+6'),jdecode(''),'/737101.html','true',[],'',''],
	['PAGE','749001',jdecode('Fotoalbum+7'),jdecode(''),'/749001.html','true',[],'',''],
	['PAGE','819020',jdecode('Fotoalbum+8'),jdecode(''),'/819020.html','true',[],'',''],
	['PAGE','845720',jdecode('Fotoalbum+9'),jdecode(''),'/845720.html','true',[],'',''],
	['PAGE','865620',jdecode('Fotoalbum+10'),jdecode(''),'/865620.html','true',[],'',''],
	['PAGE','872820',jdecode('Fotoalbum+11'),jdecode(''),'/872820.html','true',[],'',''],
	['PAGE','885520',jdecode('Fotoalbum+12'),jdecode(''),'/885520.html','true',[],'',''],
	['PAGE','908820',jdecode('Fotoalbum+13'),jdecode(''),'/908820.html','true',[],'',''],
	['PAGE','944520',jdecode('Fotoalbum+14'),jdecode(''),'/944520.html','true',[],'',''],
	['PAGE','959420',jdecode('Fotoalbum+15'),jdecode(''),'/959420.html','true',[],'',''],
	['PAGE','975720',jdecode('Fotoalbum+16'),jdecode(''),'/975720.html','true',[],'',''],
	['PAGE','41010',jdecode('Links+1'),jdecode(''),'/41010.html','true',[],'',''],
	['PAGE','247401',jdecode('Links+2'),jdecode(''),'/247401.html','true',[],'',''],
	['PAGE','345801',jdecode('Links+3'),jdecode(''),'/345801.html','true',[],'',''],
	['PAGE','296701',jdecode('Zum+Schmunzeln'),jdecode(''),'/296701.html','true',[],'',''],
	['PAGE','310101',jdecode('Haustiere'),jdecode(''),'/310101.html','true',[],'',''],
	['PAGE','32411',jdecode('SCC-Agility-Tag+06'),jdecode(''),'/32411.html','true',[],'',''],
	['PAGE','357001',jdecode('Basteleien'),jdecode(''),'/357001.html','true',[],'',''],
	['PAGE','835325',jdecode('G%C3%A4stebuch'),jdecode(''),'/835325/index.html','true',[ 
		['PAGE','835320',jdecode('Eintr%C3%A4ge'),jdecode(''),'/835325/835320.html','false',[],'','']
	],'','']];
var siteelementCount=75;
theSitetree.topTemplateName='Cable';
theSitetree.paletteFamily='3B34A1';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10575';
theSitetree.graphicsetId='10528';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cable',
				paletteFamily: 	'3B34A1',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10575',
				graphicsetId: 	'10528',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4518',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '932120',
internalId:  '',
customField: '20091005-003512'
};
webappMappings['1002']=webappMappings['1002-835325abw0x0inxsrt']={
webappId:    '1002',
documentId:  '835325',
internalId:  '835325abw0x0inxsrt',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4518',
internalId:  '',
customField: '20100701-212854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '912120',
internalId:  '',
customField: '20091005-004817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29537',
internalId:  '',
customField: '20100203-032949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '206301',
internalId:  '',
customField: '20100301-130210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '692901',
internalId:  '',
customField: '20100309-222426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '776267',
internalId:  '',
customField: '20091103-193040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '776309',
internalId:  '',
customField: '20090921-003726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '892320',
internalId:  '',
customField: '20090701-021405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901820',
internalId:  '',
customField: '20090701-021540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '983520',
internalId:  '',
customField: '20090920-213211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '206343',
internalId:  '',
customField: '20090701-021755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '943220',
internalId:  '',
customField: '20100131-044242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '990020',
internalId:  '',
customField: '20100203-031221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '284201',
internalId:  '',
customField: '20070612-130457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '436301',
internalId:  '',
customField: '20091005-004406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757501',
internalId:  '',
customField: '20091005-004234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '718101',
internalId:  '',
customField: '20070812-023633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '970320',
internalId:  '',
customField: '20090919-151159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '944520',
internalId:  '',
customField: '20091106-005834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '943241',
internalId:  '',
customField: '20100131-044406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '943262',
internalId:  '',
customField: '20100131-044146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '692922',
internalId:  '',
customField: '20090701-022136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '692943',
internalId:  '',
customField: '20091210-020309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '776288',
internalId:  '',
customField: '20090701-022602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '840920',
internalId:  '',
customField: '20091129-235600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '978220',
internalId:  '',
customField: '20100203-033410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '454901',
internalId:  '',
customField: '20080215-155233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '206322',
internalId:  '',
customField: '20080818-225806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '770701',
internalId:  '',
customField: '20071210-234438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118001',
internalId:  '',
customField: '20091021-000506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '379201',
internalId:  '',
customField: '20080109-015247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34780',
internalId:  '',
customField: '20071022-140011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48001',
internalId:  '',
customField: '20080926-013554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '822820',
internalId:  '',
customField: '20091020-232101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43526',
internalId:  '',
customField: '20070612-203051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594601',
internalId:  '',
customField: '20070612-203233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '596301',
internalId:  '',
customField: '20070521-130426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '596322',
internalId:  '',
customField: '20070612-014117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '676201',
internalId:  '',
customField: '20091005-003201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '691501',
internalId:  '',
customField: '20091106-005423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '737101',
internalId:  '',
customField: '20091106-005457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '749001',
internalId:  '',
customField: '20091106-005538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '766901',
internalId:  '',
customField: '20091005-003230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794620',
internalId:  '',
customField: '20091005-003300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801920',
internalId:  '',
customField: '20091005-003337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '819020',
internalId:  '',
customField: '20091106-005602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '845720',
internalId:  '',
customField: '20091106-005628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '865620',
internalId:  '',
customField: '20091106-005652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '872820',
internalId:  '',
customField: '20091106-005716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '885520',
internalId:  '',
customField: '20091106-005740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '908820',
internalId:  '',
customField: '20091106-005807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41010',
internalId:  '',
customField: '20090918-120541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '247401',
internalId:  '',
customField: '20080926-021151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '345801',
internalId:  '',
customField: '20081111-225855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '296701',
internalId:  '',
customField: '20070627-004200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '310101',
internalId:  '',
customField: '20070224-005358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32411',
internalId:  '',
customField: '20070303-201444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '943283',
internalId:  '',
customField: '20100131-044447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '357001',
internalId:  '',
customField: '20090628-110200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '835325',
internalId:  '',
customField: '20080409-233542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '835320',
internalId:  '',
customField: '20080409-232552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '975720',
internalId:  '',
customField: '20100203-033331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '918420',
internalId:  '',
customField: '20091005-003408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '923920',
internalId:  '',
customField: '20091005-003437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '946720',
internalId:  '',
customField: '20100309-222527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '959420',
internalId:  '',
customField: '20091106-005903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '990041',
internalId:  '',
customField: '20100203-031329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '990062',
internalId:  '',
customField: '20100131-044611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '990083',
internalId:  '',
customField: '20100701-213525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '990104',
internalId:  '',
customField: '20091210-023240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '990125',
internalId:  '',
customField: '20100203-031625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '992220',
internalId:  '',
customField: '20091013-192455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '998620',
internalId:  '',
customField: '20091106-003124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1013620',
internalId:  '',
customField: '20100203-032824'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXSRT';
var companyName   = 'Black+Jet%60s++++++++++Collie-Zucht+%2B+Agility';
var htmlTitle	  = 'Black+Jet%60s++++Collie-Zucht+%2B+Agility';
var metaKeywords  = '';
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();
};
