/* [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','83912',jdecode('2011-12+Winter+Announcements'),jdecode(''), jdecode('%2F83912.html'), 'true',[],'',''],
	['PAGE','7301',jdecode('General+Information'),jdecode(''), jdecode('%2F7301%2Findex.html'), 'true',[ 
		['PAGE','21801',jdecode('FMW+By-Laws'),jdecode(''), jdecode('%2F7301%2F21801.html'), 'true',[],'',''],
		['PAGE','21822',jdecode('FMW+Rules+%26+Regulations'),jdecode(''), jdecode('%2F7301%2F21822.html'), 'true',[],'',''],
		['PAGE','7622',jdecode('Pool+Information'),jdecode(''), jdecode('%2F7301%2F7622.html'), 'true',[],'',''],
		['PAGE','13201',jdecode('Pool+Staff'),jdecode(''), jdecode('%2F7301%2F13201.html'), 'true',[],'',''],
		['PAGE','26701',jdecode('Social+Events'),jdecode(''), jdecode('%2F7301%2F26701.html'), 'true',[],'',''],
		['PAGE','46001',jdecode('Swim+Lessons'),jdecode(''), jdecode('%2F7301%2F46001.html'), 'true',[],'',''],
		['PAGE','8801',jdecode('Tennis+Court+Information'),jdecode(''), jdecode('%2F7301%2F8801.html'), 'true',[],'','']
	],'',''],
	['PAGE','10101',jdecode('Hours+of+Operation'),jdecode(''), jdecode('%2F10101.html'), 'true',[],'',''],
	['PAGE','7601',jdecode('Membership'),jdecode(''), jdecode('%2F7601%2Findex.html'), 'true',[ 
		['PAGE','52001',jdecode('2011+Membership+Drive'),jdecode(''), jdecode('%2F7601%2F52001.html'), 'true',[],'','']
	],'',''],
	['PAGE','7401',jdecode('Swim+Team'),jdecode(''), jdecode('%2F7401%2Findex.html'), 'true',[ 
		['PAGE','65012',jdecode('Swim+Team+Contacts'),jdecode(''), jdecode('%2F7401%2F65012.html'), 'true',[],'',''],
		['PAGE','66312',jdecode('Volunteer+Info+%26+Training'),jdecode(''), jdecode('%2F7401%2F66312.html'), 'true',[],'',''],
		['PAGE','8864',jdecode('Swim+Team+Registration'),jdecode(''), jdecode('%2F7401%2F8864.html'), 'true',[],'',''],
		['PAGE','61812',jdecode('Calendar'),jdecode(''), jdecode('%2F7401%2F61812.html'), 'true',[],'',''],
		['PAGE','8906',jdecode('Meet+Schedule'),jdecode(''), jdecode('%2F7401%2F8906.html'), 'true',[],'',''],
		['PAGE','69412',jdecode('Meet+Absence+Form'),jdecode(''), jdecode('%2F7401%2F69412.html'), 'true',[],'',''],
		['PAGE','29201',jdecode('Pep+Rallies'),jdecode(''), jdecode('%2F7401%2F29201.html'), 'true',[],'',''],
		['PAGE','20622',jdecode('Weekly+News'),jdecode(''), jdecode('%2F7401%2F20622.html'), 'true',[],'',''],
		['PAGE','8927',jdecode('Private+Lessons'),jdecode(''), jdecode('%2F7401%2F8927.html'), 'true',[],'',''],
		['PAGE','8969',jdecode('FMW+Team+Handbook'),jdecode(''), jdecode('%2F7401%2F8969.html'), 'true',[],'',''],
		['PAGE','8990',jdecode('FMW+Team+Records'),jdecode(''), jdecode('%2F7401%2F8990.html'), 'true',[],'',''],
		['PAGE','25301',jdecode('Swim+Links'),jdecode(''), jdecode('%2F7401%2F25301.html'), 'true',[],'','']
	],'',''],
	['PAGE','36001',jdecode('Tennis'),jdecode(''), jdecode('%2F36001%2Findex.html'), 'true',[ 
		['PAGE','48901',jdecode('Spring+Tennis+Lessons'),jdecode(''), jdecode('%2F36001%2F48901.html'), 'true',[],'',''],
		['PAGE','36022',jdecode('Summer+Tennis+Lessons'),jdecode(''), jdecode('%2F36001%2F36022.html'), 'true',[],'',''],
		['PAGE','7422',jdecode('Tennis+Team'),jdecode(''), jdecode('%2F36001%2F7422.html'), 'true',[],'',''],
		['PAGE','37901',jdecode('Adult+Tennis+League'),jdecode(''), jdecode('%2F36001%2F37901.html'), 'true',[],'',''],
		['PAGE','25322',jdecode('Tennis+Links'),jdecode(''), jdecode('%2F36001%2F25322.html'), 'true',[],'','']
	],'',''],
	['PAGE','7443',jdecode('Board+of+Directors'),jdecode(''), jdecode('%2F7443.html'), 'true',[],'',''],
	['PAGE','7464',jdecode('Contact+Us'),jdecode(''), jdecode('%2F7464.html'), 'true',[],'',''],
	['PAGE','7485',jdecode('Directions+to+FMWST'),jdecode(''), jdecode('%2F7485.html'), 'true',[],'',''],
	['PAGE','71012',jdecode('Comments%2FSuggestions'),jdecode(''), jdecode('%2F71012.html'), 'true',[],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='Raster';
theSitetree.paletteFamily='CCCC9C';
theSitetree.keyvisualId='1291';
theSitetree.keyvisualName='delphinschwimmer.jpg';
theSitetree.fontsetId='201';
theSitetree.graphicsetId='239';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
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: 			'Raster',
				paletteFamily: 	'CCCC9C',
				keyvisualId: 	'1291',
				keyvisualName: 	'delphinschwimmer.jpg',
				fontsetId: 		'201',
				graphicsetId: 	'239',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'12357B',
				b_color: 		'509AEC',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20100302-071031'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20080410-102814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20120116-195848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7622',
internalId:  '',
customField: '20090518-120241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20120116-202730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7422',
internalId:  '',
customField: '20120116-201229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7443',
internalId:  '',
customField: '20120116-195923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7464',
internalId:  '',
customField: '20100629-085752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7485',
internalId:  '',
customField: '20080510-082200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69412',
internalId:  '',
customField: '20110320-083056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61812',
internalId:  '',
customField: '20120116-202328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20090504-181728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66312',
internalId:  '',
customField: '20110325-113001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8864',
internalId:  '',
customField: '20110409-075350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71012',
internalId:  '',
customField: '20110325-124047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8906',
internalId:  '',
customField: '20120116-200536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8927',
internalId:  '',
customField: '20100614-093301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8969',
internalId:  '',
customField: '20110320-080525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8990',
internalId:  '',
customField: '20080509-181830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25322',
internalId:  '',
customField: '20080521-074323'
};
webappMappings['1501']=webappMappings['1501-9834521']={
webappId:    '1501',
documentId:  '2201',
internalId:  '9834521',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52001',
internalId:  '',
customField: '20110225-203256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36022',
internalId:  '',
customField: '20120116-201016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20110330-181338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65012',
internalId:  '',
customField: '20120116-195634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36001',
internalId:  '',
customField: '20120116-200811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83912',
internalId:  '',
customField: '20111128-092119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25301',
internalId:  '',
customField: '20110315-121023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20120116-203205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20110601-175623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20080520-093320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21822',
internalId:  '',
customField: '20080520-093421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46001',
internalId:  '',
customField: '20110315-121630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20622',
internalId:  '',
customField: '20120116-202904'
};
webappMappings['7008']=webappMappings['7008-34762']={
webappId:    '7008',
documentId:  '71012',
internalId:  '34762',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26701',
internalId:  '',
customField: '20110330-181511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29201',
internalId:  '',
customField: '20110320-080117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48901',
internalId:  '',
customField: '20120116-200857'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN27NQ';
var companyName   = 'Fox+Mill+Woods+Swim+%26+Tennis+';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};

