/* [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','5301',jdecode('Home'),jdecode(''), jdecode('%2F5301.html'), 'true',[],'',''],
	['PAGE','14301',jdecode('Audit+%26+Assurance'),jdecode(''), jdecode('%2F14301.html'), 'true',[],'',''],
	['PAGE','14353',jdecode('Accountancy'),jdecode(''), jdecode('%2F14353.html'), 'true',[],'',''],
	['PAGE','14379',jdecode('Taxation'),jdecode(''), jdecode('%2F14379.html'), 'true',[],'',''],
	['PAGE','42801',jdecode('Other+Services'),jdecode(''), jdecode('%2F42801.html'), 'true',[],'',''],
	['PAGE','5378',jdecode('Our+Team'),jdecode(''), jdecode('%2F5378.html'), 'true',[],'',''],
	['PAGE','5404',jdecode('Contact'),jdecode(''), jdecode('%2F5404%2Findex.html'), 'true',[ 
		['PAGE','183712',jdecode('Contact+Form'),jdecode(''), jdecode('%2F5404%2F183712.html'), 'true',[],'','']
	],'',''],
	['PAGE','182112',jdecode('How+to+Find+Us'),jdecode(''), jdecode('%2F182112.html'), 'true',[],'',''],
	['PAGE','183312',jdecode('FT.com+News+Feed'),jdecode(''), jdecode('%2F183312.html'), 'true',[],'',''],
	['PAGE','125312',jdecode('Links'),jdecode(''), jdecode('%2F125312.html'), 'true',[ 
		['ITEM','179013',jdecode('HMRC'),jdecode(''), jdecode('http%3A%2F%2Fwww.hmrc.gov.uk%2F'), 'true',[],'','_blank'],
		['ITEM','179012',jdecode('ICAEW'),jdecode(''), jdecode('http%3A%2F%2Fwww.icaew.com%2F'), 'true',[],'','_blank'],
		['ITEM','179014',jdecode('BIS'),jdecode(''), jdecode('http%3A%2F%2Fwww.bis.gov.uk%2F'), 'true',[],'','_blank'],
		['ITEM','185012',jdecode('Companies+House'),jdecode(''), jdecode('http%3A%2F%2Fwww.companieshouse.gov.uk%2F'), 'true',[],'','_blank']
	],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Chaste';
theSitetree.paletteFamily='90BFFA';
theSitetree.keyvisualId='11550';
theSitetree.keyvisualName='kv_11550.jpg';
theSitetree.fontsetId='32877';
theSitetree.graphicsetId='13962';
theSitetree.contentColor='33619c';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var prodDef={
  wl_name: 'easily_co_uk',
  product: 'WSCSYSSSSLY0XVDH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Chaste',
				paletteFamily: 	'90BFFA',
				keyvisualId: 	'11550',
				keyvisualName: 	'kv_11550.jpg',
				fontsetId: 		'32877',
				graphicsetId: 	'13962',
				contentColor: 	'33619c',
				contentBGColor: 'FFFFFF',
				a_color: 		'90BFFA',
				b_color: 		'5183C3',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20111013-172904'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5378',
internalId:  '',
customField: '20110912-152927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5404',
internalId:  '',
customField: '20111013-211931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20110912-225409'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5301',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14379',
internalId:  '',
customField: '20110911-140049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182112',
internalId:  '',
customField: '20110913-191330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42801',
internalId:  '',
customField: '20110912-210925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14353',
internalId:  '',
customField: '20110911-140031'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14301',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14353',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14379',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '42801',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125312',
internalId:  '',
customField: '20110914-163244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183712',
internalId:  '',
customField: '20110914-123801'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5378',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5404',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '125312',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '182112',
internalId:  'location',
customField: 'language:en;country:GB;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183312',
internalId:  '',
customField: '20111010-190431'
};
webappMappings['7008']=webappMappings['7008-9250']={
webappId:    '7008',
documentId:  '183712',
internalId:  '9250',
customField: 'language:en;country:GB;'
};
webappMappings['7090']=webappMappings['7090-8']={
webappId:    '7090',
documentId:  '183312',
internalId:  '8',
customField: 'language:en;country:GB;name:;'
};
var webAppHostname = 'cgi.easily.co.uk:80';
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20INEWBA';
var companyName   = 'Warren+Clare+-+Chartered+Accountants+and+Business+Advisors%2C+St+Albans%2C+Hertfordshire';
var htmlTitle	  = 'Warren+Clare+Chartered+Accountants%2C+St+Albans%2C+Hertfordshire+%7C+Warren+Clare+is+a+firm+of+accountants+serving+clients+in+Hertfordshire%2C+London+and+the+Home+Counties+%7C+Warren+Clare+is+a+friendly%2C+approachable+and+supportive+firm+of+st+albans+accountants+';
var metaKeywords  = 'warren+claire+warren+cl%C3%A1re';
var metaContents  = 'Welcome+to+Warren+Clare+Chartered+Accountants.+Warren+Clare+is+a+friendly+and+approachable+firm+of+accountants++-++based+in+St+Albans.+We+provide+a+broad+range+of+audit%2C+accountancy+and+taxation+services+to+small+and+growing+businesses.+Services+include+financial+and+management+accounts%2C+audit+and+assurance%2C+tax+and+tax+planning%2C+vat%2C+payroll%2C+company+secretarial%2C+bookkeeping%2C+general+business+advice+and+support.+Warren+Clare+%28+Warren+Claire+%29+chartered+accountants+is+based+in+St+Albans+but+serves+clients+in+Hertfordshire%2C+London+and+The+Home+Counties.+Warren+Clare+%28+Warren+Claire+%29+is+a+firm+of+St+Albans+accountants+specialising+in+owner+managed+businesses.';
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();
};

