/* [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','501',jdecode('Academia'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','15461',jdecode('Localiza%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F15461.html'), 'true',[],'',''],
	['PAGE','146123',jdecode('Fale+Conosco'),jdecode(''), jdecode('%2F146123.html'), 'true',[],'',''],
	['PAGE','15251',jdecode('Hor%C3%A1rios+das+Atividades'),jdecode(''), jdecode('%2F15251.html'), 'true',[],'',''],
	['PAGE','14201',jdecode('Nossas+Instala%C3%A7%C3%B5es'),jdecode(''), jdecode('%2F14201.html'), 'true',[],'',''],
	['PAGE','146144',jdecode('Nata%C3%A7%C3%A3o+e+Hidrogin%C3%A1stica'),jdecode(''), jdecode('%2F146144%2Findex.html'), 'true',[ 
		['PAGE','122712',jdecode('Piscina+com+Oz%C3%B4nio'),jdecode(''), jdecode('%2F146144%2F122712.html'), 'true',[],'','']
	],'',''],
	['PAGE','146165',jdecode('Muscula%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F146165.html'), 'true',[],'',''],
	['PAGE','146186',jdecode('Jiu-Jitsu'),jdecode(''), jdecode('%2F146186.html'), 'true',[],'',''],
	['PAGE','14222',jdecode('Jud%C3%B4'),jdecode(''), jdecode('%2F14222%2Findex.html'), 'true',[ 
		['PAGE','15272',jdecode('Projeto+Social'),jdecode(''), jdecode('%2F14222%2F15272.html'), 'true',[],'',''],
		['PAGE','14411',jdecode('T%C3%ADtulos+Conquistados'),jdecode(''), jdecode('%2F14222%2F14411.html'), 'true',[],'',''],
		['PAGE','14432',jdecode('Quadro+de+Medalhas'),jdecode(''), jdecode('%2F14222%2F14432.html'), 'true',[],'',''],
		['PAGE','121712',jdecode('Faixa+Preta'),jdecode(''), jdecode('%2F14222%2F121712.html'), 'true',[],'','']
	],'',''],
	['PAGE','116201',jdecode('Patrocinadores+do+Jud%C3%B4'),jdecode(''), jdecode('%2F116201.html'), 'true',[],'',''],
	['PAGE','135612',jdecode('Marcos+Mercadante'),jdecode(''), jdecode('%2F135612%2Findex.html'), 'true',[ 
		['PAGE','135633',jdecode('Biografia'),jdecode(''), jdecode('%2F135612%2F135633.html'), 'true',[],'',''],
		['PAGE','130012',jdecode('Hist%C3%B3rico'),jdecode(''), jdecode('%2F135612%2F130012.html'), 'true',[],'','']
	],'',''],
	['PAGE','123812',jdecode('Nath%C3%A1lia+Mercadante'),jdecode(''), jdecode('%2F123812%2Findex.html'), 'true',[ 
		['PAGE','124312',jdecode('Biografia'),jdecode(''), jdecode('%2F123812%2F124312.html'), 'true',[],'',''],
		['PAGE','124333',jdecode('Hist%C3%B3rico+'),jdecode(''), jdecode('%2F123812%2F124333.html'), 'true',[],'','']
	],'',''],
	['PAGE','155634',jdecode('Matheus+Mercadante'),jdecode(''), jdecode('%2F155634%2Findex.html'), 'true',[ 
		['PAGE','155655',jdecode('Biografia'),jdecode(''), jdecode('%2F155634%2F155655.html'), 'true',[],'',''],
		['PAGE','155676',jdecode('Hist%C3%B3rico'),jdecode(''), jdecode('%2F155634%2F155676.html'), 'true',[],'','']
	],'',''],
	['PAGE','125512',jdecode('Not%C3%ADcias'),jdecode(''), jdecode('%2F125512.html'), 'true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Trend';
theSitetree.paletteFamily='3F70CF';
theSitetree.keyvisualId='7928';
theSitetree.keyvisualName='kv_7928.jpg';
theSitetree.fontsetId='16910';
theSitetree.graphicsetId='12323';
theSitetree.contentColor='163D88';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0X9A9'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Trend',
				paletteFamily: 	'3F70CF',
				keyvisualId: 	'7928',
				keyvisualName: 	'kv_7928.jpg',
				fontsetId: 		'16910',
				graphicsetId: 	'12323',
				contentColor: 	'163D88',
				contentBGColor: 'FFFFFF',
				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['1501']=webappMappings['1501-2156519']={
webappId:    '1501',
documentId:  '501',
internalId:  '2156519',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125512',
internalId:  '',
customField: '20120116-121915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20110903-095213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15461',
internalId:  '',
customField: '20110902-185848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146123',
internalId:  '',
customField: '20110219-121057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15251',
internalId:  '',
customField: '20110902-191456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20110903-100716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146144',
internalId:  '',
customField: '20080209-131554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122712',
internalId:  '',
customField: '20071108-130859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146165',
internalId:  '',
customField: '20110903-081136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146186',
internalId:  '',
customField: '20080209-124505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14222',
internalId:  '',
customField: '20110903-081936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15272',
internalId:  '',
customField: '20071017-095634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14411',
internalId:  '',
customField: '20110919-154148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14432',
internalId:  '',
customField: '20091231-072455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121712',
internalId:  '',
customField: '20110916-134720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116201',
internalId:  '',
customField: '20110903-093759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135612',
internalId:  '',
customField: '20071027-073949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135633',
internalId:  '',
customField: '20080619-174258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130012',
internalId:  '',
customField: '20110920-074823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123812',
internalId:  '',
customField: '20110903-093653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124312',
internalId:  '',
customField: '20071022-123741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124333',
internalId:  '',
customField: '20110920-080651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155634',
internalId:  '',
customField: '20090110-155642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155676',
internalId:  '',
customField: '20090110-152518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155655',
internalId:  '',
customField: '20090110-141051'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INEQFT';
var companyName   = 'Associa%C3%A7%C3%A3o+Marcos+Mercadante+de+Jud%C3%B4';
var htmlTitle	  = 'ASSOCIA%C3%87%C3%83O+MARCOS+MERCADANTE+DE+JUD%C3%94+-+ARARAS%2FSP+-+%2819%29+3544-3033';
var metaKeywords  = '%28www.mercadante.org.br+%29++%28Associa%C3%A7%C3%A3o+Marcos+Mercadante+de+Jud%C3%B4%29+%28Nata%C3%A7%C3%A3o%29++%28Hidrogin%C3%A1stica%29++';
var metaContents  = '%28Associa%C3%A7%C3%A3o+Marcos+Mercadante+de+Jud%C3%B4%29++%28Academia+Mercadante%29++%28Nata%C3%A7%C3%A3o+Mercadante%29++%28Hidrogin%C3%A1stica+Mercadante%29++%28Muscula%C3%A7%C3%A3o+Mercadante%29++%28Jud%C3%B4+Mercadante%29';
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();
};

