/* [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 theSitetree=[ 
	['PAGE','401',jdecode('A+EMPRESA'),jdecode(''),'/401/index.html','true',[ 
		['PAGE','473',jdecode('Valores'),jdecode(''),'/401/473.html','true',[],''],
		['PAGE','15801',jdecode('Miss%C3%A3o'),jdecode(''),'/401/15801.html','true',[],''],
		['PAGE','15822',jdecode('Neg%C3%B3cio'),jdecode(''),'/401/15822.html','true',[],''],
		['PAGE','494',jdecode('Atendimento'),jdecode(''),'/401/494.html','true',[],'']
	],''],
	['PAGE','515',jdecode('Servi%C3%A7os'),jdecode(''),'/515/index.html','true',[ 
		['PAGE','536',jdecode('Resfriamento'),jdecode(''),'/515/536.html','true',[],''],
		['PAGE','557',jdecode('Higi%C3%AAne'),jdecode(''),'/515/557.html','true',[],''],
		['PAGE','15864',jdecode('Manejo'),jdecode(''),'/515/15864.html','true',[],''],
		['PAGE','578',jdecode('Reprodu%C3%A7%C3%A3o'),jdecode(''),'/515/578.html','true',[],'']
	],''],
	['PAGE','599',jdecode('Produtos'),jdecode(''),'/599/index.html','true',[ 
		['PAGE','620',jdecode('DeLaval'),jdecode(''),'/599/620.html','true',[],''],
		['PAGE','641',jdecode('Sloten'),jdecode(''),'/599/641.html','true',[],''],
		['PAGE','15885',jdecode('Semen'),jdecode(''),'/599/15885.html','true',[],'']
	],''],
	['PAGE','14201',jdecode('INFORMES'),jdecode(''),'/14201/index.html','true',[ 
		['PAGE','15906',jdecode('Artigos'),jdecode(''),'/14201/15906.html','true',[],''],
		['PAGE','15927',jdecode('Palestras'),jdecode(''),'/14201/15927.html','true',[],''],
		['PAGE','15948',jdecode('Eventos'),jdecode(''),'/14201/15948.html','true',[],'']
	],''],
	['PAGE','15969',jdecode('Ordenhador'),jdecode(''),'/15969/index.html','true',[ 
		['PAGE','15990',jdecode('Perfil'),jdecode(''),'/15969/15990.html','true',[],''],
		['PAGE','16011',jdecode('Treinamentos'),jdecode(''),'/15969/16011.html','true',[],''],
		['PAGE','16032',jdecode('Destaque'),jdecode(''),'/15969/16032.html','true',[],''],
		['PAGE','16053',jdecode('Cursos'),jdecode(''),'/15969/16053.html','true',[],'']
	],''],
	['PAGE','16074',jdecode('Inseminador'),jdecode(''),'/16074/index.html','true',[ 
		['PAGE','16095',jdecode('Perfil'),jdecode(''),'/16074/16095.html','true',[],''],
		['PAGE','16116',jdecode('Treinamentos'),jdecode(''),'/16074/16116.html','true',[],''],
		['PAGE','16137',jdecode('Destaque'),jdecode(''),'/16074/16137.html','true',[],''],
		['PAGE','16158',jdecode('Cursos'),jdecode(''),'/16074/16158.html','true',[],'']
	],''],
	['PAGE','20001',jdecode('%C3%81lbum+de+Fotos'),jdecode(''),'/20001.html','true',[],''],
	['PAGE','19601',jdecode('Receitas+%28Blog%21%29'),jdecode(''),'/19601.html','true',[],''],
	['PAGE','16200',jdecode('Educ.+Ambiental'),jdecode(''),'/16200/index.html','true',[ 
		['PAGE','16221',jdecode('Reserva+Legal'),jdecode(''),'/16200/16221.html','true',[],'']
	],''],
	['PAGE','16242',jdecode('Reciclagem'),jdecode(''),'/16242.html','true',[],''],
	['PAGE','16263',jdecode('Bibliovideoteca'),jdecode(''),'/16263.html','true',[],''],
	['PAGE','13706',jdecode('Livro+de+visitas'),jdecode(''),'/13706/index.html','true',[ 
		['PAGE','13701',jdecode('Mensagens'),jdecode(''),'/13706/13701.html','false',[],'']
	],''],
	['PAGE','20701',jdecode('Fale+Conosco'),jdecode(''),'/20701.html','true',[],'']];
var siteelementCount=37;
theSitetree.topTemplateName='Holz';
theSitetree.paletteFamily='FF7113';
theSitetree.keyvisualId='8822';
theSitetree.keyvisualName='KV_08.swf';
theSitetree.fontsetId='17181';
theSitetree.graphicsetId='12655';
theSitetree.contentColor='262626';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Holz',
				paletteFamily: 	'FF7113',
				keyvisualId: 	'8822',
				keyvisualName: 	'KV_08.swf',
				fontsetId: 		'17181',
				graphicsetId: 	'12655',
				contentColor: 	'262626',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'FF6600',
				d_color: 		'FFFFFF',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-13706avec10inpo59']={
webappId:    '1002',
documentId:  '13706',
internalId:  '13706avec10inpo59',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-11598567']={
webappId:    '1501',
documentId:  '401',
internalId:  '11598567',
customField: '1501'
};
webappMappings['7050']=webappMappings['7050-122']={
webappId:    '7050',
documentId:  '19601',
internalId:  '122',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-7d1371ea46be4e64348655e70b1e1e8e']={
webappId:    '7060',
documentId:  '20001',
internalId:  '7d1371ea46be4e64348655e70b1e1e8e',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-873']={
webappId:    '7008',
documentId:  '20701',
internalId:  '873',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20081211-074213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20081006-204732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15822',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20081006-204732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20081006-204732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20081006-204732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20081006-204732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15864',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20081006-204732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20081009-132500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20081009-134008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20081006-204732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15885',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20081009-130911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15906',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15927',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15948',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15969',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15990',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16011',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16032',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16053',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16074',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16095',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16116',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16137',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16158',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20001',
internalId:  '',
customField: '20081112-124820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19601',
internalId:  '',
customField: '20081211-072754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16200',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16221',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16242',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16263',
internalId:  '',
customField: '20081101-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13706',
internalId:  '',
customField: '20081007-173545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13701',
internalId:  '',
customField: '20081007-173545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20701',
internalId:  '',
customField: '20081112-125137'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPO59';
var companyName   = 'CONFIAN%C3%87A+%26+TECNOLOGIA';
var htmlTitle	  = 'MERCADO+RURAL';
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();
};
