/* [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','56301',jdecode('Benvindo'),jdecode(''),'/56301.html','true',[],'',''],
	['PAGE','401',jdecode('Quem+sou+eu'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','2801',jdecode('Servi%C3%A7os+oferecidos'),jdecode(''),'/2801.html','true',[],'',''],
	['PAGE','20201',jdecode('Manejo+Reprodutivo'),jdecode(''),'/20201.html','true',[],'',''],
	['PAGE','52701',jdecode('Ciclo+estral+em+cadelas'),jdecode(''),'/52701.html','true',[],'',''],
	['PAGE','3801',jdecode('Insemina%C3%A7%C3%A3o+artificial'),jdecode(''),'/3801.html','true',[],'',''],
	['PAGE','4301',jdecode('Citologia+vaginal'),jdecode(''),'/4301.html','true',[],'',''],
	['PAGE','67801',jdecode('Vaginoscopia'),jdecode(''),'/67801.html','true',[],'',''],
	['PAGE','57601',jdecode('Progesterona'),jdecode(''),'/57601.html','true',[],'',''],
	['PAGE','67401',jdecode('Colheita+de+s%C3%AAmen'),jdecode(''),'/67401.html','true',[],'',''],
	['PAGE','65401',jdecode('S%C3%AAmen-Espermograma'),jdecode(''),'/65401.html','true',[],'',''],
	['PAGE','10801',jdecode('S%C3%AAmen+refrigerado'),jdecode(''),'/10801.html','true',[],'',''],
	['PAGE','82101',jdecode('Banco+de+s%C3%AAmen'),jdecode(''),'/82101/index.html','true',[ 
		['PAGE','18201',jdecode('S%C3%AAmen+congelado'),jdecode(''),'/82101/18201.html','true',[],'','']
	],'',''],
	['PAGE','9601',jdecode('Gesta%C3%A7%C3%A3o'),jdecode(''),'/9601.html','true',[],'',''],
	['PAGE','54001',jdecode('Parto'),jdecode(''),'/54001.html','true',[],'',''],
	['PAGE','5301',jdecode('Neonatologia'),jdecode(''),'/5301.html','true',[],'',''],
	['PAGE','83701',jdecode('Cuidados+com+os+filhotes'),jdecode(''),'/83701.html','true',[],'',''],
	['PAGE','80201',jdecode('Doen%C3%A7as+da+reprodu%C3%A7%C3%A3o'),jdecode(''),'/80201/index.html','true',[ 
		['PAGE','80222',jdecode('Piometra'),jdecode(''),'/80201/80222.html','true',[],'',''],
		['PAGE','83001',jdecode('Brucelose'),jdecode(''),'/80201/83001.html','true',[],'','']
	],'',''],
	['PAGE','74201',jdecode('Equipe'),jdecode(''),'/74201.html','true',[],'',''],
	['PAGE','72101',jdecode('Cursos+e+palestras'),jdecode(''),'/72101.html','true',[],'',''],
	['PAGE','9201',jdecode('Contato'),jdecode(''),'/9201.html','true',[],'',''],
	['PAGE','51801',jdecode('Links'),jdecode(''),'/51801.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Nurseries';
theSitetree.paletteFamily='FFE57B';
theSitetree.keyvisualId='7904';
theSitetree.keyvisualName='kv_7904.jpg';
theSitetree.fontsetId='16879';
theSitetree.graphicsetId='12313';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFE57B';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'true',
				name: 			'Nurseries',
				paletteFamily: 	'FFE57B',
				keyvisualId: 	'7904',
				keyvisualName: 	'kv_7904.jpg',
				fontsetId: 		'16879',
				graphicsetId: 	'12313',
				contentColor: 	'000000',
				contentBGColor: 'FFE57B',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54001',
internalId:  '',
customField: '20090202-182916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20091106-034625'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '56301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20090215-062914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20090131-132425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4301',
internalId:  '',
customField: '20100403-144724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3801',
internalId:  '',
customField: '20090311-162311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10801',
internalId:  '',
customField: '20090410-060821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20090502-203059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20090202-182958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20201',
internalId:  '',
customField: '20080617-033037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52701',
internalId:  '',
customField: '20100404-062019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20090416-090414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51801',
internalId:  '',
customField: '20090712-131142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56301',
internalId:  '',
customField: '20100427-063055'
};
webappMappings['7008']=webappMappings['7008-2388']={
webappId:    '7008',
documentId:  '9201',
internalId:  '2388',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57601',
internalId:  '',
customField: '20090314-181113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65401',
internalId:  '',
customField: '20090811-045750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67401',
internalId:  '',
customField: '20090126-045653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67801',
internalId:  '',
customField: '20090126-051610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72101',
internalId:  '',
customField: '20100427-063559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83701',
internalId:  '',
customField: '20090618-105452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74201',
internalId:  '',
customField: '20090324-155330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80201',
internalId:  '',
customField: '20090428-134149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80222',
internalId:  '',
customField: '20090425-212709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82101',
internalId:  '',
customField: '20090502-203321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83001',
internalId:  '',
customField: '20090513-223015'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLTDZ';
var companyName   = 'Profa.+Dra.+Silvia+Crusco';
var htmlTitle	  = 'Silvia+Crusco';
var metaKeywords  = 'Insemina%C3%A7%C3%A3o+c%C3%A3es+Banco+de+s%C3%AAmen+Reprodu%C3%A7%C3%A3o+c%C3%A3es+Congelamento+de+s%C3%AAmen';
var metaContents  = 'Insemina%C3%A7%C3%A3o+Artificial+C%C3%A3es';
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();
};
