/* [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','11',jdecode('Home'),jdecode(''),'/11.html','true',[],'',''],
	['PAGE','41',jdecode('Quem+somos+'),jdecode(''),'/41.html','true',[],'',''],
	['PAGE','50',jdecode('Cursos+Extras'),jdecode(''),'/50.html','true',[],'',''],
	['PAGE','1140',jdecode('Contato'),jdecode(''),'/1140.html','true',[],'',''],
	['PAGE','3644',jdecode('Conhe%C3%A7a+o+col%C3%A9gio'),jdecode(''),'/3644.html','true',[],'',''],
	['PAGE','66031',jdecode('Links+Favoritos'),jdecode(''),'/66031.html','true',[],'',''],
	['PAGE','155212',jdecode('Agendas+-+manh%C3%A3'),jdecode(''),'/155212/index.html','true',[ 
		['PAGE','259334',jdecode('2+e+3+ANOS'),jdecode(''),'/155212/259334.html','true',[],'',''],
		['PAGE','259355',jdecode('4+ANOS'),jdecode(''),'/155212/259355.html','true',[],'',''],
		['PAGE','259376',jdecode('5+ANOS'),jdecode(''),'/155212/259376.html','true',[],'',''],
		['PAGE','155233',jdecode('1%C2%BA+Ano'),jdecode(''),'/155212/155233.html','true',[],'',''],
		['PAGE','259134',jdecode('2%C2%BA+Ano'),jdecode(''),'/155212/259134.html','true',[],'',''],
		['PAGE','155275',jdecode('3%C2%BA+Ano'),jdecode(''),'/155212/155275.html','true',[],'',''],
		['PAGE','155296',jdecode('4%C2%BA+Ano'),jdecode(''),'/155212/155296.html','true',[],'',''],
		['PAGE','259155',jdecode('5%C2%BA+Ano'),jdecode(''),'/155212/259155.html','true',[],'',''],
		['PAGE','155338',jdecode('6%C2%BA+Ano'),jdecode(''),'/155212/155338.html','true',[],'',''],
		['PAGE','155359',jdecode('7%C2%BA+Ano'),jdecode(''),'/155212/155359.html','true',[],'',''],
		['PAGE','155380',jdecode('8%C2%BA+Ano'),jdecode(''),'/155212/155380.html','true',[],'',''],
		['PAGE','155401',jdecode('9%C2%BA+Ano'),jdecode(''),'/155212/155401.html','true',[],'',''],
		['PAGE','259397',jdecode('M%C3%A9dio'),jdecode(''),'/155212/259397.html','true',[],'','']
	],'',''],
	['PAGE','156012',jdecode('Agendas+-+tarde'),jdecode(''),'/156012/index.html','true',[ 
		['PAGE','259534',jdecode('2+E+3+ANOS'),jdecode(''),'/156012/259534.html','true',[],'',''],
		['PAGE','259555',jdecode('4+ANOS'),jdecode(''),'/156012/259555.html','true',[],'',''],
		['PAGE','259576',jdecode('5+ANOS'),jdecode(''),'/156012/259576.html','true',[],'',''],
		['PAGE','156033',jdecode('1%C2%BA+Ano'),jdecode(''),'/156012/156033.html','true',[],'',''],
		['PAGE','156054',jdecode('2%C2%BA+Ano'),jdecode(''),'/156012/156054.html','true',[],'',''],
		['PAGE','156075',jdecode('3%C2%BA+Ano'),jdecode(''),'/156012/156075.html','true',[],'',''],
		['PAGE','259176',jdecode('4%C2%BA+Ano'),jdecode(''),'/156012/259176.html','true',[],'',''],
		['PAGE','156117',jdecode('5%C2%BA+Ano'),jdecode(''),'/156012/156117.html','true',[],'','']
	],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Communication';
theSitetree.paletteFamily='F6CF9C';
theSitetree.keyvisualId='332';
theSitetree.keyvisualName='books.jpg';
theSitetree.fontsetId='31';
theSitetree.graphicsetId='34';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F5E9CD';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Communication',
				paletteFamily: 	'F6CF9C',
				keyvisualId: 	'332',
				keyvisualName: 	'books.jpg',
				fontsetId: 		'31',
				graphicsetId: 	'34',
				contentColor: 	'000000',
				contentBGColor: 'F5E9CD',
				a_color: 		'F6CF9C',
				b_color: 		'9A190E',
				c_color: 		'000000',
				d_color: 		'CC6600',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-46f569b5d78b31327bea744b8492805f']={
webappId:    '7060',
documentId:  '3644',
internalId:  '46f569b5d78b31327bea744b8492805f',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20100623-110422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41',
internalId:  '',
customField: '20091204-043208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50',
internalId:  '',
customField: '20091127-053040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1140',
internalId:  '',
customField: '20091127-053247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3644',
internalId:  '',
customField: '20091127-054132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66031',
internalId:  '',
customField: '20091202-034438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155212',
internalId:  '',
customField: '20100816-123945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155233',
internalId:  '',
customField: '20100805-122126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155275',
internalId:  '',
customField: '20100902-125733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155296',
internalId:  '',
customField: '20100902-130100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155338',
internalId:  '',
customField: '20100902-124912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155359',
internalId:  '',
customField: '20100902-125017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155380',
internalId:  '',
customField: '20100902-125104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155401',
internalId:  '',
customField: '20100902-125207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156012',
internalId:  '',
customField: '20100826-112305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156033',
internalId:  '',
customField: '20100811-143133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156054',
internalId:  '',
customField: '20100902-125246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156075',
internalId:  '',
customField: '20100902-125359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156117',
internalId:  '',
customField: '20100902-125759'
};
webappMappings['1501']=webappMappings['1501-14368426']={
webappId:    '1501',
documentId:  '11',
internalId:  '14368426',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '259134',
internalId:  '',
customField: '20100901-114205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '259155',
internalId:  '',
customField: '20100902-130142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '259176',
internalId:  '',
customField: '20100902-125545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '259334',
internalId:  '',
customField: '20091229-082607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '259355',
internalId:  '',
customField: '20091229-084734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '259376',
internalId:  '',
customField: '20091229-085311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '259397',
internalId:  '',
customField: '20100902-125349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '259534',
internalId:  '',
customField: '20091229-083316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '259555',
internalId:  '',
customField: '20091229-083855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '259576',
internalId:  '',
customField: '20091229-085759'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2IDS';
var companyName   = 'Col%C3%A9gio+Objetivo+-+Jaguar%C3%A9';
var htmlTitle	  = '';
var metaKeywords  = 'objetivo%0D%0Aescola%0D%0Ajaguar%C3%A9%0D%0Acontinental%0D%0Aensino%0D%0Aunip%0D%0Ainterativa';
var metaContents  = 'Objetivo+%0D%0AEGO%0D%0AInfantil%0D%0AColegio%0D%0A';
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();
};
