/* [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('HOME'),jdecode(''), jdecode('%2F301.html'), 'true',[],'',''],
	['PAGE','120412',jdecode('HOUSE+-+GIFT+'),jdecode(''), jdecode('%2F120412.html'), 'true',[],'',''],
	['PAGE','102112',jdecode('FOTOS+1'),jdecode(''), jdecode('%2F102112.html'), 'true',[],'',''],
	['PAGE','114512',jdecode('FOTOS+2'),jdecode(''), jdecode('%2F114512.html'), 'true',[],'',''],
	['PAGE','1485',jdecode('ABAFADOR'),jdecode(''), jdecode('%2F1485.html'), 'true',[],'',''],
	['PAGE','163923',jdecode('%C3%82NFORA'),jdecode(''), jdecode('%2F163923.html'), 'true',[],'',''],
	['PAGE','1548',jdecode('BALDE'),jdecode(''), jdecode('%2F1548.html'), 'true',[],'',''],
	['PAGE','1569',jdecode('BANDEJAS'),jdecode(''), jdecode('%2F1569.html'), 'true',[],'',''],
	['PAGE','1590',jdecode('CASTI%C3%87AL'),jdecode(''), jdecode('%2F1590.html'), 'true',[],'',''],
	['PAGE','1506',jdecode('CH%C3%81+E+CAF%C3%89'),jdecode(''), jdecode('%2F1506.html'), 'true',[],'',''],
	['PAGE','130012',jdecode('CHAMPANHEIRA'),jdecode(''), jdecode('%2F130012.html'), 'true',[],'',''],
	['PAGE','1611',jdecode('CHAFARIZ'),jdecode(''), jdecode('%2F1611.html'), 'true',[],'',''],
	['PAGE','96601',jdecode('COMO+LIMPAR+%3F'),jdecode(''), jdecode('%2F96601.html'), 'true',[],'',''],
	['PAGE','41901',jdecode('CURIOSIDADES'),jdecode(''), jdecode('%2F41901.html'), 'true',[],'',''],
	['PAGE','1632',jdecode('DIVERSOS'),jdecode(''), jdecode('%2F1632.html'), 'true',[],'',''],
	['PAGE','155412',jdecode('FLOREIRA'),jdecode(''), jdecode('%2F155412.html'), 'true',[],'',''],
	['PAGE','1674',jdecode('RECHAUD'),jdecode(''), jdecode('%2F1674.html'), 'true',[],'',''],
	['PAGE','110612',jdecode('ROSA+DE+PRATA'),jdecode(''), jdecode('%2F110612.html'), 'true',[],'',''],
	['PAGE','1653',jdecode('SALADEIRAS'),jdecode(''), jdecode('%2F1653.html'), 'true',[],'',''],
	['PAGE','5701',jdecode('SAMOVAR'),jdecode(''), jdecode('%2F5701.html'), 'true',[],'',''],
	['PAGE','5722',jdecode('SOUSPLAT'),jdecode(''), jdecode('%2F5722.html'), 'true',[],'',''],
	['PAGE','5743',jdecode('SUP.+DE+BOLO'),jdecode(''), jdecode('%2F5743.html'), 'true',[],'',''],
	['PAGE','1527',jdecode('SUP.+DE+DOCE'),jdecode(''), jdecode('%2F1527.html'), 'true',[],'',''],
	['PAGE','156012',jdecode('TA%C3%87AS+DE+PRATA'),jdecode(''), jdecode('%2F156012.html'), 'true',[],'',''],
	['PAGE','72501',jdecode('TROF%C3%89U'),jdecode(''), jdecode('%2F72501.html'), 'true',[],'',''],
	['PAGE','5764',jdecode('CONTATO'),jdecode(''), jdecode('%2F5764.html'), 'true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Vienna';
theSitetree.paletteFamily='DCCC9F';
theSitetree.keyvisualId='11891';
theSitetree.keyvisualName='kv_11891.jpg';
theSitetree.fontsetId='33180';
theSitetree.graphicsetId='14089';
theSitetree.contentColor='696146';
theSitetree.contentBGColor='fbeec7';
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: 			'Vienna',
				paletteFamily: 	'DCCC9F',
				keyvisualId: 	'11891',
				keyvisualName: 	'kv_11891.jpg',
				fontsetId: 		'33180',
				graphicsetId: 	'14089',
				contentColor: 	'696146',
				contentBGColor: 'fbeec7',
				a_color: 		'FBEFC9',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-308']={
webappId:    '7008',
documentId:  '5764',
internalId:  '308',
customField: 'language:pt;country:BR;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-11801166']={
webappId:    '1501',
documentId:  '301',
internalId:  '11801166',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20120106-080415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102112',
internalId:  '',
customField: '20120106-072749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20090615-083421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1485',
internalId:  '',
customField: '20110901-145117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1506',
internalId:  '',
customField: '20110901-150828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1527',
internalId:  '',
customField: '20120106-075226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1548',
internalId:  '',
customField: '20110901-145300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1569',
internalId:  '',
customField: '20110831-195444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1590',
internalId:  '',
customField: '20120106-072224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1611',
internalId:  '',
customField: '20110915-150754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1632',
internalId:  '',
customField: '20110915-145618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1653',
internalId:  '',
customField: '20110901-151102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1674',
internalId:  '',
customField: '20111206-072700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20110831-201408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5722',
internalId:  '',
customField: '20110831-201607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5743',
internalId:  '',
customField: '20111109-124246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5764',
internalId:  '',
customField: '20111029-121400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163923',
internalId:  '',
customField: '20111122-135110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155412',
internalId:  '',
customField: '20110912-093051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156012',
internalId:  '',
customField: '20111116-120523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130012',
internalId:  '',
customField: '20110915-143857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120412',
internalId:  '',
customField: '20110831-165328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114512',
internalId:  '',
customField: '20111206-075059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96601',
internalId:  '',
customField: '20110831-200214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72501',
internalId:  '',
customField: '20120117-093705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110612',
internalId:  '',
customField: '20110831-200954'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPBW6';
var companyName   = 'O+MUNDO+DA+PRATA+++++%C2%AE';
var htmlTitle	  = 'www.omundodaprata.com.br';
var metaKeywords  = 'PRATARIA%2C+SOUSPLAT%2C+SAMOVAR%2C+BANDEJA%2C+CASTI%C3%87AL%2C+RECHAUD%2C+SUPORTE+DE+BOLO%2C+APARELHO+DE+CH%C3%81%2C+BULE%2C+CACHEPOT%2C+PRATA%2C+FABRICA%C3%87%C3%83O+DE+PRATARIA%2C+TALHERES%2C+ABAFADOR%2C+BALEIRO%2C+BOMBONIERI%2C+CHALEIRA%2C+BALDE+DE+GELO%2C+BALDE+DE+VINHO%2C+BALDE+DE+CHAMPANHE%2C+CHAMPANHEIRA%2C+CHAFARIZ%2C+FRUTEIRA%2C+JARRA%2C+MOLHEIRA%2C+LEITEIRA%2C+P%C3%81+DE+BOLO%2C+PORTA+CAVIAR%2C+FRIGIDEIRA%2C+SOPEIRA%2C+SUPORTE+DE+BOLO%2C+SUPORTE+DE+DOCE%2C+TA%C3%87A+DE+CHAMPANHE%2C++TA%C3%87A+DE+VINHO%2C+SALADEIRA%2C+RESTAURA%C3%87%C3%83O+DE+PRATARIA%2C+BANDEJA+OVAL%2C+BANDEJA+REDONDA%2CPLACAS+COMEMORATIVAS%2C+PLACA+COMEMORATIVA%2C+CADEIRA+AL%C3%8DVIO%2C+CADEIRA+COM+VISUAL+DE+VASO+SANIT%C3%81RIO%2C+CANDELABRO%2C+PRESENTES%2C+LISTA+DE+CASAMENTO%2C+GIFT%2C+PORTA+SALGADOS%2C+CENTRO+DE+MESA%2C+A%C3%87UCAREIRO%2C+SULABH+INTERNATIONAL+MUSEUM+OF+TOILET%2C+ESPA%C3%87O+CULTURAL+MAURICE+VALANSI%2C+ANA+MARIA+BRAGA%2C+PROGRAMA+MAIS+VOC%C3%8A%2C+CADEIRA+DE+TRES+PERNAS%2C+CADEIRA+DESIGN%2C+CADEIRA+DE+FIBRA+DE+VIDRO%2C+ARTISTA+PL%C3%81STICO%2C+SULABH+MUSEUM+OF+TOILET%2C+INDIA%2C+NOVA+DELHI%2C+MUSEU+DO+TOALET%2C+BIOMBO%2C+BA%C3%9A+DE+MADEIRA%2C+LUMIN%C3%81RIA%2C+RECICLAGEM%2C+MATERIAL+RECICLADO%2C+ARTE+DO+LIXO%2C+LIXO+DE+LUXO%2C+BRINCO+DE+A%C3%87O+IN%C3%93X%2C+ARGOLA+DE+A%C3%87O+INOXID%C3%81VEL%2C+ROGER+DESIGN%2C+MUSEU+DAS+CADEIRAS%2C+%C3%82NFORA%2C+TROF%C3%89U.++';
var metaContents  = 'PRATARIA%2C+SOUSPLAT%2C+SAMOVAR%2C+BANDEJA%2C+CASTI%C3%87AL%2C+RECHAUD%2C+SUPORTE+DE+BOLO%2C+APARELHO+DE+CH%C3%81%2C+BULE%2C+CACHEPOT%2C+PRATA%2C+FABRICA%C3%87%C3%83O+DE+PRATARIA%2C+TALHERES%2C+ABAFADOR%2C+BALEIRO%2C+BOMBONIERI%2C+CHALEIRA%2C+BALDE+DE+GELO%2C+BALDE+DE+VINHO%2C+BALDE+DE+CHAMPANHE%2C+CHAMPANHEIRA%2C+CHAFARIZ%2C+FRUTEIRA%2C+JARRA%2C+MOLHEIRA%2C+LEITEIRA%2C+P%C3%81+DE+BOLO%2C+PORTA+CAVIAR%2C+FRIGIDEIRA%2C+SOPEIRA%2C+SUPORTE+DE+BOLO%2C+SUPORTE+DE+DOCE%2C+TA%C3%87A+DE+CHAMPANHE%2C++TA%C3%87A+DE+VINHO%2C+SALADEIRA%2C+RESTAURA%C3%87%C3%83O+DE+PRATARIA%2C+BANDEJA+OVAL%2C+BANDEJA+REDONDA%2CPLACAS+COMEMORATIVAS%2C+PLACA+COMEMORATIVA%2C+CADEIRA+AL%C3%8DVIO%2C+CADEIRA+COM+VISUAL+DE+VASO+SANIT%C3%81RIO%2C+CANDELABRO%2C+PRESENTES%2C+LISTA+DE+CASAMENTO%2C+GIFT%2C+PORTA+SALGADOS%2C+CENTRO+DE+MESA%2C+A%C3%87UCAREIRO%2C+SULABH+INTERNATIONAL+MUSEUM+OF+TOILET%2C+ESPA%C3%87O+CULTURAL+MAURICE+VALANSI%2C+ANA+MARIA+BRAGA%2C+PROGRAMA+MAIS+VOC%C3%8A%2C+CADEIRA+DE+TRES+PERNAS%2C+CADEIRA+DESIGN%2C+CADEIRA+DE+FIBRA+DE+VIDRO%2C+ARTISTA+PL%C3%81STICO%2C+SULABH+MUSEUM+OF+TOILET%2C+INDIA%2C+NOVA+DELHI%2C+MUSEU+DO+TOALET%2C+BIOMBO%2C+BA%C3%9A+DE+MADEIRA%2C+LUMIN%C3%81RIA%2C+RECICLAGEM%2C+MATERIAL+RECICLADO%2C+ARTE+DO+LIXO%2C+LIXO+DE+LUXO%2C+BRINCO+DE+A%C3%87O+IN%C3%93X%2C+ARGOLA+DE+A%C3%87O+INOXID%C3%81VEL%2C+ROGER+DESIGN%2C+MUSEU+DAS+CADEIRAS%2C+%C3%82NFORA%2C+TROF%C3%89U.++';
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();
};

