/* [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','4756',jdecode('Home'),jdecode(''),'/4756.html','true',[],'',''],
	['PAGE','5801',jdecode('Who+are+we+%3F'),jdecode(''),'/5801.html','true',[],'',''],
	['PAGE','7001',jdecode('Latest+Position'),jdecode(''),'/7001.html','true',[],'',''],
	['PAGE','61601',jdecode('Chile+2010'),jdecode(''),'/61601.html','true',[],'',''],
	['PAGE','61627',jdecode('E+I+to+Chile+2010'),jdecode(''),'/61627.html','true',[],'',''],
	['PAGE','55501',jdecode('Easter+Island+2010'),jdecode(''),'/55501.html','true',[],'',''],
	['PAGE','51601',jdecode('Galapagos+Islands+2009%2F10'),jdecode(''),'/51601.html','true',[],'',''],
	['PAGE','51627',jdecode('Panama+to+Galapagos+2009'),jdecode(''),'/51627.html','true',[],'',''],
	['PAGE','47801',jdecode('Panama+2009'),jdecode(''),'/47801.html','true',[],'',''],
	['PAGE','45301',jdecode('Grenada+to+Columbia+2009'),jdecode(''),'/45301.html','true',[],'',''],
	['PAGE','40001',jdecode('Grenada+2009'),jdecode(''),'/40001.html','true',[],'',''],
	['PAGE','34301',jdecode('USA+2009'),jdecode(''),'/34301.html','true',[],'',''],
	['PAGE','18301',jdecode('Grenada+Again...+2008'),jdecode(''),'/18301.html','true',[],'',''],
	['PAGE','7879',jdecode('Venezuela+2008'),jdecode(''),'/7879.html','true',[],'',''],
	['PAGE','9001',jdecode('Eastern+Caribbean+2008'),jdecode(''),'/9001.html','true',[],'',''],
	['PAGE','7853',jdecode('Back+to+the+Windwards+-+December+2007'),jdecode(''),'/7853.html','true',[],'',''],
	['PAGE','7827',jdecode('Venezuela+2007'),jdecode(''),'/7827.html','true',[],'',''],
	['PAGE','7801',jdecode('Grenada+to+Barbuda+2007'),jdecode(''),'/7801.html','true',[],'',''],
	['PAGE','7301',jdecode('Gosport+to+the+Caribbean+2006'),jdecode(''),'/7301.html','true',[],'',''],
	['PAGE','26401',jdecode('Photo+Gallery+2009'),jdecode(''),'/26401.html','true',[],'',''],
	['PAGE','10901',jdecode('Photo+Gallery+2008'),jdecode(''),'/10901.html','true',[],'',''],
	['PAGE','10927',jdecode('Photo+Gallery+2007'),jdecode(''),'/10927.html','true',[],'',''],
	['PAGE','10001',jdecode('Photo+Gallery+2006'),jdecode(''),'/10001.html','true',[],'',''],
	['PAGE','4890',jdecode('Guestbook'),jdecode(''),'/4890.html','true',[],'',''],
	['PAGE','4911',jdecode('Contact'),jdecode(''),'/4911.html','true',[],'',''],
	['PAGE','4787',jdecode('Biography'),jdecode(''),'/4787.html','false',[],'',''],
	['PAGE','4879',jdecode('My+Blog'),jdecode(''),'/4879.html','false',[],'',''],
	['PAGE','4853',jdecode('Photos'),jdecode(''),'/4853.html','false',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Holiday';
theSitetree.paletteFamily='557ECA';
theSitetree.keyvisualId='6088';
theSitetree.keyvisualName='kv_6088.jpg';
theSitetree.fontsetId='11129';
theSitetree.graphicsetId='11925';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7DA3E8';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Holiday',
				paletteFamily: 	'557ECA',
				keyvisualId: 	'6088',
				keyvisualName: 	'kv_6088.jpg',
				fontsetId: 		'11129',
				graphicsetId: 	'11925',
				contentColor: 	'FFFFFF',
				contentBGColor: '7DA3E8',
				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['7060']=webappMappings['7060-3e1adebaac25e8de34532f46e0a38ee4']={
webappId:    '7060',
documentId:  '4853',
internalId:  '3e1adebaac25e8de34532f46e0a38ee4',
customField: 'language:en;country:GB;'
};
webappMappings['7050']=webappMappings['7050-1574']={
webappId:    '7050',
documentId:  '4879',
internalId:  '1574',
customField: 'language:en;country:GB;'
};
webappMappings['7002']=webappMappings['7002-1394']={
webappId:    '7002',
documentId:  '4890',
internalId:  '1394',
customField: 'language:en;country:GB;'
};
webappMappings['7008']=webappMappings['7008-3385']={
webappId:    '7008',
documentId:  '4911',
internalId:  '3385',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4756',
internalId:  '',
customField: '20100121-181150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4787',
internalId:  '',
customField: '20081218-140631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4853',
internalId:  '',
customField: '20081218-140631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4879',
internalId:  '',
customField: '20081218-140632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4890',
internalId:  '',
customField: '20081218-140632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4911',
internalId:  '',
customField: '20081218-140632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20090412-171510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20100729-203907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20090102-175940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7801',
internalId:  '',
customField: '20090102-182801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7827',
internalId:  '',
customField: '20081230-171728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7853',
internalId:  '',
customField: '20081230-145856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7879',
internalId:  '',
customField: '20090102-182631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20081230-150213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20081226-183501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20090105-203759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10927',
internalId:  '',
customField: '20081228-161326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20090209-233439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20090514-173956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34301',
internalId:  '',
customField: '20090410-174230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40001',
internalId:  '',
customField: '20090514-163620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45301',
internalId:  '',
customField: '20091123-225036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47801',
internalId:  '',
customField: '20091126-193521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51627',
internalId:  '',
customField: '20100514-212403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51601',
internalId:  '',
customField: '20100504-204036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55501',
internalId:  '',
customField: '20100422-174827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61627',
internalId:  '',
customField: '20100729-203746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61601',
internalId:  '',
customField: '20100729-210854'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20INERC2';
var companyName   = 'El+Vagabond';
var htmlTitle	  = 'The+El+Vagabond+Blogzone';
var metaKeywords  = '';
var metaContents  = '';
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();
};
