/* [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','39301',jdecode('Home'),jdecode(''),'/39301.html','true',[],'',''],
	['PAGE','801',jdecode('Quem+Somos'),jdecode(''),'/801.html','true',[],'',''],
	['PAGE','852',jdecode('Associa%C3%A7%C3%B5es+Filiadas'),jdecode(''),'/852.html','true',[],'',''],
	['PAGE','34501',jdecode('FOTOS'),jdecode(''),'/34501.html','true',[],'',''],
	['PAGE','176912',jdecode('+FIGURINHAS'),jdecode(''),'/176912.html','true',[],'',''],
	['PAGE','957',jdecode('Not%C3%ADcias'),jdecode(''),'/957.html','true',[],'',''],
	['PAGE','915',jdecode('Contato'),jdecode(''),'/915.html','true',[],'',''],
	['PAGE','76301',jdecode('Regulamentos+2009'),jdecode(''),'/76301.html','true',[],'',''],
	['PAGE','93101',jdecode('Geral'),jdecode(''),'/93101.html','true',[],'',''],
	['PAGE','85301',jdecode('Resultados+Jogos'),jdecode(''),'/85301.html','true',[],'',''],
	['PAGE','7722',jdecode('Sites+Recomendados'),jdecode(''),'/7722.html','true',[],'',''],
	['PAGE','21801',jdecode('Ligas'),jdecode(''),'/21801.html','true',[],'',''],
	['PAGE','55701',jdecode('Galeria+dos+Campe%C3%B5es'),jdecode(''),'/55701.html','true',[],'',''],
	['PAGE','55722',jdecode('Artilheiro+%5C+Goleiro+-+10'),jdecode(''),'/55722.html','true',[],'',''],
	['PAGE','10801',jdecode('Classifica%C3%A7%C3%A3o+1%C2%BA+Divis%C3%A3o+++'),jdecode(''),'/10801.html','true',[],'',''],
	['PAGE','72601',jdecode('Calend%C3%A1rio+Esportivo'),jdecode(''),'/72601.html','true',[],'',''],
	['PAGE','111001',jdecode('Uniligas+-+08'),jdecode(''),'/111001.html','true',[],'',''],
	['PAGE','100901',jdecode('Deixe+um+Recado'),jdecode(''),'/100901.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Match';
theSitetree.paletteFamily='8FB7DA';
theSitetree.keyvisualId='2714';
theSitetree.keyvisualName='kv_2714.jpg';
theSitetree.fontsetId='10701';
theSitetree.graphicsetId='10632';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CDE4F7';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Match',
				paletteFamily: 	'8FB7DA',
				keyvisualId: 	'2714',
				keyvisualName: 	'kv_2714.jpg',
				fontsetId: 		'10701',
				graphicsetId: 	'10632',
				contentColor: 	'000000',
				contentBGColor: 'CDE4F7',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'EE0202',
				e_color: 		'707070',
				f_color: 		'707070',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '39301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '39301',
internalId:  '1501',
customField: '1501'
};
webappMappings['1501']=webappMappings['1501-4104812']={
webappId:    '1501',
documentId:  '39301',
internalId:  '4104812',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39301',
internalId:  '',
customField: '20100104-104447'
};
webappMappings['7060']=webappMappings['7060-172c6eff256f46edcdc16b8c23ec0dd9']={
webappId:    '7060',
documentId:  '34501',
internalId:  '172c6eff256f46edcdc16b8c23ec0dd9',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20070614-142741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20080928-075650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34501',
internalId:  '',
customField: '20080422-004848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '957',
internalId:  '',
customField: '20080928-075941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '915',
internalId:  '',
customField: '20070822-175748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76301',
internalId:  '',
customField: '20100319-100208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93101',
internalId:  '',
customField: '20080422-003732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85301',
internalId:  '',
customField: '20100705-081625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7722',
internalId:  '',
customField: '20080503-055507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20080422-074751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55701',
internalId:  '',
customField: '20080422-004618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55722',
internalId:  '',
customField: '20100225-091052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10801',
internalId:  '',
customField: '20100105-120914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72601',
internalId:  '',
customField: '20100107-114431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111001',
internalId:  '',
customField: '20080928-074913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100901',
internalId:  '',
customField: '20100105-120308'
};
webappMappings['7060']=webappMappings['7060-731cdf0a004c0a74ada8efa4a2e048f2']={
webappId:    '7060',
documentId:  '176912',
internalId:  '731cdf0a004c0a74ada8efa4a2e048f2',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176912',
internalId:  '',
customField: '20100402-145355'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN3NWU';
var companyName   = 'LIGA++MAUAENSE+DE+FUTEBOL';
var htmlTitle	  = 'LIGA+MAUAENSE+DE+FUTEBOL+-+aonde+o+futebol+acontece';
var metaKeywords  = 'futebol+amador+mau%C3%A1';
var metaContents  = 'Campeonatos+amadores+de+futebol+de+campo%2C+aqui+voc%C3%AA+encontrar%C3%A1+tabelas%2C+divis%C3%B5es%2C+clubes%2C+bolas%2C+chuteiras%2C+caneleiras%2C+publicidade%2C+anuncie%2C+campo%2C+futebol%2C+t%C3%A9cnicos%2C+jogadores...%2C+etc.+';
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();
};
