/* [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('Home'),jdecode(''),'/11.html','true',[],'',''],
	['PAGE','1073',jdecode('Nossos+Produtos'),jdecode(''),'/1073.html','true',[],'',''],
	['PAGE','23901',jdecode('Certifica%C3%A7%C3%B5es'),jdecode(''),'/23901/index.html','true',[ 
		['PAGE','24201',jdecode('ISO+9001%3A2008'),jdecode(''),'/23901/24201.html','true',[],'',''],
		['PAGE','24222',jdecode('Produtos+Perigosos'),jdecode(''),'/23901/24222.html','true',[],'',''],
		['PAGE','25901',jdecode('Alimentos'),jdecode(''),'/23901/25901.html','true',[],'',''],
		['PAGE','25922',jdecode('Metais+pesados'),jdecode(''),'/23901/25922.html','true',[],'',''],
		['PAGE','36101',jdecode('Outros'),jdecode(''),'/23901/36101.html','true',[],'','']
	],'',''],
	['PAGE','3627',jdecode('Conhecendo+o+Pl%C3%A1stico'),jdecode(''),'/3627/index.html','true',[ 
		['PAGE','3645',jdecode('Vantagens+na+sua+Utiliza%C3%A7%C3%A3o'),jdecode(''),'/3627/3645.html','true',[],'',''],
		['PAGE','3654',jdecode('O+Pl%C3%A1stico+na+vida+moderna'),jdecode(''),'/3627/3654.html','true',[],'','']
	],'',''],
	['PAGE','16801',jdecode('Alguns+de+nossos+clientes'),jdecode(''),'/16801.html','true',[],'',''],
	['PAGE','40401',jdecode('V%C3%ADdeo+Institucional'),jdecode(''),'/40401.html','true',[],'',''],
	['PAGE','42801',jdecode('Not%C3%ADcias'),jdecode(''),'/42801.html','true',[],'',''],
	['PAGE','3903',jdecode('Links+%C3%9Ateis'),jdecode(''),'/3903.html','true',[],'',''],
	['PAGE','1406',jdecode('Fale+Conosco'),jdecode(''),'/1406.html','true',[],'',''],
	['PAGE','9701',jdecode('Satisfa%C3%A7%C3%A3o+de+Clientes'),jdecode(''),'/9701.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Champagne';
theSitetree.paletteFamily='426388';
theSitetree.keyvisualId='11363';
theSitetree.keyvisualName='kv_11363.jpg';
theSitetree.fontsetId='31944';
theSitetree.graphicsetId='13786';
theSitetree.contentColor='152D47';
theSitetree.contentBGColor='426388';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Champagne',
				paletteFamily: 	'426388',
				keyvisualId: 	'11363',
				keyvisualName: 	'kv_11363.jpg',
				fontsetId: 		'31944',
				graphicsetId: 	'13786',
				contentColor: 	'152D47',
				contentBGColor: '426388',
				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['1501']=webappMappings['1501-1258882']={
webappId:    '1501',
documentId:  '11',
internalId:  '1258882',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-2713']={
webappId:    '7008',
documentId:  '9701',
internalId:  '2713',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20090109-123626'
};
webappMappings['7008']=webappMappings['7008-2714']={
webappId:    '7008',
documentId:  '1406',
internalId:  '2714',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-a2569628b512d0ac006e3bc54748daa4']={
webappId:    '7060',
documentId:  '16801',
internalId:  'a2569628b512d0ac006e3bc54748daa4',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16801',
internalId:  '',
customField: '20061205-104414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20061205-133415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1073',
internalId:  '',
customField: '20090114-081854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23901',
internalId:  '',
customField: '20070412-115617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24201',
internalId:  '',
customField: '20100625-144607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3627',
internalId:  '',
customField: '20090109-132711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24222',
internalId:  '',
customField: '20071205-082853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25901',
internalId:  '',
customField: '20070517-084250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25922',
internalId:  '',
customField: '20070517-084415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36101',
internalId:  '',
customField: '20081029-070201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3645',
internalId:  '',
customField: '20060516-104223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3654',
internalId:  '',
customField: '20060516-104317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3903',
internalId:  '',
customField: '20060517-102520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1406',
internalId:  '',
customField: '20080528-104925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40401',
internalId:  '',
customField: '20090114-073723'
};
webappMappings['7060']=webappMappings['7060-6e7135b1554fdd7f7965a66b0614a749']={
webappId:    '7060',
documentId:  '40401',
internalId:  '6e7135b1554fdd7f7965a66b0614a749',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42801',
internalId:  '',
customField: '20090615-064835'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2EMM';
var companyName   = 'Pantera+Embalagens+Pl%C3%A1sticas';
var htmlTitle	  = 'Pantera+Embalagens+Pl%C3%A1sticas';
var metaKeywords  = 'Saco+pl%C3%A1stico%3B++Pantera+pl%C3%A1sticos%3B+saquinhos%3B+saco+plasticos%3B+embalagens%3B+saco+valvulados%3B+sacos+impressos%3B+sacolas%3B+embalagens+impressas%3B+bobinas+pl%C3%A1sticas%3B+bobina+de+plasticos%3B+Polietileno%3B+saco+de+polietileno+de+baixa+densidade';
var metaContents  = 'Embalagens+Pl%C3%A1sticas%3B+saquinhos%3B+saco+plasticos%3B+embalagens%3B+sacos+para+argamassa%3B+saco+valvulado%3B+sacos+impressos%3B+embalagens+impressas';
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();
};

