/* [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','701',jdecode('Home'),jdecode(''), jdecode('%2F701.html'), 'true',[],'',''],
	['PAGE','242510',jdecode('Fotos+recentes'),jdecode(''), jdecode('%2F242510.html'), 'true',[],'',''],
	['PAGE','121801',jdecode('Sand%C3%A1lias+Personal.%2Fmodelos'),jdecode(''), jdecode('%2F121801.html'), 'true',[],'',''],
	['PAGE','4901',jdecode('Tipos+de+Sand%C3%A1lias++++++++++'),jdecode(''), jdecode('%2F4901.html'), 'true',[],'',''],
	['PAGE','117801',jdecode('%C3%81gua+personal.'),jdecode(''), jdecode('%2F117801.html'), 'true',[],'',''],
	['PAGE','120801',jdecode('Almofadas+p%2F+Alian%C3%A7as'),jdecode(''), jdecode('%2F120801.html'), 'true',[],'',''],
	['PAGE','14001',jdecode('Am%C3%AAndoas'),jdecode(''), jdecode('%2F14001.html'), 'true',[],'',''],
	['PAGE','170412',jdecode('Batizado%2F1%C2%AA+Comunh%C3%A3o'),jdecode(''), jdecode('%2F170412.html'), 'true',[],'',''],
	['PAGE','439105',jdecode('Bolhas+de+sab%C3%A3o'),jdecode(''), jdecode('%2F439105.html'), 'true',[],'',''],
	['PAGE','45301',jdecode('Ch%C3%A1+de+Cozinha'),jdecode(''), jdecode('%2F45301.html'), 'true',[],'',''],
	['PAGE','16001',jdecode('Fitas+personalizadas'),jdecode(''), jdecode('%2F16001.html'), 'true',[],'',''],
	['PAGE','281342',jdecode('Hashi+personalizado'),jdecode(''), jdecode('%2F281342.html'), 'true',[],'',''],
	['PAGE','117822',jdecode('Latinhas%2FCaixinhas+p%2F+balas'),jdecode(''), jdecode('%2F117822.html'), 'true',[],'',''],
	['PAGE','443416',jdecode('Leques%2FAbanadores'),jdecode(''), jdecode('%2F443416.html'), 'true',[],'',''],
	['PAGE','45322',jdecode('Madrinhas%2FPadrinhos'),jdecode(''), jdecode('%2F45322.html'), 'true',[],'',''],
	['PAGE','432694',jdecode('Maquina+fotografica'),jdecode(''), jdecode('%2F432694.html'), 'true',[],'',''],
	['PAGE','4922',jdecode('Nascimento'),jdecode(''), jdecode('%2F4922.html'), 'true',[],'',''],
	['PAGE','262587',jdecode('Noivos+p%2F+bolos'),jdecode(''), jdecode('%2F262587.html'), 'true',[],'',''],
	['PAGE','4943',jdecode('15+anos'),jdecode(''), jdecode('%2F4943.html'), 'true',[],'',''],
	['PAGE','282042',jdecode('Festa+Infantil'),jdecode(''), jdecode('%2F282042.html'), 'true',[],'',''],
	['PAGE','438905',jdecode('Sapatilhas'),jdecode(''), jdecode('%2F438905.html'), 'true',[],'',''],
	['PAGE','204811',jdecode('Ta%C3%A7as+personalizadas'),jdecode(''), jdecode('%2F204811.html'), 'true',[],'',''],
	['PAGE','96843',jdecode('Noivas'),jdecode(''), jdecode('%2F96843%2Findex.html'), 'true',[ 
		['PAGE','87206',jdecode('Tiaras'),jdecode(''), jdecode('%2F96843%2F87206.html'), 'true',[],'',''],
		['PAGE','96864',jdecode('Ligas'),jdecode(''), jdecode('%2F96843%2F96864.html'), 'true',[],'','']
	],'',''],
	['PAGE','15522',jdecode('Embalagens'),jdecode(''), jdecode('%2F15522.html'), 'true',[],'',''],
	['PAGE','87437',jdecode('Contato'),jdecode(''), jdecode('%2F87437.html'), 'true',[],'',''],
	['PAGE','397384',jdecode('ursos'),jdecode(''), jdecode('%2F397384.html'), 'false',[],'',''],
	['PAGE','433694',jdecode('porquinho'),jdecode(''), jdecode('%2F433694.html'), 'true',[],'',''],
	['PAGE','436605',jdecode('sapos'),jdecode(''), jdecode('%2F436605.html'), 'true',[],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Tendril';
theSitetree.paletteFamily='F5E7D2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33095';
theSitetree.graphicsetId='14060';
theSitetree.contentColor='D0A363';
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: 'false',
				hasCompanyname: 'false',
				name: 			'Tendril',
				paletteFamily: 	'F5E7D2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33095',
				graphicsetId: 	'14060',
				contentColor: 	'D0A363',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-381c60b4d4e4207da1283ed3924cdac8']={
webappId:    '7060',
documentId:  '433694',
internalId:  '381c60b4d4e4207da1283ed3924cdac8',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-bc455411563cf89c92bd59de92f4aba1']={
webappId:    '7060',
documentId:  '120801',
internalId:  'bc455411563cf89c92bd59de92f4aba1',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '397384',
internalId:  '',
customField: '20110125-190549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20110526-155913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121801',
internalId:  '',
customField: '20100801-163807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20100801-163956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117801',
internalId:  '',
customField: '20110125-191605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117822',
internalId:  '',
customField: '20110524-164741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45301',
internalId:  '',
customField: '20110127-180247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120801',
internalId:  '',
customField: '20110125-190307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '433694',
internalId:  '',
customField: '20110524-162831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45322',
internalId:  '',
customField: '20110125-175939'
};
webappMappings['7050']=webappMappings['7050-4393']={
webappId:    '7050',
documentId:  '242510',
internalId:  '4393',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '204811',
internalId:  '',
customField: '20110127-181954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96843',
internalId:  '',
customField: '20071105-162608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87206',
internalId:  '',
customField: '20070916-120052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96864',
internalId:  '',
customField: '20071105-162608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20110526-161815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4922',
internalId:  '',
customField: '20110127-182255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4943',
internalId:  '',
customField: '20100801-165838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15522',
internalId:  '',
customField: '20110526-133544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20110125-174138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '282042',
internalId:  '',
customField: '20100518-170429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87437',
internalId:  '',
customField: '20100801-165957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170412',
internalId:  '',
customField: '20110127-180415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '432694',
internalId:  '',
customField: '20110521-201624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '242510',
internalId:  '',
customField: '20110525-173618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '262587',
internalId:  '',
customField: '20110127-170350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '281342',
internalId:  '',
customField: '20110125-163930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '436605',
internalId:  '',
customField: '20110524-164208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '438905',
internalId:  '',
customField: '20110525-154708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '439105',
internalId:  '',
customField: '20110525-154018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '443416',
internalId:  '',
customField: '20110526-134125'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INEB01';
var companyName   = 'Rosana+Favalli+Lembran%C3%A7as+para+todas+as+ocasi%C3%B5es';
var htmlTitle	  = 'Lembran%C3%A7as+Rosana+Favalli';
var metaKeywords  = 'lembran%C3%A7as%2C+casamento%2C+maternidade%2C+nascimento%2C+anivers%C3%A1rio%2C+15+anos%2C+sand%C3%A1lias%2C+personalizadas';
var metaContents  = 'lembran%C3%A7as+de+casamento%2C+lembran%C3%A7as+para+anivers%C3%A1rio+de+15+anos%2C+lembran%C3%A7as+para+maternidade%2C+sand%C3%A1lias+personalizadas';
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();
};

