/* [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 theSitetree=[ 
	['PAGE','6801',jdecode('Home'),jdecode(''),'/6801.html','true',[],''],
	['PAGE','41301',jdecode('+Resort+Information+'),jdecode(''),'/41301.html','true',[],''],
	['PAGE','126501',jdecode('Lifestyle+Crown+Villas+'),jdecode(''),'/126501/index.html','true',[ 
		['PAGE','217101',jdecode('Villa+1a+Photos+'),jdecode(''),'/126501/217101.html','true',[],''],
		['PAGE','217201',jdecode('Villa+3+Photos+'),jdecode(''),'/126501/217201.html','true',[],''],
		['PAGE','217301',jdecode('Villa+8+Photos+'),jdecode(''),'/126501/217301.html','true',[],''],
		['PAGE','217401',jdecode('Villa+11+Photos+'),jdecode(''),'/126501/217401.html','true',[],''],
		['PAGE','216101',jdecode('Villa+16+Photos+'),jdecode(''),'/126501/216101.html','true',[],''],
		['PAGE','217422',jdecode('Villa+17+Photos+'),jdecode(''),'/126501/217422.html','true',[],''],
		['PAGE','234201',jdecode('Villa+22+Photos'),jdecode(''),'/126501/234201.html','true',[],''],
		['PAGE','217501',jdecode('Villa+23+photos+'),jdecode(''),'/126501/217501.html','true',[],''],
		['PAGE','217522',jdecode('Villa+35+Photos+'),jdecode(''),'/126501/217522.html','true',[],''],
		['PAGE','234222',jdecode('Villa+41+Photos'),jdecode(''),'/126501/234222.html','true',[],''],
		['PAGE','211701',jdecode('Villa+47+b+Photos+'),jdecode(''),'/126501/211701.html','true',[],''],
		['PAGE','217543',jdecode('Villa+49+Photos+'),jdecode(''),'/126501/217543.html','true',[],''],
		['PAGE','217564',jdecode('Villa+50+Photos+'),jdecode(''),'/126501/217564.html','true',[],''],
		['PAGE','217585',jdecode('Villa+55+Photos+'),jdecode(''),'/126501/217585.html','true',[],''],
		['PAGE','237101',jdecode('Villa+65+Photos+'),jdecode(''),'/126501/237101.html','true',[],''],
		['PAGE','217606',jdecode('Villa+67+Photos+'),jdecode(''),'/126501/217606.html','true',[],'']
	],''],
	['PAGE','177601',jdecode('Lifestyle+Presidential+Suites'),jdecode(''),'/177601/index.html','true',[ 
		['PAGE','241801',jdecode('Presidential+Suites+Photo'),jdecode(''),'/177601/241801.html','true',[],'']
	],''],
	['PAGE','186101',jdecode('Lifestyle+Executive+Spa+Suites+'),jdecode(''),'/186101/index.html','true',[ 
		['PAGE','209801',jdecode('Spa+Suite+Photos+'),jdecode(''),'/186101/209801.html','true',[],'']
	],''],
	['PAGE','125101',jdecode('Lifestyle+Crown+Residence+Suites+'),jdecode(''),'/125101.html','true',[],''],
	['PAGE','125001',jdecode('Lifestyle+Tropical+Beach+Resort+and+Spa+'),jdecode(''),'/125001.html','true',[],''],
	['PAGE','193201',jdecode('Grand+Oasis+Marien+Puerto+Plata+'),jdecode(''),'/193201.html','true',[],''],
	['PAGE','202401',jdecode('Grand+Oasis+Punta+Cana+'),jdecode(''),'/202401.html','true',[],''],
	['PAGE','12001',jdecode('Accommodations'),jdecode(''),'/12001.html','true',[],''],
	['PAGE','119701',jdecode('Restaurants+and+Bars+'),jdecode(''),'/119701.html','true',[],''],
	['PAGE','123601',jdecode('Metamorphosis+SPA'),jdecode(''),'/123601/index.html','true',[ 
		['PAGE','246201',jdecode('Metamorphosis+Spa+Info+'),jdecode(''),'/123601/246201.html','true',[],''],
		['PAGE','244501',jdecode('Kin+Ha+Spa+info+'),jdecode(''),'/123601/244501.html','true',[],'']
	],''],
	['PAGE','136101',jdecode('Kids+Club'),jdecode(''),'/136101.html','true',[],''],
	['PAGE','32201',jdecode('VIP+WORLD'),jdecode(''),'/32201.html','true',[],''],
	['PAGE','23301',jdecode('Rental+Rates'),jdecode(''),'/23301/index.html','true',[ 
		['PAGE','240001',jdecode('Example+of+Trade+Savings+'),jdecode(''),'/23301/240001.html','true',[],''],
		['PAGE','240401',jdecode('Booking+Process+'),jdecode(''),'/23301/240401.html','true',[],''],
		['PAGE','241101',jdecode('Cancellation+Information+'),jdecode(''),'/23301/241101.html','true',[],'']
	],''],
	['PAGE','101901',jdecode('Availability'),jdecode(''),'/101901.html','true',[],''],
	['PAGE','81301',jdecode('+LINKS+'),jdecode(''),'/81301.html','true',[],''],
	['PAGE','91401',jdecode('Videos+'),jdecode(''),'/91401.html','true',[],''],
	['PAGE','90301',jdecode('Photo+Albums'),jdecode(''),'/90301.html','true',[],''],
	['PAGE','162901',jdecode('Misc.+Resort+Photos+'),jdecode(''),'/162901.html','true',[],''],
	['PAGE','93001',jdecode('Excursion+Shop'),jdecode(''),'/93001.html','true',[],''],
	['PAGE','142301',jdecode('Recent+Guest+Trip+Photos+'),jdecode(''),'/142301.html','true',[],''],
	['PAGE','160001',jdecode('Trip+Photos+Monster+Truck+'),jdecode(''),'/160001.html','true',[],''],
	['PAGE','165001',jdecode('Excursion++Pamplets+Page+1+'),jdecode(''),'/165001.html','true',[],''],
	['PAGE','165601',jdecode('Excursion+Pamplets+Page+2+'),jdecode(''),'/165601.html','true',[],''],
	['PAGE','166101',jdecode('Excursion+Pamplets+Page+3+'),jdecode(''),'/166101.html','true',[],''],
	['PAGE','19101',jdecode('Frequently+Asked+Questions+'),jdecode(''),'/19101.html','true',[],''],
	['PAGE','157001',jdecode('+Flight+Information'),jdecode(''),'/157001.html','true',[],''],
	['PAGE','132201',jdecode('LHVC++News+and++Projects+'),jdecode(''),'/132201.html','true',[],''],
	['PAGE','97801',jdecode('Guest+Feed+Back'),jdecode(''),'/97801.html','true',[],''],
	['PAGE','172301',jdecode('Why+Puerto+Plata+'),jdecode(''),'/172301.html','true',[],''],
	['PAGE','181501',jdecode('+Resort+Maps+'),jdecode(''),'/181501.html','true',[],''],
	['PAGE','200901',jdecode('Contact+Us+'),jdecode(''),'/200901.html','true',[],'']];
var siteelementCount=56;
theSitetree.topTemplateName='Meta';
theSitetree.paletteFamily='5EC6A9';
theSitetree.keyvisualId='11305';
theSitetree.keyvisualName='kv_11305.jpg';
theSitetree.fontsetId='31993';
theSitetree.graphicsetId='13825';
theSitetree.contentColor='856F35';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Meta',
				paletteFamily: 	'5EC6A9',
				keyvisualId: 	'11305',
				keyvisualName: 	'kv_11305.jpg',
				fontsetId: 		'31993',
				graphicsetId: 	'13825',
				contentColor: 	'856F35',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:  '6801',
internalId:  '',
customField: '20100522-091006'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12001',
internalId:  '',
customField: '20100319-121505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19101',
internalId:  '',
customField: '20100515-091746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23301',
internalId:  '',
customField: '20100607-103311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32201',
internalId:  '',
customField: '20100319-113856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41301',
internalId:  '',
customField: '20100513-102218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81301',
internalId:  '',
customField: '20090913-153528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125101',
internalId:  '',
customField: '20100319-114410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90301',
internalId:  '',
customField: '20090805-131641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91401',
internalId:  '',
customField: '20090726-211851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93001',
internalId:  '',
customField: '20090808-020343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123601',
internalId:  '',
customField: '20090713-000333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97801',
internalId:  '',
customField: '20100419-103202'
};
webappMappings['7005']=webappMappings['7005-1428']={
webappId:    '7005',
documentId:  '97801',
internalId:  '1428',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-88aa2a69c75a474217a6fa3513fd38f8']={
webappId:    '7060',
documentId:  '162901',
internalId:  '88aa2a69c75a474217a6fa3513fd38f8',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101901',
internalId:  '',
customField: '20100530-150639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '186101',
internalId:  '',
customField: '20100419-103304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193201',
internalId:  '',
customField: '20100320-021819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119701',
internalId:  '',
customField: '20100602-000125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125001',
internalId:  '',
customField: '20090712-234820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126501',
internalId:  '',
customField: '20100419-094236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132201',
internalId:  '',
customField: '20100418-163816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136101',
internalId:  '',
customField: '20090713-000519'
};
webappMappings['7060']=webappMappings['7060-ae402012862365a77e4bb76b231641e3']={
webappId:    '7060',
documentId:  '142301',
internalId:  'ae402012862365a77e4bb76b231641e3',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142301',
internalId:  '',
customField: '20090805-004405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157001',
internalId:  '',
customField: '20090805-124816'
};
webappMappings['7060']=webappMappings['7060-999d0e7756161ecb2fe225d965f670f0']={
webappId:    '7060',
documentId:  '160001',
internalId:  '999d0e7756161ecb2fe225d965f670f0',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160001',
internalId:  '',
customField: '20100319-113946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162901',
internalId:  '',
customField: '20090809-142212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165001',
internalId:  '',
customField: '20090808-014907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165601',
internalId:  '',
customField: '20090808-015022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166101',
internalId:  '',
customField: '20090808-015638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '172301',
internalId:  '',
customField: '20090903-012350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177601',
internalId:  '',
customField: '20100423-010043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181501',
internalId:  '',
customField: '20100306-223058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200901',
internalId:  '',
customField: '20100422-014805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '202401',
internalId:  '',
customField: '20100418-162540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '209801',
internalId:  '',
customField: '20100419-012336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '211701',
internalId:  '',
customField: '20100419-102147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '216101',
internalId:  '',
customField: '20100419-154158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217101',
internalId:  '',
customField: '20100420-005644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217201',
internalId:  '',
customField: '20100420-005618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217401',
internalId:  '',
customField: '20100420-012311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217422',
internalId:  '',
customField: '20100420-012722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217501',
internalId:  '',
customField: '20100420-013318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217301',
internalId:  '',
customField: '20100420-121327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217522',
internalId:  '',
customField: '20100420-121652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217543',
internalId:  '',
customField: '20100420-123933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217564',
internalId:  '',
customField: '20100420-124505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217585',
internalId:  '',
customField: '20100420-125805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217606',
internalId:  '',
customField: '20100420-131326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '234201',
internalId:  '',
customField: '20100421-014113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '234222',
internalId:  '',
customField: '20100421-021321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '237101',
internalId:  '',
customField: '20100422-014728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '240001',
internalId:  '',
customField: '20100426-125027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '240401',
internalId:  '',
customField: '20100422-235437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '241101',
internalId:  '',
customField: '20100423-000333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '241801',
internalId:  '',
customField: '20100423-005527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '244501',
internalId:  '',
customField: '20100530-145223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '246201',
internalId:  '',
customField: '20100530-150316'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2LOR';
var companyName   = 'Lifestyle+Holidays+Vacation+Club+and+Hacienda+Resorts+in+Puerto+Plata++Members+';
var htmlTitle	  = 'LHVC+%2C+LHVC+%40+Hacienda+Resorts+%2C+Lifestyle+Holidays+Vacation+Club%2Clhvcresorts%2Clhvsresort%2C+Paradise+Island+%2CGrand+Oasis+Marien+Dream+Suites+++%2C+Lifestyle+Hocienda+Presidential+Suites+%2C+Lifestyle+Holidays+Vacation+Club++Hacienda+Resorts+%2C+Lifestyle+Hacienda';
var metaKeywords  = 'lhvcresorts.com%2C+lhvcresort.com%2C+DR1.com%2Cdebbies+dominican%2C+LHVC+%40+Hacienda+Resorts+Lifestyle+Crown+Villas+%2C+Lifestyle+Holidays+Crown+Villas%2C+Presidential+Suites%2C+Paradise+Island+%2C+Lifestyle+Spa+Suites+%2C+LifestyleTropical+Beach+Resort+And+Spa%2C++Lifestyle+Crown+Residence+Suites%2C+Lifestyle+Holidays+Vacation+Club%2C+5+star%2CSamana%2CSosua+Bay+Hotel%2CThe+Grand+Oasis+Punta+Cana%2C+The+Grand+Oasis+Marien+Puerto+Plata+Victorian%2C+Trip+Advisor%2C+VBRO%2C+Red+Week%2C++House%2Clifestyleholidaysvc%2C+Lifestyle+Holidays+Vacation+Club+Hacienda+Resorts+Puerto+Plata+Dominican+Republic%2C+Lifestyles+Holiday%2Cexotic+caribbean+beach+VIlla+VIP+Vrbo+%2CRCI+Resort+6993%2C+salemytimeshare+vacationrentals%2CReviews%2CInformation%2CReports%2CNext+level+of+vacation+great+for+women+men+kids+dominican++vacation%2C+erotic+dominican+honeymoom+destination+VIP+services+private+pool+3+4+5+6+bedroom+villas%2C+Lifestyle+Crown+Residence+Suites%2C+Lifestyle+Hacienda+Resorts+Located+Playa+Cofresi+Puerto+Plata%2C+Dominican+Republic%2Cpenthouse+suite%2Cgreat+beach+view%2C+24+hour+security%2C+wholesale+vacation+packages%2Cno+complaints%2C+my+next+villa%2Cdiscount+vacation+packages%2C+and+family+vacation+packages%2CSosua+Bay+Resort+%2C+Victorian+House+at+Sosua+Bay+%2C+Samana+%2C+Ocean+World+Casino+Excursions%2C+27+Water+Falls+cascades%2C+Monster+Truck+Safari%2COutback+Safari%2CRomantic+caribbean+%2C+Horsebach+riding+%2C+Golf+in+the+DR+%2C+getaway%2CReviews%2CReports%2CVC%2CUK%2CInfo%2C+Monster+Truck%2C+Dove+Missions%2CExpedia+Excursions+in+the+DR+Dominican+Republic++Tripadvisor+%2C+Christmas+2010+%2C+Grand+Oasis+Marien+Dream+Suites%2C+zipline+tour%2C+North+Coast+Dive+Center+LHVC+%2C+Villas%2C+Presidential+Suites%2C+Spa+Suite%2C++Grand+Oasis+Marien%2C+Playa+Dorado%2C+Golf+%2C+DR1%2C+Debbies+Dominican%2C+Island+%2C+Cascades+VIP+Vacations%2C+Your+Vacation+Dreams%2C+';
var metaContents  = '+LHVC+%40+Hacienda+Resorts+are+several+resorts+all+in+one+there+is+LHVC+%40+Lifestyle+Crown+Villas+%2C+LHVC+%40+Lifestyle+Tropical+Beach+Resort++Spa+%2C+LHVC+%40+Lifestyle+Crown+Residence+Suites+all+are+located+on+the+beautiful+north+coast+of+the+Dominican+Republic+right+next+to+Ocean+World+Adventure+Park+Marina++CasinoTorre+1%2C+Columbus+PlazaPlaya+CofresiPuerto+Plata%2C+Dominican+Republic+Offers+fantastic+all-inclusive+VIP+vacation+values++near+Ocean+World+Adventure+Park++Casin.+Also+offers+LHVC+%40+Sosua+Bay+Resort+in+Sasua+Bay+include+Victorian+House+and+Sosua+Bay+Hotel.+You+can+have+a+exotic+caribbean++beach+villa+vacation+rental+for+a+reasonable+price%2C+Villas++have+private+swimming+pool+3%2C+4%2C+5%2C+6+bedroom+Villas+available+as+well+as+Penthouses%2C+1+and+2+bedroom+apt.+suites%2C+Jr+suites++are+also+available.+%2C++googlef586e2f9fec7582a.html';
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();
};
