/* [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','701',jdecode('Home'),jdecode(''),'/701.html','true',[],''],
	['PAGE','29701',jdecode('O+Escrit%C3%B3rio'),jdecode(''),'/29701.html','true',[],''],
	['PAGE','752',jdecode('%C3%81reas+de+Atua%C3%A7%C3%A3o'),jdecode(''),'/752.html','true',[],''],
	['PAGE','773',jdecode('Profissionais'),jdecode(''),'/773.html','true',[],''],
	['PAGE','19122',jdecode('Onde+Estamos'),jdecode(''),'/19122.html','true',[],''],
	['PAGE','19143',jdecode('Artigos'),jdecode(''),'/19143.html','true',[],''],
	['PAGE','29722',jdecode('Novidades'),jdecode(''),'/29722.html','true',[],''],
	['PAGE','899',jdecode('Contato'),jdecode(''),'/899.html','true',[],''],
	['PAGE','8101',jdecode('Funda%C3%A7%C3%A3o+George+Browne'),jdecode(''),'/8101.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Chaste';
theSitetree.paletteFamily='A3D392';
theSitetree.keyvisualId='11547';
theSitetree.keyvisualName='kv_11547.jpg';
theSitetree.fontsetId='33239';
theSitetree.graphicsetId='13963';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				name: 			'Chaste',
				paletteFamily: 	'A3D392',
				keyvisualId: 	'11547',
				keyvisualName: 	'kv_11547.jpg',
				fontsetId: 		'33239',
				graphicsetId: 	'13963',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'A3D392',
				b_color: 		'659A53',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-3351']={
webappId:    '7008',
documentId:  '899',
internalId:  '3351',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20071224-091033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29701',
internalId:  '',
customField: '20071224-091328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20071224-091347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20090126-153653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19122',
internalId:  '',
customField: '20071224-091423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19143',
internalId:  '',
customField: '20071224-091435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29722',
internalId:  '',
customField: '20071224-091445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20090122-145922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '899',
internalId:  '',
customField: '20071224-091608'
};
webappMappings['7008']=webappMappings['7008-3533']={
webappId:    '7008',
documentId:  '773',
internalId:  '3533',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-63eec97f00f204ab9504820fad75c3f2']={
webappId:    '7060',
documentId:  '19122',
internalId:  '63eec97f00f204ab9504820fad75c3f2',
customField: 'language:pt;country:BR;'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '19143',
internalId:  'search',
customField: 'language:pt;country:BR;'
};
webappMappings['1501']=webappMappings['1501-7970183']={
webappId:    '1501',
documentId:  '701',
internalId:  '7970183',
customField: '1501'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZG11';
var companyName   = '';
var htmlTitle	  = '%3A%3A+BROWNE+Advocacia+e+Consultoria+%3A%3A';
var metaKeywords  = 'Browne+Advocacia+e+Consultoria%2C+Luciana+Pereira+Gomes+Browne%2C+George+Browne+Rego%2C+Breno+Augusto+Wanderley+de+Paiva%2C+Rodrigo+Barros+Pianc%C3%B3';
var metaContents  = 'Browne+Advocacia+e+Consultoria+presta+assessoria+jur%C3%ADdica+em+diversos+ramos+do+Direito+e%2C+para+isso%2C+conta+com+preparado+quadro+de+profissionais+especializados+em+cada+%C3%A1rea+de+atua%C3%A7%C3%A3o.+A+excel%C3%AAncia+dos+servi%C3%A7os+prestados%2C+a+voloriza%C3%A7%C3%A3o+do+elemento+humano+e+o+cont%C3%ADnuo+compromisso+de+criar+oportunidades+e+solu%C3%A7%C3%B5es+inteligentes+para+os+seus+clientes+fazem+deste+escrit%C3%B3rio+um+refer%C3%AAncial+dentre+os+escrit%C3%B3rios+de+advocacia+da+regi%C3%A3o+Nordeste.+Os+seus+clientes%2C+al%C3%A9m+de+contarem+com+um+andamento+personalizado+e+eficaz%2C+s%C3%A3o+assessorados+por+especialistas%2C+mestres+e+doutores+em+cada+respectiva+%C3%A1rea+do+saber+jur%C3%ADdico.';
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();
};
