/* [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','6101',jdecode('Home'),jdecode(''),'/6101.html','true',[],'',''],
	['PAGE','36801',jdecode('Guest+Book'),jdecode(''),'/36801.html','true',[],'',''],
	['PAGE','48001',jdecode('Sifu+Erick+Fallon'),jdecode(''),'/48001.html','true',[],'',''],
	['PAGE','12801',jdecode('Our+Team'),jdecode(''),'/12801.html','true',[],'',''],
	['PAGE','11164',jdecode('Coat+of+Arms'),jdecode(''),'/11164.html','true',[],'',''],
	['PAGE','11185',jdecode('Little+Tigars+Classes'),jdecode(''),'/11185.html','true',[],'',''],
	['PAGE','16401',jdecode('Kenpo+Classes'),jdecode(''),'/16401.html','true',[],'',''],
	['PAGE','16443',jdecode('Jr+Brazilian+Jiu-Jitsu'),jdecode(''),'/16443.html','true',[],'',''],
	['PAGE','16464',jdecode('Adult+Brazilian+Jiu+Jitsu'),jdecode(''),'/16464.html','true',[],'',''],
	['PAGE','40601',jdecode('Women%26%23x27%3Bs+Self-Defense'),jdecode(''),'/40601.html','true',[],'',''],
	['PAGE','41901',jdecode('+Cardio+Kick+Boxing'),jdecode(''),'/41901.html','true',[],'',''],
	['PAGE','11206',jdecode('Kenpo+History'),jdecode(''),'/11206.html','true',[],'',''],
	['PAGE','18401',jdecode('American+Kenpo'),jdecode(''),'/18401.html','true',[],'',''],
	['PAGE','11801',jdecode('Family+Tree'),jdecode(''),'/11801.html','true',[],'',''],
	['PAGE','11227',jdecode('What+Is+Kenpo%3F'),jdecode(''),'/11227.html','true',[],'',''],
	['PAGE','18001',jdecode('Kenpo+Creed'),jdecode(''),'/18001.html','true',[],'',''],
	['PAGE','11248',jdecode('What+Is+B.JJ%3F'),jdecode(''),'/11248.html','true',[],'',''],
	['PAGE','11269',jdecode('Our+Photos'),jdecode(''),'/11269.html','true',[],'',''],
	['PAGE','11290',jdecode('Philosophy'),jdecode(''),'/11290.html','true',[],'',''],
	['PAGE','11311',jdecode('Schedule'),jdecode(''),'/11311.html','true',[],'',''],
	['PAGE','11332',jdecode('Club+Newsletter'),jdecode(''),'/11332.html','true',[],'',''],
	['PAGE','11353',jdecode('Fan+Merchandising'),jdecode(''),'/11353.html','true',[],'',''],
	['PAGE','11374',jdecode('Interesting+links'),jdecode(''),'/11374.html','true',[],'',''],
	['PAGE','11395',jdecode('Join'),jdecode(''),'/11395.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Commander';
theSitetree.paletteFamily='87700';
theSitetree.keyvisualId='2375';
theSitetree.keyvisualName='autobruecke.jpg';
theSitetree.fontsetId='391';
theSitetree.graphicsetId='440';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E0E0E0';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Commander',
				paletteFamily: 	'87700',
				keyvisualId: 	'2375',
				keyvisualName: 	'autobruecke.jpg',
				fontsetId: 		'391',
				graphicsetId: 	'440',
				contentColor: 	'000000',
				contentBGColor: 'E0E0E0',
				a_color: 		'E0E0E0',
				b_color: 		'54601',
				c_color: 		'43A53C',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20090403-122458'
};
webappMappings['7060']=webappMappings['7060-e4c955a0bbea5b8453deba8027a73a20']={
webappId:    '7060',
documentId:  '11269',
internalId:  'e4c955a0bbea5b8453deba8027a73a20',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20100306-103728'
};
webappMappings['7080']=webappMappings['7080-51']={
webappId:    '7080',
documentId:  '6101',
internalId:  '51',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11269',
internalId:  '',
customField: '20090124-110938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11164',
internalId:  '',
customField: '20100223-120806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11185',
internalId:  '',
customField: '20100223-105040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20090124-165239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11227',
internalId:  '',
customField: '20100223-111525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11290',
internalId:  '',
customField: '20090121-124128'
};
webappMappings['1501']=webappMappings['1501-13109032']={
webappId:    '1501',
documentId:  '6101',
internalId:  '13109032',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16401',
internalId:  '',
customField: '20090222-131332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20090122-020626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16443',
internalId:  '',
customField: '20100223-105923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16464',
internalId:  '',
customField: '20100223-110251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11206',
internalId:  '',
customField: '20090114-010725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11248',
internalId:  '',
customField: '20090122-021354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11311',
internalId:  '',
customField: '20100223-113131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11332',
internalId:  '',
customField: '20100223-113301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11353',
internalId:  '',
customField: '20090203-113711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11374',
internalId:  '',
customField: '20100223-153835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11395',
internalId:  '',
customField: '20100222-105434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20100223-112712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40601',
internalId:  '',
customField: '20100223-145842'
};
webappMappings['1002']=webappMappings['1002-36801avfl30inp3dk']={
webappId:    '1002',
documentId:  '36801',
internalId:  '36801avfl30inp3dk',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36801',
internalId:  '',
customField: '20090124-111719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20090222-124825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48001',
internalId:  '',
customField: '20100225-112741'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INP3DK';
var companyName   = 'MARTIAL+ARTS+INSTITUTE';
var htmlTitle	  = '+Team+Martial+Arts+Institute';
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();
};
