/* [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 theSitetree=[ 
	['PAGE','17501',jdecode('Home'),jdecode(''),'/17501/index.html','true',[ 
		['PAGE','25012',jdecode('Email+Notification'),jdecode(''),'/17501/25012.html','true',[],'']
	],''],
	['PAGE','17552',jdecode('Latest+News'),jdecode(''),'/17552.html','true',[],''],
	['PAGE','38612',jdecode('Club+Information'),jdecode(''),'/38612/index.html','true',[ 
		['PAGE','17573',jdecode('About+Us'),jdecode(''),'/38612/17573.html','true',[],''],
		['PAGE','19822',jdecode('Registration'),jdecode(''),'/38612/19822.html','true',[],''],
		['PAGE','56222',jdecode('Annual+Mini-Camp'),jdecode(''),'/38612/56222.html','true',[],''],
		['PAGE','91552',jdecode('Group+Advancement+Guidelines'),jdecode(''),'/38612/91552.html','true',[],'']
	],''],
	['PAGE','18601',jdecode('Coaches+Corner'),jdecode(''),'/18601/index.html','true',[ 
		['PAGE','17594',jdecode('David+Hulit'),jdecode(''),'/18601/17594.html','true',[],''],
		['PAGE','19864',jdecode('Lindsey+Hulit+Harrigan'),jdecode(''),'/18601/19864.html','true',[],''],
		['PAGE','154382',jdecode('Leah+Holmgren'),jdecode(''),'/18601/154382.html','true',[],''],
		['PAGE','72532',jdecode('Britney+Flatten'),jdecode(''),'/18601/72532.html','true',[],''],
		['PAGE','81452',jdecode('Kallie+Biermaier'),jdecode(''),'/18601/81452.html','true',[],''],
		['PAGE','19906',jdecode('Somorae+Anderson'),jdecode(''),'/18601/19906.html','true',[],'']
	],''],
	['PAGE','17615',jdecode('Calendars'),jdecode(''),'/17615.html','true',[],''],
	['PAGE','17636',jdecode('Meet+Information'),jdecode(''),'/17636/index.html','true',[ 
		['PAGE','24612',jdecode('Sanctioned+Meet+Entries'),jdecode(''),'/17636/24612.html','true',[],''],
		['PAGE','24712',jdecode('Novice+Meet+Entries'),jdecode(''),'/17636/24712.html','true',[],'']
	],''],
	['PAGE','140057',jdecode('Meet+Results'),jdecode(''),'/140057/index.html','true',[ 
		['PAGE','114352',jdecode('2009+Summer+Meet+Results'),jdecode(''),'/140057/114352.html','true',[],''],
		['PAGE','65432',jdecode('2008-2009+Winter+Meet+Results'),jdecode(''),'/140057/65432.html','true',[],''],
		['PAGE','17657',jdecode('2008+Summer+Meet+Results'),jdecode(''),'/140057/17657.html','true',[],'']
	],''],
	['PAGE','17678',jdecode('Top+Times'),jdecode(''),'/17678.html','true',[],''],
	['PAGE','17699',jdecode('Team+Records'),jdecode(''),'/17699.html','true',[],''],
	['PAGE','18622',jdecode('CAA'),jdecode(''),'/18622/index.html','true',[ 
		['PAGE','173827',jdecode('CAA+Coaches'),jdecode(''),'/18622/173827.html','true',[],'']
	],''],
	['PAGE','20101',jdecode('Contact+Us'),jdecode(''),'/20101.html','true',[],'']];
var siteelementCount=28;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='003399';
theSitetree.keyvisualId='1273';
theSitetree.keyvisualName='schwimmerin.jpg';
theSitetree.fontsetId='190';
theSitetree.graphicsetId='228';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Profile',
				paletteFamily: 	'003399',
				keyvisualId: 	'1273',
				keyvisualName: 	'schwimmerin.jpg',
				fontsetId: 		'190',
				graphicsetId: 	'228',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'003399',
				b_color: 		'000066',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20091009-130701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17552',
internalId:  '',
customField: '20080525-221207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17573',
internalId:  '',
customField: '20080526-092922'
};
webappMappings['7050']=webappMappings['7050-2548']={
webappId:    '7050',
documentId:  '17552',
internalId:  '2548',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17594',
internalId:  '',
customField: '20090418-121303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17615',
internalId:  '',
customField: '20100221-083800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20080527-134457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17636',
internalId:  '',
customField: '20100302-091224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17657',
internalId:  '',
customField: '20080807-142538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17678',
internalId:  '',
customField: '20100302-091025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17699',
internalId:  '',
customField: '20100204-125240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18622',
internalId:  '',
customField: '20100222-161034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38612',
internalId:  '',
customField: '20100112-221803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81452',
internalId:  '',
customField: '20090118-105553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19864',
internalId:  '',
customField: '20090927-091448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91552',
internalId:  '',
customField: '20100129-163607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19822',
internalId:  '',
customField: '20090901-211151'
};
webappMappings['7008']=webappMappings['7008-4286']={
webappId:    '7008',
documentId:  '24612',
internalId:  '4286',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24612',
internalId:  '',
customField: '20080526-151137'
};
webappMappings['7008']=webappMappings['7008-4287']={
webappId:    '7008',
documentId:  '24712',
internalId:  '4287',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24712',
internalId:  '',
customField: '20080526-151537'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '17501',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-4291']={
webappId:    '7008',
documentId:  '25012',
internalId:  '4291',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25012',
internalId:  '',
customField: '20080526-212023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72532',
internalId:  '',
customField: '20081116-100340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19906',
internalId:  '',
customField: '20080525-222150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20100116-214913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56222',
internalId:  '',
customField: '20090321-170906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65432',
internalId:  '',
customField: '20090327-152951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114352',
internalId:  '',
customField: '20090913-184858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140057',
internalId:  '',
customField: '20100302-090918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '154382',
internalId:  '',
customField: '20091207-130153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '173827',
internalId:  '',
customField: '20100222-161819'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2BHL';
var companyName   = 'OMNI+Otters+Swim+Club';
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();
};
