/* [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','1201',jdecode('Home'),jdecode(''), jdecode('%2F1201.html'), 'true',[],'',''],
	['PAGE','3437',jdecode('Sponsors'),jdecode(''), jdecode('%2F3437%2Findex.html'), 'true',[ 
		['PAGE','14022',jdecode('Sponsor+us%21'),jdecode(''), jdecode('%2F3437%2F14022.html'), 'true',[],'','']
	],'',''],
	['PAGE','3311',jdecode('News'),jdecode(''), jdecode('%2F3311%2Findex.html'), 'true',[ 
		['PAGE','16101',jdecode('Presidents+message'),jdecode(''), jdecode('%2F3311%2F16101.html'), 'true',[],'',''],
		['PAGE','14001',jdecode('Club+Newsletter'),jdecode(''), jdecode('%2F3311%2F14001.html'), 'true',[],'','']
	],'',''],
	['PAGE','3101',jdecode('About+us'),jdecode(''), jdecode('%2F3101%2Findex.html'), 'true',[ 
		['PAGE','3122',jdecode('History'),jdecode(''), jdecode('%2F3101%2F3122.html'), 'true',[],'',''],
		['PAGE','3143',jdecode('Committee'),jdecode(''), jdecode('%2F3101%2F3143.html'), 'true',[],'',''],
		['PAGE','3164',jdecode('Codes+of+conduct'),jdecode(''), jdecode('%2F3101%2F3164.html'), 'true',[],'','']
	],'',''],
	['PAGE','3332',jdecode('Sign-on'),jdecode(''), jdecode('%2F3332.html'), 'true',[],'',''],
	['PAGE','3185',jdecode('Teams'),jdecode(''), jdecode('%2F3185%2Findex.html'), 'true',[ 
		['PAGE','3206',jdecode('Mens'),jdecode(''), jdecode('%2F3185%2F3206.html'), 'true',[],'',''],
		['PAGE','3227',jdecode('Womens'),jdecode(''), jdecode('%2F3185%2F3227.html'), 'true',[],'',''],
		['PAGE','3248',jdecode('Junior+Boys'),jdecode(''), jdecode('%2F3185%2F3248.html'), 'true',[],'',''],
		['PAGE','3269',jdecode('Junior+Girls'),jdecode(''), jdecode('%2F3185%2F3269.html'), 'true',[],'',''],
		['PAGE','3290',jdecode('Jnr+Non+Competetive'),jdecode(''), jdecode('%2F3185%2F3290.html'), 'true',[],'','']
	],'',''],
	['PAGE','14501',jdecode('Wet+weather+info'),jdecode(''), jdecode('%2F14501.html'), 'true',[],'',''],
	['PAGE','3353',jdecode('Results'),jdecode(''), jdecode('%2F3353.html'), 'true',[],'',''],
	['PAGE','3374',jdecode('Club+merchandising'),jdecode(''), jdecode('%2F3374.html'), 'true',[],'',''],
	['PAGE','3395',jdecode('Interesting+links'),jdecode(''), jdecode('%2F3395.html'), 'true',[],'',''],
	['PAGE','3416',jdecode('Contact'),jdecode(''), jdecode('%2F3416.html'), 'true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Match';
theSitetree.paletteFamily='FF3333';
theSitetree.keyvisualId='2704';
theSitetree.keyvisualName='kv_2704.jpg';
theSitetree.fontsetId='10701';
theSitetree.graphicsetId='10635';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCCCCC';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'wl_enom',
  product: 'WSCENOSSSLYTC21T'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Match',
				paletteFamily: 	'FF3333',
				keyvisualId: 	'2704',
				keyvisualName: 	'kv_2704.jpg',
				fontsetId: 		'10701',
				graphicsetId: 	'10635',
				contentColor: 	'000000',
				contentBGColor: 'CCCCCC',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FF3333',
				e_color: 		'545353',
				f_color: 		'545353',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-15738615']={
webappId:    '1501',
documentId:  '1201',
internalId:  '15738615',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1201',
internalId:  '',
customField: '20120131-221148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3101',
internalId:  '',
customField: '20120107-013747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3164',
internalId:  '',
customField: '20120107-021615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3143',
internalId:  '',
customField: '20111205-191153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3122',
internalId:  '',
customField: '20120107-020048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3416',
internalId:  '',
customField: '20120104-135345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3185',
internalId:  '',
customField: '20120107-173749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3206',
internalId:  '',
customField: '20120107-174527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3227',
internalId:  '',
customField: '20120107-174956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3248',
internalId:  '',
customField: '20120107-175506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3269',
internalId:  '',
customField: '20120107-180148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3290',
internalId:  '',
customField: '20120107-180109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3311',
internalId:  '',
customField: '20120131-213613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3332',
internalId:  '',
customField: '20120131-222631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3353',
internalId:  '',
customField: '20120107-182113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3374',
internalId:  '',
customField: '20120107-182613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3395',
internalId:  '',
customField: '20120107-182957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3437',
internalId:  '',
customField: '20120107-012721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20101005-231603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14022',
internalId:  '',
customField: '20090208-211712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20120107-181044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20120131-222015'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1201',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'wsc.ehost-services.com:80';
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010INZDFQ';
var companyName   = 'Lismore+Workers+FC';
var htmlTitle	  = 'Lismore+Workers+FC';
var metaKeywords  = 'lismoresoccersportsign+onsignonfootball+far+north+coast++soccer+clubjunior+soccersenior+soccerlismore+premier+leaguelismore+soccer+clublismore+football+club++++';
var metaContents  = 'lismore+workers+fc';
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();
};

