/* [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','1001',jdecode('Home'),jdecode(''), jdecode('%2F1001.html'), 'true',[],'',''],
	['PAGE','9711',jdecode('Not%C3%ADcias'),jdecode(''), jdecode('%2F9711.html'), 'true',[],'',''],
	['PAGE','9732',jdecode('%C3%81lbum+de+fotos'),jdecode(''), jdecode('%2F9732.html'), 'true',[],'',''],
	['PAGE','9837',jdecode('Contato'),jdecode(''), jdecode('%2F9837.html'), 'true',[],'',''],
	['PAGE','39012',jdecode('Informa%C3%A7%C3%B5es'),jdecode(''), jdecode('%2F39012.html'), 'true',[],'',''],
	['PAGE','10664',jdecode('Produtos'),jdecode(''), jdecode('%2F10664.html'), 'true',[],'',''],
	['PAGE','10748',jdecode('Links'),jdecode(''), jdecode('%2F10748.html'), 'true',[],'',''],
	['PAGE','47512',jdecode('Nova+p%C3%A1gina'),jdecode(''), jdecode('%2F47512.html'), 'true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Contrast';
theSitetree.paletteFamily='B42F2F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16629';
theSitetree.graphicsetId='12213';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCVWLSSSLYTC2IW'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Contrast',
				paletteFamily: 	'B42F2F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16629',
				graphicsetId: 	'12213',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1001',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-8092621']={
webappId:    '1501',
documentId:  '1001',
internalId:  '8092621',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-2450']={
webappId:    '7008',
documentId:  '9837',
internalId:  '2450',
customField: 'language:pt;country:BR;'
};
webappMappings['7005']=webappMappings['7005-293']={
webappId:    '7005',
documentId:  '1001',
internalId:  '293',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20090216-085741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9711',
internalId:  '',
customField: '20100202-140753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9732',
internalId:  '',
customField: '20090216-091841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9837',
internalId:  '',
customField: '20071211-081902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10664',
internalId:  '',
customField: '20111015-185804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10748',
internalId:  '',
customField: '20120130-181149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47512',
internalId:  '',
customField: '20120120-131051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39012',
internalId:  '',
customField: '20090402-091845'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZ8YT';
var companyName   = 'GUERRA+REPRESENTA%C3%87%C3%95ES';
var htmlTitle	  = 'GUERRA+EMBALAGENS';
var metaKeywords  = 'Filme+PVC%2C+Filme+Polilefinico%2C+Copos+Descartaveis%2C+Pratos+Descartaveis%2C+Fita+Gomada%2C+Fita+Adesiva%2C+PP%2C+PEBD%2C+PEAD%2C+BOPP%2C+Embalagens+Flexiveis%2C+Embalagens+conicas%2C+Embalagens+para+flores%2C+Embalagens+para+verduras%2C+Embalagens+p%2F+alimentos%2C+Embalagens+p%2F+frigorificos%2C+Selos+de+aluminio%2C+Tampas%2C+Sacarias+de+r%C3%A1fia%2C+sacaria+para+suplem.+mineral%2C+sacarias+p%2F+ra%C3%A7%C3%A3o%2CSaquinhos+pl%C3%A1sticos%2C+Etiquetas%2C+Etiquetas+p%2F+alimentos%2C+Etiquetas+p%2F+congelados%2C+Tags%2C+Toalha+de+papel+p%2F+restaurante%2Ctoalha+de+mesa%2CPotes+descartaveis%2C+Tampas+descartaveis%2CBlister%2C+Copos+p%2F+suco%2C+Copos+p%2F+agua%2CPotes+p%2F+tempero%2C+Selo+p%2F+copos+e+potes%2CPVC+laminado%2CEmbalagens+p%2F+Pet+Food%2C+Embalagens+Pouch%2CEmbalagem+Multicamada%2CEmbalagem+Monocamada%2C+Embalagem+Monocamada+Biorientada%2C+Embalagem+de+Papel+Cart%C3%A3o%2C+Micro+ondulado%2CEmbalagens%2C+Copo+para+Suco%2C+Copo+para+%C3%81gua%2C+guardanapos%2C+canudos+pl%C3%A1sticos%2C+produtos+descart%C3%A1veis+para+festas+e+buffet.';
var metaContents  = 'Embalagens+em+geral';
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();
};

