/* [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 theSitetree=[ 
	['PAGE','26',jdecode('Home'),jdecode(''),'/26.html','true',[],''],
	['PAGE','64412',jdecode('Quem+somos'),jdecode(''),'/64412.html','true',[],''],
	['PAGE','92',jdecode('Produtos+Arttec'),jdecode(''),'/92.html','true',[],''],
	['PAGE','31133',jdecode('Pedido+de+Cota%C3%A7%C3%A3o'),jdecode(''),'/31133/index.html','true',[ 
		['PAGE','31154',jdecode('Autom%C3%B3vel'),jdecode(''),'/31133/31154.html','true',[],''],
		['PAGE','31112',jdecode('Resid%C3%AAncia'),jdecode(''),'/31133/31112.html','true',[],''],
		['PAGE','10612',jdecode('Cons%C3%B3rcio'),jdecode(''),'/31133/10612.html','true',[],'']
	],''],
	['PAGE','31175',jdecode('Fale+Conosco'),jdecode(''),'/31175.html','true',[],''],
	['PAGE','64433',jdecode('A%C3%A7oes+Sociais'),jdecode(''),'/64433.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Champagne';
theSitetree.paletteFamily='426388';
theSitetree.keyvisualId='11063';
theSitetree.keyvisualName='kv_11063.jpg';
theSitetree.fontsetId='31943';
theSitetree.graphicsetId='13786';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='426388';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				name: 			'Champagne',
				paletteFamily: 	'426388',
				keyvisualId: 	'11063',
				keyvisualName: 	'kv_11063.jpg',
				fontsetId: 		'31943',
				graphicsetId: 	'13786',
				contentColor: 	'000000',
				contentBGColor: '426388',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:  '64433',
internalId:  '',
customField: '20090312-115319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31175',
internalId:  '',
customField: '20090312-103027'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '26',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31154',
internalId:  '',
customField: '20090312-110604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26',
internalId:  '',
customField: '20090312-152230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92',
internalId:  '',
customField: '20090312-103028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31112',
internalId:  '',
customField: '20090312-103027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31133',
internalId:  '',
customField: '20090312-120513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10612',
internalId:  '',
customField: '20080903-110402'
};
webappMappings['7008']=webappMappings['7008-5385']={
webappId:    '7008',
documentId:  '31154',
internalId:  '5385',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-5386']={
webappId:    '7008',
documentId:  '31175',
internalId:  '5386',
customField: 'language:pt;country:BR;'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '26',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64412',
internalId:  '',
customField: '20090312-120228'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN26ML';
var companyName   = 'Arttec+Seguros+e+Cons%C3%B3rcio';
var htmlTitle	  = 'Arttec+Seguros+e+Cons%C3%B3rcio+de+Im%C3%B3vel';
var metaKeywords  = 'cons%C3%B3rcio+seguro+cota%C3%A7%C3%A3o++cotacao+autom%C3%B3vel++sa%C3%BAde++auto++empresa++empresarial++fian%C3%A7a+locat%C3%ADcia++porto+seguro++azul+seguros++indiana++sul+am%C3%A9rica++seguros++agf++unibanco++maritima++liberty++paulista++bradesco++auto++amil++amiu++unimed++dixamico++dixamicu++consorcio+de+im%C3%B3vel++im%C3%B3vel++medial++carro++central+de+seguros++celular++pme++cirurgia+plastica++pl%C3%A1stica++odonto++samcil++sancil++s%C3%A3o+cristovao++cristov%C3%A3o++golden++serma++green+line++porto+cons%C3%B3rcio++porto+consorcio++avimed++omint++aesp++santamalia++hospital+das+clinicas++dentalpar++hospital+sao+paulo++incor++beneficencia+portuguesa++albert+estien++bandeirantes++++';
var metaContents  = 'cons%C3%B3rcio+cota%C3%A7%C3%A3o+de+seguro++seguro+de+auto++seguro+de+vida++seguro+empresa++plano+de+sa%C3%BAde++porto+seguro++azul+seguros++indiana++sul+am%C3%A9rica++seguros++agf++unibanco++maritima++liberty++paulista++bradesco++auto++amil++amiu++unimed++dixamico++dixamicu++consorcio+de+im%C3%B3vel++im%C3%B3vel++medial++carro++central+de+seguros++celular++pme++cirurgia+plastica++pl%C3%A1stica++odonto++samcil++sancil++s%C3%A3o+cristovao++cristov%C3%A3o++golden++serma++green+line++++';
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();
};
