/* [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','5401',jdecode('Welcome'),jdecode(''),'/5401/index.html','true',[ 
		['PAGE','5801',jdecode('About+TaeKwonDo'),jdecode(''),'/5401/5801.html','true',[],''],
		['PAGE','5822',jdecode('Great+Benefits'),jdecode(''),'/5401/5822.html','true',[],''],
		['PAGE','5843',jdecode('Why+ATC%3F'),jdecode(''),'/5401/5843.html','true',[],''],
		['PAGE','6801',jdecode('TKD+Schedule'),jdecode(''),'/5401/6801.html','true',[],''],
		['PAGE','15001',jdecode('KBX+Schedule'),jdecode(''),'/5401/15001.html','true',[],'']
	],''],
	['PAGE','5885',jdecode('Founder'),jdecode(''),'/5885.html','true',[],''],
	['PAGE','5906',jdecode('Instructors'),jdecode(''),'/5906/index.html','true',[ 
		['PAGE','5927',jdecode('Sr.+Inst.+J.+Decker'),jdecode(''),'/5906/5927.html','true',[],''],
		['PAGE','5948',jdecode('Sr.+Inst.+D.+Decker'),jdecode(''),'/5906/5948.html','true',[],''],
		['PAGE','40801',jdecode('Coach+R.+Lee'),jdecode(''),'/5906/40801.html','true',[],''],
		['PAGE','37701',jdecode('J.+Baleshiski'),jdecode(''),'/5906/37701.html','true',[],''],
		['PAGE','37722',jdecode('J.+Decker+Jr.'),jdecode(''),'/5906/37722.html','true',[],'']
	],''],
	['PAGE','6011',jdecode('Basic+Programs'),jdecode(''),'/6011/index.html','true',[ 
		['PAGE','6032',jdecode('Little+Lions'),jdecode(''),'/6011/6032.html','true',[],''],
		['PAGE','6053',jdecode('Juniors'),jdecode(''),'/6011/6053.html','true',[],''],
		['PAGE','6074',jdecode('Teens%2FAdults'),jdecode(''),'/6011/6074.html','true',[],''],
		['PAGE','6095',jdecode('Family+Class'),jdecode(''),'/6011/6095.html','true',[],'']
	],''],
	['PAGE','6116',jdecode('Advanced+Programs'),jdecode(''),'/6116/index.html','true',[ 
		['PAGE','6137',jdecode('Sparring+Team'),jdecode(''),'/6116/6137.html','true',[],''],
		['PAGE','6179',jdecode('Flying+Tigers'),jdecode(''),'/6116/6179.html','true',[],'']
	],''],
	['PAGE','6221',jdecode('Fitness+Kickboxing'),jdecode(''),'/6221.html','true',[],''],
	['PAGE','6284',jdecode('Photo+Gallery'),jdecode(''),'/6284.html','true',[],''],
	['PAGE','28322',jdecode('Testimonials'),jdecode(''),'/28322.html','true',[],''],
	['PAGE','12701',jdecode('Contact+Us'),jdecode(''),'/12701/index.html','true',[ 
		['PAGE','6389',jdecode('Links'),jdecode(''),'/12701/6389.html','true',[],'']
	],''],
	['PAGE','12901',jdecode('Special+Offers'),jdecode(''),'/12901.html','true',[],'']];
var siteelementCount=27;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='000099';
theSitetree.keyvisualId='9242';
theSitetree.keyvisualName='kv4.swf';
theSitetree.fontsetId='17360';
theSitetree.graphicsetId='12755';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Transluszent',
				paletteFamily: 	'000099',
				keyvisualId: 	'9242',
				keyvisualName: 	'kv4.swf',
				fontsetId: 		'17360',
				graphicsetId: 	'12755',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				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:  '5401',
internalId:  '',
customField: '20090721-000656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20081007-020505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5822',
internalId:  '',
customField: '20081006-175110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5843',
internalId:  '',
customField: '20090125-110830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6801',
internalId:  '',
customField: '20100503-193449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5885',
internalId:  '',
customField: '20090924-201148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5906',
internalId:  '',
customField: '20090918-174731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5948',
internalId:  '',
customField: '20100503-192320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37722',
internalId:  '',
customField: '20090921-174450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37701',
internalId:  '',
customField: '20090923-164535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6011',
internalId:  '',
customField: '20081006-190851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5927',
internalId:  '',
customField: '20081006-220411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6032',
internalId:  '',
customField: '20090924-201218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6053',
internalId:  '',
customField: '20090924-201236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6074',
internalId:  '',
customField: '20081007-015729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6095',
internalId:  '',
customField: '20081006-223111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6116',
internalId:  '',
customField: '20081009-152303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6137',
internalId:  '',
customField: '20090930-175130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6179',
internalId:  '',
customField: '20090924-201520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6221',
internalId:  '',
customField: '20090924-201549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6284',
internalId:  '',
customField: '20090930-191956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6389',
internalId:  '',
customField: '20081006-211232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12701',
internalId:  '',
customField: '20090918-174843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12901',
internalId:  '',
customField: '20081007-015605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20100503-193538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40801',
internalId:  '',
customField: '20100503-192627'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28322',
internalId:  '',
customField: '20090125-105443'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INED5S';
var companyName   = 'American+TaeKwonDo+Center';
var htmlTitle	  = '';
var metaKeywords  = 'TaeKwonDoKarateMartial+ArtsSelf+DefenseKickboxingFitness+Clubs';
var metaContents  = 'TaeKwonDo+in+Prescott+Valley%2CAZKarate+in+Prescott+Valley%2CAZMartial+Arts+in+Prescott+Valley%2CAZSelf+Defense+in+Prescott+Valley%2CAZFitness+Kickboxing+in+Prescott+Valley%2CAZKarate+for+Kids+in+Prescott+Valley%2C+AZ';
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();
};
