/* [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(''), jdecode('%2F56301.html'), 'true',[],'',''],
	['PAGE','401',jdecode('Quem+sou+eu'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','2801',jdecode('Servi%C3%A7os+oferecidos'),jdecode(''), jdecode('%2F2801.html'), 'true',[],'',''],
	['PAGE','20201',jdecode('Manejo+Reprodutivo'),jdecode(''), jdecode('%2F20201.html'), 'true',[],'',''],
	['PAGE','52701',jdecode('Ciclo+estral+em+cadelas'),jdecode(''), jdecode('%2F52701.html'), 'true',[],'',''],
	['PAGE','3801',jdecode('Insemina%C3%A7%C3%A3o+artificial'),jdecode(''), jdecode('%2F3801.html'), 'true',[],'',''],
	['PAGE','4301',jdecode('Citologia+vaginal'),jdecode(''), jdecode('%2F4301.html'), 'true',[],'',''],
	['PAGE','67801',jdecode('Vaginoscopia'),jdecode(''), jdecode('%2F67801.html'), 'true',[],'',''],
	['PAGE','57601',jdecode('Progesterona'),jdecode(''), jdecode('%2F57601.html'), 'true',[],'',''],
	['PAGE','67401',jdecode('Colheita+de+s%C3%AAmen'),jdecode(''), jdecode('%2F67401.html'), 'true',[],'',''],
	['PAGE','65401',jdecode('S%C3%AAmen-Espermograma'),jdecode(''), jdecode('%2F65401.html'), 'true',[],'',''],
	['PAGE','10801',jdecode('S%C3%AAmen+refrigerado'),jdecode(''), jdecode('%2F10801.html'), 'true',[],'',''],
	['PAGE','82101',jdecode('Banco+de+s%C3%AAmen'),jdecode(''), jdecode('%2F82101%2Findex.html'), 'true',[ 
		['PAGE','18201',jdecode('S%C3%AAmen+congelado'),jdecode(''), jdecode('%2F82101%2F18201.html'), 'true',[],'','']
	],'',''],
	['PAGE','9601',jdecode('Gesta%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F9601.html'), 'true',[],'',''],
	['PAGE','54001',jdecode('Parto'),jdecode(''), jdecode('%2F54001.html'), 'true',[],'',''],
	['PAGE','5301',jdecode('Neonatologia'),jdecode(''), jdecode('%2F5301.html'), 'true',[],'',''],
	['PAGE','83701',jdecode('Cuidados+com+os+filhotes'),jdecode(''), jdecode('%2F83701.html'), 'true',[],'',''],
	['PAGE','80201',jdecode('Doen%C3%A7as+da+reprodu%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F80201%2Findex.html'), 'true',[ 
		['PAGE','80222',jdecode('Piometra'),jdecode(''), jdecode('%2F80201%2F80222.html'), 'true',[],'',''],
		['PAGE','83001',jdecode('Brucelose'),jdecode(''), jdecode('%2F80201%2F83001.html'), 'true',[],'','']
	],'',''],
	['PAGE','72101',jdecode('Cursos+e+palestras'),jdecode(''), jdecode('%2F72101.html'), 'true',[],'',''],
	['PAGE','9201',jdecode('Contato'),jdecode(''), jdecode('%2F9201.html'), 'true',[],'',''],
	['PAGE','51801',jdecode('Links'),jdecode(''), jdecode('%2F51801.html'), 'true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Borders';
theSitetree.paletteFamily='E2C5D1';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10432';
theSitetree.graphicsetId='10773';
theSitetree.contentColor='692643';
theSitetree.contentBGColor='FBFAEE';
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: 			'Borders',
				paletteFamily: 	'E2C5D1',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10432',
				graphicsetId: 	'10773',
				contentColor: 	'692643',
				contentBGColor: 'FBFAEE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				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: '20100719-180635'
};
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: '20111208-113922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20110313-150244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51801',
internalId:  '',
customField: '20111029-163435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56301',
internalId:  '',
customField: '20111208-113826'
};
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: '20111031-045647'
};
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: '20120101-102501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83701',
internalId:  '',
customField: '20090618-105452'
};
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: '20111030-072537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83001',
internalId:  '',
customField: '20090513-223015'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLTDZ';
var companyName   = 'Profa.+Dra.+Silvia+Edelweiss+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();
};

