/* [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','2201',jdecode('Home'),jdecode(''), jdecode('%2F2201.html'), 'true',[],'',''],
	['PAGE','2252',jdecode('About+us'),jdecode(''), jdecode('%2F2252%2Findex.html'), 'true',[ 
		['PAGE','120101',jdecode('KPIs+'),jdecode(''), jdecode('%2F2252%2F120101.html'), 'true',[],'','']
	],'',''],
	['PAGE','3301',jdecode('Coursing+Club+Info'),jdecode(''), jdecode('%2F3301%2Findex.html'), 'true',[ 
		['PAGE','46901',jdecode('Benalla+Plumpton+Coursing+Club'),jdecode(''), jdecode('%2F3301%2F46901.html'), 'false',[],'',''],
		['PAGE','47601',jdecode('Charlton+Coursing+Club'),jdecode(''), jdecode('%2F3301%2F47601.html'), 'false',[],'',''],
		['PAGE','33901',jdecode('Lang+Lang+Coursing+Club'),jdecode(''), jdecode('%2F3301%2F33901.html'), 'false',[],'',''],
		['PAGE','48101',jdecode('Victoria+Coursing+Club'),jdecode(''), jdecode('%2F3301%2F48101.html'), 'false',[],'',''],
		['PAGE','48122',jdecode('Longwood+Coursing+Club'),jdecode(''), jdecode('%2F3301%2F48122.html'), 'false',[],'',''],
		['PAGE','48143',jdecode('Melton+Greyhound+Racing+Club'),jdecode(''), jdecode('%2F3301%2F48143.html'), 'false',[],'',''],
		['PAGE','48164',jdecode('Werribee+Coursing+Club'),jdecode(''), jdecode('%2F3301%2F48164.html'), 'false',[],'',''],
		['PAGE','49301',jdecode('GOTBA'),jdecode(''), jdecode('%2F3301%2F49301.html'), 'false',[],'',''],
		['PAGE','49322',jdecode('Healesville'),jdecode(''), jdecode('%2F3301%2F49322.html'), 'false',[],'','']
	],'',''],
	['PAGE','76201',jdecode('Noms%2FFields%2FReslt'),jdecode(''), jdecode('%2F76201%2Findex.html'), 'true',[ 
		['PAGE','76401',jdecode('Nominations'),jdecode(''), jdecode('%2F76201%2F76401.html'), 'true',[],'',''],
		['PAGE','71022',jdecode('Event+Types'),jdecode(''), jdecode('%2F76201%2F71022.html'), 'false',[],'',''],
		['PAGE','72101',jdecode('Nominating+for+coursing'),jdecode(''), jdecode('%2F76201%2F72101.html'), 'false',[],'',''],
		['PAGE','81701',jdecode('Nom.+Numbers'),jdecode(''), jdecode('%2F76201%2F81701.html'), 'false',[],'',''],
		['PAGE','2357',jdecode('Fields'),jdecode(''), jdecode('%2F76201%2F2357.html'), 'true',[],'',''],
		['PAGE','85101',jdecode('Scratchings'),jdecode(''), jdecode('%2F76201%2F85101.html'), 'true',[],'',''],
		['PAGE','2378',jdecode('2011+Results'),jdecode(''), jdecode('%2F76201%2F2378.html'), 'true',[],'',''],
		['PAGE','93001',jdecode('Result+Sheets'),jdecode(''), jdecode('%2F76201%2F93001.html'), 'true',[],'','']
	],'',''],
	['PAGE','2273',jdecode('Coursing+Meetings'),jdecode(''), jdecode('%2F2273%2Findex.html'), 'true',[ 
		['PAGE','107201',jdecode('Lang+Lang+17+%26+18+Sept'),jdecode(''), jdecode('%2F2273%2F107201.html'), 'true',[],'',''],
		['PAGE','105401',jdecode('Werribee+3+Sept'),jdecode(''), jdecode('%2F2273%2F105401.html'), 'true',[],'',''],
		['PAGE','100501',jdecode('Benalla+27+28+August'),jdecode(''), jdecode('%2F2273%2F100501.html'), 'true',[],'',''],
		['PAGE','94201',jdecode('Lang+Lang+14+August'),jdecode(''), jdecode('%2F2273%2F94201.html'), 'true',[],'',''],
		['PAGE','96701',jdecode('Longwood+31+July'),jdecode(''), jdecode('%2F2273%2F96701.html'), 'true',[],'',''],
		['PAGE','89201',jdecode('Longwood+24+July'),jdecode(''), jdecode('%2F2273%2F89201.html'), 'true',[],'',''],
		['PAGE','89222',jdecode('Lang+Lang+3rd+July'),jdecode(''), jdecode('%2F2273%2F89222.html'), 'true',[],'',''],
		['PAGE','83201',jdecode('Melton+18+June'),jdecode(''), jdecode('%2F2273%2F83201.html'), 'true',[],'',''],
		['PAGE','79222',jdecode('Picnic+at+Lang+Lang+12+June'),jdecode(''), jdecode('%2F2273%2F79222.html'), 'true',[],'',''],
		['PAGE','79201',jdecode('Longwood+5+June'),jdecode(''), jdecode('%2F2273%2F79201.html'), 'true',[],'','']
	],'',''],
	['PAGE','74701',jdecode('Stake+Money'),jdecode(''), jdecode('%2F74701.html'), 'true',[],'',''],
	['PAGE','115801',jdecode('Information+Reqd'),jdecode(''), jdecode('%2F115801.html'), 'true',[],'',''],
	['PAGE','112501',jdecode('Dog+Float+winner'),jdecode(''), jdecode('%2F112501.html'), 'true',[],'',''],
	['PAGE','66801',jdecode('Win+a+dog+float'),jdecode(''), jdecode('%2F66801.html'), 'false',[],'',''],
	['PAGE','73901',jdecode('Terms+%26+Conditions'),jdecode(''), jdecode('%2F73901.html'), 'false',[],'',''],
	['PAGE','71001',jdecode('Coursing+Calendar'),jdecode(''), jdecode('%2F71001.html'), 'true',[],'',''],
	['PAGE','2336',jdecode('Coursing+FAQ%26%23x27%3Bs+'),jdecode(''), jdecode('%2F2336.html'), 'true',[],'',''],
	['PAGE','78401',jdecode('Coursing+Points'),jdecode(''), jdecode('%2F78401%2Findex.html'), 'true',[ 
		['PAGE','78422',jdecode('Points+for+2011'),jdecode(''), jdecode('%2F78401%2F78422.html'), 'false',[],'',''],
		['PAGE','3322',jdecode('Points+for+2010'),jdecode(''), jdecode('%2F78401%2F3322.html'), 'false',[],'',''],
		['PAGE','41401',jdecode('Grinning+Winners+2010'),jdecode(''), jdecode('%2F78401%2F41401.html'), 'true',[],'','']
	],'',''],
	['PAGE','32601',jdecode('Photo+Gallery'),jdecode(''), jdecode('%2F32601.html'), 'true',[],'','']];
var siteelementCount=45;
theSitetree.topTemplateName='Plainly';
theSitetree.paletteFamily='ABC600';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32114';
theSitetree.graphicsetId='13925';
theSitetree.contentColor='6e6e6d';
theSitetree.contentBGColor='fbfae8';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Plainly',
				paletteFamily: 	'ABC600',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32114',
				graphicsetId: 	'13925',
				contentColor: 	'6e6e6d',
				contentBGColor: 'fbfae8',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71022',
internalId:  '',
customField: '20110309-004009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20120201-004002'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2201',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-28001439']={
webappId:    '1501',
documentId:  '2201',
internalId:  '28001439',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2252',
internalId:  '',
customField: '20120201-013316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2273',
internalId:  '',
customField: '20110629-221712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3322',
internalId:  '',
customField: '20100915-033113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3301',
internalId:  '',
customField: '20111121-045631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2336',
internalId:  '',
customField: '20110318-213213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2357',
internalId:  '',
customField: '20110915-065328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2378',
internalId:  '',
customField: '20111113-003303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66801',
internalId:  '',
customField: '20110529-034851'
};
webappMappings['7060']=webappMappings['7060-b791e1b7f668e6f4f5e542a28f2e1628']={
webappId:    '7060',
documentId:  '32601',
internalId:  'b791e1b7f668e6f4f5e542a28f2e1628',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72101',
internalId:  '',
customField: '20110527-030012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32601',
internalId:  '',
customField: '20100909-040213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71001',
internalId:  '',
customField: '20111206-043534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20111129-024326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41401',
internalId:  '',
customField: '20110529-020416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46901',
internalId:  '',
customField: '20110811-010520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47601',
internalId:  '',
customField: '20110529-022251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48101',
internalId:  '',
customField: '20111130-215050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48122',
internalId:  '',
customField: '20110622-235955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48143',
internalId:  '',
customField: '20111113-002954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48164',
internalId:  '',
customField: '20110529-023122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49301',
internalId:  '',
customField: '20110529-023222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49322',
internalId:  '',
customField: '20110529-023315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73901',
internalId:  '',
customField: '20110520-042039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74701',
internalId:  '',
customField: '20111113-005154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76201',
internalId:  '',
customField: '20110527-033656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76401',
internalId:  '',
customField: '20110915-065714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78422',
internalId:  '',
customField: '20111113-005654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78401',
internalId:  '',
customField: '20111106-041228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79222',
internalId:  '',
customField: '20110529-025947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79201',
internalId:  '',
customField: '20110529-030635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81701',
internalId:  '',
customField: '20110920-074542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83201',
internalId:  '',
customField: '20110602-015439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85101',
internalId:  '',
customField: '20110917-045651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89201',
internalId:  '',
customField: '20110722-032705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89222',
internalId:  '',
customField: '20110712-002856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93001',
internalId:  '',
customField: '20111113-004834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94201',
internalId:  '',
customField: '20110811-012520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96701',
internalId:  '',
customField: '20110722-033525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100501',
internalId:  '',
customField: '20110811-012446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105401',
internalId:  '',
customField: '20110831-040325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107201',
internalId:  '',
customField: '20110911-021750'
};
webappMappings['7008']=webappMappings['7008-6242']={
webappId:    '7008',
documentId:  '115801',
internalId:  '6242',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112501',
internalId:  '',
customField: '20110920-074846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115801',
internalId:  '',
customField: '20111121-052919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120101',
internalId:  '',
customField: '20120131-044555'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INLMAH';
var companyName   = 'National+Coursing+Association+of+Victoria+Inc';
var htmlTitle	  = '+COURSING+IN+VICTORIA';
var metaKeywords  = 'coursing%2C+greyhound%2C+lure%2C+plumpton%2C+Healesville%2C+Benalla%2C+Longwood%2C+Lang+Lang%2C+Werribee%2C+Melton%2C+GOTBA%2C+Charlton%2C+VCC%2C+Victoria%2C+racing%2C+chasing%2C';
var metaContents  = 'Coursing+for+greyhounds%2C+is+the+pursuit+of+a+mechancial+lure+via+a+drag+lure+or+a+trolley+lure';
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();
};

