/* [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','178007',jdecode('SAVANA+Brazil'),jdecode(''),'/178007.html','true',[],'',''],
	['PAGE','177307',jdecode('Portugu%C3%AAs'),jdecode(''),'/177307/index.html','true',[ 
		['PAGE','97634',jdecode('Assessorias'),jdecode(''),'/177307/97634.html','true',[],'',''],
		['PAGE','104234',jdecode('Casamentos+no+Brasil'),jdecode(''),'/177307/104234.html','true',[],'',''],
		['PAGE','97655',jdecode('Casamentos+no+Exterior'),jdecode(''),'/177307/97655.html','true',[],'',''],
		['PAGE','182507',jdecode('Lembrancinhas+%26+Acess%C3%B3rios'),jdecode(''),'/177307/182507.html','true',[],'',''],
		['PAGE','124787',jdecode('RSVP'),jdecode(''),'/177307/124787.html','true',[],'',''],
		['PAGE','103197',jdecode('Sites+de+Casamento'),jdecode(''),'/177307/103197.html','true',[],'',''],
		['PAGE','694',jdecode('Contatos'),jdecode(''),'/177307/694.html','true',[],'','']
	],'',''],
	['PAGE','164596',jdecode('English'),jdecode(''),'/164596/index.html','true',[ 
		['PAGE','177349',jdecode('Wedding+Planning'),jdecode(''),'/164596/177349.html','true',[],'',''],
		['PAGE','165696',jdecode('Real+State'),jdecode(''),'/164596/165696.html','true',[],'',''],
		['PAGE','182607',jdecode('Beach+Favors+%26+Accessories'),jdecode(''),'/164596/182607.html','true',[],'',''],
		['PAGE','182207',jdecode('Service+Providers'),jdecode(''),'/164596/182207.html','true',[],'',''],
		['PAGE','182707',jdecode('RSVP'),jdecode(''),'/164596/182707.html','true',[],'',''],
		['PAGE','177370',jdecode('Contact'),jdecode(''),'/164596/177370.html','true',[],'','']
	],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Tendril';
theSitetree.paletteFamily='D9F4D5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33095';
theSitetree.graphicsetId='14058';
theSitetree.contentColor='3B8030';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Tendril',
				paletteFamily: 	'D9F4D5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33095',
				graphicsetId: 	'14058',
				contentColor: 	'3B8030',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '178007',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-17932']={
webappId:    '7008',
documentId:  '182707',
internalId:  '17932',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-17839']={
webappId:    '7008',
documentId:  '177370',
internalId:  '17839',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165696',
internalId:  '',
customField: '20100716-102546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182207',
internalId:  '',
customField: '20100618-195705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103197',
internalId:  '',
customField: '20100705-190313'
};
webappMappings['7060']=webappMappings['7060-39d563d698e5c3e9a3006bd58346c513']={
webappId:    '7060',
documentId:  '182507',
internalId:  '39d563d698e5c3e9a3006bd58346c513',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97655',
internalId:  '',
customField: '20100608-112913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104234',
internalId:  '',
customField: '20100621-165553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177349',
internalId:  '',
customField: '20100616-201728'
};
webappMappings['7060']=webappMappings['7060-9ec3d26f8aac7c27821009a272fec750']={
webappId:    '7060',
documentId:  '182607',
internalId:  '9ec3d26f8aac7c27821009a272fec750',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97634',
internalId:  '',
customField: '20100625-105132'
};
webappMappings['7060']=webappMappings['7060-cc61b381474656ecc898ab7d5ebbc59f']={
webappId:    '7060',
documentId:  '97634',
internalId:  'cc61b381474656ecc898ab7d5ebbc59f',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-9e12a9a624d6761d4b514d29ad697c0a']={
webappId:    '7060',
documentId:  '97655',
internalId:  '9e12a9a624d6761d4b514d29ad697c0a',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177307',
internalId:  '',
customField: '20100621-164945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177370',
internalId:  '',
customField: '20100716-103212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '178007',
internalId:  '',
customField: '20100704-182419'
};
webappMappings['7008']=webappMappings['7008-5662']={
webappId:    '7008',
documentId:  '694',
internalId:  '5662',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124787',
internalId:  '',
customField: '20100608-113150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20100716-112835'
};
webappMappings['7060']=webappMappings['7060-63222b45f94852d9ac14eb923f851a55']={
webappId:    '7060',
documentId:  '104234',
internalId:  '63222b45f94852d9ac14eb923f851a55',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-e6f9837514a45c3dfe8a573569e015ec']={
webappId:    '7060',
documentId:  '164596',
internalId:  'e6f9837514a45c3dfe8a573569e015ec',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182507',
internalId:  '',
customField: '20100621-190555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182607',
internalId:  '',
customField: '20100621-190703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182707',
internalId:  '',
customField: '20100621-170606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164596',
internalId:  '',
customField: '20100616-202155'
};
webappMappings['7008']=webappMappings['7008-9723']={
webappId:    '7008',
documentId:  '124787',
internalId:  '9723',
customField: 'language:pt;country:BR;'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZKWL';
var companyName   = 'Casamentos+no+Brasil+e+no+Exterior';
var htmlTitle	  = '';
var metaKeywords  = 'savana%2C+brazil%2C+brasil%2C+marketing%2C+eventos%2C+comunica%C3%A7%C3%A3o%2Cpraia%2C+litoral%2C+guaruj%C3%A1%2C+juquehy%2C+ilhabela%2C+daltro%2C+assessoria%2C+organiza%C3%A7%C3%A3o%2C+festas%2C+casamento%2C+anivers%C3%A1rios%2C+imprensa%2C+m%C3%ADdia%2C+express%C3%A3o%2C+casamentos%2C+noivas%2C+noiva%2C+noivos%2C+noivo%2C+madrinhas%2C+madrinha%2C+cerimonial%2C+cerimonialista%2C+vera+sim%C3%A3o%2C+atrium%2C+foto%2C+litoral%2C+santos%2C+igreja%2C+sal%C3%A3o%2C+buffet%2C+espa%C3%A7o';
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();
};
