/* [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','5001',jdecode('Literatura+no+Vale'),jdecode(''),'/5001.html','true',[],'',''],
	['PAGE','5206',jdecode('Livros+e+Publica%C3%A7%C3%B5es'),jdecode(''),'/5206.html','true',[],'',''],
	['PAGE','10201',jdecode('onde+encontrar'),jdecode(''),'/10201.html','true',[],'',''],
	['PAGE','5101',jdecode('Fernando+Scarpel'),jdecode(''),'/5101/index.html','false',[ 
		['PAGE','5122',jdecode('Hoje+tem+Espet%C3%A1culo'),jdecode(''),'/5101/5122.html','true',[],'',''],
		['PAGE','5143',jdecode('Conto+Hoje+tem+Espet%C3%A1culo'),jdecode(''),'/5101/5143.html','true',[],'',''],
		['PAGE','5164',jdecode('Pelo+Ad%C3%A3o+no+Para%C3%ADso'),jdecode(''),'/5101/5164.html','true',[],'',''],
		['PAGE','5185',jdecode('Conto+A+Cria%C3%A7%C3%A3o'),jdecode(''),'/5101/5185.html','true',[],'','']
	],'',''],
	['PAGE','29801',jdecode('Blog+Vale+Literatura'),jdecode(''),'/29801.html','true',[],'',''],
	['PAGE','8501',jdecode('Jo%C3%A3o+Possid%C3%B4nio+J%C3%BAnior'),jdecode(''),'/8501/index.html','false',[ 
		['PAGE','8522',jdecode('Neblina'),jdecode(''),'/8501/8522.html','true',[],'',''],
		['PAGE','8543',jdecode('Taquara'),jdecode(''),'/8501/8543.html','true',[],'','']
	],'',''],
	['PAGE','12701',jdecode('Zenilda+Lua'),jdecode(''),'/12701/index.html','false',[ 
		['PAGE','13201',jdecode('Alfazema'),jdecode(''),'/12701/13201.html','true',[],'','']
	],'',''],
	['PAGE','15701',jdecode('Reginaldo+Poeta+Gomes'),jdecode(''),'/15701/index.html','false',[ 
		['PAGE','16601',jdecode('O+Encontro+M%C3%A1gico+do+P%C3%B3len'),jdecode(''),'/15701/16601.html','true',[],'','']
	],'',''],
	['PAGE','18001',jdecode('Paulo+Castro'),jdecode(''),'/18001/index.html','false',[ 
		['PAGE','18022',jdecode('Em+Busca+da+Chave+M%C3%A1gica'),jdecode(''),'/18001/18022.html','true',[],'','']
	],'',''],
	['PAGE','20701',jdecode('Maria+de+Jesus'),jdecode(''),'/20701/index.html','false',[ 
		['PAGE','20722',jdecode('O+Lavrador+Presidente'),jdecode(''),'/20701/20722.html','true',[],'','']
	],'',''],
	['PAGE','22401',jdecode('Joca+Faria'),jdecode(''),'/22401.html','false',[],'',''],
	['PAGE','22422',jdecode('Jos%C3%A9+Moraes+Barbosa'),jdecode(''),'/22422.html','false',[],'',''],
	['PAGE','22443',jdecode('J.A.+Braga+Barros'),jdecode(''),'/22443.html','false',[],'',''],
	['PAGE','27101',jdecode('Valentine+Cirano'),jdecode(''),'/27101.html','false',[],'',''],
	['PAGE','35901',jdecode('Contato'),jdecode(''),'/35901.html','false',[],'',''],
	['PAGE','35922',jdecode('Rodrigo+A+S+Freire'),jdecode(''),'/35922.html','false',[],'',''],
	['PAGE','27401',jdecode('Del+Aquino'),jdecode(''),'/27401/index.html','false',[ 
		['PAGE','30801',jdecode('Oscar+Gon%C3%A7alves+J%C3%BAnior'),jdecode(''),'/27401/30801.html','false',[],'','']
	],'',''],
	['PAGE','30822',jdecode('Mirian+Cris'),jdecode(''),'/30822.html','false',[],'',''],
	['PAGE','30843',jdecode('Cristina+Faga'),jdecode(''),'/30843.html','false',[],'',''],
	['PAGE','31101',jdecode('Christina+Hernandes'),jdecode(''),'/31101.html','false',[],'',''],
	['PAGE','38201',jdecode('Wilson+Gorj'),jdecode(''),'/38201.html','false',[],'',''],
	['PAGE','38222',jdecode('Rog%C3%A9rio+Rodrigues'),jdecode(''),'/38222.html','false',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Struktur';
theSitetree.paletteFamily='B2CCFF';
theSitetree.keyvisualId='1878';
theSitetree.keyvisualName='digital.jpg';
theSitetree.fontsetId='295';
theSitetree.graphicsetId='357';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='488AF0';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Struktur',
				paletteFamily: 	'B2CCFF',
				keyvisualId: 	'1878',
				keyvisualName: 	'digital.jpg',
				fontsetId: 		'295',
				graphicsetId: 	'357',
				contentColor: 	'FFFFFF',
				contentBGColor: '488AF0',
				a_color: 		'B2CCFF',
				b_color: 		'488AF0',
				c_color: 		'94B7FF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100412-231646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20090925-082244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5122',
internalId:  '',
customField: '20090806-175504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5143',
internalId:  '',
customField: '20090806-082800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5164',
internalId:  '',
customField: '20090806-084332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5185',
internalId:  '',
customField: '20090806-084217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5206',
internalId:  '',
customField: '20100412-230842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20090806-214240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8522',
internalId:  '',
customField: '20090806-094119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8543',
internalId:  '',
customField: '20090806-094624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10201',
internalId:  '',
customField: '20100414-163826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20090809-182839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12701',
internalId:  '',
customField: '20090809-185206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20090812-223836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20090812-225723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20100609-162732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18022',
internalId:  '',
customField: '20090817-180856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20701',
internalId:  '',
customField: '20090821-225636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20722',
internalId:  '',
customField: '20090821-224411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20090831-084929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22422',
internalId:  '',
customField: '20090826-202209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22443',
internalId:  '',
customField: '20090901-101845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35922',
internalId:  '',
customField: '20100118-085521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35901',
internalId:  '',
customField: '20100118-084303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27101',
internalId:  '',
customField: '20100120-110851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27401',
internalId:  '',
customField: '20090924-111216'
};
webappMappings['7050']=webappMappings['7050-2618']={
webappId:    '7050',
documentId:  '29801',
internalId:  '2618',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29801',
internalId:  '',
customField: '20100414-164115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30801',
internalId:  '',
customField: '20091025-204158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30843',
internalId:  '',
customField: '20100201-143134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31101',
internalId:  '',
customField: '20091025-205618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30822',
internalId:  '',
customField: '20091025-205654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38201',
internalId:  '',
customField: '20100412-224644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38222',
internalId:  '',
customField: '20100412-224949'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INH6CI';
var companyName   = 'Literatura+no+Vale+do+Para%C3%ADba';
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();
};

