/* [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','2101',jdecode('Inicial'),jdecode(''), jdecode('%2F2101.html'), 'true',[],'',''],
	['PAGE','2173',jdecode('Artesanato'),jdecode(''), jdecode('%2F2173%2Findex.html'), 'true',[ 
		['PAGE','8264',jdecode('Massa+Biscuit'),jdecode(''), jdecode('%2F2173%2F8264.html'), 'true',[],'',''],
		['PAGE','8348',jdecode('Creme'),jdecode(''), jdecode('%2F2173%2F8348.html'), 'true',[],'',''],
		['PAGE','8243',jdecode('Amido'),jdecode(''), jdecode('%2F2173%2F8243.html'), 'true',[],'',''],
		['PAGE','8222',jdecode('Vaselina'),jdecode(''), jdecode('%2F2173%2F8222.html'), 'true',[],'',''],
		['PAGE','8201',jdecode('Cola'),jdecode(''), jdecode('%2F2173%2F8201.html'), 'true',[],'',''],
		['PAGE','8285',jdecode('Kit+Ferramentas'),jdecode(''), jdecode('%2F2173%2F8285.html'), 'true',[],'',''],
		['PAGE','8306',jdecode('Moldes+Silicone'),jdecode(''), jdecode('%2F2173%2F8306.html'), 'true',[],'','']
	],'',''],
	['PAGE','22501',jdecode('Moveleira'),jdecode(''), jdecode('%2F22501.html'), 'true',[],'',''],
	['PAGE','22522',jdecode('Constru%C3%A7%C3%A3o+Civ%C3%ADl'),jdecode(''), jdecode('%2F22522.html'), 'true',[],'',''],
	['PAGE','2194',jdecode('Revendas'),jdecode(''), jdecode('%2F2194%2Findex.html'), 'true',[ 
		['PAGE','12222',jdecode('Belo+Horizonte+-+MG'),jdecode(''), jdecode('%2F2194%2F12222.html'), 'true',[],'',''],
		['PAGE','12264',jdecode('C%C3%A1ceres+-+MT'),jdecode(''), jdecode('%2F2194%2F12264.html'), 'true',[],'',''],
		['PAGE','12285',jdecode('Campinas+-+SP'),jdecode(''), jdecode('%2F2194%2F12285.html'), 'true',[],'',''],
		['PAGE','12306',jdecode('Catanduva+-+SP'),jdecode(''), jdecode('%2F2194%2F12306.html'), 'true',[],'',''],
		['PAGE','12327',jdecode('Curitiba+-+PR'),jdecode(''), jdecode('%2F2194%2F12327.html'), 'true',[],'',''],
		['PAGE','12348',jdecode('Feira+de+Santana+-+BA'),jdecode(''), jdecode('%2F2194%2F12348.html'), 'true',[],'',''],
		['PAGE','12369',jdecode('Fortaleza+-+CE'),jdecode(''), jdecode('%2F2194%2F12369.html'), 'true',[],'',''],
		['PAGE','12390',jdecode('Irece+-+BA'),jdecode(''), jdecode('%2F2194%2F12390.html'), 'true',[],'',''],
		['PAGE','53345',jdecode('Juazeiro+-+BA'),jdecode(''), jdecode('%2F2194%2F53345.html'), 'true',[],'',''],
		['PAGE','12411',jdecode('Jundia%C3%AD+-+SP'),jdecode(''), jdecode('%2F2194%2F12411.html'), 'true',[],'',''],
		['PAGE','55645',jdecode('Maring%C3%A1+-+PR'),jdecode(''), jdecode('%2F2194%2F55645.html'), 'true',[],'',''],
		['PAGE','12453',jdecode('Porto+Alegre+-+RS'),jdecode(''), jdecode('%2F2194%2F12453.html'), 'true',[],'',''],
		['PAGE','12432',jdecode('Recife+-+PE'),jdecode(''), jdecode('%2F2194%2F12432.html'), 'true',[],'',''],
		['PAGE','12474',jdecode('Rio+de+Janeiro+-+RJ'),jdecode(''), jdecode('%2F2194%2F12474.html'), 'true',[],'',''],
		['PAGE','12495',jdecode('S%C3%A3o+Paulo+-+SP'),jdecode(''), jdecode('%2F2194%2F12495.html'), 'true',[],'',''],
		['PAGE','39912',jdecode('S%C3%A3o+Jose+dos+Campos-SP'),jdecode(''), jdecode('%2F2194%2F39912.html'), 'true',[],'',''],
		['PAGE','12516',jdecode('Salvador+-+BA'),jdecode(''), jdecode('%2F2194%2F12516.html'), 'true',[],'',''],
		['PAGE','34801',jdecode('Santa+Catarina+-+SC'),jdecode(''), jdecode('%2F2194%2F34801.html'), 'true',[],'',''],
		['PAGE','56445',jdecode('Santana+Livramento+-+RS'),jdecode(''), jdecode('%2F2194%2F56445.html'), 'true',[],'',''],
		['PAGE','12537',jdecode('S%C3%A3o+Gon%C3%A7alo+-+RJ'),jdecode(''), jdecode('%2F2194%2F12537.html'), 'true',[],'',''],
		['PAGE','12558',jdecode('S%C3%A3o+Louren%C3%A7o+-+MG'),jdecode(''), jdecode('%2F2194%2F12558.html'), 'true',[],'',''],
		['PAGE','12579',jdecode('Tangar%C3%A1+da+Serra+-+MT'),jdecode(''), jdecode('%2F2194%2F12579.html'), 'true',[],'',''],
		['PAGE','51445',jdecode('Taguatinga+-+DF'),jdecode(''), jdecode('%2F2194%2F51445.html'), 'true',[],'',''],
		['PAGE','56245',jdecode('Uruguaiana+-+RS'),jdecode(''), jdecode('%2F2194%2F56245.html'), 'true',[],'','']
	],'',''],
	['PAGE','52145',jdecode('Representantes'),jdecode(''), jdecode('%2F52145.html'), 'true',[],'',''],
	['PAGE','2215',jdecode('Parceiros'),jdecode(''), jdecode('%2F2215.html'), 'true',[],'',''],
	['PAGE','2236',jdecode('Fox+Exporta%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F2236.html'), 'true',[],'',''],
	['PAGE','33901',jdecode('Revendas+Portugal'),jdecode(''), jdecode('%2F33901.html'), 'true',[],'',''],
	['PAGE','37712',jdecode('Fale+com+a+FOX'),jdecode(''), jdecode('%2F37712.html'), 'true',[],'','']];
var siteelementCount=41;
theSitetree.topTemplateName='Displace';
theSitetree.paletteFamily='CFCFCF';
theSitetree.keyvisualId='11077';
theSitetree.keyvisualName='kv_11077.jpg';
theSitetree.fontsetId='31958';
theSitetree.graphicsetId='13799';
theSitetree.contentColor='342500';
theSitetree.contentBGColor='CFCFCF';
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: 			'Displace',
				paletteFamily: 	'CFCFCF',
				keyvisualId: 	'11077',
				keyvisualName: 	'kv_11077.jpg',
				fontsetId: 		'31958',
				graphicsetId: 	'13799',
				contentColor: 	'342500',
				contentBGColor: 'CFCFCF',
				a_color: 		'000000',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20120127-100656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22501',
internalId:  '',
customField: '20101221-070214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20110406-072628'
};
webappMappings['1501']=webappMappings['1501-13883137']={
webappId:    '1501',
documentId:  '2101',
internalId:  '13883137',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2194',
internalId:  '',
customField: '20090720-203427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2215',
internalId:  '',
customField: '20110509-124755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2236',
internalId:  '',
customField: '20100422-115033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39912',
internalId:  '',
customField: '20110316-095047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34801',
internalId:  '',
customField: '20110802-101431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20110309-061759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20110303-080659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8222',
internalId:  '',
customField: '20100909-133750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8243',
internalId:  '',
customField: '20090706-193338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8264',
internalId:  '',
customField: '20100909-133928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8285',
internalId:  '',
customField: '20090706-195420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8306',
internalId:  '',
customField: '20090706-200559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8348',
internalId:  '',
customField: '20100525-150846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12222',
internalId:  '',
customField: '20090720-201609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12264',
internalId:  '',
customField: '20090720-201840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12285',
internalId:  '',
customField: '20110317-151012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12306',
internalId:  '',
customField: '20090722-140931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12327',
internalId:  '',
customField: '20110802-103930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12348',
internalId:  '',
customField: '20090722-141240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12369',
internalId:  '',
customField: '20090722-141526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12390',
internalId:  '',
customField: '20110311-122436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12411',
internalId:  '',
customField: '20090722-142818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12432',
internalId:  '',
customField: '20090722-143616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12453',
internalId:  '',
customField: '20090722-142946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12474',
internalId:  '',
customField: '20090722-143717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12495',
internalId:  '',
customField: '20110802-104458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12516',
internalId:  '',
customField: '20100422-102332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12537',
internalId:  '',
customField: '20090722-150412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12558',
internalId:  '',
customField: '20090722-150517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12579',
internalId:  '',
customField: '20090722-150633'
};
webappMappings['7060']=webappMappings['7060-4208e3399caec4f653b4a51e61f80dba']={
webappId:    '7060',
documentId:  '2101',
internalId:  '4208e3399caec4f653b4a51e61f80dba',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-a6713d2a4a82314f2f434bf940301534']={
webappId:    '7060',
documentId:  '2101',
internalId:  'a6713d2a4a82314f2f434bf940301534',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22522',
internalId:  '',
customField: '20100524-160740'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-23338']={
webappId:    '7008',
documentId:  '37712',
internalId:  '23338',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37712',
internalId:  '',
customField: '20120126-115932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51445',
internalId:  '',
customField: '20110412-134158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52145',
internalId:  '',
customField: '20110413-102829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53345',
internalId:  '',
customField: '20110427-071839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55645',
internalId:  '',
customField: '20110802-090347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56245',
internalId:  '',
customField: '20110802-102731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56445',
internalId:  '',
customField: '20110802-103528'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INH8P9';
var companyName   = 'FOX+INDUSTRIA';
var htmlTitle	  = 'Fox+Cola+-+Qualidade+e+Excelencia%21%21%21';
var metaKeywords  = '';
var metaContents  = '';
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();
};

