/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','37889',jdecode('NOT%C3%8DCIAS'),jdecode(''),'/37889.html','true',[],'',''],
	['PAGE','71926',jdecode('CONCEITO+%22A%22+DA+UFRGS'),jdecode(''),'/71926.html','true',[],'',''],
	['PAGE','13501',jdecode('Publica%C3%A7%C3%B5es+Infantis'),jdecode(''),'/13501/index.html','true',[ 
		['PAGE','13522',jdecode('As+Viagens+de+Cadu'),jdecode(''),'/13501/13522.html','true',[],'',''],
		['PAGE','27426',jdecode('Cadu+in+English'),jdecode(''),'/13501/27426.html','true',[],'',''],
		['PAGE','27447',jdecode('Bela%2C+a+Princesa'),jdecode(''),'/13501/27447.html','true',[],'',''],
		['PAGE','18001',jdecode('O+Lucro+de+Gusmol'),jdecode(''),'/13501/18001.html','true',[],'',''],
		['PAGE','76226',jdecode('Cadu+no+Jap%C3%A3o'),jdecode(''),'/13501/76226.html','true',[],'',''],
		['PAGE','78126',jdecode('Cadu+no+Saara'),jdecode(''),'/13501/78126.html','true',[],'',''],
		['PAGE','81626',jdecode('Aqueduto+de+Gusmol'),jdecode(''),'/13501/81626.html','true',[],'',''],
		['PAGE','81647',jdecode('Jantar+de+Vagarim'),jdecode(''),'/13501/81647.html','true',[],'',''],
		['PAGE','81668',jdecode('Cadu+e+Dinossauros'),jdecode(''),'/13501/81668.html','true',[],'','']
	],'',''],
	['PAGE','15185',jdecode('Livros+de+Contos'),jdecode(''),'/15185.html','true',[],'',''],
	['PAGE','18022',jdecode('Brum%26%23x27%3Bs+Make+Money'),jdecode(''),'/18022.html','true',[],'',''],
	['PAGE','37868',jdecode('ENQUETE+E+VIAGENS'),jdecode(''),'/37868.html','true',[],'',''],
	['PAGE','61826',jdecode('PASSATEMPO'),jdecode(''),'/61826.html','true',[],'',''],
	['PAGE','37826',jdecode('CONTOS+E+CR%C3%8DTICA'),jdecode(''),'/37826.html','true',[],'',''],
	['PAGE','73826',jdecode('ESCRITORES+CONVIDADOS'),jdecode(''),'/73826.html','true',[],'',''],
	['PAGE','43626',jdecode('VIAGENS+PELO+MUNDO'),jdecode(''),'/43626.html','true',[],'',''],
	['PAGE','43647',jdecode('Curr%C3%ADculo'),jdecode(''),'/43647.html','true',[],'',''],
	['PAGE','43668',jdecode('Contato'),jdecode(''),'/43668.html','true',[],'',''],
	['PAGE','49831',jdecode('Livro+de+visitas%2FF%C3%B3rum'),jdecode(''),'/49831.html','true',[],'',''],
	['PAGE','87726',jdecode('HIST%C3%93RIAS+PARTENON'),jdecode(''),'/87726.html','true',[],'',''],
	['PAGE','54426',jdecode('O+BLOG+DO+BRUM'),jdecode(''),'/54426.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='FFCC33';
theSitetree.keyvisualId='978';
theSitetree.keyvisualName='adresskartei.jpg';
theSitetree.fontsetId='167';
theSitetree.graphicsetId='199';
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: 			'NewYork',
				paletteFamily: 	'FFCC33',
				keyvisualId: 	'978',
				keyvisualName: 	'adresskartei.jpg',
				fontsetId: 		'167',
				graphicsetId: 	'199',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000066',
				b_color: 		'FFCC33',
				c_color: 		'000000',
				d_color: 		'406BC0',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20091208-074451'
};
webappMappings['1501']=webappMappings['1501-11902083']={
webappId:    '1501',
documentId:  '401',
internalId:  '11902083',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-572']={
webappId:    '7008',
documentId:  '43668',
internalId:  '572',
customField: 'language:pt;country:BR;'
};
webappMappings['7005']=webappMappings['7005-55']={
webappId:    '7005',
documentId:  '37868',
internalId:  '55',
customField: 'language:pt;country:BR;'
};
webappMappings['1002']=webappMappings['1002-49831avec10inf56b']={
webappId:    '1002',
documentId:  '49831',
internalId:  '49831avec10inf56b',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37889',
internalId:  '',
customField: '20091208-062939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20090409-131619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13522',
internalId:  '',
customField: '20081119-085340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27426',
internalId:  '',
customField: '20081120-151151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27447',
internalId:  '',
customField: '20081122-104720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20081120-175116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15185',
internalId:  '',
customField: '20091208-075317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18022',
internalId:  '',
customField: '20081226-191029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37868',
internalId:  '',
customField: '20081129-120628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61826',
internalId:  '',
customField: '20081129-115158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37826',
internalId:  '',
customField: '20090426-155830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43626',
internalId:  '',
customField: '20081211-162848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87726',
internalId:  '',
customField: '20091208-080007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43647',
internalId:  '',
customField: '20081203-143037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43668',
internalId:  '',
customField: '20081119-082521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49831',
internalId:  '',
customField: '20081211-164612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76226',
internalId:  '',
customField: '20090403-105222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54426',
internalId:  '',
customField: '20091208-062826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71926',
internalId:  '',
customField: '20081215-082252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73826',
internalId:  '',
customField: '20090115-170913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78126',
internalId:  '',
customField: '20090409-113818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81626',
internalId:  '',
customField: '20090624-105417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81647',
internalId:  '',
customField: '20090624-085649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81668',
internalId:  '',
customField: '20090624-103431'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INF56B';
var companyName   = 'Br1+Editores';
var htmlTitle	  = 'BR1+EDITORES+LTDA';
var metaKeywords  = 'br1+editores%2C+br1%2C+br%2C+editores%2C+editora%2C+livro%2C+livros%2C+cadu%2C+gusmol%2C+brum%2C+make+money%2C+dinheiro%2C+fique+rico%2C+infantil%2C+pintura%2C+pintar%2C+atividades%2C+jogos%2C+divers%C3%A3o%2C+brincadeira%2C+crian%C3%A7a%2C+alfabetiza%C3%A7%C3%A3o%2C+fase+de+alfabetiza%C3%A7%C3%A3o%2C+contos%2C+livros+de+contos%2C+livro+de+contos%2C+moacyr+scliar%2C+academia+brasileira+de+letras%2C+abl%2C+leticia+wierzchowski%2C+casa+das+sete+mulheres%2C+luis+antonio+de+assis+brasil%2C+curso+pucrs%2C+desenho%2C+ilustra%C3%A7%C3%A3o%2C+money%2Cjap%C3%A3o%2Cbela+a+menina+que+queria+ser+princesa%2Cjessica+gustafson+costa%2Ceduca%C3%A7%C3%A3o+financeira+para+crian%C3%A7as%2Cpalestras%2C+mini-oficinas+liter%C3%A1rias%2Cfeiras+de+livro+em+escolas%2Cfeiras+de+livros+em+escolas%2Cfeira+do+livro+da+CRL%2Cviagens+pelo+mundo%2C+conta%C3%A7%C3%A3o+de+hist%C3%B3rias+para+crian%C3%A7as+e+terceira+idade-passatempos-';
var metaContents  = 'Site+da+Br1+Editores%2C+que+publica+as+aventuras+do+jovem+Cadu%3B+as+hist%C3%B3rias+da+lesminha+Gusmol%3B+os+livros+do+jovem+escritor+Carlos+Augusto+Pessoa+de+Brum%3B+e+os+sistema+Brums+Make+Money+-+Uma+Poupan%C3%A7a+de+Id%C3%A9ias+Brasileiras+Sobre+Dinheiro+e+Como+Cri%C3%A1-lo+-+Palestras+sobre+Educa%C3%A7%C3%A3o+Financeira+-+Mini-oficinas+sobre+literatura+-viagens-dicas+de+leitura-+dicas+de+viagens-educa%C3%A7%C3%A3o+%3B+passatempos%3B+financeira+para+crian%C3%A7as-palestras-+conta%C3%A7%C3%A3o+de+hist%C3%B3rias-conta%C3%A7%C3%A3o+de+hist%C3%B3rias+para+terceira+idade-';
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();
};
