/* [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','13801',jdecode('Home'),jdecode(''),'/13801.html','true',[],'',''],
	['PAGE','321',jdecode('Quem+somos'),jdecode(''),'/321.html','true',[],'',''],
	['PAGE','15601',jdecode('Produtos'),jdecode(''),'/15601/index.html','true',[ 
		['PAGE','15622',jdecode('Cadeira+p%2F+escrit%C3%B3rio'),jdecode(''),'/15601/15622.html','true',[],'',''],
		['PAGE','15643',jdecode('Chaise+Long'),jdecode(''),'/15601/15643.html','true',[],'',''],
		['PAGE','15664',jdecode('Poltronas'),jdecode(''),'/15601/15664.html','true',[],'',''],
		['PAGE','15685',jdecode('Puffs'),jdecode(''),'/15601/15685.html','true',[],'',''],
		['PAGE','15706',jdecode('Sof%C3%A1+3+e+2+lugares'),jdecode(''),'/15601/15706.html','true',[],'',''],
		['PAGE','15727',jdecode('Sof%C3%A1s+Canto+'),jdecode(''),'/15601/15727.html','true',[],'',''],
		['PAGE','33812',jdecode('Tecidos'),jdecode(''),'/15601/33812.html','true',[],'','']
	],'',''],
	['PAGE','36212',jdecode('Dicas+'),jdecode(''),'/36212.html','true',[],'',''],
	['PAGE','42',jdecode('Contato'),jdecode(''),'/42.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Shadows';
theSitetree.paletteFamily='FFB573';
theSitetree.keyvisualId='1842';
theSitetree.keyvisualName='handwerker.jpg';
theSitetree.fontsetId='313';
theSitetree.graphicsetId='368';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFDAB9';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Shadows',
				paletteFamily: 	'FFB573',
				keyvisualId: 	'1842',
				keyvisualName: 	'handwerker.jpg',
				fontsetId: 		'313',
				graphicsetId: 	'368',
				contentColor: 	'000000',
				contentBGColor: 'FFDAB9',
				a_color: 		'FFB573',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15664',
internalId:  '',
customField: '20100518-082123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '321',
internalId:  '',
customField: '20090828-103941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20091007-071044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20100731-095626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15622',
internalId:  '',
customField: '20100518-093358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15643',
internalId:  '',
customField: '20100518-082215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15685',
internalId:  '',
customField: '20100518-082055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15706',
internalId:  '',
customField: '20100518-082023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15727',
internalId:  '',
customField: '20100518-081930'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '13801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42',
internalId:  '',
customField: '20100527-130927'
};
webappMappings['7060']=webappMappings['7060-f7d4358fb53955699a7bb2e14fa30650']={
webappId:    '7060',
documentId:  '15622',
internalId:  'f7d4358fb53955699a7bb2e14fa30650',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-023ef7f4b2ee1837b59ac1a4ecd42381']={
webappId:    '7060',
documentId:  '15643',
internalId:  '023ef7f4b2ee1837b59ac1a4ecd42381',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-12a852c01f45268a0a0278de20eabcad']={
webappId:    '7060',
documentId:  '15685',
internalId:  '12a852c01f45268a0a0278de20eabcad',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-f3bbc618668bad0dd75787ecc3b3c60e']={
webappId:    '7060',
documentId:  '15664',
internalId:  'f3bbc618668bad0dd75787ecc3b3c60e',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-f6d21ff70a6112d31620be86d0f71bb8']={
webappId:    '7060',
documentId:  '15706',
internalId:  'f6d21ff70a6112d31620be86d0f71bb8',
customField: 'language:pt;country:BR;'
};
webappMappings['1501']=webappMappings['1501-1174702']={
webappId:    '1501',
documentId:  '13801',
internalId:  '1174702',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-63f2a424cd58aed8045ed159ae8e132e']={
webappId:    '7060',
documentId:  '15727',
internalId:  '63f2a424cd58aed8045ed159ae8e132e',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-b594d20c45caef05bfb9b449a6b20129']={
webappId:    '7060',
documentId:  '33812',
internalId:  'b594d20c45caef05bfb9b449a6b20129',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-10692']={
webappId:    '7008',
documentId:  '42',
internalId:  '10692',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33812',
internalId:  '',
customField: '20100518-093511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36212',
internalId:  '',
customField: '20100524-131905'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2SF0';
var companyName   = 'EXPANS%C3%83O+M%C3%93VEIS';
var htmlTitle	  = 'Expans%C3%A3o+M%C3%B3veis';
var metaKeywords  = 'Reforma%3B+sof%C3%A1%3B+estofados%3B+cadeiras%3B+impermeabiliza%C3%A7%C3%A3o%3B+tecidos%3B+m%C3%A3o+de+obra%3Bpresta%C3%A7%C3%A3o+servi%C3%A7os%3B+facilitamos%3B+fabrica%3B+fabricamos%3B+fabrica%C3%A7%C3%A3o%3B+almofadas%3B+chaise+long%3B+chess%3B+chaise+longe%3B+capitone%3B+reformas%3B+reformamos%3B+reforma+de+sof%C3%A1%3B+reforma+de+estofados%3Bpoltrona%3B+cadeiras+de+escritorio%3B+cadeira+executiva%3B+chenille%3B+couro%3B+courvin%3B+corino%3B+corano%3BExpans%C3%A3o%3B+m%C3%B3veis%3B+expans%C3%A3o+m%C3%B3veis%3B+qualidade%3B+puff%3B+puffs%3B+sof%C3%A1+3+lugares%3B+sof%C3%A1+3+e2+lugares%3B+sof%C3%A1+de+canto%3B+sof%C3%A1+sob-medida%3B+sof%C3%A1+1+lugar%3B+assento%3B+encosto%3B+assento+cadeira%3B+encosto+cadeira%3B+impermeabilizar%3B+sob-medida%3B+estofado+3+e+2+lugares%3B+estofado+de+canto%3B+canto+alem%C3%A3o%3B+estoafado+1+lugar%3B+empresa+de+sof%C3%A1%3B+curitiba+Pr%3Bempresa+conserto%3B+restaura%C3%A7%C3%A3o+cadeiras%3B+restaura%C3%A7%C3%A3o%3B+satisfa%C3%A7%C3%A3o%3B+promo%C3%A7%C3%A3o+sof%C3%A1%3B+reconhecida%3B+tendencia%3B+design%3Bquero+reformar+sof%C3%A1%3B+empresa+de+sofa+curitiba%3B+reforma+de+estoafado+em+curitiba%3B++';
var metaContents  = '+Fabricamos+seu+sof%C3%A1+Sob-Medida%2C+reformas+de+estofados++PARA+QUEM+EXIGE+QUALIDADE%3B++Fone%3A+%28041%29+3257-4884+%2F+3357-8997++Curitiba-PR.';
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();
};
