/* [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','11',jdecode('P%C3%81GINA+INICIAL'),jdecode(''),'/11.html','true',[],'',''],
	['PAGE','1073',jdecode('NOSSA+HIST%C3%93RIA'),jdecode(''),'/1073.html','true',[],'',''],
	['PAGE','3153',jdecode('RODRIGO+ANDRADE+'),jdecode(''),'/3153.html','true',[],'',''],
	['PAGE','3283',jdecode('ACESS%C3%93RIOS'),jdecode(''),'/3283/index.html','true',[ 
		['PAGE','3058',jdecode('ACESS%C3%93RIOS+DIVERSOS'),jdecode(''),'/3283/3058.html','true',[],'',''],
		['PAGE','2757',jdecode('POLO-ACESS%C3%93RIOS+'),jdecode(''),'/3283/2757.html','true',[],'','']
	],'',''],
	['PAGE','1354',jdecode('SELAS+DE+POLO'),jdecode(''),'/1354.html','true',[],'',''],
	['PAGE','2804',jdecode('SELAS+DE+HIPISMO'),jdecode(''),'/2804.html','true',[],'',''],
	['PAGE','2854',jdecode('SELA+AUSTRALIANA'),jdecode(''),'/2854.html','true',[],'',''],
	['PAGE','19801',jdecode('EQUOTERAPIA'),jdecode(''),'/19801/index.html','true',[ 
		['PAGE','22201',jdecode('SELAS+P%2F+EQUOTERAPIA'),jdecode(''),'/19801/22201.html','true',[],'','']
	],'',''],
	['PAGE','3535',jdecode('SERVI%C3%87OS+%28Reformas%29'),jdecode(''),'/3535.html','true',[],'',''],
	['PAGE','3655',jdecode('FALE+CONOSCO'),jdecode(''),'/3655/index.html','true',[ 
		['PAGE','3707',jdecode('Novo+%28p%C3%A1gina+seguir%29'),jdecode(''),'/3655/3707.html','false',[],'','']
	],'',''],
	['PAGE','3773',jdecode('COMENT%C3%81RIOS'),jdecode(''),'/3773/index.html','true',[ 
		['PAGE','3772',jdecode('COMENT%C3%81RIOS'),jdecode(''),'/3773/3772.html','false',[],'','']
	],'',''],
	['PAGE','14101',jdecode('+FOMOS+DESTAQUE'),jdecode(''),'/14101.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Match';
theSitetree.paletteFamily='A1C183';
theSitetree.keyvisualId='2708';
theSitetree.keyvisualName='kv_2708.jpg';
theSitetree.fontsetId='33571';
theSitetree.graphicsetId='10634';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='DBE9CF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Match',
				paletteFamily: 	'A1C183',
				keyvisualId: 	'2708',
				keyvisualName: 	'kv_2708.jpg',
				fontsetId: 		'33571',
				graphicsetId: 	'10634',
				contentColor: 	'000000',
				contentBGColor: 'DBE9CF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'306102',
				e_color: 		'707070',
				f_color: 		'707070',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1075349']={
webappId:    '1501',
documentId:  '11',
internalId:  '1075349',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-3773avec10in2b4t']={
webappId:    '1002',
documentId:  '3773',
internalId:  '3773avec10in2b4t',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-0126dae13f00f4c50dc50440fed4dac6']={
webappId:    '7060',
documentId:  '1354',
internalId:  '0126dae13f00f4c50dc50440fed4dac6',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-16ef8f9a9901e54715b9629a7bb825d3']={
webappId:    '7060',
documentId:  '2757',
internalId:  '16ef8f9a9901e54715b9629a7bb825d3',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-92defd2eaf31ab157517fc99e87666b9']={
webappId:    '7060',
documentId:  '2804',
internalId:  '92defd2eaf31ab157517fc99e87666b9',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-5ff69279a4a906912a8cd9d49c7e3108']={
webappId:    '7060',
documentId:  '2854',
internalId:  '5ff69279a4a906912a8cd9d49c7e3108',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-b2eaeff77ffd0b7dd71d45315a801de3']={
webappId:    '7060',
documentId:  '3058',
internalId:  'b2eaeff77ffd0b7dd71d45315a801de3',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-cb5d97c42ed787634af63f05f3a2af46']={
webappId:    '7060',
documentId:  '3153',
internalId:  'cb5d97c42ed787634af63f05f3a2af46',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20100320-074414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20091212-084638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1073',
internalId:  '',
customField: '20080510-071200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3153',
internalId:  '',
customField: '20060328-190046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3283',
internalId:  '',
customField: '20091212-085913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3058',
internalId:  '',
customField: '20060315-195608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2757',
internalId:  '',
customField: '20060315-195420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1354',
internalId:  '',
customField: '20090226-121949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2804',
internalId:  '',
customField: '20091212-084315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2854',
internalId:  '',
customField: '20090226-121849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3535',
internalId:  '',
customField: '20060328-195725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3655',
internalId:  '',
customField: '20070219-164325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3707',
internalId:  '',
customField: '20060502-175137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3773',
internalId:  '',
customField: '20091212-082955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3772',
internalId:  '',
customField: '20071130-125821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14101',
internalId:  '',
customField: '20080510-073338'
};
webappMappings['7060']=webappMappings['7060-de694a97b5d0c63439734e52c5fe05d4']={
webappId:    '7060',
documentId:  '22201',
internalId:  'de694a97b5d0c63439734e52c5fe05d4',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22201',
internalId:  '',
customField: '20090227-084402'
};
webappMappings['7008']=webappMappings['7008-9854']={
webappId:    '7008',
documentId:  '3655',
internalId:  '9854',
customField: 'language:pt;country:BR;'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2B4T';
var companyName   = '+++++++++++SELARIA+ALVES';
var htmlTitle	  = '';
var metaKeywords  = 'selaria+alves%2Csela%2C+sela+de+p%C3%B3lo%2Csela+de+h%C3%ADpismo%2Csela+de+salto%2Csela+de+passeio%2Ccavalos%2Chorse%2Cjump%2Cmangalarga%2Cpuro-sangue%2Ccavalo+arabe%2Candaluz%2Carreio%2Cbarrigueiras%2Ccabe%C3%A7adas%2Cmartingal%2Cr%C3%A9deas%2Cestrivos%2C+estrivo+r%C3%ADgido%2Cestrivo+articulado%2Ch%C3%ADpica%2Cprova+do+la%C3%A7o%2Cbaliza+e+tambor%2Crodeio%2Cpe%C3%A3o%2Ccabresto%2Cjoelheira%2Cpolaina%2Cbotina%2CGabriel+Alves%2Calves%2CFranca%2Cloro%2CRodrigo+Andrade%2CHelvetia%2CEQUOTERAPIA%2CANDE%2Chipismo%2C+estribos';
var metaContents  = 'Especializada+na+fabrica%C3%A7%C3%A3o+e+manuten%C3%A7%C3%A3o+de+selas+para+h%C3%ADpismo++%28+salto%29+e+P%C3%B3lo%2C+venda+de+acess%C3%B3rios+para+esportes+equestres+e+equoterapia.';
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();
};
