/* [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','63',jdecode('Why+choose+us%3F'),jdecode(''),'/63.html','true',[],'',''],
	['PAGE','5035',jdecode('Divorce%2C+Dissolution'),jdecode(''),'/5035.html','true',[],'',''],
	['PAGE','11462',jdecode('Divorce%3A+Money%2FProperty'),jdecode(''),'/11462.html','true',[],'',''],
	['PAGE','71912',jdecode('Court+help%2Fadvice%2Forders'),jdecode(''),'/71912.html','true',[],'',''],
	['PAGE','107412',jdecode('July+DISCOUNTS'),jdecode(''),'/107412.html','true',[],'',''],
	['PAGE','104312',jdecode('Children%2FLaw%2FHelp'),jdecode(''),'/104312.html','true',[],'',''],
	['PAGE','7096',jdecode('Power+of+Attorney'),jdecode(''),'/7096.html','true',[],'',''],
	['PAGE','110912',jdecode('Care+Home%2FNHS%2FFees'),jdecode(''),'/110912.html','false',[],'',''],
	['PAGE','176212',jdecode('Care+AT+home+%2B'),jdecode(''),'/176212.html','false',[],'',''],
	['PAGE','182012',jdecode('Legal+Aid'),jdecode(''),'/182012.html','false',[],'',''],
	['PAGE','165',jdecode('Our+Lowest+Fees'),jdecode(''),'/165.html','true',[],'',''],
	['PAGE','48812',jdecode('Jobs%2FCourses%2FTraining'),jdecode(''),'/48812.html','true',[],'',''],
	['PAGE','183',jdecode('Success+Stories'),jdecode(''),'/183.html','true',[],'',''],
	['PAGE','185712',jdecode('Expats'),jdecode(''),'/185712.html','true',[],'',''],
	['PAGE','68012',jdecode('Contact+us'),jdecode(''),'/68012.html','true',[],'',''],
	['PAGE','5941',jdecode('Mission+Statement'),jdecode(''),'/5941.html','true',[],'',''],
	['PAGE','58312',jdecode('Complaints%2FService'),jdecode(''),'/58312.html','true',[],'',''],
	['PAGE','95212',jdecode('Sponsorships'),jdecode(''),'/95212.html','false',[],'',''],
	['PAGE','102312',jdecode('Investors'),jdecode(''),'/102312.html','false',[],'',''],
	['PAGE','129112',jdecode('Charity'),jdecode(''),'/129112.html','false',[],'',''],
	['PAGE','115112',jdecode('YouTube+video'),jdecode(''),'/115112.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Easylife';
theSitetree.paletteFamily='AD1D1D';
theSitetree.keyvisualId='5837';
theSitetree.keyvisualName='kv_5837.jpg';
theSitetree.fontsetId='11099';
theSitetree.graphicsetId='11868';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Easylife',
				paletteFamily: 	'AD1D1D',
				keyvisualId: 	'5837',
				keyvisualName: 	'kv_5837.jpg',
				fontsetId: 		'11099',
				graphicsetId: 	'11868',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1403']={
webappId:    '1501',
documentId:  '63',
internalId:  '1403',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104312',
internalId:  '',
customField: '20100728-020830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182012',
internalId:  '',
customField: '20100626-024606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '185712',
internalId:  '',
customField: '20100708-005952'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '63',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71912',
internalId:  '',
customField: '20100628-033020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63',
internalId:  '',
customField: '20100713-045110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5035',
internalId:  '',
customField: '20100708-081522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11462',
internalId:  '',
customField: '20100711-082644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129112',
internalId:  '',
customField: '20100606-064055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176212',
internalId:  '',
customField: '20100501-120606'
};
webappMappings['7008']=webappMappings['7008-5195']={
webappId:    '7008',
documentId:  '104312',
internalId:  '5195',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107412',
internalId:  '',
customField: '20100713-045008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48812',
internalId:  '',
customField: '20100711-085159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102312',
internalId:  '',
customField: '20100619-043301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7096',
internalId:  '',
customField: '20100708-010848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115112',
internalId:  '',
customField: '20100402-042707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165',
internalId:  '',
customField: '20100708-082143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95212',
internalId:  '',
customField: '20100523-034047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68012',
internalId:  '',
customField: '20100708-081930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183',
internalId:  '',
customField: '20100709-105327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5941',
internalId:  '',
customField: '20100711-123621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110912',
internalId:  '',
customField: '20100626-024510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58312',
internalId:  '',
customField: '20100624-031822'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHC010INXSOL';
var companyName   = 'FAMILY+LAW+CLINIC+LTD';
var htmlTitle	  = 'LOW+COST+FAMILY+LAW%2C+DIVORCE+ADVICE%2C+COURT+HELP%2C+EXPATS%2C+REPOSSESSIONS%2C+SHORT+COURSES%2C+LEGAL+TRAINING%2C+COHABITATION%2C+CONTACT+APPLICATIONS%2C+CHILDREN+ACT+ADVICE%3A++fixed+fee+divorce%2C+fixed+fee+lasting+power+of+attorney%2C+separation+advic';
var metaKeywords  = 'DIVORCE+ADVICE.+FAMILY+LAW.+LOW+COST+MONEY+SAVING+FAMILY+%26+MATRIMONIAL+LEGAL+ADVICE%2C+Court+help%2C+EXPATS%2C+legal+aid+issues%2C+mortgage+repossessions%2C+Short+courses%2C+Legal+training%2C+cohabitation+property+disputes%2C+diy%2C++fixed+fee+divorce+advice%2C+divorce+services%2C+divorce+law%2C+diy+divorce%2C+deaf%2C+low+cost+court+help%2C+injunctions%2C+care+home+charges%2C+power+of+attorney%2C+premarital+agreements%2C+Form+E%2C+Ancillary+Relief%2C+Consent+Orders%2C++McKenzie+Friend%2C+ancillary+relief%2C+contact+orders%2C+residence+orders%2C+court+help%2C+enforcement+of+Orders%2C+cohabitation+law%2C+cohabitation+guide%2C+children+matters%2C+csa%2C+property+litigation%2C+HM+Land+Registry+matters%2C+McKenzie+Friend+services%2C+money+claims%2C+London%2C+Berkshire%2C+Sussex%2C+Surrey%2C+Hampshire%2C+Oxfordshire%2C+South+West+England%2C+Midlands%2C+Kent%2C+Essex%2C+North+West+England%2C+Wales';
var metaContents  = 'DIVORCE+ADVICE.+FAMILY+LAW.+LOW+COST+MONEY+SAVING+FAMILY+%26+MATRIMONIAL+LEGAL+ADVICE%2C+EXPATS%2C+Legal+Aid+issues%2CCourt+help%2C+short+courses%2C++Legal+training%2C+Mortgage+repossessions%2C+Cohabitation+property+disputes%2C+DIY+contact%2Fresidence+application%2C+diy+enforcement+notice%2C+deaf%2C+fixed+fee+divorce+advice%2C+divorce+services%2C+Form+E%2C+Ancillary+Relief%2C+Consent+Orders%2C+care+home+fees%2C+power+of+attorney%2C+injunctions%2Cdivorce+law%2C+contact+orders%2C+residence+orders%2C+cohabitation+agreements%2C+low+cost+court+help%2C+diy+divorce%2C+McKenzie+Friend%2C+enforcement+of+Orders%2C++business+start-up%2C+court+help%2C+McKenzie+Friend+services%2C+cohabitation+law%2C+ancillary+relief%2C+children+matters%2C+csa%2C+property+litigation%2C+HM+Land+Registry+matters%2C+money+claims%2C+London%2C+Berkshire%2C+Surrey%2C+Sussex%2C+Hampshire%2C+Oxfordshire%2C+South+West+England%2C+Midlands%2C+Kent%2C+Essex%2C+North+West+England%2C+Wales';
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();
};
