/* [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','601',jdecode('EMPRESA'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','5401',jdecode('HIST%C3%93RIA+DE+SUCESSO'),jdecode(''),'/5401.html','true',[],'',''],
	['PAGE','5422',jdecode('SISTEMAS+DE+GEST%C3%83O+E+NF-e'),jdecode(''),'/5422/index.html','true',[ 
		['PAGE','5464',jdecode('SAN+-+Gest%C3%A3o+Empresarial+e+NF-e'),jdecode(''),'/5422/5464.html','true',[],'',''],
		['PAGE','5443',jdecode('SAN+-+Gest%C3%A3o+Cont%C3%A1bil+'),jdecode(''),'/5422/5443.html','true',[],'','']
	],'',''],
	['PAGE','117554',jdecode('SAN+NF-e+FREE'),jdecode(''),'/117554.html','true',[],'',''],
	['PAGE','6301',jdecode('INTEGRA%C3%87%C3%95ES'),jdecode(''),'/6301/index.html','true',[ 
		['PAGE','6322',jdecode('SAN+%2B+GOVERNOS'),jdecode(''),'/6301/6322.html','true',[],'','']
	],'',''],
	['PAGE','5485',jdecode('INDICA%C3%87%C3%95ES'),jdecode(''),'/5485.html','true',[],'',''],
	['PAGE','5506',jdecode('ULTIMAS+VERS%C3%95ES'),jdecode(''),'/5506.html','true',[],'',''],
	['PAGE','5527',jdecode('PRODUTOS+E+SERVI%C3%87OS'),jdecode(''),'/5527.html','true',[],'',''],
	['PAGE','38601',jdecode('GOVERNO+-+REGISTRO+DE+PRE%C3%87OS'),jdecode(''),'/38601.html','true',[],'',''],
	['PAGE','19501',jdecode('PORTAL+INFORSYSTEM'),jdecode(''),'/19501.html','true',[],'',''],
	['PAGE','93432',jdecode('EMISS%C3%83O+BOLETO+BANC%C3%81RIO'),jdecode(''),'/93432.html','true',[],'',''],
	['PAGE','56101',jdecode('TRABALHE+CONOSCO'),jdecode(''),'/56101.html','true',[],'',''],
	['PAGE','113654',jdecode('TREINAMENTOS'),jdecode(''),'/113654.html','true',[],'',''],
	['PAGE','5569',jdecode('FALE+CONOSCO'),jdecode(''),'/5569.html','true',[],'',''],
	['PAGE','98643',jdecode('EVENTOS+'),jdecode(''),'/98643/index.html','true',[ 
		['PAGE','65612',jdecode('IX+CONVEN%C3%87%C3%83O+'),jdecode(''),'/98643/65612.html','true',[],'',''],
		['PAGE','91723',jdecode('ARRAI%C3%81+INFORSYSTEM+2009'),jdecode(''),'/98643/91723.html','true',[],'',''],
		['PAGE','125554',jdecode('II+SEMANA+CONT%C3%81BIL'),jdecode(''),'/98643/125554.html','true',[],'',''],
		['PAGE','126554',jdecode('III+SEMANA+DO+CONTABILISTA'),jdecode(''),'/98643/126554.html','true',[],'','']
	],'',''],
	['PAGE','130554',jdecode('CAMPANHA+NFE%2FNFE-s'),jdecode(''),'/130554.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='DB7A7A';
theSitetree.keyvisualId='1991';
theSitetree.keyvisualName='tastatur.jpg';
theSitetree.fontsetId='330';
theSitetree.graphicsetId='386';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stylus',
				paletteFamily: 	'DB7A7A',
				keyvisualId: 	'1991',
				keyvisualName: 	'tastatur.jpg',
				fontsetId: 		'330',
				graphicsetId: 	'386',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'DB7A7A',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-1328']={
webappId:    '7008',
documentId:  '5569',
internalId:  '1328',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-1329']={
webappId:    '7008',
documentId:  '5485',
internalId:  '1329',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-1330']={
webappId:    '7008',
documentId:  '38601',
internalId:  '1330',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-1331']={
webappId:    '7008',
documentId:  '56101',
internalId:  '1331',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20091217-132132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5506',
internalId:  '',
customField: '20100828-084154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20070912-060106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5422',
internalId:  '',
customField: '20091205-171904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5464',
internalId:  '',
customField: '20100413-065725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5443',
internalId:  '',
customField: '20091116-052831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20091128-092108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6322',
internalId:  '',
customField: '20100413-131453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5485',
internalId:  '',
customField: '20091116-061614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5527',
internalId:  '',
customField: '20091114-091737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126554',
internalId:  '',
customField: '20100616-080847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38601',
internalId:  '',
customField: '20100413-152306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125554',
internalId:  '',
customField: '20100616-080759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5569',
internalId:  '',
customField: '20080131-052208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19501',
internalId:  '',
customField: '20091116-072607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56101',
internalId:  '',
customField: '20091201-223448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65612',
internalId:  '',
customField: '20090905-070442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91723',
internalId:  '',
customField: '20090730-100125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93432',
internalId:  '',
customField: '20090724-061535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98643',
internalId:  '',
customField: '20090905-070151'
};
webappMappings['1501']=webappMappings['1501-14645565']={
webappId:    '1501',
documentId:  '601',
internalId:  '14645565',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-13415']={
webappId:    '7008',
documentId:  '113654',
internalId:  '13415',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113654',
internalId:  '',
customField: '20091210-060028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117554',
internalId:  '',
customField: '20100413-063024'
};
webappMappings['7008']=webappMappings['7008-14072']={
webappId:    '7008',
documentId:  '117554',
internalId:  '14072',
customField: 'language:pt;country:BR;'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLQ2X';
var companyName   = 'INFORSYSTEM+-+TECNOLOGIA';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};
