/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','74601',jdecode('Rip+%26+Roll+U'),jdecode(''),'/74601.html','true',[],''],
	['PAGE','74622',jdecode('Team+Coaching'),jdecode(''),'/74622.html','false',[],''],
	['PAGE','161412',jdecode('Junior+Camps'),jdecode(''),'/161412.html','true',[],''],
	['PAGE','3327',jdecode('Facility+Management'),jdecode(''),'/3327.html','true',[],''],
	['PAGE','3222',jdecode('Staff'),jdecode(''),'/3222/index.html','true',[ 
		['PAGE','8701',jdecode('Tony+Sapio'),jdecode(''),'/3222/8701.html','true',[],''],
		['PAGE','8764',jdecode('Aaron+West'),jdecode(''),'/3222/8764.html','true',[],''],
		['PAGE','8743',jdecode('Eric+Becker'),jdecode(''),'/3222/8743.html','true',[],''],
		['PAGE','8722',jdecode('Thad+Arnold'),jdecode(''),'/3222/8722.html','true',[],''],
		['PAGE','8785',jdecode('%22Coach+D%22'),jdecode(''),'/3222/8785.html','true',[],''],
		['PAGE','146612',jdecode('Rafeael+Smith'),jdecode(''),'/3222/146612.html','true',[],''],
		['PAGE','141801',jdecode('Jonathan+Igbinovia'),jdecode(''),'/3222/141801.html','true',[],'']
	],''],
	['PAGE','140601',jdecode('Your+Serve+Tennis'),jdecode(''),'/140601.html','true',[],''],
	['PAGE','141501',jdecode('Monthly+Giveaway'),jdecode(''),'/141501/index.html','true',[ 
		['PAGE','143312',jdecode('Giveaway+Rules'),jdecode(''),'/141501/143312.html','true',[],'']
	],''],
	['PAGE','3369',jdecode('Contact+Us'),jdecode(''),'/3369.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Contrast';
theSitetree.paletteFamily='363C95';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16627';
theSitetree.graphicsetId='12215';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Contrast',
				paletteFamily: 	'363C95',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16627',
				graphicsetId: 	'12215',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100607-080105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161412',
internalId:  '',
customField: '20100326-193154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74601',
internalId:  '',
customField: '20100303-155529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74622',
internalId:  '',
customField: '20090406-040255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140601',
internalId:  '',
customField: '20100406-084708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3327',
internalId:  '',
customField: '20091113-005221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3222',
internalId:  '',
customField: '20100224-152724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8701',
internalId:  '',
customField: '20091208-010710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8722',
internalId:  '',
customField: '20091113-012531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8743',
internalId:  '',
customField: '20091110-193157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8764',
internalId:  '',
customField: '20091110-192509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8785',
internalId:  '',
customField: '20100224-152604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146612',
internalId:  '',
customField: '20091113-012729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3369',
internalId:  '',
customField: '20091104-175339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143312',
internalId:  '',
customField: '20091125-153144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141501',
internalId:  '',
customField: '20100406-084511'
};
webappMappings['7008']=webappMappings['7008-1496']={
webappId:    '7008',
documentId:  '141501',
internalId:  '1496',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141801',
internalId:  '',
customField: '20100124-045145'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABRI10INXXSN';
var companyName   = 'TENNIS+PROS+of+ATLANTA';
var htmlTitle	  = 'Tennis+Pros+of+Atlanta';
var metaKeywords  = 'tennis++pros+atlanta+ga+georgia+inctruction+professionals+your+serve+tennis+serious+summer+camp+junior+tennis';
var metaContents  = 'tennis++pros+atlanta+ga+georgia+inctruction+professionals+your+serve+tennis+serious+summer+camp+junior+tennis';
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();
};
