/* [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','33',jdecode('Apresenta%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F33%2Findex.html'), 'true',[ 
		['PAGE','12',jdecode('Principal'),jdecode(''), jdecode('%2F33%2F12.html'), 'true',[],'',''],
		['PAGE','42',jdecode('O+que+%C3%A9+cooperativa'),jdecode(''), jdecode('%2F33%2F42.html'), 'true',[],'',''],
		['PAGE','132',jdecode('Capital+Social'),jdecode(''), jdecode('%2F33%2F132.html'), 'true',[],'',''],
		['PAGE','1265',jdecode('Hist%C3%B3rico'),jdecode(''), jdecode('%2F33%2F1265.html'), 'true',[],'',''],
		['PAGE','159',jdecode('Miss%C3%A3o+e+Vis%C3%A3o'),jdecode(''), jdecode('%2F33%2F159.html'), 'true',[],'',''],
		['PAGE','115345',jdecode('Manuais'),jdecode(''), jdecode('%2F33%2F115345.html'), 'true',[],'','']
	],'',''],
	['PAGE','186',jdecode('Como+se+associar'),jdecode(''), jdecode('%2F186.html'), 'true',[],'',''],
	['PAGE','195',jdecode('Conta+corrente'),jdecode(''), jdecode('%2F195%2Findex.html'), 'true',[ 
		['PAGE','4508',jdecode('Cart%C3%A3o+Sicoob'),jdecode(''), jdecode('%2F195%2F4508.html'), 'true',[],'',''],
		['PAGE','4730',jdecode('ATM'),jdecode(''), jdecode('%2F195%2F4730.html'), 'true',[],'','']
	],'',''],
	['PAGE','1283',jdecode('Produtos+e+Servi%C3%A7os'),jdecode(''), jdecode('%2F1283%2Findex.html'), 'true',[ 
		['PAGE','97923',jdecode('Aplica%C3%A7%C3%B5es'),jdecode(''), jdecode('%2F1283%2F97923.html'), 'true',[],'',''],
		['PAGE','258',jdecode('Conv%C3%AAnios'),jdecode(''), jdecode('%2F1283%2F258.html'), 'true',[],'',''],
		['PAGE','276',jdecode('Bolsa+de+estudos+2010'),jdecode(''), jdecode('%2F1283%2F276.html'), 'true',[],'','']
	],'',''],
	['PAGE','5501',jdecode('Downloads'),jdecode(''), jdecode('%2F5501.html'), 'true',[],'',''],
	['PAGE','5147',jdecode('Links+%C3%9Ateis'),jdecode(''), jdecode('%2F5147.html'), 'true',[],'',''],
	['PAGE','285',jdecode('Fale+Conosco'),jdecode(''), jdecode('%2F285%2Findex.html'), 'true',[ 
		['PAGE','5724',jdecode('Fale+Conosco+%28p%C3%A1gina+seguir%29'),jdecode(''), jdecode('%2F285%2F5724.html'), 'false',[],'','']
	],'',''],
	['PAGE','59001',jdecode('%C3%8Dndices+Financeiros'),jdecode(''), jdecode('%2F59001.html'), 'true',[],'',''],
	['PAGE','74401',jdecode('Saques+no+Vale+do+A%C3%A7o'),jdecode(''), jdecode('%2F74401.html'), 'true',[],'',''],
	['PAGE','99823',jdecode('Ouvidoria'),jdecode(''), jdecode('%2F99823.html'), 'true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Plains';
theSitetree.paletteFamily='64A755';
theSitetree.keyvisualId='7887';
theSitetree.keyvisualName='01.swf';
theSitetree.fontsetId='16856';
theSitetree.graphicsetId='12304';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0X9A9'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Plains',
				paletteFamily: 	'64A755',
				keyvisualId: 	'7887',
				keyvisualName: 	'01.swf',
				fontsetId: 		'16856',
				graphicsetId: 	'12304',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '12',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99823',
internalId:  '',
customField: '20091204-081358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97923',
internalId:  '',
customField: '20091113-115830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12',
internalId:  '',
customField: '20120105-101014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33',
internalId:  '',
customField: '20111229-125954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59001',
internalId:  '',
customField: '20090826-131411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42',
internalId:  '',
customField: '20100405-071158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132',
internalId:  '',
customField: '20101015-131708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1265',
internalId:  '',
customField: '20090612-135600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159',
internalId:  '',
customField: '20090612-141700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '186',
internalId:  '',
customField: '20091204-081658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '195',
internalId:  '',
customField: '20090612-145236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4508',
internalId:  '',
customField: '20060426-221532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4730',
internalId:  '',
customField: '20070130-071140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1283',
internalId:  '',
customField: '20101022-111015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115345',
internalId:  '',
customField: '20111229-091249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '258',
internalId:  '',
customField: '20111223-055042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '276',
internalId:  '',
customField: '20100329-082251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20100506-134703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5147',
internalId:  '',
customField: '20091230-123742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '285',
internalId:  '',
customField: '20110329-105151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5724',
internalId:  '',
customField: '20060426-223006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74401',
internalId:  '',
customField: '20090729-100437'
};
webappMappings['7008']=webappMappings['7008-6797']={
webappId:    '7008',
documentId:  '285',
internalId:  '6797',
customField: 'language:pt;country:BR;'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2UFZ';
var companyName   = 'PORTAL+DO+COOPERADO';
var htmlTitle	  = '';
var metaKeywords  = 'A+COSMIPA+%C3%A9+uma+cooperativa+de+cr%C3%A9dito+m%C3%BAtuo+dos+servidores+p%C3%BAblicos+e+trabalhadores+da+rede+de+ensiono+da+regi%C3%A7%C3%A3o+e+colar+metropolitano+do+vale+do+A%C3%A7o+ltda.+que+utiliza+o+sistema+SISBR+do+SICOOB.+Conv%C3%AAnios++Fadipa%2C+Pit%C3%A1goras%2C+Ined%2C+drogaria%2C+farmacia%2C+academia%2C+ingl%C3%AAs%2C+CNA%2C+CCAA%2C+Uptime%2C+Fisk%2C+Skil%2C+saque+e+extrato+online%2C+caixa+eletr%C3%B4nico%2C+vale+do+a%C3%A7o%2C+cooperativismo%2C+downloads%2C+formularios%2C+guia+de+conv%C3%AAnios%2C+manual+do+cooperado.Luiz+Gustavo+Barreto%2C+Alandisnei%2C+Patricia%2C+Micheline%2C+Zelia%2C+Marcia%2C+Rosana%2C+fabiane%2C+Zilma+o+que+%C3%A9+cooperativa+de+cr%C3%A9dito+historico+associado+cooperado+sisbr+ipatinga+prefeitura+municipal+ipatinga+vale+do+a%C3%A7o';
var metaContents  = 'A+COSMIPA+%C3%A9+uma+cooperativa+de+cr%C3%A9dito+m%C3%BAtuo+dos+servidores+p%C3%BAblicos+e+trabalhadores+da+rede+de+ensiono+da+regi%C3%A7%C3%A3o+e+colar+metropolitano+do+vale+do+A%C3%A7o+ltda.+que+utiliza+o+sistema+SISBR+do+SICOOB.+Conv%C3%AAnios++Fadipa%2C+Pit%C3%A1goras%2C+Ined%2C+drogaria%2C+farmacia%2C+academia%2C+ingl%C3%AAs%2C+CNA%2C+CCAA%2C+Uptime%2C+Fisk%2C+Skil%2C+saque+e+extrato+online%2C+caixa+eletr%C3%B4nico%2C+vale+do+a%C3%A7o%2C+cooperativismo%2C+downloads%2C+formularios%2C+guia+de+conv%C3%AAnios%2C+manual+do+cooperado.Luiz+Gustavo+Barreto%2C+Alandisnei%2C+Patricia%2C+Micheline%2C+Zelia%2C+Marcia%2C+Rosana%2C+fabiane%2C+Zilma+o+que+%C3%A9+cooperativa+de+cr%C3%A9dito+historico+associado+cooperado+sisbr+ipatinga+prefeitura+municipal+ipatinga+vale+do+a%C3%A7o';
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();
};

