/* [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','301',jdecode('P%C3%81GINA+INICIAL'),jdecode(''), jdecode('%2F301.html'), 'true',[],'',''],
	['PAGE','137756',jdecode('RESIDENCIAL'),jdecode(''), jdecode('%2F137756%2Findex.html'), 'true',[ 
		['PAGE','154756',jdecode('Antes%2FDepois+'),jdecode(''), jdecode('%2F137756%2F154756.html'), 'true',[],'',''],
		['PAGE','137777',jdecode('Cozinha'),jdecode(''), jdecode('%2F137756%2F137777.html'), 'true',[],'',''],
		['PAGE','141456',jdecode('Arm%C3%A1rio'),jdecode(''), jdecode('%2F137756%2F141456.html'), 'true',[],'',''],
		['PAGE','137798',jdecode('Home+Theater'),jdecode(''), jdecode('%2F137756%2F137798.html'), 'true',[],'',''],
		['PAGE','137819',jdecode('Quarto+Beb%C3%AA'),jdecode(''), jdecode('%2F137756%2F137819.html'), 'true',[],'',''],
		['PAGE','137840',jdecode('Quarto+Infantil'),jdecode(''), jdecode('%2F137756%2F137840.html'), 'true',[],'',''],
		['PAGE','137861',jdecode('Quarto+Casal'),jdecode(''), jdecode('%2F137756%2F137861.html'), 'true',[],'',''],
		['PAGE','137882',jdecode('Banheiro'),jdecode(''), jdecode('%2F137756%2F137882.html'), 'true',[],'',''],
		['PAGE','137903',jdecode('Sala+Jantar'),jdecode(''), jdecode('%2F137756%2F137903.html'), 'true',[],'',''],
		['PAGE','140856',jdecode('Churrasqueira'),jdecode(''), jdecode('%2F137756%2F140856.html'), 'true',[],'',''],
		['PAGE','140877',jdecode('Porta'),jdecode(''), jdecode('%2F137756%2F140877.html'), 'true',[],'','']
	],'',''],
	['PAGE','57701',jdecode('COMERCIAL'),jdecode(''), jdecode('%2F57701%2Findex.html'), 'true',[ 
		['PAGE','177456',jdecode('Academia'),jdecode(''), jdecode('%2F57701%2F177456.html'), 'true',[],'',''],
		['PAGE','185756',jdecode('Empresa'),jdecode(''), jdecode('%2F57701%2F185756.html'), 'true',[],'','']
	],'',''],
	['PAGE','394',jdecode('LINHA+PET'),jdecode(''), jdecode('%2F394%2Findex.html'), 'true',[ 
		['PAGE','174956',jdecode('Antes%2FDepois'),jdecode(''), jdecode('%2F394%2F174956.html'), 'true',[],'',''],
		['PAGE','170456',jdecode('Folder+2012'),jdecode(''), jdecode('%2F394%2F170456.html'), 'true',[],'',''],
		['PAGE','186056',jdecode('Feiras'),jdecode(''), jdecode('%2F394%2F186056.html'), 'true',[],'','']
	],'',''],
	['PAGE','77001',jdecode('M%C3%93VEL+AQU%C3%81RIO'),jdecode(''), jdecode('%2F77001.html'), 'true',[],'',''],
	['PAGE','125256',jdecode('CLIENTES'),jdecode(''), jdecode('%2F125256%2Findex.html'), 'true',[ 
		['PAGE','132856',jdecode('Pirituba'),jdecode(''), jdecode('%2F125256%2F132856.html'), 'true',[],'',''],
		['PAGE','149656',jdecode('Munhoz'),jdecode(''), jdecode('%2F125256%2F149656.html'), 'true',[],'',''],
		['PAGE','171456',jdecode('Guerjicao+'),jdecode(''), jdecode('%2F125256%2F171456.html'), 'true',[],'',''],
		['PAGE','125277',jdecode('Mundial+Pet+Shop'),jdecode(''), jdecode('%2F125256%2F125277.html'), 'true',[],'',''],
		['PAGE','76301',jdecode('Cantareira'),jdecode(''), jdecode('%2F125256%2F76301.html'), 'true',[],'',''],
		['PAGE','77501',jdecode('Piratininga'),jdecode(''), jdecode('%2F125256%2F77501.html'), 'true',[],'',''],
		['PAGE','78201',jdecode('Mau%C3%A1'),jdecode(''), jdecode('%2F125256%2F78201.html'), 'true',[],'',''],
		['PAGE','78701',jdecode('S%C3%A3o+Miguel'),jdecode(''), jdecode('%2F125256%2F78701.html'), 'true',[],'',''],
		['PAGE','116223',jdecode('Diadema'),jdecode(''), jdecode('%2F125256%2F116223.html'), 'true',[],'',''],
		['PAGE','176856',jdecode('Sorocaba'),jdecode(''), jdecode('%2F125256%2F176856.html'), 'true',[],'',''],
		['PAGE','178856',jdecode('Orat%C3%B3rio'),jdecode(''), jdecode('%2F125256%2F178856.html'), 'true',[],'',''],
		['PAGE','183856',jdecode('Parada+Taipas'),jdecode(''), jdecode('%2F125256%2F183856.html'), 'true',[],'',''],
		['PAGE','184756',jdecode('Ra%C3%A7%C3%B5es+Renata'),jdecode(''), jdecode('%2F125256%2F184756.html'), 'true',[],'','']
	],'',''],
	['PAGE','583',jdecode('CONTATO'),jdecode(''), jdecode('%2F583.html'), 'true',[],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='Sense';
theSitetree.paletteFamily='CE3000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10522';
theSitetree.graphicsetId='11108';
theSitetree.contentColor='A11E1E';
theSitetree.contentBGColor='FFFFFF';
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: 			'Sense',
				paletteFamily: 	'CE3000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10522',
				graphicsetId: 	'11108',
				contentColor: 	'A11E1E',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-5273166']={
webappId:    '1501',
documentId:  '301',
internalId:  '5273166',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137903',
internalId:  '',
customField: '20111013-143552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140856',
internalId:  '',
customField: '20111013-143323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20111121-083727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132856',
internalId:  '',
customField: '20111014-062158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57701',
internalId:  '',
customField: '20111014-060303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137882',
internalId:  '',
customField: '20111013-144342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '394',
internalId:  '',
customField: '20111106-055043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77001',
internalId:  '',
customField: '20111014-060448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76301',
internalId:  '',
customField: '20111014-062636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77501',
internalId:  '',
customField: '20111014-062827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78201',
internalId:  '',
customField: '20111014-063037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78701',
internalId:  '',
customField: '20111014-063132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170456',
internalId:  '',
customField: '20111121-070819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171456',
internalId:  '',
customField: '20111106-054836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '583',
internalId:  '',
customField: '20111014-061337'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137756',
internalId:  '',
customField: '20111014-071245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137777',
internalId:  '',
customField: '20111014-071837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137798',
internalId:  '',
customField: '20111013-063724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137819',
internalId:  '',
customField: '20110731-052507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137840',
internalId:  '',
customField: '20110731-052739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137861',
internalId:  '',
customField: '20111013-145059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116223',
internalId:  '',
customField: '20111014-064517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141456',
internalId:  '',
customField: '20111204-054916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140877',
internalId:  '',
customField: '20111013-143142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125256',
internalId:  '',
customField: '20120128-114636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125277',
internalId:  '',
customField: '20111014-062509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149656',
internalId:  '',
customField: '20111014-062355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '154756',
internalId:  '',
customField: '20111014-071112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '174956',
internalId:  '',
customField: '20120206-062412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176856',
internalId:  '',
customField: '20111204-074649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177456',
internalId:  '',
customField: '20111208-073622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '178856',
internalId:  '',
customField: '20111208-165203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183856',
internalId:  '',
customField: '20111214-033140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '184756',
internalId:  '',
customField: '20111215-102441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '186056',
internalId:  '',
customField: '20111217-152808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '185756',
internalId:  '',
customField: '20111216-015009'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INVZWH';
var companyName   = 'IGS+MARCENARIA';
var htmlTitle	  = 'IGS+Marcenaria+%2811%29+3435-4311+-+M%C3%B3veis+Planejados+e+N%C3%A3o+Modulados';
var metaKeywords  = 'm%C3%B3veis%2C+moveis%2C+comercial%2C+comerciais%2C+m%C3%B3vel%2C+movel%2C+marcenaria%2C+marcenarias%2C+igs%2C+pet%2C+box%2C+shop%2C+ra%C3%A7%C3%A3o%2C+Guarulhos%2C+guarulhos%2C+S%C3%A3o+Paulo%2C+s%C3%A3o+paulo%2C+mdf%2C+madeira%2Cp%C3%BAlpito%2C+religioso%2Cbanco%2Ccozinha%2C+planejado%2C+arm%C3%A1rio%2C+escrit%C3%B3rio%2C+residencial%2C+ind%C3%BAstria%2Cigreja%2C+alimento%2C+animal%2C+home+theater%2C+sala%2C+banheiro%2C+%C3%A1rea+de+servi%C3%A7o%2C+lavanderia%2C+quarto%2C+beb%C3%AA%2C+crian%C3%A7a%2C+mulher%2C+homem%2C+marceneiro%2Ccart%C3%A3o+de+cr%C3%A9dito%2C+dinheiro%2C+menino%2C+menina%2C+adolescente%2C+su%C3%ADte%2C+sala+de+estar%2C+sala+de+espera%2C+consult%C3%B3rio%2C+escola%2C+sal%C3%A3o%2C+imobili%C3%A1ria%2C+loja%2C+shopping%2C+estande%2C+stand%2C++show+room%2C+f%C3%A1brica';
var metaContents  = 'm%C3%B3veis%2C+moveis%2C+comercial%2C+comerciais%2C+m%C3%B3vel%2C+movel%2C+marcenaria%2C+marcenarias%2C+igs%2C+pet%2C+box%2C+shop%2C+ra%C3%A7%C3%A3o%2C+Guarulhos%2C+guarulhos%2C+S%C3%A3o+Paulo%2C+s%C3%A3o+paulo%2C+mdf%2C+madeira%2Cp%C3%BAlpito%2C+religioso%2Cbanco%2Ccozinha%2C+planejado%2C+arm%C3%A1rio%2C+escrit%C3%B3rio%2C+residencial%2C+ind%C3%BAstria%2Cigreja%2C+alimento%2C+animal%2C+home+theater%2C+sala%2C+banheiro%2C+%C3%A1rea+de+servi%C3%A7o%2C+lavanderia%2C+quarto%2C+beb%C3%AA%2C+crian%C3%A7a%2C+mulher%2C+homem%2C+marceneiro%2Ccart%C3%A3o+de+cr%C3%A9dito%2C+dinheiro%2C+menino%2C+menina%2C+adolescente%2C+su%C3%ADte%2C+sala+de+estar%2C+sala+de+espera%2C+consult%C3%B3rio%2C+escola%2C+sal%C3%A3o%2C+imobili%C3%A1ria%2C+loja%2C+shopping%2C+estande%2C+stand%2C+show+room%2C+f%C3%A1brica';
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();
};

