/* [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('PRINCIPAL'),jdecode(''),'/11.html','true',[],'',''],
	['PAGE','79901',jdecode('REPRESENTADAS+NO+MS'),jdecode(''),'/79901/index.html','true',[ 
		['PAGE','86',jdecode('C+B+C'),jdecode(''),'/79901/86.html','true',[],'',''],
		['PAGE','81101',jdecode('CONDOR'),jdecode(''),'/79901/81101.html','true',[],'',''],
		['PAGE','17545',jdecode('H%C3%84FELE'),jdecode(''),'/79901/17545.html','true',[],'',''],
		['PAGE','81143',jdecode('IMBEL'),jdecode(''),'/79901/81143.html','true',[],'',''],
		['PAGE','14709',jdecode('MUNDIAL+SA'),jdecode(''),'/79901/14709.html','true',[],'',''],
		['PAGE','81164',jdecode('V%C3%89RTICE'),jdecode(''),'/79901/81164.html','true',[],'','']
	],'',''],
	['PAGE','79922',jdecode('REPRESENTADAS+NO+CE'),jdecode(''),'/79922/index.html','true',[ 
		['PAGE','81185',jdecode('CONDOR'),jdecode(''),'/79922/81185.html','true',[],'',''],
		['PAGE','81227',jdecode('IMBEL'),jdecode(''),'/79922/81227.html','true',[],'',''],
		['PAGE','81248',jdecode('V%C3%89RTICE'),jdecode(''),'/79922/81248.html','true',[],'','']
	],'',''],
	['PAGE','55701',jdecode('TEND%C3%8ANCIAS%2FDEBATES'),jdecode(''),'/55701.html','true',[],'',''],
	['PAGE','16349',jdecode('LINKS'),jdecode(''),'/16349.html','true',[],'',''],
	['PAGE','1201',jdecode('FOTOS'),jdecode(''),'/1201.html','true',[],'',''],
	['PAGE','41',jdecode('CONTATO'),jdecode(''),'/41/index.html','true',[ 
		['PAGE','1474',jdecode('CONTATO+%28p%C3%A1gina+seguir%29'),jdecode(''),'/41/1474.html','false',[],'','']
	],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Trend';
theSitetree.paletteFamily='619A45';
theSitetree.keyvisualId='7931';
theSitetree.keyvisualName='kv_7931.jpg';
theSitetree.fontsetId='16912';
theSitetree.graphicsetId='12324';
theSitetree.contentColor='386721';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Trend',
				paletteFamily: 	'619A45',
				keyvisualId: 	'7931',
				keyvisualName: 	'kv_7931.jpg',
				fontsetId: 		'16912',
				graphicsetId: 	'12324',
				contentColor: 	'386721',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1077718']={
webappId:    '1501',
documentId:  '11',
internalId:  '1077718',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-2774c147b5115ff67c30f661e7147e18']={
webappId:    '7060',
documentId:  '1201',
internalId:  '2774c147b5115ff67c30f661e7147e18',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20100510-122031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1201',
internalId:  '',
customField: '20080909-082044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79901',
internalId:  '',
customField: '20090812-082953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86',
internalId:  '',
customField: '20061127-202833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81101',
internalId:  '',
customField: '20090727-112533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17545',
internalId:  '',
customField: '20070910-153914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81143',
internalId:  '',
customField: '20090812-083643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14709',
internalId:  '',
customField: '20060411-232457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81164',
internalId:  '',
customField: '20080821-084452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79922',
internalId:  '',
customField: '20100115-125956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81185',
internalId:  '',
customField: '20090727-121502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81227',
internalId:  '',
customField: '20090812-083831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81248',
internalId:  '',
customField: '20080821-084452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55701',
internalId:  '',
customField: '20090813-125919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16349',
internalId:  '',
customField: '20090813-125940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41',
internalId:  '',
customField: '20090727-122328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1474',
internalId:  '',
customField: '20050812-163255'
};
webappMappings['7008']=webappMappings['7008-9682']={
webappId:    '7008',
documentId:  '41',
internalId:  '9682',
customField: 'language:pt;country:BR;'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2E7E';
var companyName   = 'PROMOVENDAS+Consultoria+%26+Representa%C3%A7%C3%A3o';
var htmlTitle	  = 'PROMOVENDAS+Consultoria+e+Representa%C3%A7%C3%A3o';
var metaKeywords  = 'Promovendas%2C+representante%2C+representa%C3%A7%C3%A3o%2C+representa%C3%A7%C3%A3o+comercial%2C+material+de+constru%C3%A7%C3%A3o%2C+ferragens%2C+marcenaria%2C+madereira%2C+ca%C3%A7a%2C+pesca%2C+camping%2C+n%C3%A1utica%2C+outdoor%2C+seguran%C3%A7a%2C+seguran%C3%A7a+p%C3%BAblica%2C+seguran%C3%A7a+privada%2C+empresas+de+vigil%C3%A2ncia%2C+colas%2C+adesivos%2C+cascola%2C+cascorez+extra%2C+cascorez%2C+flexite%2C+silicone%2C+durepoxi%2C+massa+de+calafetar%2C+flexite%2C+mundial%2C+alicate+de+cut%C3%ADculas%2C+tesoura%2C+escova%2C+talher%2C+faca%2C+ferramenta%2C+cbc%2C+alba%2C+hummer%2C+barraca%2C+mochila%2C+saco+de+dormir%2C+colch%C3%A3o+infl%C3%A1vel%2C+lanterna%2C+muni%C3%A7%C3%A3o%2C+arma%2C+armamento%2C+desarmamento%2C+p%C3%B3lvora%2C+espoleta%2C+tiro%2C+mato+grosso+do+sul%2C+campo+grande%2C+bonito%2C+corumb%C3%A1%2C+pantanal%2C+materias+para+m%C3%B3veis%2C+conectores%2C+portas+de+vidro%2C+rod%C3%ADzios%2C+correid%C3%A7as%2C+corredi%C3%A7a+telesc%C3%B3pica%2C+moveis%2C+arquitetura%2C+zoobot%C3%A2nico%2C+parque+zoobot%C3%A2nico%2C+urbanismo%2C+ana+claudia+de+abreu+magno%2C+arquiteta+e+urbanista';
var metaContents  = 'Promovendas+Representa%C3%A7%C3%B5es+Comerciais+Ltda%2C+empresa+de+representa%C3%A7%C3%A3o+e+Consultoria+para+os+segmentos+de+distribuidores+para+Marcenaria%2C+Madereias%2C+Materiais+de+Constru%C3%A7%C3%A3o%2C+Ferragens%2C+Ca%C3%A7a+e+Pesca%2C+Camping%2C+Outdoor%2C+Seguran%C3%A7a+P%C3%BAblica+e+Privada%2C+Utilidades%2C+Perfumarias+e+Cosm%C3%A9ticos%2C+Importa%C3%A7%C3%A3o+e+Exporta%C3%A7%C3%A3o+para+o+Paraguai+e+Bol%C3%ADvia.+Fundada+em+1996%2C+a+Promovendas+atua+no+estado+do+Mato+Grosso+do+Sul+e+tem+colaboradores+nos+estados+do+Mato+Grosso+e+Paran%C3%A1.';
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();
};
