/* [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','501',jdecode('HOME'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','89045',jdecode('Uniformes%2FListas+2010'),jdecode(''),'/89045.html','true',[],'',''],
	['PAGE','76445',jdecode('Aprovados+no+Vestibular+'),jdecode(''),'/76445.html','true',[],'',''],
	['PAGE','18101',jdecode('Nosso+Espa%C3%A7o+f%C3%ADsico'),jdecode(''),'/18101.html','true',[],'',''],
	['PAGE','131956',jdecode('%C3%9ALTIMAS+NOT%C3%8DCIAS'),jdecode(''),'/131956.html','true',[],'',''],
	['PAGE','56834',jdecode('PORTAL+ACAD%C3%8AMICO+'),jdecode(''),'/56834.html','true',[],'',''],
	['PAGE','53534',jdecode('Aconteceu+no+Col%C3%A9gio'),jdecode(''),'/53534.html','true',[],'',''],
	['PAGE','6122',jdecode('Outras+Not%C3%ADcias'),jdecode(''),'/6122.html','true',[],'',''],
	['PAGE','11901',jdecode('Equipe+Monteiro+Lobato'),jdecode(''),'/11901.html','true',[],'',''],
	['PAGE','6601',jdecode('Maternal'),jdecode(''),'/6601.html','true',[],'',''],
	['PAGE','6164',jdecode('Ensino+Infantil'),jdecode(''),'/6164.html','true',[],'',''],
	['PAGE','6185',jdecode('1%C2%BA+ao+5%C2%BA+ano'),jdecode(''),'/6185.html','true',[],'',''],
	['PAGE','6206',jdecode('6%C2%BA+ao+9%C2%BA+ano'),jdecode(''),'/6206.html','true',[],'',''],
	['PAGE','6248',jdecode('Ensino+M%C3%A9dio+e+Terceir%C3%A3o'),jdecode(''),'/6248.html','true',[],'',''],
	['PAGE','141256',jdecode('Simulados'),jdecode(''),'/141256.html','true',[],'',''],
	['PAGE','55634',jdecode('PROJETO+ACQUA'),jdecode(''),'/55634.html','true',[],'',''],
	['PAGE','15601',jdecode('Projetos+de+Aprendizagem'),jdecode(''),'/15601.html','true',[],'',''],
	['PAGE','231000',jdecode('Semana+da+crian%C3%A7a+2009'),jdecode(''),'/231000.html','true',[],'',''],
	['PAGE','188178',jdecode('FESTA+M%C3%83ES+2009'),jdecode(''),'/188178.html','true',[],'',''],
	['PAGE','211200',jdecode('DIA+DOS+PAIS+2009'),jdecode(''),'/211200.html','true',[],'',''],
	['PAGE','10301',jdecode('Quem+foi+Monteiro+Lobato%3F'),jdecode(''),'/10301.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Mondrian';
theSitetree.paletteFamily='3E51B5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10711';
theSitetree.graphicsetId='10886';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3E51B5';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Mondrian',
				paletteFamily: 	'3E51B5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10711',
				graphicsetId: 	'10886',
				contentColor: 	'FFFFFF',
				contentBGColor: '3E51B5',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D3D3D3',
				e_color: 		'D3D3D3',
				f_color: 		'D3D3D3',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '501',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '211200',
internalId:  '',
customField: '20100227-144649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '188178',
internalId:  '',
customField: '20100227-144458'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100307-111155'
};
webappMappings['7005']=webappMappings['7005-108']={
webappId:    '7005',
documentId:  '501',
internalId:  '108',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76445',
internalId:  '',
customField: '20091129-080540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131956',
internalId:  '',
customField: '20100309-204504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56834',
internalId:  '',
customField: '20090804-131640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89045',
internalId:  '',
customField: '20091105-193604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53534',
internalId:  '',
customField: '20091116-145929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6122',
internalId:  '',
customField: '20091116-151203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20090201-182030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20100306-161454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6164',
internalId:  '',
customField: '20100306-202742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6185',
internalId:  '',
customField: '20100307-123047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6206',
internalId:  '',
customField: '20100227-141303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6248',
internalId:  '',
customField: '20100227-142930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55634',
internalId:  '',
customField: '20100212-084724'
};
webappMappings['1501']=webappMappings['1501-9683795']={
webappId:    '1501',
documentId:  '501',
internalId:  '9683795',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20100227-143736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20080604-055321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20080811-162113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141256',
internalId:  '',
customField: '20100310-105510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '231000',
internalId:  '',
customField: '20091015-170657'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INFXMH';
var companyName   = 'COL%C3%89GIO+MONTEIRO+LOBATO+-+Maternal+ao+Pr%C3%A9-vestibular';
var htmlTitle	  = 'Col%C3%A9gio+Monteiro+Lobato+-+Maternal+ao+Pr%C3%A9-vestibular+-+M%C3%A9dia++ENEM%3A++72%2C63';
var metaKeywords  = 'Nucleo+Educativo+Monteiro+Lobato+-Monteiro-+Col%C3%A9gio+Monteiro+Lobato+-+Monteiro+Lobato+-+Ensino+-+Vestibular+-+Col%C3%A9gio+-+Educa%C3%A7%C3%A3o+-+Projetos+Pedag%C3%B3gicos+-+Ensino+Infantil+-+Ensino+Fundamental+-+Pr%C3%A9-vestibular+-+aprender+-+ensinar+-+professores+-+alunos+-+festas+-+eventos+-+atividades+-+ensino+-+escola+-+vestibular+-+sugest%C3%B5es+projetos+pedag%C3%B3gicos+-+cidadaniabato+-+Col%C3%A9gio+Monteiro+Lobato+-+Ensino+-+Vestibular+-+Col%C3%A9gio+-+Educa%C3%A7%C3%A3o+-+Projetos+Pedag%C3%B3gicos+-+Ensino+Infantil+-+Ensino+Fundamental+-+Pr%C3%A9-vestibular+-+aprender+-+ensinar+-+professores+-+alunos+-+festas+-+eventos+-+monteiro+araxa';
var metaContents  = 'Nucleo+Educativo+Monteiro+Lobato+-+Monteiro+-+Col%C3%A9gio+Monteiro+Lobato+-+Monteiro+Lobato+-+Ensino+-+Vestibular+-+Col%C3%A9gio+-+Educa%C3%A7%C3%A3o+-+Projetos+Pedag%C3%B3gicos+-+Ensino+Infantil+-+Ensino+Fundamental+-+Pr%C3%A9-vestibular+-+aprender+-+ensinar+-+professores+-+alunos+-+festas+-+eventos+-+atividades+-+ensino+-+escola+-+vestibular+-+sugest%C3%B5es+projetos+pedag%C3%B3gicos+-+cidadania+-+ensino+infantil+-+escola+de+Araxa+-+col%C3%A9gios+de+Arax%C3%A1+-+monteiro+araxa';
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();
};
