/* [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','2201',jdecode('Home'),jdecode(''), jdecode('%2F2201.html'), 'true',[],'',''],
	['PAGE','190615',jdecode('NEW+HOLIDAY+DESIGNS'),jdecode(''), jdecode('%2F190615.html'), 'true',[],'',''],
	['PAGE','2252',jdecode('New+Items'),jdecode(''), jdecode('%2F2252.html'), 'true',[],'',''],
	['PAGE','2294',jdecode('CRAFT+KITS+%26+Super+Saturdays'),jdecode(''), jdecode('%2F2294.html'), 'true',[],'',''],
	['PAGE','26401',jdecode('VINYL+Lettering+Products'),jdecode(''), jdecode('%2F26401%2Findex.html'), 'true',[ 
		['PAGE','63301',jdecode('Tiles'),jdecode(''), jdecode('%2F26401%2F63301.html'), 'true',[],'',''],
		['PAGE','2399',jdecode('Stackers'),jdecode(''), jdecode('%2F26401%2F2399.html'), 'true',[],'',''],
		['PAGE','28322',jdecode('Wall+Vinyl'),jdecode(''), jdecode('%2F26401%2F28322.html'), 'true',[],'',''],
		['PAGE','2378',jdecode('Vinyl-Wood+Signs+'),jdecode(''), jdecode('%2F26401%2F2378.html'), 'true',[],'',''],
		['PAGE','34401',jdecode('Family+Name+Signs'),jdecode(''), jdecode('%2F26401%2F34401.html'), 'true',[],'',''],
		['PAGE','33401',jdecode('FHE+%26++Messages'),jdecode(''), jdecode('%2F26401%2F33401.html'), 'true',[],'',''],
		['PAGE','180715',jdecode('Calendars+%26+Chore+Charts'),jdecode(''), jdecode('%2F26401%2F180715.html'), 'true',[],'',''],
		['PAGE','56469',jdecode('Memory+Boards'),jdecode(''), jdecode('%2F26401%2F56469.html'), 'true',[],'',''],
		['PAGE','28343',jdecode('Blocks'),jdecode(''), jdecode('%2F26401%2F28343.html'), 'true',[],'',''],
		['PAGE','34485',jdecode('Temples'),jdecode(''), jdecode('%2F26401%2F34485.html'), 'true',[],'',''],
		['PAGE','72601',jdecode('Cut+Outs'),jdecode(''), jdecode('%2F26401%2F72601.html'), 'true',[],'',''],
		['PAGE','72701',jdecode('Mailboxs-Doors'),jdecode(''), jdecode('%2F26401%2F72701.html'), 'true',[],'',''],
		['PAGE','71601',jdecode('Crescents'),jdecode(''), jdecode('%2F26401%2F71601.html'), 'true',[],'','']
	],'',''],
	['PAGE','126801',jdecode('It%26%23x27%3Bs+all+Fair+Trade'),jdecode(''), jdecode('%2F126801%2Findex.html'), 'true',[ 
		['PAGE','192215',jdecode('New+Bags+for+2012'),jdecode(''), jdecode('%2F126801%2F192215.html'), 'true',[],'',''],
		['PAGE','126922',jdecode('Bags%2C+Shoppers+%26+Totes'),jdecode(''), jdecode('%2F126801%2F126922.html'), 'true',[],'',''],
		['PAGE','126901',jdecode('Journals'),jdecode(''), jdecode('%2F126801%2F126901.html'), 'true',[],'',''],
		['PAGE','126943',jdecode('Jewelry'),jdecode(''), jdecode('%2F126801%2F126943.html'), 'true',[],'',''],
		['PAGE','189515',jdecode('Sandals'),jdecode(''), jdecode('%2F126801%2F189515.html'), 'true',[],'',''],
		['PAGE','158915',jdecode('Home+Decor'),jdecode(''), jdecode('%2F126801%2F158915.html'), 'true',[],'',''],
		['PAGE','175715',jdecode('Toys+%26+Fun+Accessories'),jdecode(''), jdecode('%2F126801%2F175715.html'), 'true',[],'','']
	],'',''],
	['PAGE','58401',jdecode('Scrappy+Wood+Products'),jdecode(''), jdecode('%2F58401.html'), 'true',[],'',''],
	['PAGE','2273',jdecode('Steel+Products'),jdecode(''), jdecode('%2F2273.html'), 'true',[],'',''],
	['PAGE','56001',jdecode('Clocks'),jdecode(''), jdecode('%2F56001.html'), 'true',[],'',''],
	['PAGE','34569',jdecode('Holidays'),jdecode(''), jdecode('%2F34569.html'), 'true',[],'',''],
	['PAGE','3301',jdecode('Embellishments'),jdecode(''), jdecode('%2F3301.html'), 'true',[],'',''],
	['PAGE','2336',jdecode('Fonts'),jdecode(''), jdecode('%2F2336.html'), 'true',[],'',''],
	['PAGE','82801',jdecode('Colors'),jdecode(''), jdecode('%2F82801.html'), 'true',[],'',''],
	['PAGE','28301',jdecode('Quote+Samples'),jdecode(''), jdecode('%2F28301%2Findex.html'), 'true',[ 
		['PAGE','33501',jdecode('Family+%26+Friends'),jdecode(''), jdecode('%2F28301%2F33501.html'), 'true',[],'',''],
		['PAGE','33543',jdecode('Children+quotes'),jdecode(''), jdecode('%2F28301%2F33543.html'), 'true',[],'',''],
		['PAGE','33522',jdecode('Inspirational'),jdecode(''), jdecode('%2F28301%2F33522.html'), 'true',[],'',''],
		['PAGE','85601',jdecode('Religious'),jdecode(''), jdecode('%2F28301%2F85601.html'), 'true',[],'',''],
		['PAGE','85622',jdecode('Love+%26+Romance'),jdecode(''), jdecode('%2F28301%2F85622.html'), 'true',[],'',''],
		['PAGE','33606',jdecode('Entry-Kitchen-Bath'),jdecode(''), jdecode('%2F28301%2F33606.html'), 'true',[],'',''],
		['PAGE','33564',jdecode('Outdoors'),jdecode(''), jdecode('%2F28301%2F33564.html'), 'true',[],'',''],
		['PAGE','33585',jdecode('Holiday+Quotes'),jdecode(''), jdecode('%2F28301%2F33585.html'), 'true',[],'',''],
		['PAGE','33627',jdecode('Misc.+Quotes'),jdecode(''), jdecode('%2F28301%2F33627.html'), 'true',[],'','']
	],'',''],
	['PAGE','2315',jdecode('Pricing-Ordering'),jdecode(''), jdecode('%2F2315.html'), 'true',[],'',''],
	['PAGE','15822',jdecode('Contact+Us'),jdecode(''), jdecode('%2F15822.html'), 'true',[],'',''],
	['PAGE','15843',jdecode('FAQs'),jdecode(''), jdecode('%2F15843.html'), 'true',[],'',''],
	['PAGE','19701',jdecode('Petal+Soft+Jewelry'),jdecode(''), jdecode('%2F19701.html'), 'false',[],'',''],
	['PAGE','59501',jdecode('Nykki%26%23x27%3Bs+TuTus'),jdecode(''), jdecode('%2F59501.html'), 'false',[],'',''],
	['PAGE','34443',jdecode('5x12'),jdecode(''), jdecode('%2F34443.html'), 'false',[],'',''],
	['PAGE','34464',jdecode('8x8'),jdecode(''), jdecode('%2F34464.html'), 'false',[],'',''],
	['PAGE','56301',jdecode('12x12'),jdecode(''), jdecode('%2F56301.html'), 'false',[],'',''],
	['PAGE','72101',jdecode('6x18'),jdecode(''), jdecode('%2F72101.html'), 'false',[],'',''],
	['PAGE','56322',jdecode('6x36'),jdecode(''), jdecode('%2F56322.html'), 'false',[],'',''],
	['PAGE','56343',jdecode('6x24'),jdecode(''), jdecode('%2F56343.html'), 'false',[],'',''],
	['PAGE','56364',jdecode('8x24'),jdecode(''), jdecode('%2F56364.html'), 'false',[],'',''],
	['PAGE','56385',jdecode('8x36'),jdecode(''), jdecode('%2F56385.html'), 'false',[],'',''],
	['PAGE','56406',jdecode('8x48'),jdecode(''), jdecode('%2F56406.html'), 'false',[],'',''],
	['PAGE','34422',jdecode('5x7'),jdecode(''), jdecode('%2F34422.html'), 'false',[],'',''],
	['PAGE','34506',jdecode('4x10'),jdecode(''), jdecode('%2F34506.html'), 'false',[],'',''],
	['PAGE','34527',jdecode('4.5+x+'),jdecode(''), jdecode('%2F34527.html'), 'false',[],'',''],
	['PAGE','34548',jdecode('4x4'),jdecode(''), jdecode('%2F34548.html'), 'false',[],'',''],
	['PAGE','35301',jdecode('Welcome'),jdecode(''), jdecode('%2F35301.html'), 'false',[],'',''],
	['PAGE','35322',jdecode('Triples'),jdecode(''), jdecode('%2F35322.html'), 'false',[],'',''],
	['PAGE','35343',jdecode('Scrolls+%26+Embellishments'),jdecode(''), jdecode('%2F35343.html'), 'false',[],'',''],
	['PAGE','63343',jdecode('TILES-Religious'),jdecode(''), jdecode('%2F63343.html'), 'false',[],'',''],
	['PAGE','63385',jdecode('TILES-inspiration'),jdecode(''), jdecode('%2F63385.html'), 'false',[],'',''],
	['PAGE','15801',jdecode('Tiles+-+Holidays+%26+Seasonal'),jdecode(''), jdecode('%2F15801.html'), 'false',[],'',''],
	['PAGE','63364',jdecode('TILES-Family'),jdecode(''), jdecode('%2F63364.html'), 'false',[],'',''],
	['PAGE','63322',jdecode('TILES-Child'),jdecode(''), jdecode('%2F63322.html'), 'false',[],'',''],
	['PAGE','66601',jdecode('Tiles-Fun'),jdecode(''), jdecode('%2F66601.html'), 'false',[],'',''],
	['PAGE','193515',jdecode('google'),jdecode(''), jdecode('%2F193515.html'), 'false',[],'',''],
	['PAGE','194115',jdecode('Thanks+so+Much'),jdecode(''), jdecode('%2F194115.html'), 'false',[],'','']];
var siteelementCount=72;
theSitetree.topTemplateName='Gaudy';
theSitetree.paletteFamily='5C5D96';
theSitetree.keyvisualId='5969';
theSitetree.keyvisualName='kv_5969.jpg';
theSitetree.fontsetId='11113';
theSitetree.graphicsetId='11905';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='6E8BCE';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Gaudy',
				paletteFamily: 	'5C5D96',
				keyvisualId: 	'5969',
				keyvisualName: 	'kv_5969.jpg',
				fontsetId: 		'11113',
				graphicsetId: 	'11905',
				contentColor: 	'FFFFFF',
				contentBGColor: '6E8BCE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2273',
internalId:  '',
customField: '20111112-192716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20111230-182611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2399',
internalId:  '',
customField: '20091230-175844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3301',
internalId:  '',
customField: '20091010-000610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2315',
internalId:  '',
customField: '20100326-210455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2378',
internalId:  '',
customField: '20091010-000001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2252',
internalId:  '',
customField: '20111102-124111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2294',
internalId:  '',
customField: '20111102-105105'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20091230-181713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2336',
internalId:  '',
customField: '20091010-000626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15822',
internalId:  '',
customField: '20091007-003901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15843',
internalId:  '',
customField: '20091010-001028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20091230-181741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34485',
internalId:  '',
customField: '20091010-000214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34548',
internalId:  '',
customField: '20090916-191604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34401',
internalId:  '',
customField: '20091010-000032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56301',
internalId:  '',
customField: '20091009-215802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28343',
internalId:  '',
customField: '20091010-000146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28322',
internalId:  '',
customField: '20091009-235944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33401',
internalId:  '',
customField: '20110324-155458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56001',
internalId:  '',
customField: '20101207-224502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58401',
internalId:  '',
customField: '20111102-111356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63322',
internalId:  '',
customField: '20091230-182000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63385',
internalId:  '',
customField: '20091230-181902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63343',
internalId:  '',
customField: '20101221-192344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66601',
internalId:  '',
customField: '20091230-182054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63364',
internalId:  '',
customField: '20091230-182123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34422',
internalId:  '',
customField: '20091006-183625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56322',
internalId:  '',
customField: '20091009-215838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56343',
internalId:  '',
customField: '20091009-215900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72101',
internalId:  '',
customField: '20091009-215828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34443',
internalId:  '',
customField: '20091009-220906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56364',
internalId:  '',
customField: '20091009-215910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56385',
internalId:  '',
customField: '20091009-215927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56406',
internalId:  '',
customField: '20091009-220014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34464',
internalId:  '',
customField: '20091009-215719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56469',
internalId:  '',
customField: '20091010-000057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72601',
internalId:  '',
customField: '20091010-000243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72701',
internalId:  '',
customField: '20091010-000306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71601',
internalId:  '',
customField: '20091010-000334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34569',
internalId:  '',
customField: '20091010-000555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82801',
internalId:  '',
customField: '20091010-000704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28301',
internalId:  '',
customField: '20091010-000723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20091008-000210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33543',
internalId:  '',
customField: '20091008-010130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33522',
internalId:  '',
customField: '20091008-001851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85601',
internalId:  '',
customField: '20091008-002844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85622',
internalId:  '',
customField: '20091008-003616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33606',
internalId:  '',
customField: '20091008-011509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33564',
internalId:  '',
customField: '20091008-011845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33627',
internalId:  '',
customField: '20091008-012501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33585',
internalId:  '',
customField: '20091008-014953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20100102-014429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59501',
internalId:  '',
customField: '20090930-202055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34506',
internalId:  '',
customField: '20090916-191604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34527',
internalId:  '',
customField: '20090916-191604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35301',
internalId:  '',
customField: '20090916-193158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35322',
internalId:  '',
customField: '20090916-193158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35343',
internalId:  '',
customField: '20090916-193158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63301',
internalId:  '',
customField: '20110326-180127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126801',
internalId:  '',
customField: '20101124-200344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126901',
internalId:  '',
customField: '20101124-204151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126922',
internalId:  '',
customField: '20110704-202808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126943',
internalId:  '',
customField: '20101125-000051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158915',
internalId:  '',
customField: '20100422-170124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '175715',
internalId:  '',
customField: '20101124-224340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '180715',
internalId:  '',
customField: '20110324-155702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '189515',
internalId:  '',
customField: '20110713-231356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190615',
internalId:  '',
customField: '20111102-121806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '192215',
internalId:  '',
customField: '20111206-223245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193515',
internalId:  '',
customField: '20120106-231825'
};
webappMappings['1002']=webappMappings['1002-194115aendu0in2dlz']={
webappId:    '1002',
documentId:  '194115',
internalId:  '194115aendu0in2dlz',
customField: 'icq=false'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2DLZ';
var companyName   = 'Teresa%27s+Custom+Creations';
var htmlTitle	  = 'LDS+Vinyl.com+%26+Teresa%27s+Custom+Creations';
var metaKeywords  = 'lds+mormon+super+saturdays+crafts+vinyl+lettering+steel+signs+clocks+custom+enrichment+enrichments+HFPE+home+family+personal+enrichment+relief+society+wholesale+personalized+utah+idaho+california+oregon+washington+arizona+nevada+texas+florida+new+york+eco-friendly+eco+friendly+fair+trade+cruelty+free+leather+journal+journals+tree+free+tree-free+paper+banana+cotton+bags+tote+totes+messenger+bags+jewelry+resin+wood+stone+';
var metaContents  = 'LDS+Vinyl+Decorative+Steel%2C+Craft+Kits%2C+Finished+Products%2C+We+do+it+all%21';
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();
};

