/* [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','11',jdecode('P%C3%A1gina+Inicial'),jdecode(''),'/11.html','true',[],'',''],
	['PAGE','3229',jdecode('Esquadrias'),jdecode(''),'/3229.html','true',[],'',''],
	['PAGE','40301',jdecode('Banheiros'),jdecode(''),'/40301.html','true',[],'',''],
	['PAGE','40201',jdecode('Cozinhas'),jdecode(''),'/40201.html','true',[],'',''],
	['PAGE','40401',jdecode('Dormit%C3%B3rios+e+Salas'),jdecode(''),'/40401.html','true',[],'',''],
	['PAGE','45001',jdecode('Mesas+e+Balc%C3%B5es'),jdecode(''),'/45001.html','true',[],'',''],
	['PAGE','45401',jdecode('Material+Offshore'),jdecode(''),'/45401.html','true',[],'',''],
	['PAGE','41001',jdecode('Contato'),jdecode(''),'/41001.html','true',[],'',''],
	['PAGE','47601',jdecode('Quem+somos'),jdecode(''),'/47601.html','true',[],'',''],
	['PAGE','41043',jdecode('Nossos+princ%C3%ADpios'),jdecode(''),'/41043.html','true',[],'',''],
	['PAGE','3167',jdecode('Informativo'),jdecode(''),'/3167.html','true',[],'',''],
	['PAGE','41',jdecode('Fique+por+dentro'),jdecode(''),'/41.html','true',[],'',''],
	['PAGE','77',jdecode('Aonde+estamos'),jdecode(''),'/77.html','true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Deepcolor';
theSitetree.paletteFamily='F9F6BC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10349';
theSitetree.graphicsetId='10472';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FDEE91';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Deepcolor',
				paletteFamily: 	'F9F6BC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10349',
				graphicsetId: 	'10472',
				contentColor: 	'000000',
				contentBGColor: 'FDEE91',
				a_color: 		'F9F6BC',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1028992']={
webappId:    '1501',
documentId:  '11',
internalId:  '1028992',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-79736dfc239181428cf973c7aa8e4091']={
webappId:    '7060',
documentId:  '3229',
internalId:  '79736dfc239181428cf973c7aa8e4091',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-e2cffb7997061e435e1f63919b733ac9']={
webappId:    '7060',
documentId:  '40201',
internalId:  'e2cffb7997061e435e1f63919b733ac9',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-7e68d77c801c8fb3d32414f769d702b1']={
webappId:    '7060',
documentId:  '40301',
internalId:  '7e68d77c801c8fb3d32414f769d702b1',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-fae029d0a1a02a4b8c83a5573a542050']={
webappId:    '7060',
documentId:  '40401',
internalId:  'fae029d0a1a02a4b8c83a5573a542050',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-299']={
webappId:    '7008',
documentId:  '41001',
internalId:  '299',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-295ad09fb6cebe4462b098bb9356e06e']={
webappId:    '7060',
documentId:  '45001',
internalId:  '295ad09fb6cebe4462b098bb9356e06e',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-490f43563615522a19e0f300bb0cb6b5']={
webappId:    '7060',
documentId:  '45401',
internalId:  '490f43563615522a19e0f300bb0cb6b5',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20100607-164422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41',
internalId:  '',
customField: '20090227-055805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3229',
internalId:  '',
customField: '20080123-075933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40301',
internalId:  '',
customField: '20100331-160553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40201',
internalId:  '',
customField: '20100331-160613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40401',
internalId:  '',
customField: '20100331-160639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45001',
internalId:  '',
customField: '20100331-160657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45401',
internalId:  '',
customField: '20080123-071528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41001',
internalId:  '',
customField: '20080123-091602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47601',
internalId:  '',
customField: '20100607-165054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41043',
internalId:  '',
customField: '20081209-152617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3167',
internalId:  '',
customField: '20090314-093540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77',
internalId:  '',
customField: '20080123-065717'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2URL';
var companyName   = 'PREST+SERV+MARCENARIA';
var htmlTitle	  = 'http%3A%2F%2Fwww.marcenariaprestserv.com.br';
var metaKeywords  = 'MARCENARIAPRESTSERV%2C+MARCENARIA+MACAE%2C+F%C3%81BRICA+DE+M%C3%93VEIS%2C+CARPINTARIA+MACAE%2C+SOBMEDIDA%2C+PETROBRAS%2C+PETR%C3%93LEO';
var metaContents  = 'M%C3%93VEIS%2C+PORTAS%2C+JANELAS%2C+COZINHAS%2C+ARM%C3%81RIOS%2C+MADEIRAS%2C+MARCENARIA%2C+CARPINTARIA%2C+CAIXAS%2C+CAIXONETES%2C+ADUELAS%2C+MESAS%2C+CADEIRAS%2C+ESCADAS%2C+RODAP%C3%89%2C+ALISAR%2C+PAIN%C3%89IS%2C+ESTANTES%2C+MODULADOS%2C+SOBMEDIDA%2C+MADEIRAS%2C+RACK%2C+HOME+THEATER%2C+CLOSET%2C+QUARTOS%2C+SALAS%2C+DIVIS%C3%93RIAS%2C+VERNIZ%2C+LACA%2C+MARCENEIRO%2C+CARPINTEIRO%2C+LUSTRADOR%2C+MARCENARIAMACA%C3%89%2C+PETROBRASMACA%C3%89%2C+PREFEITURAMACA%C3%89';
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();
};
