/* [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','4901',jdecode('Home'),jdecode(''),'/4901.html','true',[],'',''],
	['PAGE','4952',jdecode('Accommodation'),jdecode(''),'/4952.html','true',[],'',''],
	['PAGE','4978',jdecode('Prices'),jdecode(''),'/4978.html','true',[],'',''],
	['PAGE','5801',jdecode('Menu'),jdecode(''),'/5801.html','true',[],'',''],
	['PAGE','5004',jdecode('Directions'),jdecode(''),'/5004.html','true',[],'',''],
	['PAGE','28501',jdecode('Gite'),jdecode(''),'/28501.html','true',[],'',''],
	['PAGE','5030',jdecode('Having+Fun'),jdecode(''),'/5030.html','true',[],'',''],
	['PAGE','7101',jdecode('Links%2FInfo'),jdecode(''),'/7101.html','true',[],'',''],
	['PAGE','34201',jdecode('News'),jdecode(''),'/34201.html','true',[],'',''],
	['PAGE','5827',jdecode('Email+Us'),jdecode(''),'/5827.html','true',[],'','']];
var siteelementCount=10;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28501',
internalId:  '',
customField: '20100109-122622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4978',
internalId:  '',
customField: '20100122-101341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20100628-141352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5004',
internalId:  '',
customField: '20090907-144300'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4952',
internalId:  '',
customField: '20100628-140838'
};
webappMappings['7008']=webappMappings['7008-4573']={
webappId:    '7008',
documentId:  '5827',
internalId:  '4573',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20100202-125048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5030',
internalId:  '',
customField: '20100414-093229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20100528-091051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5827',
internalId:  '',
customField: '20100628-141748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20100610-121749'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10INEH23';
var companyName   = 'French+Bed+and+Breakfast';
var htmlTitle	  = 'French+Bed+and+Breakfast+-+La+Guesdonniere';
var metaKeywords  = 'Bed%2CBreakfast%2CNormandy%2Ccountryside%2Cquiet%2CFrance%2CFrench%2CMayenne%2C53%2Cfamily%2Ctranquil%2Cprivate%2Charmony%2Crelax%2Choliday%2Cvacation%2Ctraditional%2Cpeace%2Ccouples%2Cstay%2Cbandb%2CGorron%2CFougeres%2CCaen%2Caccommodation%2Cweekend%2Chouse+hunting%2Cfamilies%2CDinard%2CSt.+Aubin+Fosse+Louvain%2C+Laval%2Cchambres%2Cdhotes%2Cfarmhouse%2Clunch%2Ctea%2Cdinner%2Csleeps%2Cbedroom%2Clounge%2Cgarden%2CTV%2CDVD%2CCD%2Cgarage%2Cparking%2Calfresco%2Csummer%2Cperfect%2Cchild%2Cpets%2CCherbourg%2CLeMans%2CSt.Malo%2CLeHavre%2Copen%2Call%2Cyear%2Chouse%2CLassayleschateaux%2Cfishing%2Cbeaches%2CRennes%2CMortain%2CPontmain%2CBayeaux%2CBB+mayenne+france%2C+midweek+breaks+in+Normandy%2C+shortbreak+france+normandy%2C+farmhouse+BB+normandy%2CBB+in+Normandy%2C+BB+in+Pays+de+la+Loire%2Cbb+normandy%2C+bb+in+Normandy%2CBB+in+Pays+de+la+loire%2Cbb+pays+de+la+loire%2Cbed+and+breakfast+near+Gorron%2Ccountryside%2CPays+de+la+Loire%2Cshortbreak%2Cbreak%2Cweekend%2Cfarmhouse+bb+in+Normandy%2CVieuvy%2CDesertines%2Cdouble+beds%2Csingle+beds%2Cafternoon+teas-BB+near+Gorron%2CBB+near+Gorron+Pays+de+la+Loire%2C+BB+France%2C+BB+Normandy%2C+BB+Pays+de+la+Loire.';
var metaContents  = 'French+Bed+and+Breakfast+-+La+Guesdonni%C3%A8re%2C+53120%2C+St.Aubin+Fosse+Louvain+situated+in+the+tranquil+countryside+of+Northwest+France+25+mins+from+Foug%C3%A8res%2C+1%C2%BD+hours+from+Caen+and+Dinard.+The+perfect+place+to+relax%2C+enjoy+good+food+and+amazing+places+to+visit.+Our+suites+are+for+your+exclusive+use.+Families+and+pets+welcome.';
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();
};
