/* [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','7326',jdecode('Apresenta%C3%A7%C3%A3o'),jdecode(''),'/7326.html','true',[],'',''],
	['PAGE','13126',jdecode('Aplica%C3%A7%C3%B5es'),jdecode(''),'/13126.html','true',[],'',''],
	['PAGE','7398',jdecode('Fotos+do+Cortador'),jdecode(''),'/7398.html','true',[],'',''],
	['PAGE','7377',jdecode('Fotos+Aromatizador'),jdecode(''),'/7377.html','true',[],'',''],
	['ITEM','18726',jdecode('Video'),jdecode(''),'http://www.youtube.com/watch?v=oLKBKuTDsnE&NR=1','true',[],'','_blank'],
	['PAGE','13168',jdecode('M%C3%ADdia'),jdecode(''),'/13168.html','true',[],'',''],
	['PAGE','13347',jdecode('D%C3%BAvidas+Freq%C3%BCentes'),jdecode(''),'/13347.html','true',[],'',''],
	['PAGE','11327',jdecode('Contato'),jdecode(''),'/11327.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Cube';
theSitetree.paletteFamily='158663';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10606';
theSitetree.graphicsetId='10489';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cube',
				paletteFamily: 	'158663',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10606',
				graphicsetId: 	'10489',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-b398542b8c76f9a3a8fc1b91ed6f8411']={
webappId:    '7060',
documentId:  '7398',
internalId:  'b398542b8c76f9a3a8fc1b91ed6f8411',
customField: 'language:pt;country:BR;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '7326',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-73015e28057b9adaaf9eacffceefb82f']={
webappId:    '7060',
documentId:  '13126',
internalId:  '73015e28057b9adaaf9eacffceefb82f',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7326',
internalId:  '',
customField: '20100108-004051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7398',
internalId:  '',
customField: '20100108-005447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11327',
internalId:  '',
customField: '20100113-014426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7377',
internalId:  '',
customField: '20100108-005137'
};
webappMappings['7060']=webappMappings['7060-f1a6a9a7bdd0edc645b96f26f245ad52']={
webappId:    '7060',
documentId:  '7377',
internalId:  'f1a6a9a7bdd0edc645b96f26f245ad52',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13126',
internalId:  '',
customField: '20100113-015052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13168',
internalId:  '',
customField: '20100108-033124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13347',
internalId:  '',
customField: '20100112-124000'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CWBN';
var companyName   = '+SKGW+++++++++++++++++++++++++CORTADOR+DE+GARRAFAS';
var htmlTitle	  = '';
var metaKeywords  = '%3CHEAD%3E+maquina%2C+automatica%2C+m%C3%A1quina%2C+eletronica%2Cgarrafa%2C+vidro%2C+cortador%2C+cortar%2C+fatiar%2C+argolas%2Caros%2C+aromatizador%2C+aroma%2C+SKGW%2C+solu%C3%A7%C3%B5es%2C+copos%2C+ta%C3%A7as%2C+artesanato%2C+reciclagem%2C+velas%2C+cilindrica%2C+perfume%2C+autom%C3%A1tica%2C+eletr%C3%B4nica%2C+manuseio%2C+ovalada%2C+odor%2C+essencia%2C+ess%C3%AAncia%2C+aromatizante%2C+reciclar%2C+reciclagem%2C+recycle%2C+glass%2C+bottes%3C%2FHEAD%3E+';
var metaContents  = '%3CHEAD%3E+O+Cortador+de+Garrafas+tem+como+princ%C3%ADpios+b%C3%A1sicos%2C+baixo+custo+de+aquisi%C3%A7%C3%A3o%2Fmanuten%C3%A7%C3%A3o+e+facilidade+no+manuseio.+O+processo+de+corte+%C3%A9+muito+simples+e+autom%C3%A1tico%3C%2FHEAD%3E++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++';
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();
};

