/* [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','1201',jdecode('Home'),jdecode(''),'/1201.html','true',[],'',''],
	['PAGE','22201',jdecode('Fameplan'),jdecode(''),'/22201/index.html','true',[ 
		['PAGE','22222',jdecode('A+Institui%C3%A7%C3%A3o'),jdecode(''),'/22201/22222.html','true',[],'',''],
		['PAGE','103197',jdecode('Princ%C3%ADpios+Norteadores'),jdecode(''),'/22201/103197.html','true',[],'',''],
		['PAGE','22243',jdecode('Como+Chegar'),jdecode(''),'/22201/22243.html','true',[],'','']
	],'',''],
	['PAGE','22306',jdecode('Instala%C3%A7%C3%B5es'),jdecode(''),'/22306/index.html','true',[ 
		['PAGE','22327',jdecode('Laborat%C3%B3rios'),jdecode(''),'/22306/22327.html','true',[],'',''],
		['PAGE','22348',jdecode('Biblioteca'),jdecode(''),'/22306/22348.html','true',[],'','']
	],'',''],
	['PAGE','12501',jdecode('Biblioteca+-+Acesso'),jdecode(''),'/12501.html','true',[],'',''],
	['PAGE','22801',jdecode('Cursos'),jdecode(''),'/22801/index.html','true',[ 
		['PAGE','22822',jdecode('Gradua%C3%A7%C3%A3o'),jdecode(''),'/22801/22822.html','true',[],'',''],
		['PAGE','22843',jdecode('P%C3%B3s+-+Gradua%C3%A7%C3%A3o'),jdecode(''),'/22801/22843.html','true',[],'',''],
		['PAGE','22864',jdecode('T%C3%A9cnicos'),jdecode(''),'/22801/22864.html','true',[],'','']
	],'',''],
	['PAGE','22906',jdecode('Administrativo'),jdecode(''),'/22906/index.html','true',[ 
		['PAGE','22927',jdecode('Coordena%C3%A7%C3%A3o'),jdecode(''),'/22906/22927.html','true',[],'',''],
		['PAGE','22948',jdecode('Corpo+Docente'),jdecode(''),'/22906/22948.html','true',[],'',''],
		['PAGE','22969',jdecode('Investimento'),jdecode(''),'/22906/22969.html','true',[],'',''],
		['PAGE','76901',jdecode('Benef%C3%ADcios'),jdecode(''),'/22906/76901.html','true',[],'','']
	],'',''],
	['PAGE','23401',jdecode('Processo+Seletivo'),jdecode(''),'/23401/index.html','true',[ 
		['PAGE','23422',jdecode('Cronograma'),jdecode(''),'/23401/23422.html','true',[],'',''],
		['PAGE','23443',jdecode('Edital'),jdecode(''),'/23401/23443.html','true',[],'',''],
		['PAGE','113828',jdecode('Aprovados+2010%2F1'),jdecode(''),'/23401/113828.html','true',[],'','']
	],'',''],
	['PAGE','37901',jdecode('Calend%C3%A1rio'),jdecode(''),'/37901.html','true',[],'',''],
	['PAGE','43501',jdecode('Portaria'),jdecode(''),'/43501.html','true',[],'',''],
	['PAGE','75801',jdecode('Galeria+de+fotos'),jdecode(''),'/75801.html','true',[],'',''],
	['PAGE','112028',jdecode('Painel+de+informa%C3%A7%C3%A3o'),jdecode(''),'/112028/index.html','true',[ 
		['PAGE','112049',jdecode('Notas+Professores'),jdecode(''),'/112028/112049.html','true',[],'',''],
		['PAGE','112070',jdecode('Notas+Alunos'),jdecode(''),'/112028/112070.html','true',[],'','']
	],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='000099';
theSitetree.keyvisualId='9241';
theSitetree.keyvisualName='kv3.swf';
theSitetree.fontsetId='17360';
theSitetree.graphicsetId='12755';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Transluszent',
				paletteFamily: 	'000099',
				keyvisualId: 	'9241',
				keyvisualName: 	'kv3.swf',
				fontsetId: 		'17360',
				graphicsetId: 	'12755',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1201',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-9687330']={
webappId:    '1501',
documentId:  '1201',
internalId:  '9687330',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1201',
internalId:  '',
customField: '20100820-074205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20100319-093025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22201',
internalId:  '',
customField: '20081023-173207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22222',
internalId:  '',
customField: '20091023-071716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22243',
internalId:  '',
customField: '20080505-130353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22306',
internalId:  '',
customField: '20091023-073737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22327',
internalId:  '',
customField: '20080415-133942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22348',
internalId:  '',
customField: '20080509-062156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12501',
internalId:  '',
customField: '20090524-232659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22822',
internalId:  '',
customField: '20080527-114513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22843',
internalId:  '',
customField: '20100319-094833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22864',
internalId:  '',
customField: '20100302-192106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22906',
internalId:  '',
customField: '20080411-131431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22927',
internalId:  '',
customField: '20091027-105007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22948',
internalId:  '',
customField: '20091027-104138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22969',
internalId:  '',
customField: '20091027-103622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76901',
internalId:  '',
customField: '20081124-192541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23401',
internalId:  '',
customField: '20100712-113505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23422',
internalId:  '',
customField: '20100528-094719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23443',
internalId:  '',
customField: '20100528-091826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20100616-120037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43501',
internalId:  '',
customField: '20080521-132943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75801',
internalId:  '',
customField: '20100809-121656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103197',
internalId:  '',
customField: '20091023-070958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112028',
internalId:  '',
customField: '20100810-124454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112049',
internalId:  '',
customField: '20100810-124756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112070',
internalId:  '',
customField: '20100810-124903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113828',
internalId:  '',
customField: '20091209-072724'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLRJP';
var companyName   = 'FAMEPLAN';
var htmlTitle	  = '';
var metaKeywords  = 'Canoinhas%2C+Fameplan%2C+Faculdade%2C+Educa%C3%A7%C3%A3o%2C+Planalto+Norte%2C+P%C3%B3s+-+Gradua%C3%A7%C3%A3o%2C+MBA%2C+FGV%2C+Sociesc%2C+Cursos%2C+Escola%2C+T%C3%A9cnico%2CEscola+T%C3%A9cnica%2C';
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();
};
