/* [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','4901',jdecode('Home'),jdecode(''), jdecode('%2F4901.html'), 'true',[],'',''],
	['PAGE','5401',jdecode('Classes+and+Prices+'),jdecode(''), jdecode('%2F5401%2Findex.html'), 'true',[ 
		['PAGE','30001',jdecode('Toddler+Classes'),jdecode(''), jdecode('%2F5401%2F30001.html'), 'true',[],'',''],
		['PAGE','5527',jdecode('Our+team'),jdecode(''), jdecode('%2F5401%2F5527.html'), 'true',[],'','']
	],'',''],
	['PAGE','5422',jdecode('Schedule'),jdecode(''), jdecode('%2F5422.html'), 'true',[],'',''],
	['PAGE','5506',jdecode('About+us'),jdecode(''), jdecode('%2F5506.html'), 'true',[],'',''],
	['PAGE','28001',jdecode('Contact+us'),jdecode(''), jdecode('%2F28001.html'), 'true',[],'',''],
	['PAGE','20601',jdecode('Calendar'),jdecode(''), jdecode('%2F20601.html'), 'true',[],'',''],
	['PAGE','14401',jdecode('Gym+News'),jdecode(''), jdecode('%2F14401.html'), 'true',[],'',''],
	['PAGE','30901',jdecode('Newsletters+'),jdecode(''), jdecode('%2F30901.html'), 'true',[],'',''],
	['PAGE','5464',jdecode('Links'),jdecode(''), jdecode('%2F5464.html'), 'true',[],'',''],
	['PAGE','26301',jdecode('Informed+Consent'),jdecode(''), jdecode('%2F26301.html'), 'true',[],'',''],
	['PAGE','7422',jdecode('Media+Album'),jdecode(''), jdecode('%2F7422.html'), 'true',[],'',''],
	['PAGE','23001',jdecode('2010+Photos'),jdecode(''), jdecode('%2F23001.html'), 'true',[],'',''],
	['PAGE','31001',jdecode('Testimonials+'),jdecode(''), jdecode('%2F31001.html'), 'true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='9900CC';
theSitetree.keyvisualId='9242';
theSitetree.keyvisualName='kv4.swf';
theSitetree.fontsetId='17364';
theSitetree.graphicsetId='12760';
theSitetree.contentColor='9900CC';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Transluszent',
				paletteFamily: 	'9900CC',
				keyvisualId: 	'9242',
				keyvisualName: 	'kv4.swf',
				fontsetId: 		'17364',
				graphicsetId: 	'12760',
				contentColor: 	'9900CC',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20101122-112428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20110209-091636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5422',
internalId:  '',
customField: '20110209-091111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5464',
internalId:  '',
customField: '20110209-090626'
};
webappMappings['7060']=webappMappings['7060-e48e5e842f2ca4fb0ccbcb0c46eda2cc']={
webappId:    '7060',
documentId:  '30001',
internalId:  'e48e5e842f2ca4fb0ccbcb0c46eda2cc',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5506',
internalId:  '',
customField: '20110205-143355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5527',
internalId:  '',
customField: '20110205-184201'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4901',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-12244191']={
webappId:    '1501',
documentId:  '4901',
internalId:  '12244191',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28001',
internalId:  '',
customField: '20110206-113655'
};
webappMappings['7050']=webappMappings['7050-6494']={
webappId:    '7050',
documentId:  '14401',
internalId:  '6494',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26301',
internalId:  '',
customField: '20110205-215942'
};
webappMappings['7060']=webappMappings['7060-0f511cc35ee9be9f4543989bed6f1abe']={
webappId:    '7060',
documentId:  '7422',
internalId:  '0f511cc35ee9be9f4543989bed6f1abe',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7422',
internalId:  '',
customField: '20110205-174832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20110205-213108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20110205-213157'
};
webappMappings['7060']=webappMappings['7060-7ba4c3bcc223641bd5ba39691fbecab4']={
webappId:    '7060',
documentId:  '23001',
internalId:  '7ba4c3bcc223641bd5ba39691fbecab4',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20101028-131129'
};
webappMappings['7060']=webappMappings['7060-4aa2103abaca0e426ff19df794f8f6fc']={
webappId:    '7060',
documentId:  '5527',
internalId:  '4aa2103abaca0e426ff19df794f8f6fc',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-e268176e38ed6d320c638f660bb388d0']={
webappId:    '7060',
documentId:  '4901',
internalId:  'e268176e38ed6d320c638f660bb388d0',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20110206-111310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30901',
internalId:  '',
customField: '20110208-105106'
};
webappMappings['7008']=webappMappings['7008-22512']={
webappId:    '7008',
documentId:  '28001',
internalId:  '22512',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-avfl30inp2g812e05ff33c8']={
webappId:    '1003',
documentId:  '31001',
internalId:  'avfl30inp2g812e05ff33c8',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31001',
internalId:  '',
customField: '20110208-120943'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INP2G8';
var companyName   = 'Small+Wonders+Gymnastics';
var htmlTitle	  = 'Gymnastics';
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();
};

