/* [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','10401',jdecode('Home+page'),jdecode(''),'/10401.html','true',[],'',''],
	['PAGE','12401',jdecode('About+our+Club'),jdecode(''),'/12401.html','true',[],'',''],
	['PAGE','46901',jdecode('The+Committee+2009%2F10'),jdecode(''),'/46901.html','true',[],'',''],
	['PAGE','12601',jdecode('Membership'),jdecode(''),'/12601/index.html','true',[ 
		['PAGE','12622',jdecode('Application'),jdecode(''),'/12601/12622.html','true',[],'','']
	],'',''],
	['PAGE','12643',jdecode('Activities'),jdecode(''),'/12643/index.html','true',[ 
		['PAGE','12664',jdecode('Coaching'),jdecode(''),'/12643/12664.html','true',[],'',''],
		['PAGE','12685',jdecode('Trips'),jdecode(''),'/12643/12685.html','true',[],'',''],
		['PAGE','29101',jdecode('Canoe+polo'),jdecode(''),'/12643/29101.html','true',[],'',''],
		['PAGE','30501',jdecode('Regional+events'),jdecode(''),'/12643/30501.html','true',[],'',''],
		['PAGE','67001',jdecode('Slalom'),jdecode(''),'/12643/67001.html','true',[],'','']
	],'',''],
	['PAGE','12706',jdecode('Youth+section'),jdecode(''),'/12706.html','true',[],'',''],
	['PAGE','57601',jdecode('Photos+from+Events'),jdecode(''),'/57601.html','true',[],'',''],
	['PAGE','12727',jdecode('Boat+House'),jdecode(''),'/12727.html','true',[],'',''],
	['PAGE','16301',jdecode('Club+Bulletins+%26+Committee+Minutes'),jdecode(''),'/16301.html','true',[],'',''],
	['PAGE','12001',jdecode('Notice+Board'),jdecode(''),'/12001.html','true',[],'',''],
	['PAGE','53801',jdecode('Clothing+%26+Order+form'),jdecode(''),'/53801.html','true',[],'',''],
	['PAGE','21101',jdecode('Classified+advertisements'),jdecode(''),'/21101/index.html','true',[ 
		['PAGE','12748',jdecode('Sales'),jdecode(''),'/21101/12748.html','true',[],'',''],
		['PAGE','21122',jdecode('Wants'),jdecode(''),'/21101/21122.html','true',[],'',''],
		['PAGE','52901',jdecode(''),jdecode(''),'/21101/52901.html','true',[],'','']
	],'',''],
	['PAGE','51101',jdecode('Facebook'),jdecode(''),'/51101.html','true',[],'',''],
	['PAGE','52922',jdecode(''),jdecode(''),'/52922.html','true',[],'',''],
	['PAGE','52943',jdecode(''),jdecode(''),'/52943.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Delta';
theSitetree.paletteFamily='080245';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10440';
theSitetree.graphicsetId='10811';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='080245';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Delta',
				paletteFamily: 	'080245',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10440',
				graphicsetId: 	'10811',
				contentColor: 	'FFFFFF',
				contentBGColor: '080245',
				a_color: 		'221785',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '10401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '10401',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10401',
internalId:  '',
customField: '20100526-145847'
};
webappMappings['1003']=webappMappings['1003-ahw050in3cpx11e7e613819']={
webappId:    '1003',
documentId:  '12001',
internalId:  'ahw050in3cpx11e7e613819',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12001',
internalId:  '',
customField: '20090714-160339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12401',
internalId:  '',
customField: '20100526-145141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12643',
internalId:  '',
customField: '20100425-074418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12664',
internalId:  '',
customField: '20100425-070654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20090718-025523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12622',
internalId:  '',
customField: '20100503-170052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12685',
internalId:  '',
customField: '20100418-105259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12706',
internalId:  '',
customField: '20090719-125514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12727',
internalId:  '',
customField: '20100530-095820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12748',
internalId:  '',
customField: '20100718-150359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16301',
internalId:  '',
customField: '20100425-072145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21101',
internalId:  '',
customField: '20090329-063913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21122',
internalId:  '',
customField: '20090329-063944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29101',
internalId:  '',
customField: '20091115-042036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30501',
internalId:  '',
customField: '20090614-141232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46901',
internalId:  '',
customField: '20091101-064838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51101',
internalId:  '',
customField: '20090826-060341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52901',
internalId:  '',
customField: '20090717-143119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52943',
internalId:  '',
customField: '20090717-143119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57601',
internalId:  '',
customField: '20100418-134845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53801',
internalId:  '',
customField: '20091129-040223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52922',
internalId:  '',
customField: '20090717-143119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67001',
internalId:  '',
customField: '20100508-170145'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3CPX';
var companyName   = 'Hexham+Canoe+Club';
var htmlTitle	  = 'Hexham+Canoe+Club';
var metaKeywords  = 'Outdoors%2C+sport%2C+canoe%2C+kayak%2C+paddlesport%2C+Hexham%2C+Northumberland%2C+north+east+England';
var metaContents  = 'The+website+of+Hexham+Canoe+Club.+We+have+Sport+England+Clubmark+accreditation+and+our+aim+is+to+introduce+all+members+of+the+community+to+the+joys+of+paddlesport.+We+are+based+in+Northumberland+in+the+beautiful+north+east+of+England.';
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();
};
