/* [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','4901',jdecode('Empresa'),jdecode(''),'/4901.html','true',[],'',''],
	['PAGE','4952',jdecode('Loca%C3%A7%C3%A3o'),jdecode(''),'/4952.html','true',[],'',''],
	['PAGE','5015',jdecode('Promoc%C3%A3o+do+Mes'),jdecode(''),'/5015.html','true',[],'',''],
	['PAGE','13301',jdecode('vendas'),jdecode(''),'/13301/index.html','true',[ 
		['PAGE','13406',jdecode('pula-pula'),jdecode(''),'/13301/13406.html','true',[],'',''],
		['PAGE','13427',jdecode('Tobog%C3%A3'),jdecode(''),'/13301/13427.html','true',[],'',''],
		['PAGE','13511',jdecode('Kid+Play+Inflavel'),jdecode(''),'/13301/13511.html','true',[],'',''],
		['PAGE','13322',jdecode('tombo+legal'),jdecode(''),'/13301/13322.html','true',[],'',''],
		['PAGE','13343',jdecode('piscina+de+bolinhas'),jdecode(''),'/13301/13343.html','true',[],'',''],
		['PAGE','13364',jdecode('cama+el%C3%A1stica'),jdecode(''),'/13301/13364.html','true',[],'',''],
		['PAGE','13448',jdecode('Inflaveis+Diversos'),jdecode(''),'/13301/13448.html','true',[],'',''],
		['PAGE','13469',jdecode('Brinqued%C3%A3o+%22Kid+Play%22'),jdecode(''),'/13301/13469.html','true',[],'',''],
		['PAGE','13490',jdecode('Air+game+e+Aero+hockey'),jdecode(''),'/13301/13490.html','true',[],'',''],
		['PAGE','13532',jdecode('Mesas'),jdecode(''),'/13301/13532.html','true',[],'',''],
		['PAGE','51312',jdecode('Touro+Mec%C3%A2nico'),jdecode(''),'/13301/51312.html','true',[],'',''],
		['PAGE','51333',jdecode('Estilingue+Humano'),jdecode(''),'/13301/51333.html','true',[],'',''],
		['PAGE','51612',jdecode('Luta+de+Cotonete%2FBoxe'),jdecode(''),'/13301/51612.html','true',[],'',''],
		['PAGE','51633',jdecode('Bol%C3%A3o+Infl%C3%A1vel%2FSuper+Ball'),jdecode(''),'/13301/51633.html','true',[],'',''],
		['PAGE','51654',jdecode('Quadra+de+Futbol+de+Sab%C3%A3o'),jdecode(''),'/13301/51654.html','true',[],'',''],
		['PAGE','51675',jdecode('Boliche+Humano'),jdecode(''),'/13301/51675.html','true',[],'','']
	],'',''],
	['PAGE','4994',jdecode('Contato%2FOr%C3%A7amento'),jdecode(''),'/4994.html','true',[],'',''],
	['PAGE','16101',jdecode('%C3%81lbum+de+Fotos'),jdecode(''),'/16101.html','true',[],'',''],
	['PAGE','64523',jdecode('Brindes+Promocionais'),jdecode(''),'/64523.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Comic';
theSitetree.paletteFamily='071A5E';
theSitetree.keyvisualId='9983';
theSitetree.keyvisualName='kv2.swf';
theSitetree.fontsetId='17761';
theSitetree.graphicsetId='13130';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Comic',
				paletteFamily: 	'071A5E',
				keyvisualId: 	'9983',
				keyvisualName: 	'kv2.swf',
				fontsetId: 		'17761',
				graphicsetId: 	'13130',
				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['7008']=webappMappings['7008-13344']={
webappId:    '7008',
documentId:  '51312',
internalId:  '13344',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-5350d05c0624879141626c7e4f8037f6']={
webappId:    '7060',
documentId:  '16101',
internalId:  '5350d05c0624879141626c7e4f8037f6',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-1344']={
webappId:    '7008',
documentId:  '4994',
internalId:  '1344',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20100802-082130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20100802-082351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13490',
internalId:  '',
customField: '20081216-061920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20090627-104017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4994',
internalId:  '',
customField: '20080923-193856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4952',
internalId:  '',
customField: '20100802-082219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5015',
internalId:  '',
customField: '20100802-082306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13406',
internalId:  '',
customField: '20100512-164433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13427',
internalId:  '',
customField: '20100323-161922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13511',
internalId:  '',
customField: '20100323-162355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13322',
internalId:  '',
customField: '20100331-125130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13343',
internalId:  '',
customField: '20100323-162720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13364',
internalId:  '',
customField: '20100323-162759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13448',
internalId:  '',
customField: '20100323-162848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13469',
internalId:  '',
customField: '20091130-195709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13532',
internalId:  '',
customField: '20081218-212800'
};
webappMappings['1501']=webappMappings['1501-12568848']={
webappId:    '1501',
documentId:  '4901',
internalId:  '12568848',
customField: '1501'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '4901',
internalId:  '1501',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51312',
internalId:  '',
customField: '20100601-155124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51333',
internalId:  '',
customField: '20091127-202658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51612',
internalId:  '',
customField: '20091127-203334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51633',
internalId:  '',
customField: '20091127-203334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51654',
internalId:  '',
customField: '20091127-203334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51675',
internalId:  '',
customField: '20091127-203334'
};
webappMappings['7060']=webappMappings['7060-f344f05f942596c168852477fa1823b2']={
webappId:    '7060',
documentId:  '13301',
internalId:  'f344f05f942596c168852477fa1823b2',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64523',
internalId:  '',
customField: '20100514-075954'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INFX70';
var companyName   = 'TUTTI+KIDS';
var htmlTitle	  = 'Tutti+Kids';
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();
};
