/* [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','1801',jdecode('Inicial'),jdecode(''),'/1801/index.html','true',[ 
		['PAGE','54301',jdecode('Sites+amigos'),jdecode(''),'/1801/54301.html','true',[],'','']
	],'',''],
	['PAGE','1852',jdecode('Quem+sou'),jdecode(''),'/1852.html','true',[],'',''],
	['PAGE','29401',jdecode('Servi%C3%A7os+oferecidos'),jdecode(''),'/29401/index.html','true',[ 
		['PAGE','29422',jdecode('Servi%C3%A7os+free'),jdecode(''),'/29401/29422.html','true',[],'',''],
		['PAGE','30501',jdecode('Dicas+sobre+pl%C3%A1gio'),jdecode(''),'/29401/30501.html','true',[],'','']
	],'',''],
	['PAGE','30901',jdecode('Linha+de+a%C3%A7%C3%A3o'),jdecode(''),'/30901.html','true',[],'',''],
	['PAGE','32501',jdecode('Or%C3%A7amento'),jdecode(''),'/32501/index.html','true',[ 
		['PAGE','34301',jdecode('Formul%C3%A1rio+de+or%C3%A7amento'),jdecode(''),'/32501/34301.html','true',[],'','']
	],'',''],
	['PAGE','1873',jdecode('Onde+estamos'),jdecode(''),'/1873.html','true',[],'',''],
	['PAGE','1957',jdecode('Contato'),jdecode(''),'/1957.html','true',[],'',''],
	['PAGE','33322',jdecode('D%C3%BAvidas+e+sugest%C3%B5es'),jdecode(''),'/33322.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Anlage';
theSitetree.paletteFamily='92B4DE';
theSitetree.keyvisualId='2014';
theSitetree.keyvisualName='schule4.jpg';
theSitetree.fontsetId='331';
theSitetree.graphicsetId='387';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='92BEDE';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0XJEL'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Anlage',
				paletteFamily: 	'92B4DE',
				keyvisualId: 	'2014',
				keyvisualName: 	'schule4.jpg',
				fontsetId: 		'331',
				graphicsetId: 	'387',
				contentColor: 	'000000',
				contentBGColor: '92BEDE',
				a_color: 		'92B4DE',
				b_color: 		'FFFFFF',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20101104-212539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20101104-212009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20090311-013633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30501',
internalId:  '',
customField: '20090311-013223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20090311-014031'
};
webappMappings['1501']=webappMappings['1501-13123184']={
webappId:    '1501',
documentId:  '1801',
internalId:  '13123184',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29422',
internalId:  '',
customField: '20090311-014312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29401',
internalId:  '',
customField: '20090311-014232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30901',
internalId:  '',
customField: '20090311-014332'
};
webappMappings['7008']=webappMappings['7008-5154']={
webappId:    '7008',
documentId:  '34301',
internalId:  '5154',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33322',
internalId:  '',
customField: '20090304-224038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54301',
internalId:  '',
customField: '20090311-033337'
};
webappMappings['7008']=webappMappings['7008-5149']={
webappId:    '7008',
documentId:  '33322',
internalId:  '5149',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32501',
internalId:  '',
customField: '20090311-013501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34301',
internalId:  '',
customField: '20090304-235523'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHKCQ';
var companyName   = 'Monografia+Jur%C3%ADdica';
var htmlTitle	  = 'Monojur+Monografia+Jur%C3%ADdica+Monografias+de+Direito';
var metaKeywords  = 'Monografia%2C+Monografias%2C+Monografias+de+Direito%2C+Monografias+Jur%C3%ADdicas%2C++TCCs%2C+Teses%2C+Disserta%C3%A7%C3%B5es%2C+Livros%2C+Artigos+Jur%C3%ADdicos%2C+Resenhas%2C+Resumos%2C+Curriculum%2C+Relat%C3%B3rios%2C+Projetos%2C+Trabalhos+Acad%C3%AAmicos%2C+Normas+da+ABNT.+Acompanhamento+personalizado+e+especializado.';
var metaContents  = 'Encontre+tudo+o+que+voc%C3%AA+precisa+para+a+elabora%C3%A7%C3%A3o+de+monografias+de+direito+e+trabalhos+jur%C3%ADdicos+in%C3%A9ditos%2C+exclusivos%2C+com+qualidade+e+personalizados.+Ofere%C3%A7o+pesquisa%2C+orienta%C3%A7%C3%A3o+e+suporte+na+constru%C3%A7%C3%A3o+de+monografias%2C+TCC%2C+teses%2C+disserta%C3%A7%C3%B5es%2C+resenhas%2C+resumos%2C+artigos%2C+enfim%2C+pesquisas+jur%C3%ADdicas+e+jurisprud%C3%AAncias+em+geral.';
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();
};

