/* [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','1646',jdecode('Home'),jdecode(''),'/1646.html','true',[],'',''],
	['PAGE','19601',jdecode('The+Club'),jdecode(''),'/19601.html','true',[],'',''],
	['PAGE','20801',jdecode('Fords+Champagne+moment'),jdecode(''),'/20801.html','false',[],'',''],
	['PAGE','3157',jdecode('Hire+of+Club'),jdecode(''),'/3157.html','true',[],'',''],
	['PAGE','3079',jdecode('Contacts'),jdecode(''),'/3079.html','true',[],'',''],
	['PAGE','3501',jdecode('1st+Team'),jdecode(''),'/3501.html','false',[],'',''],
	['PAGE','3527',jdecode('2nd+Team'),jdecode(''),'/3527.html','false',[],'',''],
	['PAGE','3553',jdecode('3rd+Team'),jdecode(''),'/3553.html','false',[],'',''],
	['PAGE','3579',jdecode('4th+Team'),jdecode(''),'/3579.html','false',[],'',''],
	['PAGE','3001',jdecode('Ladies'),jdecode(''),'/3001.html','true',[],'',''],
	['PAGE','3605',jdecode('Sundays'),jdecode(''),'/3605.html','false',[],'',''],
	['PAGE','59812',jdecode('Guestbook'),jdecode(''),'/59812.html','false',[],'',''],
	['PAGE','1677',jdecode('Colts'),jdecode(''),'/1677.html','true',[],'',''],
	['PAGE','12201',jdecode('Links'),jdecode(''),'/12201.html','true',[],'',''],
	['PAGE','3131',jdecode('50+Club'),jdecode(''),'/3131.html','true',[],'',''],
	['PAGE','3105',jdecode('Location'),jdecode(''),'/3105.html','true',[],'',''],
	['PAGE','38012',jdecode('Teams'),jdecode(''),'/38012.html','false',[],'',''],
	['PAGE','38412',jdecode('Reports'),jdecode(''),'/38412.html','true',[],'',''],
	['PAGE','44112',jdecode('6as'),jdecode(''),'/44112.html','false',[],'',''],
	['PAGE','70612',jdecode('Colt+Reports'),jdecode(''),'/70612.html','false',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Basic';
theSitetree.paletteFamily='36566E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10828';
theSitetree.graphicsetId='11283';
theSitetree.contentColor='36566E';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Basic',
				paletteFamily: 	'36566E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10828',
				graphicsetId: 	'11283',
				contentColor: 	'36566E',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38412',
internalId:  '',
customField: '20100901-211607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19601',
internalId:  '',
customField: '20100503-215703'
};
webappMappings['7005']=webappMappings['7005-90']={
webappId:    '7005',
documentId:  '20801',
internalId:  '90',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1646',
internalId:  '',
customField: '20100903-121459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1677',
internalId:  '',
customField: '20100428-122916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20801',
internalId:  '',
customField: '20090602-182826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12201',
internalId:  '',
customField: '20090625-215156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38012',
internalId:  '',
customField: '20100825-191027'
};
webappMappings['7002']=webappMappings['7002-2573']={
webappId:    '7002',
documentId:  '59812',
internalId:  '2573',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3501',
internalId:  '',
customField: '20090205-123919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3527',
internalId:  '',
customField: '20090205-124318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20100903-121512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3553',
internalId:  '',
customField: '20090205-124557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3579',
internalId:  '',
customField: '20090205-124927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3605',
internalId:  '',
customField: '20081020-123711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3157',
internalId:  '',
customField: '20100423-232334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3079',
internalId:  '',
customField: '20100423-232601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3131',
internalId:  '',
customField: '20100722-144346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3105',
internalId:  '',
customField: '20081017-183907'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1646',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44112',
internalId:  '',
customField: '20090604-203238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59812',
internalId:  '',
customField: '20090902-122731'
};
webappMappings['1501']=webappMappings['1501-7623732']={
webappId:    '1501',
documentId:  '1646',
internalId:  '7623732',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70612',
internalId:  '',
customField: '20100427-121217'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20INEAFH';
var companyName   = 'Welcome+to+Aldershot+Cricket+Club+';
var htmlTitle	  = 'Aldershot+Cricket+Club';
var metaKeywords  = 'AldershotCricketClubHampshire';
var metaContents  = 'One+of+Hampshires+finest+clubs';
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();
};
