/* [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','4201',jdecode('Apresenta%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F4201.html'), 'true',[],'',''],
	['PAGE','64801',jdecode('Edi%C3%A7%C3%A3o+Atual'),jdecode(''), jdecode('%2F64801.html'), 'true',[],'',''],
	['PAGE','9801',jdecode('Edi%C3%A7%C3%A3o+Anterior'),jdecode(''), jdecode('%2F9801.html'), 'true',[],'',''],
	['PAGE','8301',jdecode('Proposta+para+2012'),jdecode(''), jdecode('%2F8301.html'), 'true',[],'',''],
	['PAGE','65501',jdecode('Programa%C3%A7%C3%A3o+do+m%C3%AAs'),jdecode(''), jdecode('%2F65501.html'), 'true',[],'',''],
	['PAGE','43201',jdecode('Veredas+da+Espiritualidade'),jdecode(''), jdecode('%2F43201.html'), 'true',[],'',''],
	['PAGE','11001',jdecode('Grupo+de+Reflex%C3%A3o'),jdecode(''), jdecode('%2F11001.html'), 'true',[],'',''],
	['PAGE','48601',jdecode('Grupo+Mios%C3%B3tis'),jdecode(''), jdecode('%2F48601.html'), 'true',[],'',''],
	['PAGE','62001',jdecode('Novo+Grupo+de+Reflex%C3%A3o+-+Sa%C3%BAde+Preventiva'),jdecode(''), jdecode('%2F62001.html'), 'true',[],'',''],
	['PAGE','21301',jdecode('Espa%C3%A7o+dos+Mios%C3%B3tis'),jdecode(''), jdecode('%2F21301.html'), 'true',[],'',''],
	['PAGE','24801',jdecode('Aconselhamento+Terap%C3%AAutico+Integrado'),jdecode(''), jdecode('%2F24801.html'), 'true',[],'',''],
	['PAGE','36901',jdecode('Psicoterapia+Hol%C3%ADstica+Transpessoal'),jdecode(''), jdecode('%2F36901.html'), 'true',[],'',''],
	['PAGE','42101',jdecode('Significado+de+%22Personal+Coaching%22'),jdecode(''), jdecode('%2F42101.html'), 'true',[],'',''],
	['PAGE','12101',jdecode('Curso%3AO+Poder+Criador+da+Mente'),jdecode(''), jdecode('%2F12101.html'), 'true',[],'',''],
	['PAGE','24101',jdecode('Semin%C3%A1rio%3A+Intelig%C3%AAncia+e+Compet%C3%AAncia+Emocional'),jdecode(''), jdecode('%2F24101.html'), 'true',[],'',''],
	['PAGE','26401',jdecode('Workshop%3A+Liberando+o+Stress%21'),jdecode(''), jdecode('%2F26401.html'), 'true',[],'',''],
	['PAGE','30001',jdecode('Workshop+Vivencial'),jdecode(''), jdecode('%2F30001.html'), 'true',[],'',''],
	['PAGE','13901',jdecode('Artigo%3A+O+Poder+Criador+da+Mente'),jdecode(''), jdecode('%2F13901.html'), 'true',[],'',''],
	['PAGE','36501',jdecode('Recusa+das+Emo%C3%A7%C3%B5es+Negativas'),jdecode(''), jdecode('%2F36501.html'), 'true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Undulate';
theSitetree.paletteFamily='040404';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33117';
theSitetree.graphicsetId='14070';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='404040';
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: 			'Undulate',
				paletteFamily: 	'040404',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33117',
				graphicsetId: 	'14070',
				contentColor: 	'FFFFFF',
				contentBGColor: '404040',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64801',
internalId:  '',
customField: '20120212-084105'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '4201',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20120115-104537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20111204-120905'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20100704-113646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20120212-085514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20111218-095306'
};
webappMappings['1501']=webappMappings['1501-12836131']={
webappId:    '1501',
documentId:  '4201',
internalId:  '12836131',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20100704-115014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21301',
internalId:  '',
customField: '20100704-113007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24101',
internalId:  '',
customField: '20100704-114215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24801',
internalId:  '',
customField: '20100131-101324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20100704-114631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65501',
internalId:  '',
customField: '20120212-090759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20100701-153321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36501',
internalId:  '',
customField: '20100103-155845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36901',
internalId:  '',
customField: '20100103-161837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42101',
internalId:  '',
customField: '20120212-092740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43201',
internalId:  '',
customField: '20100701-151841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48601',
internalId:  '',
customField: '20120103-131142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62001',
internalId:  '',
customField: '20120212-091323'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INPX7U';
var companyName   = 'OTIMIZE+SEU+DIA%21';
var htmlTitle	  = 'OTIMIZE+SEU+DIA%21';
var metaKeywords  = 'Aconselhamento+Terap%C3%AAutico%3B+Aconselhamento%3B+Reflex%C3%A3o%3B+Crescimento+Pessoal%3B+Espiritual%3B+Espiritualidade%3B+Amor%3B+Paz%3B+Pureza%3B+Equilibrio%3B+Verdade%3B+Poder+sobre+si+mesmo%3B+Felicidade%3B+Sabedoria%3B+Energia+Espiritual%3B+Intui%C3%A7%C3%A3o%3B+Inspira%C3%A7%C3%A3o%3B+Personal+Coaching%3B+Psicoterapia%3B+Psicoterapia+Hol%C3%ADstica+Transpessoal';
var metaContents  = 'Todos+queremos+crescer+e+sermos+felizes.+As+atitudes+que+assumimos%2C+em+qualquer+momento%2C+ser%C3%A3o+para+nos+sentirmos+motivados.+Todos+queremos+viver+nossa+felicidade+aut%C3%AAntica.+';
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();
};

