/* [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','2301',jdecode('***HOME***'),jdecode(''),'/2301.html','true',[],'',''],
	['PAGE','178937',jdecode('Computador'),jdecode(''),'/178937.html','false',[],'',''],
	['PAGE','3301',jdecode('TABELA+DE+PRE%C3%87OS'),jdecode(''),'/3301/index.html','true',[ 
		['PAGE','127026',jdecode('DVD+RW+LG'),jdecode(''),'/3301/127026.html','false',[],'',''],
		['PAGE','19701',jdecode('Fones'),jdecode(''),'/3301/19701.html','true',[],'',''],
		['PAGE','127047',jdecode('Gabinets+ATX'),jdecode(''),'/3301/127047.html','false',[],'',''],
		['PAGE','19843',jdecode('Hardware'),jdecode(''),'/3301/19843.html','true',[],'',''],
		['PAGE','127068',jdecode('HD+160GB'),jdecode(''),'/3301/127068.html','false',[],'',''],
		['PAGE','127110',jdecode('Headphone+WASTA'),jdecode(''),'/3301/127110.html','false',[],'',''],
		['PAGE','127131',jdecode('Mem%C3%B3rias+DDR'),jdecode(''),'/3301/127131.html','true',[],'',''],
		['PAGE','127173',jdecode('Monitor+LG+19%22%22'),jdecode(''),'/3301/127173.html','false',[],'',''],
		['PAGE','127194',jdecode('Mouse+%C3%B3ptico'),jdecode(''),'/3301/127194.html','false',[],'',''],
		['PAGE','19801',jdecode('Mouses'),jdecode(''),'/3301/19801.html','true',[],'',''],
		['PAGE','28201',jdecode('Monitores'),jdecode(''),'/3301/28201.html','true',[],'',''],
		['PAGE','127236',jdecode('MP3'),jdecode(''),'/3301/127236.html','false',[],'',''],
		['PAGE','31501',jdecode('Pendrives+e+Acess%C3%B3rios'),jdecode(''),'/3301/31501.html','true',[],'',''],
		['PAGE','19864',jdecode('Software'),jdecode(''),'/3301/19864.html','false',[],'',''],
		['PAGE','164237',jdecode('Subwoofer'),jdecode(''),'/3301/164237.html','false',[],'',''],
		['PAGE','145037',jdecode('Teclados'),jdecode(''),'/3301/145037.html','true',[],'',''],
		['PAGE','19822',jdecode('Web+cam'),jdecode(''),'/3301/19822.html','true',[],'',''],
		['PAGE','188948',jdecode('Computador'),jdecode(''),'/3301/188948.html','false',[],'','']
	],'',''],
	['PAGE','27601',jdecode('TELEFONES'),jdecode(''),'/27601.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Amaze';
theSitetree.paletteFamily='333300';
theSitetree.keyvisualId='2416';
theSitetree.keyvisualName='digital.jpg';
theSitetree.fontsetId='395';
theSitetree.graphicsetId='445';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333300';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Amaze',
				paletteFamily: 	'333300',
				keyvisualId: 	'2416',
				keyvisualName: 	'digital.jpg',
				fontsetId: 		'395',
				graphicsetId: 	'445',
				contentColor: 	'FFFFFF',
				contentBGColor: '333300',
				a_color: 		'333300',
				b_color: 		'262601',
				c_color: 		'3268E2',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20100423-185041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3301',
internalId:  '',
customField: '20100423-185230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20100423-185651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20100413-110225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19822',
internalId:  '',
customField: '20100413-112526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19843',
internalId:  '',
customField: '20100423-185720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19864',
internalId:  '',
customField: '20091028-114923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164237',
internalId:  '',
customField: '20091127-131229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27601',
internalId:  '',
customField: '20100126-151249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28201',
internalId:  '',
customField: '20100413-111522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31501',
internalId:  '',
customField: '20100201-135955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127131',
internalId:  '',
customField: '20100423-185820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127173',
internalId:  '',
customField: '20091127-115838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127194',
internalId:  '',
customField: '20091009-130707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127236',
internalId:  '',
customField: '20091127-115929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127026',
internalId:  '',
customField: '20090806-151454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127047',
internalId:  '',
customField: '20091001-144821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127068',
internalId:  '',
customField: '20091009-125900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145037',
internalId:  '',
customField: '20100413-112423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127110',
internalId:  '',
customField: '20091127-115646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '188948',
internalId:  '',
customField: '20100201-132817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '178937',
internalId:  '',
customField: '20100121-110228'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INPZ9Z';
var companyName   = 'ROBERTS+Boutique+da+Inform%C3%A1tica';
var htmlTitle	  = 'ROBERTS+BOUTIQUE';
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();
};
