/* [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','11',jdecode('Home'),jdecode(''),'/11.html','true',[],''],
	['PAGE','32',jdecode('A+Empresa'),jdecode(''),'/32/index.html','true',[ 
		['PAGE','41',jdecode('%C3%81reas+de+Atua%C3%A7%C3%A3o'),jdecode(''),'/32/41.html','true',[],'']
	],''],
	['PAGE','50',jdecode('Consultoria'),jdecode(''),'/50/index.html','true',[ 
		['PAGE','59',jdecode('Marketing'),jdecode(''),'/50/59.html','true',[],''],
		['PAGE','68',jdecode('Custos'),jdecode(''),'/50/68.html','true',[],''],
		['PAGE','77',jdecode('Finan%C3%A7as'),jdecode(''),'/50/77.html','true',[],''],
		['PAGE','86',jdecode('Planej.+Estrat%C3%A9gico'),jdecode(''),'/50/86.html','true',[],''],
		['PAGE','95',jdecode('Organizacional'),jdecode(''),'/50/95.html','true',[],'']
	],''],
	['PAGE','104',jdecode('Comunica%C3%A7%C3%A3o'),jdecode(''),'/104/index.html','true',[ 
		['PAGE','113',jdecode('R%C3%A1dio'),jdecode(''),'/104/113.html','true',[],''],
		['PAGE','122',jdecode('Apres.+de+Eventos'),jdecode(''),'/104/122.html','true',[],'']
	],''],
	['PAGE','131',jdecode('Not%C3%ADcias'),jdecode(''),'/131/index.html','true',[ 
		['PAGE','14001',jdecode('++Flash%2FTempo'),jdecode(''),'/131/14001.html','true',[],'']
	],''],
	['PAGE','140',jdecode('Parceiros%2FClientes'),jdecode(''),'/140.html','true',[],''],
	['PAGE','6701',jdecode('Arquivos'),jdecode(''),'/6701.html','true',[],''],
	['PAGE','149',jdecode('Trabalhe+Conosco'),jdecode(''),'/149/index.html','true',[ 
		['PAGE','1298',jdecode('Trabalhe+Conosco+%28p%C3%A1gina+seguir%29'),jdecode(''),'/149/1298.html','false',[],'']
	],''],
	['PAGE','158',jdecode('Fale+Conosco'),jdecode(''),'/158.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='B0CBD6';
theSitetree.keyvisualId='1966';
theSitetree.keyvisualName='businessman.jpg';
theSitetree.fontsetId='328';
theSitetree.graphicsetId='383';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Stylus',
				paletteFamily: 	'B0CBD6',
				keyvisualId: 	'1966',
				keyvisualName: 	'businessman.jpg',
				fontsetId: 		'328',
				graphicsetId: 	'383',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'B0CBD6',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, 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-1237349']={
webappId:    '1501',
documentId:  '11',
internalId:  '1237349',
customField: '1501'
};
webappMappings['7005']=webappMappings['7005-145']={
webappId:    '7005',
documentId:  '11',
internalId:  '145',
customField: 'language:pt;country:BR;'
};
webappMappings['1001']=webappMappings['1001-avec10in22qi20d666f0e5d6618f']={
webappId:    '1001',
documentId:  '149',
internalId:  'avec10in22qi20d666f0e5d6618f',
customField: ''
};
webappMappings['1001']=webappMappings['1001-avec10in22qi20d666f0e5d6618f']={
webappId:    '1001',
documentId:  '1298',
internalId:  'avec10in22qi20d666f0e5d6618f',
customField: 'followUp'
};
webappMappings['7008']=webappMappings['7008-1379']={
webappId:    '7008',
documentId:  '158',
internalId:  '1379',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20090112-111551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50',
internalId:  '',
customField: '20081215-113014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140',
internalId:  '',
customField: '20080816-193604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20081215-112917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41',
internalId:  '',
customField: '20071029-105111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59',
internalId:  '',
customField: '20070508-132034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68',
internalId:  '',
customField: '20070223-131328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77',
internalId:  '',
customField: '20090112-111742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86',
internalId:  '',
customField: '20081215-113134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95',
internalId:  '',
customField: '20080816-193158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104',
internalId:  '',
customField: '20070508-132635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113',
internalId:  '',
customField: '20070223-131004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122',
internalId:  '',
customField: '20081215-113335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131',
internalId:  '',
customField: '20081215-115200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20071112-141144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6701',
internalId:  '',
customField: '20090112-113513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149',
internalId:  '',
customField: '20070706-083634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158',
internalId:  '',
customField: '20070917-143101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1298',
internalId:  '',
customField: '20061013-152108'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN22QI';
var companyName   = 'MAC+SOLU%C3%87%C3%95ES+E+TECNOLOGIA';
var htmlTitle	  = 'MAC+Solu%C3%A7%C3%B5es+e+Tecnologia+-+Master+Tech';
var metaKeywords  = 'Consultoria%3B+mercado%3B+marketing%3B+planejamento%3B+estrat%C3%A9gico%3B+gest%C3%A3o%3B+r%C3%A1dio%3B+eventos%3B+mac%3B+macsolucoes%3B+master+tech%2C+fenixweb';
var metaContents  = 'Consultoria%3B+Gest%C3%A3o%3B+Conhecimento%3B+Comunica%C3%A7%C3%A3o%3B+Planejamento';
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();
};

