/* [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','59301',jdecode('Paola+Rhoden'),jdecode(''),'/59301.html','true',[],'',''],
	['PAGE','501',jdecode('Obras+publicadas'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','552',jdecode('Pensamentos'),jdecode(''),'/552.html','true',[],'',''],
	['PAGE','636',jdecode('Como+comprar'),jdecode(''),'/636.html','true',[],'',''],
	['PAGE','12601',jdecode('Est%C3%B3rias'),jdecode(''),'/12601/index.html','true',[ 
		['PAGE','12622',jdecode('Contos'),jdecode(''),'/12601/12622.html','true',[],'',''],
		['PAGE','12643',jdecode('Cr%C3%B4nicas'),jdecode(''),'/12601/12643.html','true',[],'',''],
		['PAGE','12664',jdecode('Textos'),jdecode(''),'/12601/12664.html','true',[],'','']
	],'',''],
	['PAGE','17901',jdecode('Poemas'),jdecode(''),'/17901.html','true',[],'',''],
	['PAGE','678',jdecode('Textos+Premiados'),jdecode(''),'/678.html','true',[],'',''],
	['PAGE','699',jdecode('Contos+premiados'),jdecode(''),'/699.html','true',[],'',''],
	['PAGE','720',jdecode('Cr%C3%B4nicas+premiadas'),jdecode(''),'/720.html','true',[],'',''],
	['PAGE','783',jdecode('Contato'),jdecode(''),'/783.html','true',[],'',''],
	['PAGE','25701',jdecode('Links+'),jdecode(''),'/25701.html','true',[],'',''],
	['PAGE','57701',jdecode('Livro+de+Visitas'),jdecode(''),'/57701.html','true',[],'',''],
	['PAGE','58901',jdecode('Novo+acordo+Ortogr%C3%A1fico'),jdecode(''),'/58901.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='AC2323';
theSitetree.keyvisualId='1741';
theSitetree.keyvisualName='ebusiness.jpg';
theSitetree.fontsetId='292';
theSitetree.graphicsetId='356';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AC2323';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'AC2323',
				keyvisualId: 	'1741',
				keyvisualName: 	'ebusiness.jpg',
				fontsetId: 		'292',
				graphicsetId: 	'356',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AC2323',
				a_color: 		'AC2323',
				b_color: 		'480F0F',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '59301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59301',
internalId:  '',
customField: '20100720-231935'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '59301',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58901',
internalId:  '',
customField: '20090101-175918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100720-232145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20100522-171907'
};
webappMappings['1501']=webappMappings['1501-7880684']={
webappId:    '1501',
documentId:  '59301',
internalId:  '7880684',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20100307-112609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20100503-110739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12622',
internalId:  '',
customField: '20100503-111056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12643',
internalId:  '',
customField: '20100503-111134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12664',
internalId:  '',
customField: '20100503-111206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20100503-111238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20100503-111321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20100503-111413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '720',
internalId:  '',
customField: '20100503-111501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20100306-220235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57701',
internalId:  '',
customField: '20090115-105446'
};
webappMappings['1002']=webappMappings['1002-57701avec10inlpxe']={
webappId:    '1002',
documentId:  '57701',
internalId:  '57701avec10inlpxe',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25701',
internalId:  '',
customField: '20100306-220417'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLPXE';
var companyName   = 'Paola+Rhoden';
var htmlTitle	  = 'Izair+Tonato';
var metaKeywords  = 'Izair+Tonato%2C+Caminhos+Sem+Volta%2C+Dezessete+Anos%2C+Garimpo+de+Palavras%2C+contos%2C+romances%2C+cr%C3%B4nicas%2C+est%C3%B3rias.';
var metaContents  = 'Izair+tonato%2C+Escritora%2C+Caminhos+Sem+Volta%2C+Dezessete+Anos%2C++livros%2C+lan%C3%A7amentos%2C+antologias.';
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();
};
