/* [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','5043',jdecode('Cottage+For+Sale'),jdecode(''),'/5043/index.html','false',[ 
		['PAGE','11085',jdecode('Accommodation'),jdecode(''),'/5043/11085.html','true',[],'',''],
		['PAGE','5064',jdecode('The+Region'),jdecode(''),'/5043/5064.html','true',[],'',''],
		['PAGE','179112',jdecode('%22What+our+Guests+Say%22'),jdecode(''),'/5043/179112.html','false',[],'',''],
		['PAGE','5106',jdecode('Activities'),jdecode(''),'/5043/5106.html','true',[],'',''],
		['PAGE','73201',jdecode('Specials'),jdecode(''),'/5043/73201.html','false',[],'',''],
		['PAGE','87501',jdecode('Directions'),jdecode(''),'/5043/87501.html','true',[],'',''],
		['PAGE','66801',jdecode('Booking+Details'),jdecode(''),'/5043/66801.html','false',[],'',''],
		['PAGE','66822',jdecode('Contact+Us'),jdecode(''),'/5043/66822.html','false',[],'',''],
		['PAGE','167612',jdecode('FT+Home'),jdecode(''),'/5043/167612.html','false',[],'',''],
		['PAGE','168112',jdecode('FT+Acc'),jdecode(''),'/5043/168112.html','false',[],'',''],
		['PAGE','168138',jdecode('FT+Reg'),jdecode(''),'/5043/168138.html','false',[],'',''],
		['PAGE','168164',jdecode('FT+Acts'),jdecode(''),'/5043/168164.html','false',[],'',''],
		['PAGE','168216',jdecode('FT+Dir'),jdecode(''),'/5043/168216.html','false',[],'',''],
		['PAGE','168242',jdecode('FT+Book'),jdecode(''),'/5043/168242.html','false',[],'',''],
		['PAGE','168268',jdecode('FT+Cont'),jdecode(''),'/5043/168268.html','false',[],'','']
	],'',''],
	['PAGE','121201',jdecode('Home'),jdecode(''),'/121201.html','false',[],'',''],
	['PAGE','119201',jdecode('River+Carp+Fishing+'),jdecode(''),'/119201/index.html','false',[ 
		['PAGE','119222',jdecode('%22Drive+%26%23x27%3Bn+We%26%23x27%3Bll+Guide%22'),jdecode(''),'/119201/119222.html','true',[],'',''],
		['PAGE','119285',jdecode('Your+Guide'),jdecode(''),'/119201/119285.html','true',[],'',''],
		['PAGE','208434',jdecode('Booking+Details'),jdecode(''),'/119201/208434.html','false',[],'',''],
		['PAGE','122901',jdecode('Gallery'),jdecode(''),'/119201/122901.html','true',[],'',''],
		['PAGE','149201',jdecode('Contact+Us'),jdecode(''),'/119201/149201.html','false',[],'','']
	],'',''],
	['PAGE','160901',jdecode('River+Coarse+Fishing'),jdecode(''),'/160901/index.html','false',[ 
		['PAGE','157101',jdecode('Contact+Us'),jdecode(''),'/160901/157101.html','true',[],'','']
	],'',''],
	['PAGE','218034',jdecode('UK+Partners'),jdecode(''),'/218034.html','false',[],'',''],
	['PAGE','182212',jdecode('Old+Partners+'),jdecode(''),'/182212.html','false',[],'',''],
	['PAGE','188412',jdecode('.'),jdecode(''),'/188412.html','false',[],'',''],
	['PAGE','188438',jdecode('.'),jdecode(''),'/188438.html','false',[],'',''],
	['PAGE','203234',jdecode('Paul'),jdecode(''),'/203234.html','false',[],'',''],
	['PAGE','227634',jdecode('Barque'),jdecode(''),'/227634.html','true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Natural';
theSitetree.paletteFamily='666699';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='154';
theSitetree.graphicsetId='168';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FCFCF4';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Natural',
				paletteFamily: 	'666699',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'154',
				graphicsetId: 	'168',
				contentColor: 	'000066',
				contentBGColor: 'FCFCF4',
				a_color: 		'666699',
				b_color: 		'91A5C1',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5043',
internalId:  '',
customField: '20100616-114211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5064',
internalId:  '',
customField: '20091030-153454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11085',
internalId:  '',
customField: '20091030-153443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73201',
internalId:  '',
customField: '20080128-125643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122901',
internalId:  '',
customField: '20090101-142628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119222',
internalId:  '',
customField: '20100616-114254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5106',
internalId:  '',
customField: '20091030-153510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119201',
internalId:  '',
customField: '20100616-114235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87501',
internalId:  '',
customField: '20081123-131552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66801',
internalId:  '',
customField: '20080910-234725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66822',
internalId:  '',
customField: '20080528-180923'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '227634',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '218034',
internalId:  '',
customField: '20090206-184238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149201',
internalId:  '',
customField: '20090206-154710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119285',
internalId:  '',
customField: '20090121-135020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121201',
internalId:  '',
customField: '20090915-001729'
};
webappMappings['7060']=webappMappings['7060-89908d6fbca0915713a63bc62ad25357']={
webappId:    '7060',
documentId:  '122901',
internalId:  '89908d6fbca0915713a63bc62ad25357',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157101',
internalId:  '',
customField: '20090101-143046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '188412',
internalId:  '',
customField: '20081123-122304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160901',
internalId:  '',
customField: '20090218-212201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167612',
internalId:  '',
customField: '20080528-222614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168112',
internalId:  '',
customField: '20080528-143039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168138',
internalId:  '',
customField: '20080528-144721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168164',
internalId:  '',
customField: '20080528-160637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168242',
internalId:  '',
customField: '20080910-233953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168268',
internalId:  '',
customField: '20080528-165840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168216',
internalId:  '',
customField: '20080528-175431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182212',
internalId:  '',
customField: '20090101-143158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '179112',
internalId:  '',
customField: '20080911-122128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '188438',
internalId:  '',
customField: '20081123-122318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '227634',
internalId:  '',
customField: '20100604-215157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '203234',
internalId:  '',
customField: '20081211-153527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '208434',
internalId:  '',
customField: '20090915-003235'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10INX3UQ';
var companyName   = '';
var htmlTitle	  = 'French+River+Fishing+Holiday%2C+Carp%2C+Cats%2C+Coarse';
var metaKeywords  = '+Fishing+Holidays+in+France%2C+Carp%2C+Catfish%2C+Barbel%2C+Holiday+Cottage+France%2C+Gite%2C+English+spoken%2C+Walking+holidays%2C+Camp+site+facilities';
var metaContents  = 'French+River+Fishing%2C+Carp+and+Coarse%2C+French+Gite%2FCottage+Holiday';
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();
};
