/* [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','11801',jdecode('Home'),jdecode(''),'/11801.html','true',[],'',''],
	['PAGE','11852',jdecode('latest+thumzups'),jdecode(''),'/11852.html','true',[],'',''],
	['PAGE','14901',jdecode('thumzup+looking+good'),jdecode(''),'/14901.html','true',[],'',''],
	['PAGE','34701',jdecode('toni+%26guy+hair+straightener'),jdecode(''),'/34701.html','false',[],'',''],
	['PAGE','19801',jdecode('thumzup+at+home'),jdecode(''),'/19801.html','true',[],'',''],
	['PAGE','33501',jdecode('thumzup+for+service'),jdecode(''),'/33501.html','true',[],'',''],
	['PAGE','47501',jdecode('Residue+in+Brita+water+jug'),jdecode(''),'/47501.html','false',[],'',''],
	['PAGE','47522',jdecode('ACSA+George+thumzdown'),jdecode(''),'/47522.html','false',[],'',''],
	['PAGE','16301',jdecode('places+to+stay'),jdecode(''),'/16301.html','false',[],'',''],
	['PAGE','55501',jdecode('thumzup+at+play'),jdecode(''),'/55501.html','true',[],'',''],
	['PAGE','55522',jdecode('places+to+eat'),jdecode(''),'/55522.html','false',[],'',''],
	['PAGE','55543',jdecode('Things+to+do'),jdecode(''),'/55543.html','false',[],'',''],
	['PAGE','63801',jdecode('Shows+to+see'),jdecode(''),'/63801.html','false',[],'',''],
	['PAGE','37301',jdecode('Motswari+Private+Game+Reserve+-+An+Experience'),jdecode(''),'/37301.html','false',[],'',''],
	['PAGE','26501',jdecode('cellars+hohenort'),jdecode(''),'/26501.html','false',[],'',''],
	['PAGE','26801',jdecode('sunbeam+oven'),jdecode(''),'/26801.html','false',[],'',''],
	['PAGE','36901',jdecode('What%26%23x27%3Bs+happening+in+Cape+Town'),jdecode(''),'/36901.html','false',[],'',''],
	['PAGE','51501',jdecode('thumzup+for+health'),jdecode(''),'/51501.html','true',[],'',''],
	['PAGE','27501',jdecode('my+pond+hotel'),jdecode(''),'/27501.html','false',[],'',''],
	['PAGE','16501',jdecode('find+a+thumzup'),jdecode(''),'/16501.html','true',[],'',''],
	['PAGE','11915',jdecode('want+a+thumzup%3F'),jdecode(''),'/11915.html','true',[],'',''],
	['PAGE','16101',jdecode('contact+thumzup'),jdecode(''),'/16101.html','true',[],'',''],
	['PAGE','12601',jdecode('blue+jay'),jdecode(''),'/12601.html','false',[],'',''],
	['PAGE','14701',jdecode('king+of+shaves'),jdecode(''),'/14701.html','false',[],'',''],
	['PAGE','19301',jdecode('Najirel'),jdecode(''),'/19301.html','false',[],'',''],
	['PAGE','18301',jdecode('true+love'),jdecode(''),'/18301.html','false',[],'',''],
	['PAGE','25401',jdecode('FernIvy'),jdecode(''),'/25401.html','false',[],'',''],
	['PAGE','17301',jdecode('disclaimer'),jdecode(''),'/17301.html','true',[],'',''],
	['PAGE','20501',jdecode('Thula+Thula'),jdecode(''),'/20501.html','false',[],'',''],
	['PAGE','26101',jdecode('whale+cottage'),jdecode(''),'/26101.html','false',[],'',''],
	['PAGE','28701',jdecode('lalu+nails'),jdecode(''),'/28701.html','false',[],'',''],
	['PAGE','29301',jdecode('Sun+Protect+Sport'),jdecode(''),'/29301.html','false',[],'',''],
	['PAGE','29901',jdecode('In+a+Fix+-+blenders'),jdecode(''),'/29901.html','false',[],'',''],
	['PAGE','30301',jdecode('Pure+Moods+%26%23x27%3Bglow%26%23x27%3B+Body+Souffle+by+Clicks'),jdecode(''),'/30301.html','false',[],'',''],
	['PAGE','31101',jdecode('Yes+to+Cucumbers+Body+Gel+-+Husband+says+%22YES%21%22'),jdecode(''),'/31101.html','false',[],'',''],
	['PAGE','31901',jdecode('Yes+to+Nailfinity+by+Max+Factor'),jdecode(''),'/31901.html','false',[],'',''],
	['PAGE','32801',jdecode('Flowershop'),jdecode(''),'/32801.html','false',[],'',''],
	['PAGE','35401',jdecode('carpet+factory+shop'),jdecode(''),'/35401.html','false',[],'',''],
	['PAGE','35801',jdecode('masterpiece+mascara'),jdecode(''),'/35801.html','false',[],'',''],
	['PAGE','35822',jdecode('cell+c+cavendish'),jdecode(''),'/35822.html','false',[],'',''],
	['PAGE','40401',jdecode('woolies'),jdecode(''),'/40401.html','false',[],'',''],
	['PAGE','40801',jdecode('Simonstown+Country+Club'),jdecode(''),'/40801.html','false',[],'',''],
	['PAGE','41301',jdecode('Electro+Smart'),jdecode(''),'/41301.html','false',[],'',''],
	['PAGE','41901',jdecode('Hospice+2nd+Hand+Book+Store+in+Pretoria'),jdecode(''),'/41901.html','false',[],'',''],
	['PAGE','42401',jdecode('Faerie+Glen+Nature+Reserve'),jdecode(''),'/42401.html','false',[],'',''],
	['PAGE','43601',jdecode('Pick+%26+Pay+-+Groceries+%26+Clothing+together'),jdecode(''),'/43601.html','false',[],'',''],
	['PAGE','44401',jdecode('Good+business+-+Good+customers'),jdecode(''),'/44401.html','false',[],'',''],
	['PAGE','46501',jdecode('thumzup+requests'),jdecode(''),'/46501.html','false',[],'',''],
	['PAGE','46801',jdecode('Good+pool+maintenance'),jdecode(''),'/46801.html','false',[],'',''],
	['PAGE','47601',jdecode('Aloe+guest+house+-+Hermanus'),jdecode(''),'/47601.html','false',[],'',''],
	['PAGE','47701',jdecode('Marine+Square+-+Hermanus'),jdecode(''),'/47701.html','false',[],'',''],
	['PAGE','47722',jdecode('16+reasons+B%26B+Hermanus'),jdecode(''),'/47722.html','false',[],'',''],
	['PAGE','47801',jdecode('Fochville+supermarket+-+bad+smell'),jdecode(''),'/47801.html','false',[],'',''],
	['PAGE','47822',jdecode('Stoepie+with+a+view'),jdecode(''),'/47822.html','false',[],'',''],
	['PAGE','47901',jdecode('Thumzdown+Oudsthoorn+Spur'),jdecode(''),'/47901.html','false',[],'',''],
	['PAGE','47922',jdecode('Thumzup+Nedbank+Gardens'),jdecode(''),'/47922.html','false',[],'',''],
	['PAGE','48001',jdecode('Solal%26%23x27%3Bs+Melatonin+-+getting+a+good+nights+sleep'),jdecode(''),'/48001.html','false',[],'',''],
	['PAGE','53601',jdecode('response+carl'),jdecode(''),'/53601.html','false',[],'',''],
	['PAGE','53622',jdecode('response+flora'),jdecode(''),'/53622.html','false',[],'',''],
	['PAGE','53643',jdecode('response+gavin'),jdecode(''),'/53643.html','false',[],'',''],
	['PAGE','56601',jdecode('Breakfast+Cereal'),jdecode(''),'/56601.html','false',[],'',''],
	['PAGE','60401',jdecode('Protea+Hotel+Fire+%26+Ice'),jdecode(''),'/60401.html','false',[],'',''],
	['PAGE','56901',jdecode('Milnerton+License+Department+'),jdecode(''),'/56901.html','false',[],'',''],
	['PAGE','57801',jdecode('Drumming'),jdecode(''),'/57801.html','false',[],'',''],
	['PAGE','57201',jdecode('Flea+Deterrant'),jdecode(''),'/57201.html','false',[],'',''],
	['PAGE','58101',jdecode('Tribute+Celine+Dion'),jdecode(''),'/58101.html','false',[],'',''],
	['PAGE','58401',jdecode('Rosemary+Hill+Farm+Market'),jdecode(''),'/58401.html','false',[],'',''],
	['PAGE','58701',jdecode('Ocean+Basket+Cyprus'),jdecode(''),'/58701.html','false',[],'',''],
	['PAGE','60201',jdecode('XL++Wildtravel'),jdecode(''),'/60201.html','false',[],'',''],
	['PAGE','61501',jdecode('Col+%E2%80%98Cacchio+Pizz'),jdecode(''),'/61501.html','false',[],'',''],
	['PAGE','62001',jdecode('Table+Mountain'),jdecode(''),'/62001.html','false',[],'',''],
	['PAGE','62601',jdecode('Liberty+Medical'),jdecode(''),'/62601.html','false',[],'',''],
	['PAGE','65501',jdecode('Clicks+Olive+bath+range'),jdecode(''),'/65501.html','false',[],'',''],
	['PAGE','66001',jdecode('Kirstenbosch+Cottage'),jdecode(''),'/66001.html','false',[],'',''],
	['PAGE','66301',jdecode('beware+Willie+Tosen+Promotions'),jdecode(''),'/66301.html','false',[],'',''],
	['PAGE','66322',jdecode('Porn+Ads+Complaint'),jdecode(''),'/66322.html','false',[],'',''],
	['PAGE','66343',jdecode('Lodging+a+complaint+against+Garages+'),jdecode(''),'/66343.html','false',[],'',''],
	['PAGE','67601',jdecode('Thumbs+down%2C+Moyo%2C+Eden+on+the+Bay'),jdecode(''),'/67601.html','false',[],'','']];
var siteelementCount=78;
theSitetree.topTemplateName='Shopping';
theSitetree.paletteFamily='5C0F00';
theSitetree.keyvisualId='11760';
theSitetree.keyvisualName='kv_11760.jpg';
theSitetree.fontsetId='33041';
theSitetree.graphicsetId='14025';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='e8b96a';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Shopping',
				paletteFamily: 	'5C0F00',
				keyvisualId: 	'11760',
				keyvisualName: 	'kv_11760.jpg',
				fontsetId: 		'33041',
				graphicsetId: 	'14025',
				contentColor: 	'000000',
				contentBGColor: 'e8b96a',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['7050']=webappMappings['7050-579']={
webappId:    '7050',
documentId:  '11852',
internalId:  '579',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-2786']={
webappId:    '7008',
documentId:  '16101',
internalId:  '2786',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14901',
internalId:  '',
customField: '20100222-101624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20100203-114509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11852',
internalId:  '',
customField: '20100201-145556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20091211-124459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20091211-124312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11915',
internalId:  '',
customField: '20091126-133225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20100203-112956'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '16501',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16301',
internalId:  '',
customField: '20100203-143120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20091126-130841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20091211-124701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20091211-155459'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20091211-155227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20100302-112548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20501',
internalId:  '',
customField: '20091211-124625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20091211-165847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20100113-073427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26501',
internalId:  '',
customField: '20091217-175704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26801',
internalId:  '',
customField: '20100120-092857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27501',
internalId:  '',
customField: '20100104-162556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28701',
internalId:  '',
customField: '20100104-174618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29301',
internalId:  '',
customField: '20100104-095012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29901',
internalId:  '',
customField: '20100120-073255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30301',
internalId:  '',
customField: '20100110-151606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31101',
internalId:  '',
customField: '20100104-164959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31901',
internalId:  '',
customField: '20100104-174705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32801',
internalId:  '',
customField: '20100104-152203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20100411-203615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34701',
internalId:  '',
customField: '20100104-170232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35401',
internalId:  '',
customField: '20100107-084118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35822',
internalId:  '',
customField: '20100202-162915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35801',
internalId:  '',
customField: '20100120-092647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36901',
internalId:  '',
customField: '20100108-160525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37301',
internalId:  '',
customField: '20100108-154657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40401',
internalId:  '',
customField: '20100113-152923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40801',
internalId:  '',
customField: '20100202-165604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41301',
internalId:  '',
customField: '20100202-162057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20100118-115400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42401',
internalId:  '',
customField: '20100118-122215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43601',
internalId:  '',
customField: '20100122-101650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44401',
internalId:  '',
customField: '20100118-135721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46801',
internalId:  '',
customField: '20100129-094405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46501',
internalId:  '',
customField: '20100122-145547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47922',
internalId:  '',
customField: '20100129-120650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47522',
internalId:  '',
customField: '20100129-115001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47501',
internalId:  '',
customField: '20100129-120132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47901',
internalId:  '',
customField: '20100202-170407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48001',
internalId:  '',
customField: '20100129-151306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47822',
internalId:  '',
customField: '20100129-124137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47722',
internalId:  '',
customField: '20100129-124501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47701',
internalId:  '',
customField: '20100129-130511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47601',
internalId:  '',
customField: '20100129-130325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51501',
internalId:  '',
customField: '20100219-125535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47801',
internalId:  '',
customField: '20100129-145459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53643',
internalId:  '',
customField: '20100202-164628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53601',
internalId:  '',
customField: '20100202-165049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53622',
internalId:  '',
customField: '20100202-165211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55501',
internalId:  '',
customField: '20100221-164049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55522',
internalId:  '',
customField: '20100307-172035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55543',
internalId:  '',
customField: '20100221-171336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56601',
internalId:  '',
customField: '20100219-161455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56901',
internalId:  '',
customField: '20100219-124414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57201',
internalId:  '',
customField: '20100219-125017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57801',
internalId:  '',
customField: '20100219-134010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58101',
internalId:  '',
customField: '20100219-133610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58401',
internalId:  '',
customField: '20100219-134408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58701',
internalId:  '',
customField: '20100219-134848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60201',
internalId:  '',
customField: '20100219-142429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60401',
internalId:  '',
customField: '20100219-144720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61501',
internalId:  '',
customField: '20100221-142252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62001',
internalId:  '',
customField: '20100221-154627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62601',
internalId:  '',
customField: '20100221-155605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63801',
internalId:  '',
customField: '20100221-163447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65501',
internalId:  '',
customField: '20100222-101259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66001',
internalId:  '',
customField: '20100222-103008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66301',
internalId:  '',
customField: '20100301-181310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66322',
internalId:  '',
customField: '20100301-181702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66343',
internalId:  '',
customField: '20100301-182422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67601',
internalId:  '',
customField: '20100307-171540'
};
var canonHostname = 'sitebuilder1.jnb2.host-h.net';
var accountId     = 'AHTZ10IN25JO';
var companyName   = '';
var htmlTitle	  = 'Thumzup%3F';
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();
};
