/* [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','601',jdecode('Empresa'),jdecode(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','652',jdecode('Loca%C3%A7%C3%A3o'),jdecode(''), jdecode('%2F652.html'), 'true',[],'',''],
	['PAGE','757',jdecode('Vendas'),jdecode(''), jdecode('%2F757%2Findex.html'), 'true',[ 
		['PAGE','221656',jdecode('Brinqued%C3%A3o+-+Kid+Play'),jdecode(''), jdecode('%2F757%2F221656.html'), 'true',[],'',''],
		['PAGE','293989',jdecode('Brinqued%C3%A3o+-+Kid+play+2'),jdecode(''), jdecode('%2F757%2F293989.html'), 'false',[],'',''],
		['PAGE','157145',jdecode('Pula+pula'),jdecode(''), jdecode('%2F757%2F157145.html'), 'true',[],'',''],
		['PAGE','157292',jdecode('Tobog%C3%A3'),jdecode(''), jdecode('%2F757%2F157292.html'), 'true',[],'',''],
		['PAGE','157229',jdecode('Futebol+Sab%C3%A3o'),jdecode(''), jdecode('%2F757%2F157229.html'), 'true',[],'',''],
		['PAGE','157271',jdecode('Piscina+de+bolinhas'),jdecode(''), jdecode('%2F757%2F157271.html'), 'true',[],'',''],
		['PAGE','160766',jdecode('Tombo+Legal'),jdecode(''), jdecode('%2F757%2F160766.html'), 'true',[],'',''],
		['PAGE','157208',jdecode('Kid+Play+Infl%C3%A1vel'),jdecode(''), jdecode('%2F757%2F157208.html'), 'true',[],'',''],
		['PAGE','160745',jdecode('Cama+El%C3%A1stica'),jdecode(''), jdecode('%2F757%2F160745.html'), 'true',[],'',''],
		['PAGE','157250',jdecode('Alpinismo'),jdecode(''), jdecode('%2F757%2F157250.html'), 'true',[],'',''],
		['PAGE','220156',jdecode('Estilingue+Humano'),jdecode(''), jdecode('%2F757%2F220156.html'), 'true',[],'',''],
		['PAGE','220177',jdecode('Luta+de+Cotonetes%2FBoxe'),jdecode(''), jdecode('%2F757%2F220177.html'), 'true',[],'',''],
		['PAGE','220198',jdecode('Bol%C3%A3o+Infl%C3%A1vel+%2F+Super+Ball'),jdecode(''), jdecode('%2F757%2F220198.html'), 'true',[],'',''],
		['PAGE','220219',jdecode('Boliche+Humano'),jdecode(''), jdecode('%2F757%2F220219.html'), 'true',[],'',''],
		['PAGE','160787',jdecode('Touro+%2F+Surf+Mec%C3%A2nico'),jdecode(''), jdecode('%2F757%2F160787.html'), 'true',[],'',''],
		['PAGE','219756',jdecode('Diversos'),jdecode(''), jdecode('%2F757%2F219756.html'), 'true',[],'',''],
		['PAGE','240356',jdecode('Acess%C3%B3rios+para+Buffet'),jdecode(''), jdecode('%2F757%2F240356.html'), 'false',[],'',''],
		['PAGE','163945',jdecode('Eletr%C3%B4nicos+'),jdecode(''), jdecode('%2F757%2F163945.html'), 'true',[],'',''],
		['PAGE','162487',jdecode('Autorama'),jdecode(''), jdecode('%2F757%2F162487.html'), 'false',[],'','']
	],'',''],
	['PAGE','778',jdecode('Contato%2FOr%C3%A7amento'),jdecode(''), jdecode('%2F778.html'), 'true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Comic';
theSitetree.paletteFamily='76064D';
theSitetree.keyvisualId='9982';
theSitetree.keyvisualName='kv1.swf';
theSitetree.fontsetId='17761';
theSitetree.graphicsetId='13132';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0X9A9'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Comic',
				paletteFamily: 	'76064D',
				keyvisualId: 	'9982',
				keyvisualName: 	'kv1.swf',
				fontsetId: 		'17761',
				graphicsetId: 	'13132',
				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:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '293989',
internalId:  '',
customField: '20100926-174002'
};
webappMappings['7008']=webappMappings['7008-2831']={
webappId:    '7008',
documentId:  '778',
internalId:  '2831',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20110911-133524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20110910-184357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20111026-174613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157145',
internalId:  '',
customField: '20110911-100812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157208',
internalId:  '',
customField: '20110911-110635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157229',
internalId:  '',
customField: '20110911-103233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157250',
internalId:  '',
customField: '20110911-112235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157271',
internalId:  '',
customField: '20110911-103811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157292',
internalId:  '',
customField: '20110911-102216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160745',
internalId:  '',
customField: '20110911-112025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160766',
internalId:  '',
customField: '20110911-110243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160787',
internalId:  '',
customField: '20110911-114037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '221656',
internalId:  '',
customField: '20111026-174846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '240356',
internalId:  '',
customField: '20090331-131949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162487',
internalId:  '',
customField: '20100408-142426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163945',
internalId:  '',
customField: '20110911-140347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20100110-103420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '219756',
internalId:  '',
customField: '20110921-161842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '220156',
internalId:  '',
customField: '20110911-112320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '220177',
internalId:  '',
customField: '20110911-112520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '220198',
internalId:  '',
customField: '20110911-112634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '220219',
internalId:  '',
customField: '20110911-113044'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN3UHD';
var companyName   = 'ESPA%C3%87O+PLAY+';
var htmlTitle	  = '';
var metaKeywords  = 'brinquedos%2C+infl%C3%A1veis%2C+festa%2C+lembrancinhas%2C+anima%C3%A7%C3%A3o%2C+recrea%C3%A7%C3%A3o%2C+decora%C3%A7%C3%A3o%2C+escultura+em+bexigas%2C+maquiagem+infantil%2C+eventos%2C+bal%C3%A3o%2C+pula-pula%2C+cama-el%C3%A1stica%2C+piscina+de+bolinhas%2C+escorregadores%2C+loca%C3%A7%C3%A3o+de+brinquedos%2C+aluguel+de+brinquedos%2C+tobog%C3%A3%2C+touro+mec%C3%A2nico%2C+kiddy+play%2C+aluguel+de+brinquedo%2C+venda+de+brinquedos%2C+kid+play%2C+kiddie+play%2C+futebol+de+sab%C3%A3o%2C+tombo+legal%2C+montanha+de+alpinismo%2C+play+pula%2C+piu+piu+eventos%2C+raposinhas+eventos%2C+pimentinha+brinquedos%2C+happy+star%2C+juninho+play%2C+tutti+festa%2C+tutti+kids%2C+bibi+brinquedos%2C+play+park%2C+toy+eventos%2C+quadra+de+futebol+no+sab%C3%A3o%2C+surf+mec%C3%A2nico%2C+boliche+humano';
var metaContents  = 'Venda+e+loca%C3%A7%C3%A3o+de+brinquedos+infl%C3%A1veis%2C+cama+el%C3%A1stica%2C+pula+-+pula%2C+piscina+de+bolinhas%2C+tobog%C3%A3%2C+touro+mec%C3%A2nico%2C+anima%C3%A7%C3%A3o%2C+recrea%C3%A7%C3%A3o%2C+decora%C3%A7%C3%A3o+com+bal%C3%B5es%2C+%2811%293422-6955+%2F+4226-6451+%2F+8148-2618+%2F+8114-7481.++';
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();
};

