/* [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(''), jdecode('%2F1201.html'), 'true',[],'',''],
	['PAGE','234842',jdecode('Links+interessantes'),jdecode(''), jdecode('%2F234842.html'), 'true',[],'',''],
	['PAGE','22201',jdecode('Fameplan'),jdecode(''), jdecode('%2F22201%2Findex.html'), 'true',[ 
		['PAGE','22222',jdecode('A+Institui%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F22201%2F22222.html'), 'true',[],'',''],
		['PAGE','103197',jdecode('Princ%C3%ADpios+Norteadores'),jdecode(''), jdecode('%2F22201%2F103197.html'), 'true',[],'',''],
		['PAGE','22243',jdecode('Como+Chegar'),jdecode(''), jdecode('%2F22201%2F22243.html'), 'true',[],'','']
	],'',''],
	['PAGE','22306',jdecode('Instala%C3%A7%C3%B5es'),jdecode(''), jdecode('%2F22306%2Findex.html'), 'true',[ 
		['PAGE','22327',jdecode('Laborat%C3%B3rios'),jdecode(''), jdecode('%2F22306%2F22327.html'), 'true',[],'',''],
		['PAGE','22348',jdecode('Biblioteca'),jdecode(''), jdecode('%2F22306%2F22348.html'), 'true',[],'','']
	],'',''],
	['PAGE','12501',jdecode('Biblioteca+-+Acesso'),jdecode(''), jdecode('%2F12501.html'), 'true',[],'',''],
	['PAGE','22801',jdecode('Cursos'),jdecode(''), jdecode('%2F22801%2Findex.html'), 'true',[ 
		['PAGE','148572',jdecode('Col%C3%A9gio+Objetivo'),jdecode(''), jdecode('%2F22801%2F148572.html'), 'true',[],'',''],
		['PAGE','22822',jdecode('Gradua%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F22801%2F22822.html'), 'true',[],'',''],
		['PAGE','22843',jdecode('P%C3%B3s+-+Gradua%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F22801%2F22843.html'), 'true',[],'','']
	],'',''],
	['PAGE','164972',jdecode('Inscri%C3%A7%C3%B5es'),jdecode(''), jdecode('%2F164972.html'), 'true',[],'',''],
	['PAGE','22906',jdecode('Administrativo'),jdecode(''), jdecode('%2F22906%2Findex.html'), 'true',[ 
		['PAGE','22927',jdecode('Coordena%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F22906%2F22927.html'), 'true',[],'',''],
		['PAGE','22948',jdecode('Corpo+Docente'),jdecode(''), jdecode('%2F22906%2F22948.html'), 'true',[],'',''],
		['PAGE','22969',jdecode('Investimento'),jdecode(''), jdecode('%2F22906%2F22969.html'), 'true',[],'',''],
		['PAGE','76901',jdecode('Benef%C3%ADcios'),jdecode(''), jdecode('%2F22906%2F76901.html'), 'true',[],'','']
	],'',''],
	['PAGE','23401',jdecode('Processo+Seletivo'),jdecode(''), jdecode('%2F23401%2Findex.html'), 'true',[ 
		['PAGE','23422',jdecode('Cronograma'),jdecode(''), jdecode('%2F23401%2F23422.html'), 'true',[],'',''],
		['PAGE','23443',jdecode('Edital'),jdecode(''), jdecode('%2F23401%2F23443.html'), 'true',[],'',''],
		['PAGE','201398',jdecode('Aprovados+2%C2%AA+Sem.+2011'),jdecode(''), jdecode('%2F23401%2F201398.html'), 'true',[],'',''],
		['PAGE','37901',jdecode('Calend%C3%A1rio'),jdecode(''), jdecode('%2F23401%2F37901.html'), 'true',[],'','']
	],'',''],
	['PAGE','43501',jdecode('Portaria'),jdecode(''), jdecode('%2F43501.html'), 'true',[],'',''],
	['PAGE','75801',jdecode('Galeria+de+fotos'),jdecode(''), jdecode('%2F75801.html'), 'true',[],'',''],
	['PAGE','112028',jdecode('Painel+de+informa%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F112028.html'), 'true',[ 
		['ITEM','171187',jdecode('Notas+Professores'),jdecode(''), jdecode('http%3A%2F%2Ffameplan.ddns.com.br%3A8080%2Fwebspedu%2FLogin.aspx%3FTID%3D1'), 'true',[],'',''],
		['ITEM','171188',jdecode('Notas+Alunos'),jdecode(''), jdecode('http%3A%2F%2Ffameplan.ddns.com.br%3A8080%2Fwebspedu%2FLogin.aspx%3FTID%3D0'), 'true',[],'','']
	],'',''],
	['PAGE','170787',jdecode('Enquete'),jdecode(''), jdecode('%2F170787.html'), 'true',[],'',''],
	['PAGE','232442',jdecode('Contato'),jdecode(''), jdecode('%2F232442.html'), 'true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Mote';
theSitetree.paletteFamily='0450C2';
theSitetree.keyvisualId='11400';
theSitetree.keyvisualName='kv_11400.jpg';
theSitetree.fontsetId='31998';
theSitetree.graphicsetId='13828';
theSitetree.contentColor='8E8C8C';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0X9A9'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Mote',
				paletteFamily: 	'0450C2',
				keyvisualId: 	'11400',
				keyvisualName: 	'kv_11400.jpg',
				fontsetId: 		'31998',
				graphicsetId: 	'13828',
				contentColor: 	'8E8C8C',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
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: '20120201-071123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20120124-114912'
};
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: '20120125-110318'
};
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: '20101115-141843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22822',
internalId:  '',
customField: '20111129-113859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22843',
internalId:  '',
customField: '20120125-105511'
};
webappMappings['7008']=webappMappings['7008-28093']={
webappId:    '7008',
documentId:  '232442',
internalId:  '28093',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22906',
internalId:  '',
customField: '20080411-131431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22927',
internalId:  '',
customField: '20120111-122221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22948',
internalId:  '',
customField: '20111027-065746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22969',
internalId:  '',
customField: '20120111-122710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76901',
internalId:  '',
customField: '20101115-124854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23401',
internalId:  '',
customField: '20120111-123521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23422',
internalId:  '',
customField: '20120111-124510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23443',
internalId:  '',
customField: '20120111-130958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20120111-131944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43501',
internalId:  '',
customField: '20080521-132943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75801',
internalId:  '',
customField: '20101018-063636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103197',
internalId:  '',
customField: '20091023-070958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112028',
internalId:  '',
customField: '20100920-072012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '232442',
internalId:  '',
customField: '20111205-074925'
};
webappMappings['7060']=webappMappings['7060-df3b461b9023cc36fe60989fcad9ffd3']={
webappId:    '7060',
documentId:  '37901',
internalId:  'df3b461b9023cc36fe60989fcad9ffd3',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148572',
internalId:  '',
customField: '20100928-093849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164972',
internalId:  '',
customField: '20101027-081513'
};
webappMappings['7008']=webappMappings['7008-20075']={
webappId:    '7008',
documentId:  '164972',
internalId:  '20075',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-f3966de911d1d8241cc4428dff69feb5']={
webappId:    '7060',
documentId:  '75801',
internalId:  'f3966de911d1d8241cc4428dff69feb5',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-d882ff86ad3398eb4e034e130c38dc5c']={
webappId:    '7060',
documentId:  '75801',
internalId:  'd882ff86ad3398eb4e034e130c38dc5c',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-20206']={
webappId:    '7008',
documentId:  '12501',
internalId:  '20206',
customField: 'language:pt;country:BR;'
};
webappMappings['7005']=webappMappings['7005-1738']={
webappId:    '7005',
documentId:  '170787',
internalId:  '1738',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170787',
internalId:  '',
customField: '20110805-094337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '234842',
internalId:  '',
customField: '20120125-110055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201398',
internalId:  '',
customField: '20111216-160133'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '23401',
internalId:  'search',
customField: 'language:pt;country:BR;'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLRJP';
var companyName   = 'FAMEPLAN';
var htmlTitle	  = 'O+protagonista+%C3%A9+voc%C3%AA%21';
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+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();
};

