/* [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','13812',jdecode('Web+Home'),jdecode(''),'/13812.html','true',[],'',''],
	['PAGE','20612',jdecode('Martial+Arts'),jdecode(''),'/20612/index.html','true',[ 
		['PAGE','20633',jdecode('Who+am+I%3F'),jdecode(''),'/20612/20633.html','true',[],'',''],
		['PAGE','20654',jdecode('Tien+Tae+Jitsu'),jdecode(''),'/20612/20654.html','true',[],'',''],
		['PAGE','20675',jdecode('Tien+T%26%23x27%3Bai+Chi'),jdecode(''),'/20612/20675.html','true',[],'',''],
		['PAGE','20696',jdecode('Self+Defense'),jdecode(''),'/20612/20696.html','true',[],'',''],
		['PAGE','20717',jdecode('Kickboxing'),jdecode(''),'/20612/20717.html','true',[],'',''],
		['PAGE','26412',jdecode('Upcoming+Events'),jdecode(''),'/20612/26412.html','true',[],'',''],
		['PAGE','20738',jdecode('Class+locations'),jdecode(''),'/20612/20738.html','true',[],'',''],
		['PAGE','27012',jdecode('Map--TTJ'),jdecode(''),'/20612/27012.html','true',[],'',''],
		['PAGE','20759',jdecode('Contact'),jdecode(''),'/20612/20759.html','true',[],'',''],
		['PAGE','24212',jdecode('TTJ+Links'),jdecode(''),'/20612/24212.html','true',[],'','']
	],'',''],
	['PAGE','20780',jdecode('Art'),jdecode(''),'/20780/index.html','true',[ 
		['PAGE','20801',jdecode('Who+Am+I%3F'),jdecode(''),'/20780/20801.html','true',[],'',''],
		['PAGE','20822',jdecode('Art+Bio+'),jdecode(''),'/20780/20822.html','true',[],'',''],
		['PAGE','20843',jdecode('Sculptures'),jdecode(''),'/20780/20843.html','true',[],'',''],
		['PAGE','20864',jdecode('Purchase+Info'),jdecode(''),'/20780/20864.html','true',[],'',''],
		['PAGE','20885',jdecode('Casting+Info'),jdecode(''),'/20780/20885.html','true',[],'',''],
		['PAGE','20906',jdecode('Contact+for+Art'),jdecode(''),'/20780/20906.html','true',[],'',''],
		['PAGE','20927',jdecode('Art+Links'),jdecode(''),'/20780/20927.html','true',[],'','']
	],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Circulation';
theSitetree.paletteFamily='FC2323';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10381';
theSitetree.graphicsetId='10561';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Circulation',
				paletteFamily: 	'FC2323',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10381',
				graphicsetId: 	'10561',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13812',
internalId:  '',
customField: '20110405-163342'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '13812',
internalId:  '1006',
customField: '1006'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '13812',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20612',
internalId:  '',
customField: '20110310-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20633',
internalId:  '',
customField: '20110405-165049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20738',
internalId:  '',
customField: '20110403-174949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20654',
internalId:  '',
customField: '20110405-165351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20675',
internalId:  '',
customField: '20110405-170941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20759',
internalId:  '',
customField: '20110403-175049'
};
webappMappings['7008']=webappMappings['7008-11001']={
webappId:    '7008',
documentId:  '20759',
internalId:  '11001',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20906',
internalId:  '',
customField: '20110310-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20696',
internalId:  '',
customField: '20110310-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20717',
internalId:  '',
customField: '20110310-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20780',
internalId:  '',
customField: '20110310-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20801',
internalId:  '',
customField: '20110310-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20822',
internalId:  '',
customField: '20110310-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20843',
internalId:  '',
customField: '20110310-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20864',
internalId:  '',
customField: '20110310-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20885',
internalId:  '',
customField: '20110310-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20927',
internalId:  '',
customField: '20110310-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24212',
internalId:  '',
customField: '20110403-191934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26412',
internalId:  '',
customField: '20110405-171231'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '27012',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27012',
internalId:  '',
customField: '20110403-190852'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INZRO7';
var companyName   = 'Celene+Greene%2C+Ltd.';
var htmlTitle	  = 'Celene+Greene%2C+Ltd.--Bronze+Sculptures+and+Martial+Arts+Classes+for+Health+%26+Self+Defense';
var metaKeywords  = 'martial+arts%2C+tien+tae+jitsu%2C+t%27ai+chi%2C+self+defense%2C+little+dragons%2C+karate%2C+taekwondo%2C+jujitsu%2C+ninjitsu%2C+kenpo%2C+muay+thai%2C+fitness%2C+family+fitness%2C+art%2C+sculpture%2C+three-dimensional+art%2C+metal+sculpture%2C+bronze+sculpture%2C+wildlife+sculpture%2C+equine+sculpture%2C+canine+sculpture%2C+dogs%2C+horses%2C+figurative+sculpture%2C+western+sculpture';
var metaContents  = 'Martial+Arts+for+ages+4+to+100--Tien+Tae+Jitsu%2C+Tien+T%27ai+Chi%2C+Little+Dragons%2C+Self+Defense+for+adults+and+children.++Fitness%2C+health%2C+self+confidence%2C+safety%2C+and+life+lessons+for+all%21++On+the+opposite+half+of+yin+and+yang%2C+is+the+art+of+bronze+sculpture.++An+award-winning+bronze+sculptor%2C+Celene+Greene%27s+work+displays+life%2C+energy+and+power.';
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();
};

