/* [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','401',jdecode('Welcome'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','11401',jdecode('Property+To+Rent'),jdecode(''),'/11401.html','true',[],'',''],
	['PAGE','427057',jdecode('Property+For+Sale'),jdecode(''),'/427057.html','true',[],'',''],
	['PAGE','431957',jdecode('NEWS'),jdecode(''),'/431957/index.html','true',[ 
		['PAGE','431983',jdecode('Housing+Health+%26+Safety+Rating+System'),jdecode(''),'/431957/431983.html','true',[],'',''],
		['PAGE','432157',jdecode('Digital+TV+Switchover'),jdecode(''),'/431957/432157.html','true',[],'',''],
		['PAGE','432757',jdecode('Maximising+Rental+Investment'),jdecode(''),'/431957/432757.html','true',[],'',''],
		['PAGE','432783',jdecode('Tax+changes+for+holiday+lettings'),jdecode(''),'/431957/432783.html','true',[],'','']
	],'',''],
	['PAGE','13001',jdecode('Landlords'),jdecode(''),'/13001/index.html','true',[ 
		['PAGE','14301',jdecode('Landlords+FAQ'),jdecode(''),'/13001/14301.html','true',[],'',''],
		['PAGE','421557',jdecode('SPECIAL+OFFERS'),jdecode(''),'/13001/421557.html','true',[],'',''],
		['PAGE','417357',jdecode('Tenant+Referencing'),jdecode(''),'/13001/417357.html','true',[],'',''],
		['PAGE','14322',jdecode('Properties+Wanted'),jdecode(''),'/13001/14322.html','true',[],'',''],
		['PAGE','99001',jdecode('Property+Services'),jdecode(''),'/13001/99001.html','true',[],'',''],
		['PAGE','99901',jdecode('Moving+Away%3F'),jdecode(''),'/13001/99901.html','true',[],'',''],
		['PAGE','429257',jdecode('Electrical+Safety'),jdecode(''),'/13001/429257.html','true',[],'','']
	],'',''],
	['PAGE','169813',jdecode('Virtual+Tours'),jdecode(''),'/169813/index.html','true',[ 
		['PAGE','425357',jdecode('SPECIAL+OFFERS'),jdecode(''),'/169813/425357.html','true',[],'','']
	],'',''],
	['PAGE','414257',jdecode('Elevated+Photography'),jdecode(''),'/414257.html','true',[],'',''],
	['PAGE','10864',jdecode('Tenants'),jdecode(''),'/10864/index.html','true',[ 
		['PAGE','25401',jdecode('Tenants+FAQ'),jdecode(''),'/10864/25401.html','true',[],'',''],
		['PAGE','18301',jdecode('Relocation'),jdecode(''),'/10864/18301.html','true',[],'',''],
		['PAGE','10885',jdecode('International'),jdecode(''),'/10864/10885.html','true',[],'','']
	],'',''],
	['PAGE','117701',jdecode('Join+our+mailing+list'),jdecode(''),'/117701.html','true',[],'',''],
	['PAGE','416557',jdecode('Landlord+Insurance'),jdecode(''),'/416557.html','true',[],'',''],
	['PAGE','416583',jdecode('Tenant+Insurance'),jdecode(''),'/416583.html','true',[],'',''],
	['PAGE','417057',jdecode('Rent+Protection+Insurance'),jdecode(''),'/417057.html','true',[],'',''],
	['PAGE','418557',jdecode('Energy+Performance+%28EPC%29'),jdecode(''),'/418557.html','true',[],'',''],
	['PAGE','431357',jdecode('Calculate+your+carbon+footprint'),jdecode(''),'/431357.html','true',[],'',''],
	['PAGE','420257',jdecode('Tenancy+Deposit+Scheme'),jdecode(''),'/420257.html','true',[],'',''],
	['PAGE','285624',jdecode('Discount+Utilities'),jdecode(''),'/285624.html','true',[],'',''],
	['PAGE','423157',jdecode('Conveyancing'),jdecode(''),'/423157.html','true',[],'',''],
	['PAGE','4201',jdecode('About+us'),jdecode(''),'/4201/index.html','true',[ 
		['PAGE','4264',jdecode('How+to+find+us'),jdecode(''),'/4201/4264.html','true',[],'',''],
		['PAGE','106501',jdecode('Website+Policy'),jdecode(''),'/4201/106501.html','true',[],'','']
	],'',''],
	['PAGE','4285',jdecode('Contact'),jdecode(''),'/4285.html','true',[],'',''],
	['PAGE','4327',jdecode('Links'),jdecode(''),'/4327.html','true',[],'',''],
	['PAGE','89901',jdecode('Cheque+Cashing'),jdecode(''),'/89901.html','true',[],'',''],
	['PAGE','116101',jdecode('Pest+Control+Services'),jdecode(''),'/116101/index.html','true',[ 
		['PAGE','121901',jdecode('Fly+Screens'),jdecode(''),'/116101/121901.html','true',[],'',''],
		['PAGE','119101',jdecode('Wasps'),jdecode(''),'/116101/119101.html','true',[],'',''],
		['PAGE','122601',jdecode('Rats'),jdecode(''),'/116101/122601.html','true',[],'',''],
		['PAGE','122622',jdecode('Mice'),jdecode(''),'/116101/122622.html','true',[],'',''],
		['PAGE','122643',jdecode('Bed+Bugs'),jdecode(''),'/116101/122643.html','true',[],'',''],
		['PAGE','122664',jdecode('Ants'),jdecode(''),'/116101/122664.html','true',[],'',''],
		['PAGE','123301',jdecode('Fleas'),jdecode(''),'/116101/123301.html','true',[],'',''],
		['PAGE','123322',jdecode('Cockroaches'),jdecode(''),'/116101/123322.html','true',[],'','']
	],'',''],
	['PAGE','176813',jdecode('MoneyGram%C2%AE'),jdecode(''),'/176813.html','true',[],'','']];
var siteelementCount=48;
theSitetree.topTemplateName='Business';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='2492';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='418';
theSitetree.graphicsetId='463';
theSitetree.contentColor='020E66';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Business',
				paletteFamily: 	'003366',
				keyvisualId: 	'2492',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'418',
				graphicsetId: 	'463',
				contentColor: 	'020E66',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '427057',
internalId:  '',
customField: '20090730-164440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20090620-192151'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99001',
internalId:  '',
customField: '20080515-155326'
};
webappMappings['7008']=webappMappings['7008-236']={
webappId:    '7008',
documentId:  '4285',
internalId:  '236',
customField: 'language:en;country:GB;'
};
webappMappings['7008']=webappMappings['7008-237']={
webappId:    '7008',
documentId:  '10864',
internalId:  '237',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '417357',
internalId:  '',
customField: '20090810-151618'
};
webappMappings['7008']=webappMappings['7008-238']={
webappId:    '7008',
documentId:  '117701',
internalId:  '238',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20091105-193813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20090803-113642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '425357',
internalId:  '',
customField: '20090628-185809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14322',
internalId:  '',
customField: '20080122-173231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20081226-121806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99901',
internalId:  '',
customField: '20080515-155441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '416583',
internalId:  '',
customField: '20090826-114450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '416557',
internalId:  '',
customField: '20090826-114532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10864',
internalId:  '',
customField: '20080701-172336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20080701-172405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '285624',
internalId:  '',
customField: '20080825-145610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20080701-172423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10885',
internalId:  '',
customField: '20080701-172513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '420257',
internalId:  '',
customField: '20090610-174653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20090608-180933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4264',
internalId:  '',
customField: '20070902-153559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106501',
internalId:  '',
customField: '20070730-163724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4285',
internalId:  '',
customField: '20091105-193953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '423157',
internalId:  '',
customField: '20090824-130624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4327',
internalId:  '',
customField: '20090626-175738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89901',
internalId:  '',
customField: '20080701-173256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116101',
internalId:  '',
customField: '20080904-144438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121901',
internalId:  '',
customField: '20080321-103827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119101',
internalId:  '',
customField: '20080904-144620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122601',
internalId:  '',
customField: '20080904-144701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122622',
internalId:  '',
customField: '20080904-144744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122643',
internalId:  '',
customField: '20080904-144825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122664',
internalId:  '',
customField: '20080904-144935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123301',
internalId:  '',
customField: '20080904-145023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123322',
internalId:  '',
customField: '20080904-145122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117701',
internalId:  '',
customField: '20090410-133247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '414257',
internalId:  '',
customField: '20090628-163049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169813',
internalId:  '',
customField: '20080803-171531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '417057',
internalId:  '',
customField: '20090727-103859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176813',
internalId:  '',
customField: '20080701-173425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '421557',
internalId:  '',
customField: '20090727-144627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '418557',
internalId:  '',
customField: '20090608-200438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '429257',
internalId:  '',
customField: '20090908-093846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '431357',
internalId:  '',
customField: '20091120-101435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '431957',
internalId:  '',
customField: '20100121-181026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '431983',
internalId:  '',
customField: '20100121-180345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '432157',
internalId:  '',
customField: '20100121-182712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '432783',
internalId:  '',
customField: '20100123-121256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '432757',
internalId:  '',
customField: '20100123-124247'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10INXS8Z';
var companyName   = '++++++++++';
var htmlTitle	  = 'PPM+%28Lincs%29+Ltd+08444+14+7000';
var metaKeywords  = 'Multi+Let+spalding+holbeach+boston+lincoln+kirton+pinchbeck+property+rental+tenants+rent+accommodation+house+flat+room+tolet+long+sutton+bridge+boston+gosberton+inclusive+cheque+cashing+vermin+pest+control+management+property+premier+eviction+notice+contract+furnished+fully+rats+mice+cockroaches+fleas+bed+bugs+ants+wasps+gas+water+electricity+council+tax+poland+lithuania+crocus+walk+parking+cash+service+visa+mastercard+credit+card+south+holland';
var metaContents  = 'Premier+Property+Management+%28Lincs%29+Ltd';
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();
};
