/* [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','23501',jdecode('INICIAL'),jdecode(''),'/23501.html','true',[],'',''],
	['PAGE','2101',jdecode('P%2F+MOTO'),jdecode(''),'/2101.html','true',[],'',''],
	['PAGE','2152',jdecode('Quem+somos'),jdecode(''),'/2152.html','false',[],'',''],
	['PAGE','2173',jdecode('SERVI%C3%87OS'),jdecode(''),'/2173.html','false',[],'',''],
	['PAGE','2194',jdecode('A+T+E+N+%C3%87+%C3%83+O+%21%21%21'),jdecode(''),'/2194.html','false',[],'',''],
	['PAGE','2215',jdecode('comprar'),jdecode(''),'/2215.html','false',[],'',''],
	['PAGE','34101',jdecode('NOT%C3%8DCIAS'),jdecode(''),'/34101.html','false',[],'',''],
	['PAGE','2236',jdecode('CONTATO'),jdecode(''),'/2236.html','true',[],'',''],
	['PAGE','15201',jdecode('ALARME+PATRIMONIAL'),jdecode(''),'/15201.html','true',[],'',''],
	['PAGE','40901',jdecode('BRINDE'),jdecode(''),'/40901.html','false',[],'',''],
	['PAGE','50001',jdecode('Imprensa'),jdecode(''),'/50001.html','true',[],'',''],
	['PAGE','66922',jdecode('Lista+de+Links'),jdecode(''),'/66922.html','false',[],'',''],
	['PAGE','96456',jdecode('PROMO%C3%87%C3%83O'),jdecode(''),'/96456.html','true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Undulate';
theSitetree.paletteFamily='413D42';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33116';
theSitetree.graphicsetId='14071';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='413D42';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Undulate',
				paletteFamily: 	'413D42',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33116',
				graphicsetId: 	'14071',
				contentColor: 	'FFFFFF',
				contentBGColor: '413D42',
				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:  '2101',
internalId:  '',
customField: '20100827-132930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2152',
internalId:  '',
customField: '20090804-145755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20090930-172938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2194',
internalId:  '',
customField: '20090830-182307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2215',
internalId:  '',
customField: '20090804-150050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2236',
internalId:  '',
customField: '20100827-133102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23501',
internalId:  '',
customField: '20100827-132854'
};
webappMappings['7008']=webappMappings['7008-9149']={
webappId:    '7008',
documentId:  '15201',
internalId:  '9149',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20100824-201449'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '2101',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34101',
internalId:  '',
customField: '20091001-090958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40901',
internalId:  '',
customField: '20090913-181236'
};
webappMappings['1501']=webappMappings['1501-14160909']={
webappId:    '1501',
documentId:  '2101',
internalId:  '14160909',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50001',
internalId:  '',
customField: '20091017-120148'
};
webappMappings['7008']=webappMappings['7008-15926']={
webappId:    '7008',
documentId:  '23501',
internalId:  '15926',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66922',
internalId:  '',
customField: '20091209-121303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96456',
internalId:  '',
customField: '20100827-133204'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHGD1';
var companyName   = 'ITURAN+++LOCALIZA++MESMO';
var htmlTitle	  = '';
var metaKeywords  = 'Ituram%2Cituran%2C+graber%2C+teletrim%2C+sascar%2C+omnilink%2CLOCALIZADOR%2C+LOCALIZADOR+DE+VEICULOS%2C+VE%C3%8DCULOS+LOcALIZADOS+COM+LOCALIZADOR%2C+RASTREAMENTO+DE+VE%C3%8DCULOS%2C+RASTREADOR+DE+VE%C3%8DCULOS%2C+MONITORAMENTO%2C+GPS%2C+LOCALIZADOR+POR+ANTENAS%2C+LOCALIZADOR+POR+RADIO+FREQUENCIA+%2C+LOCALIZADOR+VIA+SAT%C3%89LITE%2C+ROUBO+DE+VE%C3%8DCULOS%2C+LADROES+DE+VE%C3%8DCULOS%2C+LOCALIZA%C3%87%C3%83O+DE+VE%C3%8DCULOS+PELA+INTERNET.RASTREADOR+E+BLOQUEDOR+P%2F+MOTO%2C+CARRO%2C+CAMINHAO%2C+FROTAS%2C+AUTOMOVEIS+CAMINHOES%2C+FUSCA%2C+KOMBI%2C+FIORIONO%2C+AUDI%2C+BMW%2C+PEOUGEOT%2C+VANS%2C+CAMINHONETES%2C+PERUAS%2C+TAXIS%2C+RASTREADOR%2C+LOCALIZADOR%2C+TELETRIM%2CGRABER%2C+SASCAR%2C+AUTOTRACK%2C+HYUNDAI%2C+KIA%2CIMPORTADOS';
var metaContents  = '%0D%0ARASTREADOR+IITURAN%2CVEJA+%3A+QUARENTENA%2C+OS+LADR%C3%95ES+ESCONDEM+O+VE%C3%8DCULO+POR+DIAS+E+SE+NINGUEM+ACHAR%2C+ELES+LEVAM+O+CARRO.+MAS+COM+ITURAN+SMART...+QUARENTENA+N%C3%83O+FUNCIONA+%21%21%0D%0A%0D%0A%0D%0AEnvie+seu+nome+e+telefone+para%3A+vendas%40segporto.com.br++O+SISTEMA+%C3%89+de+alta+tecnologia.++Vejam+o+homem+tem+procurado+diminuir+os+equipamentos+para+esconde-lo+mais+facilmente+no+ve%C3%ADculo%2C+ou+aonde+quer+que+seja.+O+localizador+tambem+foi+assim%2C+hoje+s%C3%A3o+bem+menores+e+com+tecnologia+avan%C3%A7ada+de+bateria+de+longa+dura%C3%A7%C3%A3o.+A%C3%AD+vem+a+novidade%2C+estes+equipamentos+n%C3%A3o+precis%C3%A3o++de+alimentar-se+da+bateria+do+ve%C3%ADculo+ou+de+uma+bateria+externa%2C+ficando+desta+forma+totalmente+desatrelado+da+fia%C3%A7%C3%A3o+dos+carros+e+permitindo+que+sejam+colocados+em+mais+de+mil+pontos+diferentes.+Veja+o+trabalho+que+um+ladr%C3%A3o+teria+para+localiza-los%2C+s%C3%B3mente+se+destru%C3%8Dssem+o+ve%C3%ADculo+para+encontrar+o+localizador.+Mas+o+mais+importante+vem+agora%2C+imagine+um+micro+equipamento+deste%2C+com+a+tecnologia+de+antenas+que+permite+localizador+localizar+em+lugares+cobertos+e+fechados.++Temos+como+exemplo+a+empresa+ITURAN+de+seguran%C3%A7a+automotiva%2C+que+apostou+neste+sistema+e+hoje+aproveitando+e+unindo+toda+a+tecnologia+a+disposi%C3%A7%C3%A3o+consegue+um+resultado+excelente+na+recupera%C3%A7%C3%A3o+de+ve%C3%ADculos.++';
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();
};
