/* [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','501',jdecode('Home'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','38101',jdecode('A+CIDADE%2FHISTORIA'),jdecode(''), jdecode('%2F38101.html'), 'true',[],'',''],
	['PAGE','573',jdecode('MARANDUBA'),jdecode(''), jdecode('%2F573.html'), 'true',[],'',''],
	['PAGE','103412',jdecode('Praias'),jdecode(''), jdecode('%2F103412.html'), 'true',[],'',''],
	['PAGE','6706',jdecode('LOCA%C3%87%C3%83O+TEMPORADA'),jdecode(''), jdecode('%2F6706%2Findex.html'), 'true',[ 
		['PAGE','6727',jdecode('Casas'),jdecode(''), jdecode('%2F6706%2F6727.html'), 'true',[],'',''],
		['PAGE','6748',jdecode('Apartamentos'),jdecode(''), jdecode('%2F6706%2F6748.html'), 'true',[],'',''],
		['PAGE','34301',jdecode('CONTATO'),jdecode(''), jdecode('%2F6706%2F34301.html'), 'true',[],'','']
	],'',''],
	['PAGE','594',jdecode('VENDA-APTOS'),jdecode(''), jdecode('%2F594.html'), 'true',[],'',''],
	['PAGE','615',jdecode('VENDA-MARANDUBA'),jdecode(''), jdecode('%2F615.html'), 'true',[],'',''],
	['PAGE','53501',jdecode('VENDA-PULSO'),jdecode(''), jdecode('%2F53501.html'), 'true',[],'',''],
	['PAGE','134612',jdecode('VENDA-PRAIA+SAP%C3%89'),jdecode(''), jdecode('%2F134612.html'), 'true',[],'',''],
	['PAGE','122612',jdecode('VENDA-LAGOINHA'),jdecode(''), jdecode('%2F122612.html'), 'true',[],'',''],
	['PAGE','118133',jdecode('VENDA-CACHOEIRAS'),jdecode(''), jdecode('%2F118133.html'), 'true',[],'',''],
	['PAGE','118154',jdecode('Outras+Praias'),jdecode(''), jdecode('%2F118154.html'), 'true',[],'',''],
	['PAGE','112612',jdecode('S%C3%8DTIOS%2FCH%C3%81CARAS'),jdecode(''), jdecode('%2F112612.html'), 'true',[],'',''],
	['PAGE','636',jdecode('TERRENOS'),jdecode(''), jdecode('%2F636.html'), 'true',[],'',''],
	['PAGE','38122',jdecode('IM%C3%93VEIS+COMERCIAIS'),jdecode(''), jdecode('%2F38122.html'), 'true',[],'',''],
	['PAGE','170545',jdecode('LAN%C3%87AMENTOS'),jdecode(''), jdecode('%2F170545.html'), 'true',[],'',''],
	['PAGE','206356',jdecode('PRESTADOR+SERVI%C3%87OS'),jdecode(''), jdecode('%2F206356.html'), 'true',[],'',''],
	['PAGE','993',jdecode('CONTATO'),jdecode(''), jdecode('%2F993.html'), 'true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Sportive';
theSitetree.paletteFamily='E9EEF4';
theSitetree.keyvisualId='2691';
theSitetree.keyvisualName='urlaub2.jpg';
theSitetree.fontsetId='222';
theSitetree.graphicsetId='262';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E9EEF4';
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: 			'Sportive',
				paletteFamily: 	'E9EEF4',
				keyvisualId: 	'2691',
				keyvisualName: 	'urlaub2.jpg',
				fontsetId: 		'222',
				graphicsetId: 	'262',
				contentColor: 	'000000',
				contentBGColor: 'E9EEF4',
				a_color: 		'E9EEF4',
				b_color: 		'C1C4D3',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-1458']={
webappId:    '7008',
documentId:  '993',
internalId:  '1458',
customField: 'language:pt;country:BR;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-1459']={
webappId:    '7008',
documentId:  '34301',
internalId:  '1459',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20111012-213150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38101',
internalId:  '',
customField: '20111012-213244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20111012-162052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20120123-095257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20120123-095705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118133',
internalId:  '',
customField: '20111006-105229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118154',
internalId:  '',
customField: '20110901-093546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20090624-081907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112612',
internalId:  '',
customField: '20110504-104637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38122',
internalId:  '',
customField: '20120123-100406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103412',
internalId:  '',
customField: '20111012-175831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '206356',
internalId:  '',
customField: '20120115-134630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53501',
internalId:  '',
customField: '20110307-194912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '993',
internalId:  '',
customField: '20120123-055857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6706',
internalId:  '',
customField: '20111012-180233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6727',
internalId:  '',
customField: '20111012-181036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6748',
internalId:  '',
customField: '20110831-090255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170545',
internalId:  '',
customField: '20120123-055721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34301',
internalId:  '',
customField: '20110815-085545'
};
webappMappings['1501']=webappMappings['1501-7584705']={
webappId:    '1501',
documentId:  '501',
internalId:  '7584705',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134612',
internalId:  '',
customField: '20120123-095853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122612',
internalId:  '',
customField: '20110504-132732'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZC1L';
var companyName   = 'MAURO+IMOVEIS%2FUBATUBA%2FSP%2FBR';
var htmlTitle	  = 'MAURO+IM%C3%93VEIS+-+MARANDUBA+-+UBATUBA';
var metaKeywords  = 'CASA+UBATUBA%2C+APARTAMENTOS+UBATUBA%2C+CASAS+MARANDUBA%2C+APARTAMENTOS+UBATUBA%2C+TERRENOS+MARANDUBA%2C+TERRENOS+UBATUBA%2C+MARANDUBA%2C+UBATUBA%2C+PRAIA+DA+MARANDUBA%2C+PRAIA+DA+LAGOINHA%2C+PRAIA+DO+PULSO%2C+SITIOS+NA+PRAIA%2C+IM%C3%93VEIS+%C3%80+VENDA%2C+CASA+NA+PRAIA%2C+PRAIA%2C+F%C3%89RIAS%2C+APARTAMENTO+NA+PRAIA%2C+IM%C3%93VEIS+NA+PRAIA%2C+IMOBILI%C3%81RIAS+UBATUBA%2C+IMOBILI%C3%81RIAS+MARANDUBA++INVESTIMENTO+NA+PRAIA%2C+CHALES+PRAIA%2C+ALUGUEL+NA+PRAIA%2C+TEMPORADA+NA+PRAIA%2C+LITORAL+NORTE.';
var metaContents  = 'CASAS%2C+UBATUBA%2C+MARANDUBA%2C+F%C3%89RIAS%2C+IM%C3%93VEIS+%C3%80+VENDA%2C+IM%C3%93VEIS+LOCA%C3%87%C3%83O%2C+TEMPORADA%2C+TEMPORADA+UBATUBA%2C+TEMPORADA+MARANDUBA%2C+PRAIA+DA+MARANDUBA%2C+PRAIA+DA+LAGOINHA%2C+PRAIA+DA+TABATINGA%2C+PRAIA+DO+PULSO%2C+SALGA%2C+RECANTO+LAGOINHA%2C+LOCA%C3%87%C3%83O+PRAIA%2C+LITORAL+NORTE%2C+CARAGUATATUBA%2C+ALTO+PADR%C3%83O%2C+PRAIA%2C+APARTAMENTOS+%C3%80+VENDA%2C+APARTAMENTOS+UBATUBA%2C+APARTAMENTOS+MARANDUBA%2C+CHAL%C3%89S+MARANDUBA%2C+CHAL%C3%89S+UBATUBA%2C+CONDOM%C3%8DNIO+MARANDUBA%2C+CONDOM%C3%8DNIO%2C+PRAIA+LITORAL+NORTE%2C+CONJUNTOS+PARA+RENDA%2C+INVESTIMENTO%2C+CASA+%C3%80+VENDA%2C+IMOVEIS+NA+PRAIA%2C+CASA+NA+PRAIA%2C+APARTAMENTO+NA+PRAIA';
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();
};

