/* [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','1801',jdecode('HOME'),jdecode(''), jdecode('%2F1801.html'), 'true',[],'',''],
	['PAGE','51601',jdecode('QUEM+SOMOS'),jdecode(''), jdecode('%2F51601.html'), 'true',[],'',''],
	['PAGE','165001',jdecode('CADASTRE-SE'),jdecode(''), jdecode('%2F165001.html'), 'true',[],'',''],
	['PAGE','223312',jdecode('SEGUROS'),jdecode(''), jdecode('%2F223312%2Findex.html'), 'true',[ 
		['PAGE','223333',jdecode('AUTOM%C3%93VEL'),jdecode(''), jdecode('%2F223312%2F223333.html'), 'false',[],'',''],
		['PAGE','223375',jdecode('RESIDENCIAL'),jdecode(''), jdecode('%2F223312%2F223375.html'), 'false',[],'',''],
		['PAGE','223417',jdecode('EMPRESARIAL'),jdecode(''), jdecode('%2F223312%2F223417.html'), 'false',[],'',''],
		['PAGE','223396',jdecode('CONDOM%C3%8DNIO'),jdecode(''), jdecode('%2F223312%2F223396.html'), 'false',[],'',''],
		['PAGE','223501',jdecode('FIADOR+ALUGUEL'),jdecode(''), jdecode('%2F223312%2F223501.html'), 'false',[],'',''],
		['PAGE','224712',jdecode('N%C3%81UTICO'),jdecode(''), jdecode('%2F223312%2F224712.html'), 'false',[],'',''],
		['PAGE','223522',jdecode('TRANSPORTES'),jdecode(''), jdecode('%2F223312%2F223522.html'), 'false',[],'',''],
		['PAGE','223480',jdecode('ODONTOL%C3%93GICO'),jdecode(''), jdecode('%2F223312%2F223480.html'), 'false',[],'',''],
		['PAGE','223459',jdecode('SA%C3%9ADE'),jdecode(''), jdecode('%2F223312%2F223459.html'), 'false',[],'',''],
		['PAGE','223438',jdecode('VIDA'),jdecode(''), jdecode('%2F223312%2F223438.html'), 'false',[],'','']
	],'',''],
	['PAGE','51664',jdecode('CONS%C3%93RCIOS'),jdecode(''), jdecode('%2F51664.html'), 'true',[],'',''],
	['PAGE','67901',jdecode('PREVID%C3%8ANCIA'),jdecode(''), jdecode('%2F67901.html'), 'true',[],'',''],
	['PAGE','51685',jdecode('FINANCIAMENTOS'),jdecode(''), jdecode('%2F51685.html'), 'true',[],'',''],
	['PAGE','191401',jdecode('CART%C3%83O+DE+CR%C3%89DITO'),jdecode(''), jdecode('%2F191401.html'), 'true',[],'',''],
	['PAGE','51706',jdecode('ALARMES'),jdecode(''), jdecode('%2F51706.html'), 'true',[],'',''],
	['PAGE','51727',jdecode('SERVI%C3%87OS'),jdecode(''), jdecode('%2F51727.html'), 'true',[],'',''],
	['PAGE','51790',jdecode('FALE+CONOSCO'),jdecode(''), jdecode('%2F51790.html'), 'true',[],'',''],
	['PAGE','51748',jdecode('CENTRAIS+24+HORAS'),jdecode(''), jdecode('%2F51748.html'), 'true',[],'',''],
	['PAGE','51769',jdecode('DICAS+DE+SEGURAN%C3%87A'),jdecode(''), jdecode('%2F51769.html'), 'true',[],'',''],
	['PAGE','51811',jdecode('A%C3%87%C3%83O+SOCIAL'),jdecode(''), jdecode('%2F51811.html'), 'true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Mote';
theSitetree.paletteFamily='F84101';
theSitetree.keyvisualId='11388';
theSitetree.keyvisualName='kv_11388.jpg';
theSitetree.fontsetId='31998';
theSitetree.graphicsetId='13830';
theSitetree.contentColor='8E8C8C';
theSitetree.contentBGColor='FFFFFF';
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: 			'Mote',
				paletteFamily: 	'F84101',
				keyvisualId: 	'11388',
				keyvisualName: 	'kv_11388.jpg',
				fontsetId: 		'31998',
				graphicsetId: 	'13830',
				contentColor: 	'8E8C8C',
				contentBGColor: 'FFFFFF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-545']={
webappId:    '7008',
documentId:  '51748',
internalId:  '545',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-546']={
webappId:    '7008',
documentId:  '51790',
internalId:  '546',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-547']={
webappId:    '7008',
documentId:  '51727',
internalId:  '547',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-549']={
webappId:    '7008',
documentId:  '165001',
internalId:  '549',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20120123-110637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51601',
internalId:  '',
customField: '20111122-083354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165001',
internalId:  '',
customField: '20111119-071335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51664',
internalId:  '',
customField: '20111209-082633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67901',
internalId:  '',
customField: '20111209-085016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51685',
internalId:  '',
customField: '20111208-142311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191401',
internalId:  '',
customField: '20111208-144204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51706',
internalId:  '',
customField: '20111208-144700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51727',
internalId:  '',
customField: '20111119-075622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51790',
internalId:  '',
customField: '20111119-075646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51748',
internalId:  '',
customField: '20111119-075731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51769',
internalId:  '',
customField: '20111119-075816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51811',
internalId:  '',
customField: '20111119-075850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223312',
internalId:  '',
customField: '20111121-083242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223333',
internalId:  '',
customField: '20100814-101436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223375',
internalId:  '',
customField: '20100814-101616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223396',
internalId:  '',
customField: '20100814-101753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223417',
internalId:  '',
customField: '20100814-102015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223438',
internalId:  '',
customField: '20100814-102132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223459',
internalId:  '',
customField: '20100814-102340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223480',
internalId:  '',
customField: '20100814-102513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223501',
internalId:  '',
customField: '20111119-082510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223522',
internalId:  '',
customField: '20100814-102832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '224712',
internalId:  '',
customField: '20100814-103009'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN3KV4';
var companyName   = '';
var htmlTitle	  = 'www.casascoseguros.com.br';
var metaKeywords  = 'SEGUROS++PREVID%C3%8ANCIA+PRIVADA+FIAN%C3%87A+LOCAT%C3%8DCIA+ALUGUEL+SEGURO+DE+TRANSPORTES+TRANSPORTES+DE+CARGA+ALARMES+SEGURO+SA%C3%9ADE+SEGURO+DE+VIDA+SINDICATOS+ADMINISTRADORAS+DE+BENS+CONS%C3%93RCIO+IMOBILI%C3%81RIO+CONS%C3%93RCIO+AUTOM%C3%93VEL+SEGURO+N%C3%81UTICO+';
var metaContents  = 'A+CASASCO+SEGUROS+%C3%89+ESPECIALIZADA+NA+COMERCIALIZA%C3%87%C3%83O+E+CONSULTORIA+DE+SEGUROS+EM+GERAL%2C+FIAN%C3%87A+LOCAT%C3%8DCIA%2C+PREVID%C3%8ANCIA%2C+CONS%C3%93RCIOS%2C+TRANSPORTES+DE+CARGA.';
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();
};

