/* [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','2701',jdecode('HOME'),jdecode(''), jdecode('%2F2701.html'), 'true',[],'',''],
	['PAGE','32801',jdecode('APRESENTA%C3%87%C3%83O'),jdecode(''), jdecode('%2F32801.html'), 'true',[],'',''],
	['PAGE','43912',jdecode('EVENTOS'),jdecode(''), jdecode('%2F43912.html'), 'true',[],'',''],
	['PAGE','20401',jdecode('IMPRENSA'),jdecode(''), jdecode('%2F20401.html'), 'false',[],'',''],
	['PAGE','34301',jdecode('DERMOCOSM%C3%89TICOS'),jdecode(''), jdecode('%2F34301.html'), 'true',[],'',''],
	['PAGE','22022',jdecode('MANIPULADOS'),jdecode(''), jdecode('%2F22022.html'), 'true',[],'',''],
	['PAGE','24601',jdecode('DICAS+DE+SA%C3%9ADE'),jdecode(''), jdecode('%2F24601.html'), 'true',[],'',''],
	['PAGE','22001',jdecode('OR%C3%87AMENTO+ON+LINE'),jdecode(''), jdecode('%2F22001.html'), 'true',[],'',''],
	['PAGE','9201',jdecode('LOCALIZA%C3%87%C3%83O'),jdecode(''), jdecode('%2F9201.html'), 'false',[],'',''],
	['PAGE','9222',jdecode('CONTATO'),jdecode(''), jdecode('%2F9222.html'), 'true',[],'',''],
	['PAGE','47012',jdecode('Palestras'),jdecode(''), jdecode('%2F47012.html'), 'false',[],'',''],
	['PAGE','47033',jdecode('Consulfarma'),jdecode(''), jdecode('%2F47033.html'), 'false',[],'',''],
	['PAGE','34901',jdecode('DERMO+E+ENERGIA+E+VIDA'),jdecode(''), jdecode('%2F34901.html'), 'false',[],'',''],
	['PAGE','46112',jdecode('%C3%B3leo+semente+de+framboesa'),jdecode(''), jdecode('%2F46112.html'), 'false',[],'',''],
	['PAGE','24901',jdecode('Acne'),jdecode(''), jdecode('%2F24901.html'), 'false',[],'',''],
	['PAGE','25801',jdecode('Alergia'),jdecode(''), jdecode('%2F25801.html'), 'false',[],'',''],
	['PAGE','26201',jdecode('Dengue'),jdecode(''), jdecode('%2F26201.html'), 'false',[],'',''],
	['PAGE','26501',jdecode('Menopausa'),jdecode(''), jdecode('%2F26501.html'), 'false',[],'',''],
	['PAGE','27101',jdecode('ch%C3%A1s'),jdecode(''), jdecode('%2F27101.html'), 'false',[],'',''],
	['PAGE','37801',jdecode('depress%C3%A3o'),jdecode(''), jdecode('%2F37801.html'), 'false',[],'',''],
	['PAGE','38301',jdecode('reposi%C3%A7%C3%A3o+hormonal'),jdecode(''), jdecode('%2F38301.html'), 'false',[],'',''],
	['PAGE','38701',jdecode('obesidade'),jdecode(''), jdecode('%2F38701.html'), 'false',[],'',''],
	['PAGE','39001',jdecode('press%C3%A3o+arterial'),jdecode(''), jdecode('%2F39001.html'), 'false',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='1E3F20';
theSitetree.keyvisualId='2496';
theSitetree.keyvisualName='labor.jpg';
theSitetree.fontsetId='433';
theSitetree.graphicsetId='485';
theSitetree.contentColor='006633';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0XJEL'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aeskulap',
				paletteFamily: 	'1E3F20',
				keyvisualId: 	'2496',
				keyvisualName: 	'labor.jpg',
				fontsetId: 		'433',
				graphicsetId: 	'485',
				contentColor: 	'006633',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20101026-091826'
};
webappMappings['1501']=webappMappings['1501-14647849']={
webappId:    '1501',
documentId:  '2701',
internalId:  '14647849',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20100408-150744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9222',
internalId:  '',
customField: '20100609-201810'
};
webappMappings['7008']=webappMappings['7008-13037']={
webappId:    '7008',
documentId:  '9222',
internalId:  '13037',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-16142']={
webappId:    '7008',
documentId:  '22001',
internalId:  '16142',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20100408-150518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22001',
internalId:  '',
customField: '20100609-201855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22022',
internalId:  '',
customField: '20100609-203653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20101026-092634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24901',
internalId:  '',
customField: '20101026-092455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25801',
internalId:  '',
customField: '20101026-103856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26201',
internalId:  '',
customField: '20101026-103945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26501',
internalId:  '',
customField: '20101026-104038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27101',
internalId:  '',
customField: '20101026-104120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32801',
internalId:  '',
customField: '20100609-204156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34301',
internalId:  '',
customField: '20100609-203735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34901',
internalId:  '',
customField: '20100408-162934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37801',
internalId:  '',
customField: '20101026-104207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38301',
internalId:  '',
customField: '20101026-104310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38701',
internalId:  '',
customField: '20101026-104351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39001',
internalId:  '',
customField: '20101026-104439'
};
webappMappings['7008']=webappMappings['7008-16178']={
webappId:    '7008',
documentId:  '2701',
internalId:  '16178',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43912',
internalId:  '',
customField: '20101104-172530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46112',
internalId:  '',
customField: '20101026-104723'
};
webappMappings['7060']=webappMappings['7060-c956060d26fc3fd78c03ae117f482df2']={
webappId:    '7060',
documentId:  '47012',
internalId:  'c956060d26fc3fd78c03ae117f482df2',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-cd1812941ef8a65f9a5d0ba4e7c587dc']={
webappId:    '7060',
documentId:  '47033',
internalId:  'cd1812941ef8a65f9a5d0ba4e7c587dc',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47012',
internalId:  '',
customField: '20101104-162536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47033',
internalId:  '',
customField: '20101104-162610'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30I7C1O2';
var companyName   = '';
var htmlTitle	  = 'BEM+VINDO+%C3%80+ENERGIA+%26+VIDA....';
var metaKeywords  = 'Produtos+Alop%C3%A1ticos%2C+manipula%C3%A7%C3%A3o%2C+farmacia+de+manipula%C3%A7%C3%A3o%2C+entrega+em+domic%C3%ADlio%2C+rem%C3%A9dios+encapsulados';
var metaContents  = 'Produtos+Alop%C3%A1ticos%2C+manipula%C3%A7%C3%A3o%2C+farmacia+de+manipula%C3%A7%C3%A3o%2C+entrega+em+domic%C3%ADlio%2C+rem%C3%A9dios+encapsulados';
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();
};

