/* [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','12',jdecode('Home'),jdecode(''),'/12.html','true',[],'',''],
	['PAGE','5828',jdecode('Produtos'),jdecode(''),'/5828/index.html','true',[ 
		['PAGE','5875',jdecode('Catalogo+de+Portas'),jdecode(''),'/5828/5875.html','true',[],'',''],
		['PAGE','34601',jdecode('Madeira+Serrada'),jdecode(''),'/5828/34601.html','true',[],'',''],
		['PAGE','72901',jdecode('Compensados'),jdecode(''),'/5828/72901.html','true',[],'','']
	],'',''],
	['PAGE','38301',jdecode('Outros+Produtos'),jdecode(''),'/38301/index.html','true',[ 
		['PAGE','32501',jdecode('Assoalhos+e+Pisos+Maci%C3%A7os'),jdecode(''),'/38301/32501.html','true',[],'',''],
		['PAGE','32801',jdecode('Rodap%C3%A9s'),jdecode(''),'/38301/32801.html','true',[],'',''],
		['PAGE','34801',jdecode('Assoalhos+Laminados'),jdecode(''),'/38301/34801.html','true',[],'',''],
		['PAGE','35201',jdecode('Pain%C3%A9is'),jdecode(''),'/38301/35201.html','true',[],'',''],
		['PAGE','36501',jdecode('Tacos'),jdecode(''),'/38301/36501.html','true',[],'',''],
		['PAGE','26801',jdecode('Tabela+de+C%C3%A1lculo'),jdecode(''),'/38301/26801.html','true',[],'','']
	],'',''],
	['PAGE','71201',jdecode('Contato'),jdecode(''),'/71201.html','true',[],'',''],
	['PAGE','71243',jdecode('Empresa'),jdecode(''),'/71243.html','true',[],'',''],
	['PAGE','73501',jdecode('Caixilhos'),jdecode(''),'/73501.html','true',[],'',''],
	['PAGE','74001',jdecode('Caixilhos'),jdecode(''),'/74001.html','true',[],'',''],
	['PAGE','74101',jdecode('Decks'),jdecode(''),'/74101.html','true',[],'',''],
	['PAGE','74201',jdecode('Madeira+Serrada'),jdecode(''),'/74201.html','true',[],'',''],
	['PAGE','74301',jdecode('Forro'),jdecode(''),'/74301.html','true',[],'',''],
	['PAGE','74401',jdecode('Bancos'),jdecode(''),'/74401.html','true',[],'',''],
	['PAGE','74501',jdecode('Assoalhos+e+Pissos+Maci%C3%A7os'),jdecode(''),'/74501.html','true',[],'',''],
	['PAGE','74601',jdecode('Rodap%C3%A9s'),jdecode(''),'/74601.html','true',[],'',''],
	['PAGE','74701',jdecode('Assoalho+Laminado'),jdecode(''),'/74701.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Linear';
theSitetree.paletteFamily='993300';
theSitetree.keyvisualId='2192';
theSitetree.keyvisualName='bau1.jpg';
theSitetree.fontsetId='362';
theSitetree.graphicsetId='412';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333300';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Linear',
				paletteFamily: 	'993300',
				keyvisualId: 	'2192',
				keyvisualName: 	'bau1.jpg',
				fontsetId: 		'362',
				graphicsetId: 	'412',
				contentColor: 	'FFFFFF',
				contentBGColor: '333300',
				a_color: 		'003333',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'99CC66',
				e_color: 		'CCFF66',
				f_color: 		'669966',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-987731']={
webappId:    '1501',
documentId:  '12',
internalId:  '987731',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-c7908b9021856b1b36489d8086354526']={
webappId:    '7060',
documentId:  '32501',
internalId:  'c7908b9021856b1b36489d8086354526',
customField: 'language:pt;country:BR;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '12',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-6731d839ea05a98d6b135841ef84391b']={
webappId:    '7060',
documentId:  '72901',
internalId:  '6731d839ea05a98d6b135841ef84391b',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-94a904dcbf74a56ac6da8364e26f929b']={
webappId:    '7060',
documentId:  '74001',
internalId:  '94a904dcbf74a56ac6da8364e26f929b',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-d4af0242081b2c888a69d8c01ae1fdc6']={
webappId:    '7060',
documentId:  '32801',
internalId:  'd4af0242081b2c888a69d8c01ae1fdc6',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-5cc1cd6e3c23ef602994a0d07de90164']={
webappId:    '7060',
documentId:  '72901',
internalId:  '5cc1cd6e3c23ef602994a0d07de90164',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-a1cb8e1428696e3e0c5a02ed2e583e0a']={
webappId:    '7060',
documentId:  '32501',
internalId:  'a1cb8e1428696e3e0c5a02ed2e583e0a',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-e1dcf0c3177251672ba930dd5d2f183f']={
webappId:    '7060',
documentId:  '34801',
internalId:  'e1dcf0c3177251672ba930dd5d2f183f',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-7ce5020de12de8a9c67c0339a870b28a']={
webappId:    '7060',
documentId:  '35201',
internalId:  '7ce5020de12de8a9c67c0339a870b28a',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-334ba0be437c80ed4166f39c4a4748eb']={
webappId:    '7060',
documentId:  '74001',
internalId:  '334ba0be437c80ed4166f39c4a4748eb',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-9a8e1dea670067656b245e95d66c3010']={
webappId:    '7060',
documentId:  '74201',
internalId:  '9a8e1dea670067656b245e95d66c3010',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-9425535bb631ec7d46ad6b1136586238']={
webappId:    '7060',
documentId:  '74301',
internalId:  '9425535bb631ec7d46ad6b1136586238',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-fe102bb972cbf58a2571e749da2f9739']={
webappId:    '7060',
documentId:  '74401',
internalId:  'fe102bb972cbf58a2571e749da2f9739',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-ff69fe35ccff1befcdb6b6b1a0031866']={
webappId:    '7060',
documentId:  '74501',
internalId:  'ff69fe35ccff1befcdb6b6b1a0031866',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-cd731b505aa129c184c182d2e8b8abd6']={
webappId:    '7060',
documentId:  '74601',
internalId:  'cd731b505aa129c184c182d2e8b8abd6',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-b2138e6c420a12f873810f806a2b807a']={
webappId:    '7060',
documentId:  '34601',
internalId:  'b2138e6c420a12f873810f806a2b807a',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-b913f0e91a1108d631c0d1ae3898add7']={
webappId:    '7060',
documentId:  '74101',
internalId:  'b913f0e91a1108d631c0d1ae3898add7',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-01c1f02dfa8805824d3ddb7af33b074b']={
webappId:    '7060',
documentId:  '32801',
internalId:  '01c1f02dfa8805824d3ddb7af33b074b',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-3c1d2f3af72ad32a8c4394ddcf6dff5b']={
webappId:    '7060',
documentId:  '74301',
internalId:  '3c1d2f3af72ad32a8c4394ddcf6dff5b',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-3b46219280b885e4b18d71c3e0a5ea9e']={
webappId:    '7060',
documentId:  '74201',
internalId:  '3b46219280b885e4b18d71c3e0a5ea9e',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-01b7da16cfe0bc79b7aa227420e49cfd']={
webappId:    '7060',
documentId:  '74101',
internalId:  '01b7da16cfe0bc79b7aa227420e49cfd',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-7ac9250d51d982a06d9d73f13bd5da61']={
webappId:    '7060',
documentId:  '34601',
internalId:  '7ac9250d51d982a06d9d73f13bd5da61',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-a5dc43e51f52247208ae72aa3316973a']={
webappId:    '7060',
documentId:  '36501',
internalId:  'a5dc43e51f52247208ae72aa3316973a',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-6b704a6ea06799cad917d957f5283006']={
webappId:    '7060',
documentId:  '74701',
internalId:  '6b704a6ea06799cad917d957f5283006',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-66cf71ee3bae8972b276781f2aaf72be']={
webappId:    '7060',
documentId:  '34801',
internalId:  '66cf71ee3bae8972b276781f2aaf72be',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-1deb12341fb9bae8feba373b32bdce72']={
webappId:    '7060',
documentId:  '35201',
internalId:  '1deb12341fb9bae8feba373b32bdce72',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-170ee611c4126e9ae67c5d44b70fb706']={
webappId:    '7060',
documentId:  '36501',
internalId:  '170ee611c4126e9ae67c5d44b70fb706',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-f6754065c32cd90a72fb95471582df9f']={
webappId:    '7060',
documentId:  '74401',
internalId:  'f6754065c32cd90a72fb95471582df9f',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-6fa7a9351f23d23da0ada99bacdeb554']={
webappId:    '7060',
documentId:  '74501',
internalId:  '6fa7a9351f23d23da0ada99bacdeb554',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-28ec835f416c9fac5470eddc0e15a328']={
webappId:    '7060',
documentId:  '74601',
internalId:  '28ec835f416c9fac5470eddc0e15a328',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-8489bbf28e127a14f27c2ef7fa07ee8f']={
webappId:    '7060',
documentId:  '74701',
internalId:  '8489bbf28e127a14f27c2ef7fa07ee8f',
customField: 'language:pt;country:BR;'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2THZ';
var companyName   = 'ORTESA+-+Tudo+Em+Madeiras';
var htmlTitle	  = 'ORTESA+-+Tudo+Em+Madeiras';
var metaKeywords  = 'ORTESA%2C+Ortesa%2C+ortesa%2CORTESA+TUDO+EM+MADEIRAS%2C+ortesa+tudo+em+madeiras%2C+Madeiras%2C+Forro%2CGeral%2C+Forros%2C+Vigas%2CAssoalhos%2C+Caichilhos%2C+Portas%2CJ+anelas%2C+Compensados%2C+Ripas%2Ccade%2Cgoogle%2Cyahoo%2Cbrutas%2Cbeneficiadas.Ortesa%2COrtesa%2COrtesa%2Cortesa%2Cmadeiras%2CRepresenta%C3%A7%C3%B5es+de+Madeiras+Em+Geral%2CForros%2CVigas%2CAssoalhos%2CCaichilhos%2CPortas%2CJanelas%2CCompensados%2CRipas............madaireira%2Cripas%2Cvigas%2Cchapas%2Cchapinha%2Cmesas%2Cparedes%2CORTESA%2C+Ortesa%2C+ortesa%2CORTESA+TUDO+EM+MADEIRAS%2C+ortesa+tudo+em+madeiras%2C+Madeiras%2C+Forro%2CGeral%2C+Forros%2C+Vigas%2CAssoalhos%2C+Caichilhos%2C+Portas%2CJ+anelas%2C+';
var metaContents  = 'Ortesa%2COrtesa%2Cortesa%2Cmadeiras%2CRepresenta%C3%A7%C3%B5es+de+Madeiras+Em+Geral%2CForros%2CVigas%2CAssoalhos%2CCaichilhos%2CPortas%2CJanelas%2CCompensados%2CRipas............madaireira%2Cripas%2Cvigas%2Cchapas%2Cchapinha%2Cmesas%2Cparedes%2CORTESA%2C+Ortesa%2C+ortesa%2CORTESA+TUDO+EM+MADEIRAS%2C+ortesa+tudo+em+madeiras%2C+Madeiras%2C+Forro%2CGeral%2C+Forros%2C+Vigas%2CAssoalhos%2C+Caichilhos%2C+Portas%2CJ+anelas%2C+Compensados%2C+Ripas%2Ccade%2Cgoogle%2Cyahoo%2Cbrutas%2Cbeneficiadas.';
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();
};
