/* [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','1901',jdecode('Home'),jdecode(''),'/1901.html','true',[],'',''],
	['PAGE','19305',jdecode('News'),jdecode(''),'/19305.html','true',[],'',''],
	['PAGE','8301',jdecode('Calendar+of+Events'),jdecode(''),'/8301.html','true',[],'',''],
	['PAGE','21405',jdecode('75th+Jubilee+News'),jdecode(''),'/21405.html','true',[],'',''],
	['PAGE','8322',jdecode('Founding'),jdecode(''),'/8322/index.html','true',[ 
		['PAGE','8343',jdecode('Club+History'),jdecode(''),'/8322/8343.html','true',[],'',''],
		['PAGE','8364',jdecode('The+Club'),jdecode(''),'/8322/8364.html','true',[],'','']
	],'',''],
	['PAGE','8385',jdecode('Hockey'),jdecode(''),'/8385/index.html','true',[ 
		['PAGE','8448',jdecode('Men'),jdecode(''),'/8385/8448.html','true',[],'',''],
		['PAGE','8427',jdecode('Women'),jdecode(''),'/8385/8427.html','true',[],'',''],
		['PAGE','8406',jdecode('Junior'),jdecode(''),'/8385/8406.html','true',[],'','']
	],'',''],
	['PAGE','12643',jdecode('Gallery'),jdecode(''),'/12643/index.html','true',[ 
		['PAGE','12664',jdecode('Youth'),jdecode(''),'/12643/12664.html','true',[],'',''],
		['PAGE','12685',jdecode('U23%26%23x27%3Bs+2007'),jdecode(''),'/12643/12685.html','true',[],'',''],
		['PAGE','32957',jdecode('U23%26%23x27%3Bs+2010'),jdecode(''),'/12643/32957.html','true',[],'',''],
		['PAGE','12706',jdecode('Women'),jdecode(''),'/12643/12706.html','true',[],'',''],
		['PAGE','12727',jdecode('Men'),jdecode(''),'/12643/12727.html','true',[],'',''],
		['PAGE','25433',jdecode('Cricket'),jdecode(''),'/12643/25433.html','true',[],'','']
	],'',''],
	['PAGE','10485',jdecode('Cricket'),jdecode(''),'/10485/index.html','true',[ 
		['PAGE','10506',jdecode('Men'),jdecode(''),'/10485/10506.html','true',[],'',''],
		['PAGE','10548',jdecode('Junior'),jdecode(''),'/10485/10548.html','true',[],'','']
	],'',''],
	['PAGE','8490',jdecode('Members'),jdecode(''),'/8490/index.html','true',[ 
		['PAGE','8511',jdecode('Executive+Team'),jdecode(''),'/8490/8511.html','true',[],'','']
	],'',''],
	['PAGE','10001',jdecode('Local+Competitions'),jdecode(''),'/10001.html','true',[],'',''],
	['PAGE','8553',jdecode('Links'),jdecode(''),'/8553.html','true',[],'',''],
	['PAGE','8574',jdecode('Contact'),jdecode(''),'/8574.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Jakarta';
theSitetree.paletteFamily='6176B2';
theSitetree.keyvisualId='7871';
theSitetree.keyvisualName='kv_7871.jpg';
theSitetree.fontsetId='16854';
theSitetree.graphicsetId='12296';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='ABBBE8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'true',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Jakarta',
				paletteFamily: 	'6176B2',
				keyvisualId: 	'7871',
				keyvisualName: 	'kv_7871.jpg',
				fontsetId: 		'16854',
				graphicsetId: 	'12296',
				contentColor: 	'000000',
				contentBGColor: 'ABBBE8',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'6176B2',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20100608-161138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8385',
internalId:  '',
customField: '20091102-214625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8322',
internalId:  '',
customField: '20090521-023238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8574',
internalId:  '',
customField: '20090619-192740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12664',
internalId:  '',
customField: '20091020-032726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20091222-175202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8343',
internalId:  '',
customField: '20090521-023238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8364',
internalId:  '',
customField: '20090521-023238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8406',
internalId:  '',
customField: '20091020-032445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8427',
internalId:  '',
customField: '20091222-184057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8448',
internalId:  '',
customField: '20090928-041119'
};
webappMappings['7060']=webappMappings['7060-2a13bd27989ab51ee50bb3bef2a4a5a5']={
webappId:    '7060',
documentId:  '12643',
internalId:  '2a13bd27989ab51ee50bb3bef2a4a5a5',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12643',
internalId:  '',
customField: '20091020-032903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8490',
internalId:  '',
customField: '20090629-012158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8511',
internalId:  '',
customField: '20090521-023238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10485',
internalId:  '',
customField: '20091222-183220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8553',
internalId:  '',
customField: '20100608-043117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20090621-022324'
};
webappMappings['7008']=webappMappings['7008-7898']={
webappId:    '7008',
documentId:  '8574',
internalId:  '7898',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10506',
internalId:  '',
customField: '20090523-051108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10548',
internalId:  '',
customField: '20091222-182946'
};
webappMappings['7060']=webappMappings['7060-3a3ed4e4331ec694b0114bab7159551b']={
webappId:    '7060',
documentId:  '12685',
internalId:  '3a3ed4e4331ec694b0114bab7159551b',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12685',
internalId:  '',
customField: '20091123-010605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12706',
internalId:  '',
customField: '20091123-010256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12727',
internalId:  '',
customField: '20091123-005650'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19305',
internalId:  '',
customField: '20091222-191830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21405',
internalId:  '',
customField: '20100426-063049'
};
webappMappings['7060']=webappMappings['7060-220e42f5c7926df82ab917529a9fe8cb']={
webappId:    '7060',
documentId:  '25433',
internalId:  '220e42f5c7926df82ab917529a9fe8cb',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25433',
internalId:  '',
customField: '20091123-005426'
};
webappMappings['7060']=webappMappings['7060-86d7b14de9fd0abb84951d768c825fe6']={
webappId:    '7060',
documentId:  '32957',
internalId:  '86d7b14de9fd0abb84951d768c825fe6',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32957',
internalId:  '',
customField: '20100324-035404'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHNRR';
var companyName   = 'Wellington+Indian+Sports+Club+%28WISC%29';
var htmlTitle	  = 'Wellington+Indian+Sports+Club+%28WISC%29';
var metaKeywords  = 'Hockey%2C+Indians%2C+Indian+Hockey+Team%2C+Wellington%2C+Sports%2C+Cricket%2C+Youth%2C+Wellington+Indian+Sports+Club%2C+Netball%2C+Woman%2C+Men%2C+Turf%2C+Hockey+Turf%2C+Field+Hockey%2C+New+Zealand%2C+Umesh+Parag%2C+Gareth+Brooks';
var metaContents  = 'The+Wellington+Indian+Sports+Club+%28WISC%29';
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();
};
