/* [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','1679',jdecode('Home'),jdecode(''), jdecode('%2F1679.html'), 'true',[],'',''],
	['PAGE','1700',jdecode('Czech+Heritage'),jdecode(''), jdecode('%2F1700.html'), 'true',[],'',''],
	['PAGE','130534',jdecode('Our+Work'),jdecode(''), jdecode('%2F130534.html'), 'true',[],'',''],
	['PAGE','188256',jdecode('Our+Project+at+Uher%C4%8Dice'),jdecode(''), jdecode('%2F188256.html'), 'true',[],'',''],
	['PAGE','6601',jdecode('Fundraising+Events'),jdecode(''), jdecode('%2F6601.html'), 'true',[],'',''],
	['PAGE','49001',jdecode('Subscribe+-+Who+We+Are'),jdecode(''), jdecode('%2F49001.html'), 'true',[],'',''],
	['PAGE','175056',jdecode('What+They+Say+About+Us'),jdecode(''), jdecode('%2F175056.html'), 'true',[],'',''],
	['PAGE','177556',jdecode('The+Friends+in+the+Media'),jdecode(''), jdecode('%2F177556.html'), 'true',[],'',''],
	['PAGE','1774',jdecode('Contact+Request'),jdecode(''), jdecode('%2F1774.html'), 'false',[],'',''],
	['PAGE','49601',jdecode('E-mail+contact'),jdecode(''), jdecode('%2F49601.html'), 'false',[],'',''],
	['PAGE','9201',jdecode('Appeal'),jdecode(''), jdecode('%2F9201.html'), 'true',[],'',''],
	['PAGE','55101',jdecode('Donation'),jdecode(''), jdecode('%2F55101.html'), 'true',[],'',''],
	['PAGE','1721',jdecode('Photos'),jdecode(''), jdecode('%2F1721.html'), 'false',[],'',''],
	['PAGE','1753',jdecode('Guestbook'),jdecode(''), jdecode('%2F1753.html'), 'false',[],'',''],
	['PAGE','49027',jdecode('From+the+latest+Newsletter'),jdecode(''), jdecode('%2F49027.html'), 'true',[],'',''],
	['PAGE','7301',jdecode('Contact+Us'),jdecode(''), jdecode('%2F7301.html'), 'true',[],'',''],
	['PAGE','60801',jdecode('Culture+%26+Architecture'),jdecode(''), jdecode('%2F60801.html'), 'true',[],'',''],
	['PAGE','64001',jdecode('Music+News'),jdecode(''), jdecode('%2F64001.html'), 'true',[],'',''],
	['PAGE','115934',jdecode('Gothic'),jdecode(''), jdecode('%2F115934.html'), 'false',[],'',''],
	['PAGE','116434',jdecode('%C4%8Cesky'),jdecode(''), jdecode('%2F116434.html'), 'true',[],'',''],
	['PAGE','115960',jdecode('Renaissance'),jdecode(''), jdecode('%2F115960.html'), 'false',[],'',''],
	['PAGE','115986',jdecode('Neoclassical'),jdecode(''), jdecode('%2F115986.html'), 'false',[],'',''],
	['PAGE','116012',jdecode('Nineteenth+Century'),jdecode(''), jdecode('%2F116012.html'), 'false',[],'',''],
	['PAGE','116038',jdecode('Twentieth+Century'),jdecode(''), jdecode('%2F116038.html'), 'false',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='5351C2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10894';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var prodDef={
  wl_name: 'easily_co_uk_ce',
  product: 'WSCSYSSSSLY0XKQS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'5351C2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10894',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'5351C2',
				e_color: 		'5351C2',
				f_color: 		'5351C2',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-6b5484876c7b40e4b00f156d8b000906']={
webappId:    '7060',
documentId:  '1721',
internalId:  '6b5484876c7b40e4b00f156d8b000906',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20120118-230129'
};
webappMappings['7002']=webappMappings['7002-811']={
webappId:    '7002',
documentId:  '1753',
internalId:  '811',
customField: 'language:en;country:GB;'
};
webappMappings['7008']=webappMappings['7008-2155']={
webappId:    '7008',
documentId:  '1774',
internalId:  '2155',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1679',
internalId:  '',
customField: '20120127-130500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1700',
internalId:  '',
customField: '20111122-141733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1721',
internalId:  '',
customField: '20080813-220220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20120127-180528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1753',
internalId:  '',
customField: '20080811-134512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1774',
internalId:  '',
customField: '20080811-180720'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1679',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20110420-160640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49001',
internalId:  '',
customField: '20111130-122316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49027',
internalId:  '',
customField: '20110928-155600'
};
webappMappings['7008']=webappMappings['7008-4184']={
webappId:    '7008',
documentId:  '49601',
internalId:  '4184',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49601',
internalId:  '',
customField: '20090313-123924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55101',
internalId:  '',
customField: '20110322-171824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60801',
internalId:  '',
customField: '20120126-190844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '175056',
internalId:  '',
customField: '20111130-122243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64001',
internalId:  '',
customField: '20120131-114913'
};
webappMappings['1501']=webappMappings['1501-9803314']={
webappId:    '1501',
documentId:  '1679',
internalId:  '9803314',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115934',
internalId:  '',
customField: '20100122-005032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115960',
internalId:  '',
customField: '20100122-005032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115986',
internalId:  '',
customField: '20100122-005032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116012',
internalId:  '',
customField: '20100122-005032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116038',
internalId:  '',
customField: '20100122-005032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116434',
internalId:  '',
customField: '20111205-114517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130534',
internalId:  '',
customField: '20120131-113417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177556',
internalId:  '',
customField: '20111020-204707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '188256',
internalId:  '',
customField: '20111209-181448'
};
var webAppHostname = 'cgi.easily.co.uk:80';
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20INEW1K';
var companyName   = '';
var htmlTitle	  = 'Friends+of+Czech+Historic+Buildings%2C+Gardens+and+Parks';
var metaKeywords  = 'UK+Czech+Friends+Historic+Buildings+Gardens+Parks+Architecture+House+Castle+Palace+City+Town+Culture+Music+Prague+Bohemia+Moravia+Czech+Moravia+Western+Silesia+architecture+Republic+concert+lecture+gardens+parks+fundraising+cultural+castle+house+architect+restoration+country+grant+house+conservation+charity+ruins+painting+portrait+baroque+rococo+painted+classical+neo-classical+gothic+medieval+renaissance+roof+ceiling+windows+%C4%8Derven%C3%BD+dv%C5%AFr+uher%C4%8Dice+%C4%8Desk%C3%BD+krumlov+putim+%C5%BEd%27%C3%A1r+nad+s%C3%A1zavou+eva+ji%C5%99i%C4%8Dn%C3%A1+cubism+art+nouveau+secession+secessionist+functionalist+Czechoslovakia+UNESCO+World+Heritage+Monuments+Velvet+Revolution+Lysice+Collalto+Brtnice+Thirty+Years+War+Headley+Willman+Nov%C3%A9+M%C4%9Bsto+nad+Metuj%C3%AD+Jurkovic+Barton-Dobenin+Mathyas+Bernard+Braun+Arbour+Schwarzenberg+Jacub+Franti%C5%A1ek+Proky%C5%A1+Eggenberg+D%C4%9B%C4%8D%C3%ADn+Znojmo+Music+Hudba+Pavlina+Seni%C4%87+Miroslava+N%C4%9Bmcov%C3%A1+Masaryk+Jo%C5%BEe+Ple%C4%8Dnik+Nad%C4%9B%C5%BEda+Goryczkov%C3%A1+NPU+Kate%C5%99ina+Cichrov%C3%A1+Zden%C4%9Bk+V%C3%A1cha+Apollo+%C4%8Cesk%C3%A1+Televize+2+Jan+Santini-Aichel+St+John+Nepomuk+Steven+E.+Brummel+P%C5%99%C3%A1tel%C3%A9+%C4%8Desk%C3%BDch+historick%C3%BDch+budov%2C+zahrad+a+park%C5%AF%0D%0A%0D%0A';
var metaContents  = 'A+charity+working+to+help+the+conservation+of+historic+buildings%2C+gardens+and+parks+in+the+Czech+Republic';
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();
};

