/* [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','11',jdecode('Home'),jdecode(''), jdecode('%2F11.html'), 'true',[],'',''],
	['PAGE','32',jdecode('Quem+somos'),jdecode(''), jdecode('%2F32.html'), 'true',[],'',''],
	['PAGE','41',jdecode('Onde+estamos'),jdecode(''), jdecode('%2F41.html'), 'true',[],'',''],
	['PAGE','1618',jdecode('Amigos+e+Parceiros'),jdecode(''), jdecode('%2F1618.html'), 'true',[],'',''],
	['PAGE','166025',jdecode('Nossos+Clientes+'),jdecode(''), jdecode('%2F166025.html'), 'true',[],'',''],
	['PAGE','1407',jdecode('Decora%C3%A7%C3%A3o+Infantil+'),jdecode(''), jdecode('%2F1407.html'), 'true',[],'',''],
	['PAGE','141659',jdecode('***+DJ+***'),jdecode(''), jdecode('%2F141659.html'), 'true',[],'',''],
	['PAGE','140059',jdecode('Buffet+a+Domic%C3%ADlio'),jdecode(''), jdecode('%2F140059.html'), 'true',[],'',''],
	['PAGE','208302',jdecode('Kit+festa'),jdecode(''), jdecode('%2F208302.html'), 'true',[],'',''],
	['PAGE','108634',jdecode('Barraquinhas'),jdecode(''), jdecode('%2F108634.html'), 'true',[],'',''],
	['PAGE','41501',jdecode('Churrascos+%2F+Jantares'),jdecode(''), jdecode('%2F41501.html'), 'true',[],'',''],
	['PAGE','190169',jdecode('Convites+Lemb-foto-film'),jdecode(''), jdecode('%2F190169.html'), 'true',[],'',''],
	['PAGE','8756',jdecode('Lembrancinhas++'),jdecode(''), jdecode('%2F8756.html'), 'true',[],'',''],
	['PAGE','28101',jdecode('Brinquedos+'),jdecode(''), jdecode('%2F28101.html'), 'true',[],'',''],
	['PAGE','222402',jdecode('M%C3%A1gico+Oz+Lelli+'),jdecode(''), jdecode('%2F222402.html'), 'true',[],'',''],
	['PAGE','7094',jdecode('Recrea%C3%A7%C3%A3o+'),jdecode(''), jdecode('%2F7094.html'), 'true',[],'',''],
	['PAGE','168725',jdecode('Cabeleireiro+Fashion+'),jdecode(''), jdecode('%2F168725.html'), 'true',[],'',''],
	['PAGE','159859',jdecode('Caricaturista'),jdecode(''), jdecode('%2F159859.html'), 'true',[],'',''],
	['PAGE','1564',jdecode('Dicas'),jdecode(''), jdecode('%2F1564.html'), 'true',[],'',''],
	['PAGE','7962',jdecode('Atendimento+'),jdecode(''), jdecode('%2F7962.html'), 'true',[],'',''],
	['PAGE','1600',jdecode('Mensagens+'),jdecode(''), jdecode('%2F1600.html'), 'true',[],'',''],
	['PAGE','68',jdecode('Contato'),jdecode(''), jdecode('%2F68.html'), 'true',[],'',''],
	['PAGE','2012',jdecode('Agradecimentos'),jdecode(''), jdecode('%2F2012.html'), 'true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Sonnemond';
theSitetree.paletteFamily='D7E1FC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10759';
theSitetree.graphicsetId='10815';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D7E1FC';
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: 			'Sonnemond',
				paletteFamily: 	'D7E1FC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10759',
				graphicsetId: 	'10815',
				contentColor: 	'000000',
				contentBGColor: 'D7E1FC',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'5C5898',
				e_color: 		'ED4747',
				f_color: 		'437D3B',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1007522']={
webappId:    '1501',
documentId:  '11',
internalId:  '1007522',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1618',
internalId:  '',
customField: '20110819-094010'
};
webappMappings['1002']=webappMappings['1002-1600AVEC10IN2IYL']={
webappId:    '1002',
documentId:  '1600',
internalId:  '1600AVEC10IN2IYL',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159859',
internalId:  '',
customField: '20110819-095301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168725',
internalId:  '',
customField: '20110819-092521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20120204-165118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20110819-093412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41',
internalId:  '',
customField: '20110819-093515'
};
webappMappings['7060']=webappMappings['7060-a97b017d97931b2eefe3d871855bba7e']={
webappId:    '7060',
documentId:  '1407',
internalId:  'a97b017d97931b2eefe3d871855bba7e',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1407',
internalId:  '',
customField: '20120204-165931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '208302',
internalId:  '',
customField: '20111202-082259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166025',
internalId:  '',
customField: '20111017-044808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28101',
internalId:  '',
customField: '20110918-163455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7094',
internalId:  '',
customField: '20110819-093131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8756',
internalId:  '',
customField: '20111220-130713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108634',
internalId:  '',
customField: '20110819-092622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141659',
internalId:  '',
customField: '20110914-104059'
};
webappMappings['7008']=webappMappings['7008-7132']={
webappId:    '7008',
documentId:  '68',
internalId:  '7132',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140059',
internalId:  '',
customField: '20111026-142347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20110929-051954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190169',
internalId:  '',
customField: '20110819-094901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1564',
internalId:  '',
customField: '20110819-095338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7962',
internalId:  '',
customField: '20110819-095435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1600',
internalId:  '',
customField: '20081209-101415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2012',
internalId:  '',
customField: '20110819-095557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68',
internalId:  '',
customField: '20060318-061459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '222402',
internalId:  '',
customField: '20111214-045419'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2IYL';
var companyName   = 'BIA%27S+FESTAS';
var htmlTitle	  = 'BIAS+FESTAS+DECORA%C3%87%C3%83O+E+BUFFET++';
var metaKeywords  = 'festas+infantis%2C+kit+festas%2C+buffet%2C+festas%2C+decora%C3%A7%C3%A3o%2C+Bias+Festas%2Cdecora%C3%A7%C3%A3o+infantil%2Cbrinquedos+%2C+maquiagem+infantil%2Cchurrasco%2C+escultura+de+bal%C3%B5es%2Cbuffet+domicilio%2C+beth+boop%2C+backyardigans%2C+piratas+do+caribe%2C+halooween%2C+barbie+princesa+da+ilha%2Cmesas+tem%C3%A1ticas%2C+mesas+infantis%2C+mesas+decoradas%2C+palmeiras%2C+corinthians%2C+s%C3%A3o+paulo%2C+ursinhos+carinhosos%2C++dj%2C+brinquedos+infl%C3%A1veis%2C+almo%C3%A7os+e+jantares%2C+kit+festa%2C+decora%C3%A7%C3%A3o+com+bal%C3%B5es%2Cdiscovery+kids%2C+enfeites+de+festas.thomas+e+seus+amigos.pucca%2Csal%C3%A3o+fashion%2Cminnie+vermelha%2C+balada.';
var metaContents  = 'festas+infantis%2C+decora%C3%A7%C3%A3o+festas%2C+festas%2C+kit+festas%2Cdecora%C3%A7%C3%A3o%2C+buffet%2C+aluguel+de+festas+infantis%2C+buffet%2C+Bias+Festas%2C+brinquedos%2C+anima%C3%A7%C3%A3o%2CDJ%2Cconvites%2C+fotos%2C+filmagens%2C+lembran%C3%A7inhas%2Cchurrasco%2C+maquiagem+infantil%2C+palha%C3%A7o%2Cbrinquedos+%2C+sal%C3%A3o+fashion%2C+recrea%C3%A7%C3%A3o+%2C+escultura+bal%C3%B5es%2C+buffet+a+domicilio%2C+festa+da+Beth+boop%2C+halloween%2C+barbie+princesa+da+ilha%2Cbackyardigans%2C+piratas+do+caribe%2C+mesas+tem%C3%A1ticas%2C+mesas+infantis+%2C+mesas+decoradas%2C+palmeiras%2C+corinthians%2C+s%C3%A3o+paulo%2C+ursinhos+carinhosos%2C+brinquedos+infl%C3%A1veis%2C+almo%C3%A7os+e+jantares%2Ckit+festa%2C+decora%C3%A7%C3%A3o+com+bal%C3%B5es%2Cdiscovery+kids%2C+thomas+e+seus+amigos%2Cpucca%2Cbalada%2C+minnie+vermelha.';
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();
};

