/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','494',jdecode('Atividades'),jdecode(''),'/494.html','true',[],'',''],
	['PAGE','452',jdecode('Agenda'),jdecode(''),'/452.html','false',[],'',''],
	['PAGE','14701',jdecode('Fotografia'),jdecode(''),'/14701.html','false',[],'',''],
	['PAGE','35701',jdecode('Fotos+de+Eventos'),jdecode(''),'/35701.html','true',[],'',''],
	['PAGE','43512',jdecode('Fotos+de+Gestantes'),jdecode(''),'/43512.html','true',[],'',''],
	['PAGE','43612',jdecode('Fotos+de+Modelos'),jdecode(''),'/43612.html','true',[],'',''],
	['PAGE','38012',jdecode('Fotos+Infantil'),jdecode(''),'/38012.html','true',[],'',''],
	['PAGE','33801',jdecode('Fotos+de+Casamentos'),jdecode(''),'/33801.html','true',[],'',''],
	['PAGE','33822',jdecode('Fotos+de+Guloseimas'),jdecode(''),'/33822.html','true',[],'',''],
	['PAGE','599',jdecode('Filmagem'),jdecode(''),'/599/index.html','true',[ 
		['PAGE','620',jdecode('Retrospectiva'),jdecode(''),'/599/620.html','true',[],'',''],
		['PAGE','641',jdecode('Making+Off'),jdecode(''),'/599/641.html','false',[],'',''],
		['PAGE','662',jdecode('Anivers%C3%A1rio'),jdecode(''),'/599/662.html','false',[],'',''],
		['PAGE','683',jdecode('Casamento'),jdecode(''),'/599/683.html','false',[],'',''],
		['PAGE','704',jdecode('Ballet%2C+Dan%C3%A7as'),jdecode(''),'/599/704.html','false',[],'','']
	],'',''],
	['PAGE','12601',jdecode('Personaliza%C3%A7%C3%A3o+de+Brindes'),jdecode(''),'/12601.html','true',[],'',''],
	['PAGE','473',jdecode('Contato'),jdecode(''),'/473.html','true',[],'',''],
	['PAGE','9201',jdecode('Parceiros'),jdecode(''),'/9201.html','true',[],'',''],
	['PAGE','22401',jdecode('Links+para+festas'),jdecode(''),'/22401.html','false',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Corporate';
theSitetree.paletteFamily='5F8AA9';
theSitetree.keyvisualId='11072';
theSitetree.keyvisualName='kv_11072.jpg';
theSitetree.fontsetId='31953';
theSitetree.graphicsetId='13792';
theSitetree.contentColor='888D92';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Corporate',
				paletteFamily: 	'5F8AA9',
				keyvisualId: 	'11072',
				keyvisualName: 	'kv_11072.jpg',
				fontsetId: 		'31953',
				graphicsetId: 	'13792',
				contentColor: 	'888D92',
				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['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '12601',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-2050']={
webappId:    '7008',
documentId:  '473',
internalId:  '2050',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100523-112723'
};
webappMappings['7060']=webappMappings['7060-b58b776bc18f149e6ccba99388fcdd41']={
webappId:    '7060',
documentId:  '35701',
internalId:  'b58b776bc18f149e6ccba99388fcdd41',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20100523-113407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20081123-172556'
};
webappMappings['7060']=webappMappings['7060-d582e55417bfc006c1b047662e58542d']={
webappId:    '7060',
documentId:  '12601',
internalId:  'd582e55417bfc006c1b047662e58542d',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-a99d5204a94c7bb1e151dfff6abdb262']={
webappId:    '7060',
documentId:  '620',
internalId:  'a99d5204a94c7bb1e151dfff6abdb262',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20090510-221522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20100425-103257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20080930-193802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20080930-234918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20080930-234607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '683',
internalId:  '',
customField: '20080930-234643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '704',
internalId:  '',
customField: '20080930-234723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20090918-222314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20090510-222112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20100523-113629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20090918-222135'
};
webappMappings['7060']=webappMappings['7060-4a59f885882e99294b0d7ec96c7a24fc']={
webappId:    '7060',
documentId:  '599',
internalId:  '4a59f885882e99294b0d7ec96c7a24fc',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-59c38d6274af627df14d220eafbc0acf']={
webappId:    '7060',
documentId:  '33801',
internalId:  '59c38d6274af627df14d220eafbc0acf',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-3f6610946c34e65d9189794dcbde9c46']={
webappId:    '7060',
documentId:  '33822',
internalId:  '3f6610946c34e65d9189794dcbde9c46',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33801',
internalId:  '',
customField: '20090918-205510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33822',
internalId:  '',
customField: '20090918-205556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35701',
internalId:  '',
customField: '20090918-220353'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '704',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '683',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '662',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '641',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '599',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '620',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '33822',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '33801',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '38012',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '43612',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '43512',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '35701',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14701',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '452',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '494',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '401',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-57e79c1598a9748a1171295be464560e']={
webappId:    '7060',
documentId:  '38012',
internalId:  '57e79c1598a9748a1171295be464560e',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38012',
internalId:  '',
customField: '20091026-212328'
};
webappMappings['7060']=webappMappings['7060-36229cccae68a45bb7c2d90307b5b33b']={
webappId:    '7060',
documentId:  '43512',
internalId:  '36229cccae68a45bb7c2d90307b5b33b',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-036d86edb85c2cb29db22dda7f880593']={
webappId:    '7060',
documentId:  '43612',
internalId:  '036d86edb85c2cb29db22dda7f880593',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43512',
internalId:  '',
customField: '20100421-221013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43612',
internalId:  '',
customField: '20100421-221107'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '473',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9201',
internalId:  '',
customField: 'language:pt;country:BR;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '22401',
internalId:  '',
customField: 'language:pt;country:BR;'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPRWD';
var companyName   = 'RN+Produtora+-+Fotografia+e+Filmagem';
var htmlTitle	  = 'RN+PRODUTORA+FOTOGRAFIA+E+FILMAGEM';
var metaKeywords  = 'Filmagem++Fotografia++Foto++Evento++Festas++Casamento++Reportagem+Lembrancinhas+Personaliza%C3%A7%C3%A3o+Bodas+Batizados+Debutantes+Formatura+Recordacao+Recordacao+Foto+Ballet+Videos+Fotoprodutos';
var metaContents  = 'Filmagem++Fotografia++Foto++Eventos++Festas++Casamento+Lembrancinhas+Brindes+PersonalizadosRecorda%C3%A7%C3%A3o+Recordacao+Foto+Ballet+Audi%C3%A7%C3%A3o+Musical+Fotoprodutos+Videos+de+Artesanato';
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();
};
