/* [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','2434',jdecode('Home'),jdecode(''),'/2434.html','true',[],'',''],
	['PAGE','198712',jdecode('Consulte+J%C3%A1.'),jdecode(''),'/198712.html','true',[],'',''],
	['PAGE','232712',jdecode('Refinanciamentos+Especiais'),jdecode(''),'/232712.html','true',[],'',''],
	['PAGE','11',jdecode('Aposentados%2FPensionistas'),jdecode(''),'/11.html','false',[],'',''],
	['PAGE','150001',jdecode('Servidores+Prefeitura+S.+Paulo'),jdecode(''),'/150001.html','true',[],'',''],
	['PAGE','150043',jdecode('Servidor+Federal+Civil'),jdecode(''),'/150043.html','true',[],'',''],
	['PAGE','150064',jdecode('Militares+das+For%C3%A7as+Armadas'),jdecode(''),'/150064.html','true',[],'',''],
	['PAGE','21830',jdecode('Cart%C3%B5es+de+Cr%C3%A9dito+BMG'),jdecode(''),'/21830.html','true',[],'',''],
	['PAGE','67701',jdecode('BMG+Eletro+'),jdecode(''),'/67701.html','false',[],'',''],
	['PAGE','22573',jdecode('Recomenda%C3%A7%C3%B5es+%C3%9Ateis'),jdecode(''),'/22573.html','true',[],'',''],
	['PAGE','230412',jdecode('Represente+a++Cr%C3%A9dito+M%C3%BAtuo+'),jdecode(''),'/230412.html','false',[],'',''],
	['PAGE','59',jdecode('BMG-Saiba+Mais'),jdecode(''),'/59.html','true',[],'',''],
	['PAGE','77',jdecode('Fale+Conosco'),jdecode(''),'/77.html','true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Blog';
theSitetree.paletteFamily='649B30';
theSitetree.keyvisualId='11513';
theSitetree.keyvisualName='kv_11513.jpg';
theSitetree.fontsetId='32865';
theSitetree.graphicsetId='13949';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='989696';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blog',
				paletteFamily: 	'649B30',
				keyvisualId: 	'11513',
				keyvisualName: 	'kv_11513.jpg',
				fontsetId: 		'32865',
				graphicsetId: 	'13949',
				contentColor: 	'FFFFFF',
				contentBGColor: '989696',
				a_color: 		'FFB434',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '198712',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '232712',
internalId:  '',
customField: '20100407-222857'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '198712',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-16040']={
webappId:    '7008',
documentId:  '230412',
internalId:  '16040',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20100407-212201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2434',
internalId:  '',
customField: '20100723-082449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150001',
internalId:  '',
customField: '20100621-140355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150043',
internalId:  '',
customField: '20100615-183918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150064',
internalId:  '',
customField: '20090824-193043'
};
webappMappings['7008']=webappMappings['7008-8940']={
webappId:    '7008',
documentId:  '77',
internalId:  '8940',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198712',
internalId:  '',
customField: '20100727-223416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21830',
internalId:  '',
customField: '20090824-194110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67701',
internalId:  '',
customField: '20090824-193538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22573',
internalId:  '',
customField: '20100608-202023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59',
internalId:  '',
customField: '20100407-195645'
};
webappMappings['7008']=webappMappings['7008-8037']={
webappId:    '7008',
documentId:  '198712',
internalId:  '8037',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77',
internalId:  '',
customField: '20090629-200605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '230412',
internalId:  '',
customField: '20100406-103430'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2SJH';
var companyName   = 'www.correspondentebmg.com.br';
var htmlTitle	  = 'Correspondente+BMG.+0800+772+1314++O+Sinal+Verde+para+o++Consignado+BMG';
var metaKeywords  = 'empr%C3%A9stimos%0D%0Acorrespondentebmg%0D%0ACorrespondente+autorizado+BMG%0D%0Aaposentados%0D%0Apensionistas%0D%0A+INSS%0D%0A+bmg%0D%0A+servidor+federal%0D%0Aemprestimo';
var metaContents  = 'Empr%C3%A9stimos+com+desconto+em+folha%0D%0AAposentados+e+Pensionistas+do+INSS%0D%0AServidores+da+Prefeitura+de+S%C3%A3o+Paulo%0D%0AServidores+Publicos+Federais';
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();
};
