/* [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','17301',jdecode('Home'),jdecode(''),'/17301.html','true',[],'',''],
	['PAGE','154209',jdecode('A+message+from+our+Director'),jdecode(''),'/154209.html','true',[],'',''],
	['PAGE','17701',jdecode('Registration'),jdecode(''),'/17701.html','true',[],'',''],
	['PAGE','96667',jdecode('CHAMPS+Information'),jdecode(''),'/96667.html','true',[],'',''],
	['PAGE','17394',jdecode('Schedules'),jdecode(''),'/17394.html','true',[],'',''],
	['PAGE','153609',jdecode('Meet+Sign+Up'),jdecode(''),'/153609.html','true',[],'',''],
	['PAGE','77725',jdecode('Meet+Entries+%26+Results'),jdecode(''),'/77725.html','true',[],'',''],
	['PAGE','17478',jdecode('Volunteers'),jdecode(''),'/17478.html','true',[],'',''],
	['PAGE','70625',jdecode('Merchandise'),jdecode(''),'/70625.html','true',[],'',''],
	['PAGE','17415',jdecode('News+%26+Info'),jdecode(''),'/17415/index.html','true',[ 
		['PAGE','17520',jdecode('Sponsors'),jdecode(''),'/17415/17520.html','true',[],'',''],
		['PAGE','17352',jdecode('Contact+Us'),jdecode(''),'/17415/17352.html','true',[],'',''],
		['PAGE','68325',jdecode('Helpful+Links'),jdecode(''),'/17415/68325.html','true',[],'',''],
		['PAGE','129509',jdecode('Register+for+CHAMPS'),jdecode(''),'/17415/129509.html','false',[],'','']
	],'',''],
	['PAGE','17457',jdecode('About+Our+Pool'),jdecode(''),'/17457.html','true',[],'',''],
	['PAGE','17801',jdecode('Local+Weather'),jdecode(''),'/17801.html','true',[],'',''],
	['PAGE','37725',jdecode('Coach%26%23x27%3Bs+Corner'),jdecode(''),'/37725.html','true',[],'',''],
	['PAGE','73625',jdecode('Forum+%26+Classifieds'),jdecode(''),'/73625.html','true',[],'',''],
	['PAGE','65725',jdecode('Search+Our+Site'),jdecode(''),'/65725.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='B0CBD6';
theSitetree.keyvisualId='2054';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='328';
theSitetree.graphicsetId='383';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stylus',
				paletteFamily: 	'B0CBD6',
				keyvisualId: 	'2054',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'328',
				graphicsetId: 	'383',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				a_color: 		'B0CBD6',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7080']=webappMappings['7080-382']={
webappId:    '7080',
documentId:  '17801',
internalId:  '382',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20110723-134105'
};
webappMappings['7008']=webappMappings['7008-12831']={
webappId:    '7008',
documentId:  '17352',
internalId:  '12831',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17394',
internalId:  '',
customField: '20110710-152718'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '17301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-15152879']={
webappId:    '1501',
documentId:  '17301',
internalId:  '15152879',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17415',
internalId:  '',
customField: '20110526-141457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17457',
internalId:  '',
customField: '20090308-123047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17478',
internalId:  '',
customField: '20110712-093946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17520',
internalId:  '',
customField: '20110526-141849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17701',
internalId:  '',
customField: '20110531-161638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17352',
internalId:  '',
customField: '20110526-142132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70625',
internalId:  '',
customField: '20110514-165831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20090125-174612'
};
webappMappings['7050']=webappMappings['7050-7431']={
webappId:    '7050',
documentId:  '37725',
internalId:  '7431',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37725',
internalId:  '',
customField: '20100122-091718'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '65725',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65725',
internalId:  '',
customField: '20090307-174651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68325',
internalId:  '',
customField: '20090317-171256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73625',
internalId:  '',
customField: '20090419-185234'
};
webappMappings['1003']=webappMappings['1003-aendu0inezk3120c08ed68c']={
webappId:    '1003',
documentId:  '73625',
internalId:  'aendu0inezk3120c08ed68c',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77725',
internalId:  '',
customField: '20110723-141015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96667',
internalId:  '',
customField: '20110727-205117'
};
webappMappings['7008']=webappMappings['7008-29668']={
webappId:    '7008',
documentId:  '129509',
internalId:  '29668',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129509',
internalId:  '',
customField: '20100717-084019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '154209',
internalId:  '',
customField: '20110530-115644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153609',
internalId:  '',
customField: '20110720-172122'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INEZK3';
var companyName   = 'Tarrington+Tiger+Sharks';
var htmlTitle	  = 'Tarrington+Swim+Team';
var metaKeywords  = 'TarringtonSwimTeamTiger+SharksTiger+Shark';
var metaContents  = 'Tarrington+Swim+Team';
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();
};

