/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','5001',jdecode('Plotagem+Engenharia'),jdecode(''), jdecode('%2F5001.html'), 'true',[],'',''],
	['PAGE','5022',jdecode('C%C3%B3pias%2FImpress%C3%A3o'),jdecode(''), jdecode('%2F5022.html'), 'true',[],'',''],
	['PAGE','452',jdecode('Comunic.+Visual+Interna'),jdecode(''), jdecode('%2F452%2Findex.html'), 'true',[ 
		['PAGE','26912',jdecode('Banner'),jdecode(''), jdecode('%2F452%2F26912.html'), 'true',[],'',''],
		['PAGE','26933',jdecode('Placas+Setoriza%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F452%2F26933.html'), 'true',[],'',''],
		['PAGE','26954',jdecode('Impress%C3%A3o+Digital'),jdecode(''), jdecode('%2F452%2F26954.html'), 'true',[],'',''],
		['PAGE','26975',jdecode('Displays'),jdecode(''), jdecode('%2F452%2F26975.html'), 'true',[],'',''],
		['PAGE','26996',jdecode('Faixas'),jdecode(''), jdecode('%2F452%2F26996.html'), 'true',[],'',''],
		['PAGE','27017',jdecode('Adesivos'),jdecode(''), jdecode('%2F452%2F27017.html'), 'true',[],'','']
	],'',''],
	['PAGE','27038',jdecode('Comun.+Visual+Externa'),jdecode(''), jdecode('%2F27038%2Findex.html'), 'true',[ 
		['PAGE','27059',jdecode('Fachada'),jdecode(''), jdecode('%2F27038%2F27059.html'), 'true',[],'',''],
		['PAGE','27080',jdecode('Luminoso'),jdecode(''), jdecode('%2F27038%2F27080.html'), 'true',[],'',''],
		['PAGE','27101',jdecode('Letra+Caixa'),jdecode(''), jdecode('%2F27038%2F27101.html'), 'true',[],'',''],
		['PAGE','27122',jdecode('Totem'),jdecode(''), jdecode('%2F27038%2F27122.html'), 'true',[],'',''],
		['PAGE','27143',jdecode('Toldo'),jdecode(''), jdecode('%2F27038%2F27143.html'), 'true',[],'','']
	],'',''],
	['PAGE','494',jdecode('Pe%C3%A7as+em+Acr%C3%ADlico'),jdecode(''), jdecode('%2F494%2Findex.html'), 'true',[ 
		['PAGE','27164',jdecode('Expositores'),jdecode(''), jdecode('%2F494%2F27164.html'), 'true',[],'',''],
		['PAGE','28912',jdecode('Letras'),jdecode(''), jdecode('%2F494%2F28912.html'), 'true',[],'',''],
		['PAGE','27206',jdecode('Displays'),jdecode(''), jdecode('%2F494%2F27206.html'), 'true',[],'',''],
		['PAGE','31312',jdecode('Stands'),jdecode(''), jdecode('%2F494%2F31312.html'), 'true',[],'',''],
		['PAGE','31333',jdecode('Grava%C3%A7%C3%A3o+a+Laser'),jdecode(''), jdecode('%2F494%2F31333.html'), 'true',[],'',''],
		['PAGE','27185',jdecode('Pe%C3%A7as+Especiais'),jdecode(''), jdecode('%2F494%2F27185.html'), 'true',[],'','']
	],'',''],
	['PAGE','473',jdecode('Sinaliza%C3%A7%C3%A3o%2FSeguran%C3%A7a'),jdecode(''), jdecode('%2F473.html'), 'true',[],'',''],
	['PAGE','5801',jdecode('Brindes'),jdecode(''), jdecode('%2F5801.html'), 'true',[],'',''],
	['PAGE','20412',jdecode('Portf%C3%B3lio'),jdecode(''), jdecode('%2F20412.html'), 'true',[],'',''],
	['PAGE','536',jdecode('Localiza%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F536.html'), 'true',[],'',''],
	['PAGE','34044',jdecode('Contato%2FOr%C3%A7amento'),jdecode(''), jdecode('%2F34044.html'), 'true',[],'',''],
	['PAGE','34823',jdecode('Fotos'),jdecode(''), jdecode('%2F34823.html'), 'true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Commander';
theSitetree.paletteFamily='2B25A2';
theSitetree.keyvisualId='2380';
theSitetree.keyvisualName='computerchips.jpg';
theSitetree.fontsetId='391';
theSitetree.graphicsetId='439';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E0E0E0';
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: 			'Commander',
				paletteFamily: 	'2B25A2',
				keyvisualId: 	'2380',
				keyvisualName: 	'computerchips.jpg',
				fontsetId: 		'391',
				graphicsetId: 	'439',
				contentColor: 	'000000',
				contentBGColor: 'E0E0E0',
				a_color: 		'E0E0E0',
				b_color: 		'5762CA',
				c_color: 		'A1A4D2',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090904-154641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090916-164737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20412',
internalId:  '',
customField: '20090916-155315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20071025-104816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27038',
internalId:  '',
customField: '20090916-192353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20090916-194142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20090903-131559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20090924-072218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20090924-072832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20090822-185724'
};
webappMappings['1501']=webappMappings['1501-14164719']={
webappId:    '1501',
documentId:  '401',
internalId:  '14164719',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27059',
internalId:  '',
customField: '20090904-152013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27080',
internalId:  '',
customField: '20090916-193042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26912',
internalId:  '',
customField: '20090904-161333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26933',
internalId:  '',
customField: '20090916-165308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26954',
internalId:  '',
customField: '20090916-165842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26975',
internalId:  '',
customField: '20090924-073338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26996',
internalId:  '',
customField: '20090916-170733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27017',
internalId:  '',
customField: '20090916-170816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27101',
internalId:  '',
customField: '20090916-193400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27122',
internalId:  '',
customField: '20090916-193705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27143',
internalId:  '',
customField: '20090916-193840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27164',
internalId:  '',
customField: '20090916-202500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27185',
internalId:  '',
customField: '20090916-202910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27206',
internalId:  '',
customField: '20090916-203601'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28912',
internalId:  '',
customField: '20090916-202714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31333',
internalId:  '',
customField: '20090916-203348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31312',
internalId:  '',
customField: '20090916-203056'
};
webappMappings['7008']=webappMappings['7008-11425']={
webappId:    '7008',
documentId:  '34044',
internalId:  '11425',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34044',
internalId:  '',
customField: '20090924-075431'
};
webappMappings['7060']=webappMappings['7060-09db5235479864fc765091dc29b9983c']={
webappId:    '7060',
documentId:  '34823',
internalId:  '09db5235479864fc765091dc29b9983c',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34823',
internalId:  '',
customField: '20090924-075549'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZW11';
var companyName   = 'UPCASE';
var htmlTitle	  = 'UPCASE+-+A+melhor+solu%C3%A7%C3%A3o';
var metaKeywords  = 'COMUNICA%C3%87%C3%83O+VISUAL++SINALIZA%C3%87%C3%83O++PLOTAGEM++COPIADORA++TOLDO++BANNER++FAIXA++PLACA++ACRILICO+DISPLAY+EXPOSITOR++ADESIVO++LUMINOSO++PAINEL++BACK-LIGHT++VITRINE++EVENTO++FEIRA++BRINDES++';
var metaContents  = 'COMUNICA%C3%87%C3%83O+VISUAL++GR%C3%81FICA++SINALIZA%C3%87%C3%83O++PLOTAGEM++COPIADORA++';
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();
};

