/* [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','622',jdecode('P%C3%81GINA+INICIAL'),jdecode(''),'/622.html','true',[],'',''],
	['PAGE','64012',jdecode('O+ALUM%C3%8DNIO'),jdecode(''),'/64012.html','true',[],'',''],
	['PAGE','6801',jdecode('QUEM+SOMOS'),jdecode(''),'/6801.html','true',[],'',''],
	['PAGE','6822',jdecode('CLIENTES'),jdecode(''),'/6822.html','true',[],'',''],
	['PAGE','673',jdecode('PRODUTOS'),jdecode(''),'/673/index.html','true',[ 
		['PAGE','22912',jdecode('BRISE+SOLEIL'),jdecode(''),'/673/22912.html','true',[],'',''],
		['PAGE','694',jdecode('BRISES'),jdecode(''),'/673/694.html','true',[],'',''],
		['PAGE','26712',jdecode('LOUSAS'),jdecode(''),'/673/26712.html','true',[],'',''],
		['PAGE','6843',jdecode('LOUSAS+MECANICAS'),jdecode(''),'/673/6843.html','true',[],'',''],
		['PAGE','31712',jdecode('VARAL'),jdecode(''),'/673/31712.html','true',[],'',''],
		['PAGE','47712',jdecode('LINHA+DEFICIENTE%2FIDOSOS'),jdecode(''),'/673/47712.html','true',[],'',''],
		['PAGE','6885',jdecode('CAIXILHARIA'),jdecode(''),'/673/6885.html','true',[],'',''],
		['PAGE','27712',jdecode('PANTOGRAFICA'),jdecode(''),'/673/27712.html','true',[],'',''],
		['PAGE','45112',jdecode('GRADES%2C+PORTAS%2C+JANELAS'),jdecode(''),'/673/45112.html','true',[],'',''],
		['PAGE','29612',jdecode('CORRIM%C3%83O'),jdecode(''),'/673/29612.html','true',[],'',''],
		['PAGE','32712',jdecode('LINHA+RESIDENCIAL'),jdecode(''),'/673/32712.html','true',[],'',''],
		['PAGE','64812',jdecode('VITRINE'),jdecode(''),'/673/64812.html','true',[],'',''],
		['PAGE','6906',jdecode('DIVERSOS'),jdecode(''),'/673/6906.html','true',[],'','']
	],'',''],
	['PAGE','6927',jdecode('CONTATO'),jdecode(''),'/6927.html','true',[],'',''],
	['PAGE','60154',jdecode('SERVI%C3%87OS'),jdecode(''),'/60154.html','true',[],'',''],
	['PAGE','60175',jdecode('NOTICIAS'),jdecode(''),'/60175.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Strom';
theSitetree.paletteFamily='1A3873';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='253';
theSitetree.graphicsetId='324';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Strom',
				paletteFamily: 	'1A3873',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'253',
				graphicsetId: 	'324',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'1A3873',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '622',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-6818600']={
webappId:    '1501',
documentId:  '622',
internalId:  '6818600',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-9f046fc88fef68fb827c7d0dcf37bcf7']={
webappId:    '7060',
documentId:  '22912',
internalId:  '9f046fc88fef68fb827c7d0dcf37bcf7',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-d70f1de4f92b8e3782899615f5bf01cb']={
webappId:    '7060',
documentId:  '26712',
internalId:  'd70f1de4f92b8e3782899615f5bf01cb',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-9a4880e0dafac0cd0379b9c76c6e1c54']={
webappId:    '7060',
documentId:  '29612',
internalId:  '9a4880e0dafac0cd0379b9c76c6e1c54',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-107655765e6c00d09c7abd2980da8a69']={
webappId:    '7060',
documentId:  '31712',
internalId:  '107655765e6c00d09c7abd2980da8a69',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-f567ba9afac17507f547d66ae9bc4a31']={
webappId:    '7060',
documentId:  '32712',
internalId:  'f567ba9afac17507f547d66ae9bc4a31',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-b89b925b192a8702df375ede7f3ee03c']={
webappId:    '7060',
documentId:  '45112',
internalId:  'b89b925b192a8702df375ede7f3ee03c',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-78dff73945c3bf12e835670f4228da8a']={
webappId:    '7060',
documentId:  '47712',
internalId:  '78dff73945c3bf12e835670f4228da8a',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '622',
internalId:  '',
customField: '20090929-190730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6801',
internalId:  '',
customField: '20081106-162258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6822',
internalId:  '',
customField: '20070829-141850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20100525-133919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22912',
internalId:  '',
customField: '20070823-172150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20090929-194220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26712',
internalId:  '',
customField: '20070831-212408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6843',
internalId:  '',
customField: '20070904-204921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31712',
internalId:  '',
customField: '20100525-135010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47712',
internalId:  '',
customField: '20080111-190333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6885',
internalId:  '',
customField: '20070831-212821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27712',
internalId:  '',
customField: '20070831-163836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45112',
internalId:  '',
customField: '20070913-184018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29612',
internalId:  '',
customField: '20070913-182346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32712',
internalId:  '',
customField: '20070901-182830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6906',
internalId:  '',
customField: '20070909-205119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6927',
internalId:  '',
customField: '20070913-184339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60154',
internalId:  '',
customField: '20080824-145742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60175',
internalId:  '',
customField: '20080824-145742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64012',
internalId:  '',
customField: '20090203-151557'
};
webappMappings['7060']=webappMappings['7060-68476b2c88c9282f94d36f51ae53ce5c']={
webappId:    '7060',
documentId:  '64812',
internalId:  '68476b2c88c9282f94d36f51ae53ce5c',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64812',
internalId:  '',
customField: '20090302-130918'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLAP6';
var companyName   = 'GUATEMALA+ALUMINIO';
var htmlTitle	  = 'GUATEMALA+ALUMINIO';
var metaKeywords  = 'BRISE%2C+VARAL%2C+JANELAS%2C+ALUMINIO';
var metaContents  = 'FABRICA%C3%87%C3%83O+DE+ESQUADRIAS+DE+ALUMINIO%2C+FABRICA%C3%87%C3%83O+DE+VARAL+DE+ALUMINIO%2C+FABRICA%C3%87%C3%83O+DE+BRISE+DE+ALUMINIO';
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();
};
