/* [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','3001',jdecode('Inicial'),jdecode(''), jdecode('%2F3001.html'), 'true',[],'',''],
	['PAGE','12612',jdecode('Raio+Violeta'),jdecode(''), jdecode('%2F12612%2Findex.html'), 'true',[ 
		['PAGE','12633',jdecode('Profissionais'),jdecode(''), jdecode('%2F12612%2F12633.html'), 'true',[],'',''],
		['PAGE','12654',jdecode('Fotos'),jdecode(''), jdecode('%2F12612%2F12654.html'), 'true',[],'','']
	],'',''],
	['PAGE','5001',jdecode('Psicologia'),jdecode(''), jdecode('%2F5001%2Findex.html'), 'true',[ 
		['PAGE','10712',jdecode('Hipnose'),jdecode(''), jdecode('%2F5001%2F10712.html'), 'true',[],'',''],
		['PAGE','7712',jdecode('Regress%C3%A3o'),jdecode(''), jdecode('%2F5001%2F7712.html'), 'true',[],'','']
	],'',''],
	['PAGE','5022',jdecode('Astrologia'),jdecode(''), jdecode('%2F5022.html'), 'true',[],'',''],
	['PAGE','5043',jdecode('Terapias'),jdecode(''), jdecode('%2F5043%2Findex.html'), 'true',[ 
		['PAGE','10733',jdecode('Florais'),jdecode(''), jdecode('%2F5043%2F10733.html'), 'true',[],'',''],
		['PAGE','10754',jdecode('Reiki'),jdecode(''), jdecode('%2F5043%2F10754.html'), 'true',[],'',''],
		['PAGE','10775',jdecode('EMF'),jdecode(''), jdecode('%2F5043%2F10775.html'), 'true',[],'','']
	],'',''],
	['PAGE','5064',jdecode('Agenda'),jdecode(''), jdecode('%2F5064.html'), 'true',[],'',''],
	['PAGE','5085',jdecode('Not%C3%ADcias'),jdecode(''), jdecode('%2F5085%2Findex.html'), 'true',[ 
		['PAGE','12675',jdecode('Geral'),jdecode(''), jdecode('%2F5085%2F12675.html'), 'true',[],'',''],
		['PAGE','12696',jdecode('Meio+Ambiente'),jdecode(''), jdecode('%2F5085%2F12696.html'), 'true',[],'','']
	],'',''],
	['PAGE','12717',jdecode('Artigos'),jdecode(''), jdecode('%2F12717.html'), 'true',[],'',''],
	['PAGE','6001',jdecode('Servi%C3%A7os'),jdecode(''), jdecode('%2F6001%2Findex.html'), 'true',[ 
		['PAGE','10912',jdecode('Calend%C3%A1rio'),jdecode(''), jdecode('%2F6001%2F10912.html'), 'true',[],'',''],
		['PAGE','10933',jdecode('Consultas'),jdecode(''), jdecode('%2F6001%2F10933.html'), 'true',[],'',''],
		['PAGE','10954',jdecode('Progn%C3%B3sticos'),jdecode(''), jdecode('%2F6001%2F10954.html'), 'true',[],'','']
	],'',''],
	['PAGE','4501',jdecode('Contato'),jdecode(''), jdecode('%2F4501.html'), 'true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Stars';
theSitetree.paletteFamily='3C5284';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10510';
theSitetree.graphicsetId='10913';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3C5284';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0X9WF'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stars',
				paletteFamily: 	'3C5284',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10510',
				graphicsetId: 	'10913',
				contentColor: 	'FFFFFF',
				contentBGColor: '3C5284',
				a_color: 		'3C5284',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20110209-162630'
};
webappMappings['7008']=webappMappings['7008-22179']={
webappId:    '7008',
documentId:  '4501',
internalId:  '22179',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20110209-222935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20110208-001223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4501',
internalId:  '',
customField: '20110208-181853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5064',
internalId:  '',
customField: '20110202-184432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5043',
internalId:  '',
customField: '20110209-210436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20110209-222348'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5085',
internalId:  '',
customField: '20110202-145833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7712',
internalId:  '',
customField: '20110209-234149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10712',
internalId:  '',
customField: '20110209-234128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10754',
internalId:  '',
customField: '20110209-220535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10733',
internalId:  '',
customField: '20110209-220354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12612',
internalId:  '',
customField: '20110209-223613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12633',
internalId:  '',
customField: '20110209-225945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12654',
internalId:  '',
customField: '20110209-233154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10775',
internalId:  '',
customField: '20110209-221051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12675',
internalId:  '',
customField: '20110208-175338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12696',
internalId:  '',
customField: '20110208-175338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12717',
internalId:  '',
customField: '20110208-175338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10912',
internalId:  '',
customField: '20110208-000040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10933',
internalId:  '',
customField: '20110208-000040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10954',
internalId:  '',
customField: '20110208-000040'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7KCM0';
var companyName   = 'RAIO+VIOLETA';
var htmlTitle	  = 'RAIO+VIOLETA';
var metaKeywords  = 'Raio+Violeta%2C+Psicologia+Transpessoal%2C+Astrologia%2C+TRT+Regress%C3%A3o+de+Mem%C3%B3ria%2C+Reiki%2C+Terapia+Floral%2C+EMF+Balancing+Technique%2C+EMDR%2C+Hipnose+Cl%C3%ADnica+Ericksoniana.';
var metaContents  = 'Raio+Violeta%2C+consultas+e+cursos';
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();
};

