/* [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','3101',jdecode('Home+Page'),jdecode(''), jdecode('%2F3101.html'), 'true',[],'',''],
	['PAGE','1531',jdecode('Profile'),jdecode(''), jdecode('%2F1531.html'), 'true',[],'',''],
	['PAGE','3812',jdecode('Topics'),jdecode(''), jdecode('%2F3812.html'), 'true',[],'',''],
	['PAGE','4412',jdecode('After+Dinner+'),jdecode(''), jdecode('%2F4412.html'), 'true',[],'',''],
	['PAGE','40545',jdecode('Specialist+Lectures'),jdecode(''), jdecode('%2F40545.html'), 'true',[],'',''],
	['PAGE','32560',jdecode('Keynote+Speaker'),jdecode(''), jdecode('%2F32560.html'), 'true',[],'',''],
	['PAGE','4212',jdecode('Client+List'),jdecode(''), jdecode('%2F4212.html'), 'true',[],'',''],
	['PAGE','43645',jdecode('Client+Comments'),jdecode(''), jdecode('%2F43645.html'), 'true',[],'',''],
	['PAGE','45945',jdecode('Future+Talks'),jdecode(''), jdecode('%2F45945.html'), 'true',[],'',''],
	['PAGE','4723',jdecode('Testimonies'),jdecode(''), jdecode('%2F4723.html'), 'true',[],'',''],
	['PAGE','4923',jdecode('Press+Releases'),jdecode(''), jdecode('%2F4923.html'), 'true',[],'',''],
	['PAGE','5123',jdecode('Cruise+Ship+Speakers'),jdecode(''), jdecode('%2F5123.html'), 'true',[],'',''],
	['PAGE','5323',jdecode('Voice+Training'),jdecode(''), jdecode('%2F5323.html'), 'true',[],'',''],
	['PAGE','5523',jdecode('Voice+Over'),jdecode(''), jdecode('%2F5523.html'), 'true',[],'',''],
	['PAGE','5723',jdecode('Publication'),jdecode(''), jdecode('%2F5723.html'), 'true',[],'',''],
	['PAGE','29634',jdecode('Book+Reviews'),jdecode(''), jdecode('%2F29634.html'), 'true',[],'',''],
	['PAGE','32534',jdecode('TV+Book+Signing'),jdecode(''), jdecode('%2F32534.html'), 'true',[],'',''],
	['PAGE','5923',jdecode('Contact'),jdecode(''), jdecode('%2F5923.html'), 'true',[],'',''],
	['PAGE','1510',jdecode(''),jdecode(''), jdecode('%2F1510.html'), 'true',[],'',''],
	['PAGE','1573',jdecode('My+Blog'),jdecode(''), jdecode('%2F1573.html'), 'true',[],'',''],
	['PAGE','1584',jdecode('Guestbook'),jdecode(''), jdecode('%2F1584.html'), 'true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Bigcity_Sydney';
theSitetree.paletteFamily='333333';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='21081';
theSitetree.graphicsetId='13173';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333333';
var localeDef={
  language: 'en',
  country: 'GB'
};
var prodDef={
  wl_name: 'easily_co_uk_ce',
  product: 'WSCSYSSSSLY0XKQS'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Bigcity_Sydney',
				paletteFamily: 	'333333',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'21081',
				graphicsetId: 	'13173',
				contentColor: 	'FFFFFF',
				contentBGColor: '333333',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32534',
internalId:  '',
customField: '20110110-190740'
};
webappMappings['7050']=webappMappings['7050-3500']={
webappId:    '7050',
documentId:  '1573',
internalId:  '3500',
customField: 'language:en;country:GB;'
};
webappMappings['7002']=webappMappings['7002-3240']={
webappId:    '7002',
documentId:  '1584',
internalId:  '3240',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32560',
internalId:  '',
customField: '20110113-161832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1510',
internalId:  '',
customField: '20100117-160046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1531',
internalId:  '',
customField: '20110813-091701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29634',
internalId:  '',
customField: '20110130-165245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1573',
internalId:  '',
customField: '20100117-160046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1584',
internalId:  '',
customField: '20100117-160047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5923',
internalId:  '',
customField: '20120120-191757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3101',
internalId:  '',
customField: '20120120-191814'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3812',
internalId:  '',
customField: '20111020-103443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4212',
internalId:  '',
customField: '20111202-143233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4412',
internalId:  '',
customField: '20100406-202507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4723',
internalId:  '',
customField: '20111202-143126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4923',
internalId:  '',
customField: '20110421-171056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5123',
internalId:  '',
customField: '20111112-114355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5323',
internalId:  '',
customField: '20101207-181234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5523',
internalId:  '',
customField: '20100203-193238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5723',
internalId:  '',
customField: '20101202-193000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40545',
internalId:  '',
customField: '20110629-103831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43645',
internalId:  '',
customField: '20111227-192917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45945',
internalId:  '',
customField: '20120120-191428'
};
var webAppHostname = 'cgi.easily.co.uk:80';
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10IN3QSV';
var companyName   = 'Captain+William+Wells';
var htmlTitle	  = 'Captain+William+Wells%2C+Maritime+Speaker+';
var metaKeywords  = 'Admiral+Lord+Nelson%2C+Advert%2C+Adverts%2C+Advertisements%2C+After%2C+After+Dinner%2C+After+Lunch%2C+After+Dinner+Speaker%2C+After+Dinner+Speaker+with+a+Difference%2C+After+Lunch+Speaker%2C+After+Lunch+Speaker+with+a+Difference%2C+Artist%2C+Artiste%2C+Atlantic%2C+Battle%2C+Bermuda%2C+Bermuda+Triangle%2C+Berthing%2C+Bridge%2C+Building%2C+Bulk+Carrier%2C+Captain%2C+Commercial%2C+Commodore%2C+Container%2C+Container+Ship%2C+Corporate%2C+Craft%2C+Crew%2C+Cruise%2C+Cruise+Ship%2C+Cruise+Ship+Enrichment+Lectures%2C+Cruise+Ship+Lecturer%2C+Cruise+Ship+Speaker%2C+Deep-sea+Pilot%2C+Destinational+Speaker%2C+District+Pilot%2C+Docking%2C+Docking+Pilot%2C+Enrichment%2C+Enrichment+Lecturer%2C+Enrichment+Speaker%2C+Entertaining%2C+Experience%2C+Experienced%2C++Freighter%2C+Funny%2C+Guest+Speaker%2C+Harbour%2C+Harbour+Pilot%2C+History%2C+House%2C+Humorous%2C+Informative%2C+Inhabitants%2C+Inspirational%2C+Interesting%2C+Key+Note%2C+Ladies+Business+Clubs%2C+Ladies+Business+Lunch+Clubs%2C+Ladies+Business+Luncheon+Clubs%2C++Ladies+Lunch+Clubs%2C+Ladies+Luncheon+Clubs%2C+Leadership%2C+Lecture%2C+Lecturer%2C+Legends%2C+Life%2C+License%2C+Liner%2C+Liquid+History%2C+London%2C+London+District+Pilot%2C+London+Pilot%2C+London+River%2C+London+River+Pilot%2C+Man+Management%2C+Management%2C+Marine+Leadership%2C+Marine+Training%2C+Marine%2C+Mariner%2C+Mariners%2C+Maritime%2C+Maritime+Commercial+Pilot%2C+Marine+Commercial+Pilotage%2C+Maritime+Greenwich%2C+Maritime+London%2C+Master%2C+Master+Mariner%2C+Mercantile%2C+Motivational+Speaker%2C+Mud+Pilot%2C+Myths%2C+NADFAS%2C+Nautical%2C+Nautically%2C+Naval%2C+Navy%2C+North+Sea+Pilot%2C+Ocean%2C+Oceans%2C+Ocean+Liner%2C+Oil+Tanker%2C+Over%2C+PassengerLiner%2C+Passenger+Liners%2C+Passionate%2C+Pilot%2C+Pilotage%2C+Pilotage+Service%2C+Piloting%2C+Pilots%2C+Port%2C+Port+Pilots%2C+Port+Arrival%2C+Port+Departure%2C+Presentations%2C+Presenter%2C+Principal+Speaker%2C+Professional%2C+Public%2C+Public+Speaker%2C+Qualified%2C+Radio%2C+Record%2C+Recorder%2C+Recording%2C+River+Thames%2C+Sailor%2C+Sailors%2C+Sea%2C+Sea+Bed%2C+Sea+Floor%2C+Seaman%2C+Seamen%2C+Seas%2C+Seminar%2C+Seminars%2C+Senior%2C+Ship%2C+Ship%27s+Pilot%2C+Shipshape%2C+Speaker+with+a+Difference%2C+Speakers%2C+Speaking%2C+Speech%2C+Station%2C+Subject%2C+Talk%2C+Talks%2C+Thames+Pilot%2C+Thames+River+Pilot%2C+Team%2C+Theme%2C+Times%2C+Topic%2C+Topics%2C+Tower+Bridge%2C+Tower+of+London%2C+Trafalgar%2C+Tramp%2C+Triangle%2C+Trinity%2C+Trinity+House%2C+Unberthing%2C+Vessel%2C+Vikings%2C+VIP+Speaker%2C+Voice%2C+Voice+Over%2C+Wells%2C+William%2C+World+Heritage+Site.%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A';
var metaContents  = 'Informative%2C+entertaining+speaker+for+all+occasions+as+well+as+speaking+on+board+cruise+ships.';
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();
};

