/* [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','1901',jdecode('Inicial'),jdecode(''),'/1901.html','true',[],'',''],
	['PAGE','52312',jdecode('Comprar'),jdecode(''),'/52312/index.html','true',[ 
		['PAGE','52333',jdecode('CASA+----------------------'),jdecode(''),'/52312/52333.html','true',[],'',''],
		['PAGE','56423',jdecode('1+Dorm'),jdecode(''),'/52312/56423.html','true',[],'',''],
		['PAGE','56444',jdecode('2+Dorm'),jdecode(''),'/52312/56444.html','true',[],'',''],
		['PAGE','56465',jdecode('3+Dorm'),jdecode(''),'/52312/56465.html','true',[],'',''],
		['PAGE','56486',jdecode('4+Dorm'),jdecode(''),'/52312/56486.html','true',[],'',''],
		['PAGE','72623',jdecode('5+Dorm'),jdecode(''),'/52312/72623.html','true',[],'',''],
		['PAGE','72644',jdecode('6+Dorm'),jdecode(''),'/52312/72644.html','true',[],'',''],
		['PAGE','52733',jdecode('APARTAMENTO+--------------'),jdecode(''),'/52312/52733.html','true',[],'',''],
		['PAGE','56507',jdecode('1+Dorm'),jdecode(''),'/52312/56507.html','true',[],'',''],
		['PAGE','56528',jdecode('2+Dorm'),jdecode(''),'/52312/56528.html','true',[],'',''],
		['PAGE','56549',jdecode('3+Dorm'),jdecode(''),'/52312/56549.html','true',[],'',''],
		['PAGE','56570',jdecode('4+Dorm'),jdecode(''),'/52312/56570.html','true',[],'',''],
		['PAGE','72423',jdecode('5+Dorm'),jdecode(''),'/52312/72423.html','true',[],'',''],
		['PAGE','72444',jdecode('6+Dorm'),jdecode(''),'/52312/72444.html','true',[],'',''],
		['PAGE','54823',jdecode('CONDOM%C3%8DNIO+FECHADO+---'),jdecode(''),'/52312/54823.html','true',[],'',''],
		['PAGE','69323',jdecode('1+Dorm'),jdecode(''),'/52312/69323.html','true',[],'',''],
		['PAGE','69344',jdecode('2+Dorm'),jdecode(''),'/52312/69344.html','true',[],'',''],
		['PAGE','69365',jdecode('3+Dorm'),jdecode(''),'/52312/69365.html','true',[],'',''],
		['PAGE','69386',jdecode('4+Dorm'),jdecode(''),'/52312/69386.html','true',[],'',''],
		['PAGE','131867',jdecode('5+Dorm'),jdecode(''),'/52312/131867.html','true',[],'',''],
		['PAGE','131888',jdecode('6+Dorm'),jdecode(''),'/52312/131888.html','true',[],'',''],
		['PAGE','112867',jdecode('IM%C3%93VEIS+COMERCIAIS---'),jdecode(''),'/52312/112867.html','true',[],'',''],
		['PAGE','142267',jdecode('Pontos+Comerciais+Variados+'),jdecode(''),'/52312/142267.html','true',[],'',''],
		['PAGE','54844',jdecode('TERRENO+----------------'),jdecode(''),'/52312/54844.html','true',[],'',''],
		['PAGE','105667',jdecode('Terrenos+Variados'),jdecode(''),'/52312/105667.html','true',[],'','']
	],'',''],
	['PAGE','52912',jdecode('Alugar'),jdecode(''),'/52912/index.html','true',[ 
		['PAGE','52933',jdecode('CASA+----------------------'),jdecode(''),'/52912/52933.html','true',[],'',''],
		['PAGE','57523',jdecode('1+Dorm'),jdecode(''),'/52912/57523.html','true',[],'',''],
		['PAGE','57544',jdecode('2+Dorm'),jdecode(''),'/52912/57544.html','true',[],'',''],
		['PAGE','57565',jdecode('3+Dorm'),jdecode(''),'/52912/57565.html','true',[],'',''],
		['PAGE','57586',jdecode('4+Dorm'),jdecode(''),'/52912/57586.html','true',[],'',''],
		['PAGE','112567',jdecode('5+Dorm'),jdecode(''),'/52912/112567.html','true',[],'',''],
		['PAGE','112588',jdecode('6+Dorm'),jdecode(''),'/52912/112588.html','true',[],'',''],
		['PAGE','52954',jdecode('APARTAMENTO+-----------------'),jdecode(''),'/52912/52954.html','true',[],'',''],
		['PAGE','57607',jdecode('1+Dorm'),jdecode(''),'/52912/57607.html','true',[],'',''],
		['PAGE','57628',jdecode('2+Dorm'),jdecode(''),'/52912/57628.html','true',[],'',''],
		['PAGE','57649',jdecode('3+Dorm'),jdecode(''),'/52912/57649.html','true',[],'',''],
		['PAGE','57670',jdecode('4+Dorm'),jdecode(''),'/52912/57670.html','true',[],'',''],
		['PAGE','112609',jdecode('5+Dorm'),jdecode(''),'/52912/112609.html','true',[],'',''],
		['PAGE','112630',jdecode('6+Dorm'),jdecode(''),'/52912/112630.html','true',[],'',''],
		['PAGE','52975',jdecode('CONDOM%C3%8DNIO+FECHADO----'),jdecode(''),'/52912/52975.html','true',[],'',''],
		['PAGE','70123',jdecode('1+Dorm'),jdecode(''),'/52912/70123.html','true',[],'',''],
		['PAGE','70144',jdecode('2+Dorm'),jdecode(''),'/52912/70144.html','true',[],'',''],
		['PAGE','70165',jdecode('3+Dorm'),jdecode(''),'/52912/70165.html','true',[],'',''],
		['PAGE','70186',jdecode('4+Dorm'),jdecode(''),'/52912/70186.html','true',[],'',''],
		['PAGE','112651',jdecode('5+Dorm'),jdecode(''),'/52912/112651.html','true',[],'',''],
		['PAGE','131909',jdecode('6+Dorm'),jdecode(''),'/52912/131909.html','true',[],'',''],
		['PAGE','142288',jdecode('%C3%8DMOVEIS++COMERCIAIS----------'),jdecode(''),'/52912/142288.html','true',[],'',''],
		['PAGE','60123',jdecode('Pontos+Comerciais+Variados'),jdecode(''),'/52912/60123.html','true',[],'','']
	],'',''],
	['PAGE','53175',jdecode('Quem+Somos'),jdecode(''),'/53175.html','true',[],'',''],
	['PAGE','53196',jdecode('Contato'),jdecode(''),'/53196.html','true',[],'','']];
var siteelementCount=53;
theSitetree.topTemplateName='Padma';
theSitetree.paletteFamily='CC6866';
theSitetree.keyvisualId='1075';
theSitetree.keyvisualName='wohnung_einrichten.jpg';
theSitetree.fontsetId='178';
theSitetree.graphicsetId='220';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='9E9D90';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Padma',
				paletteFamily: 	'CC6866',
				keyvisualId: 	'1075',
				keyvisualName: 	'wohnung_einrichten.jpg',
				fontsetId: 		'178',
				graphicsetId: 	'220',
				contentColor: 	'DDDDDD',
				contentBGColor: '9E9D90',
				a_color: 		'CC6866',
				b_color: 		'CC0000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20100819-152621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57607',
internalId:  '',
customField: '20100622-085900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52933',
internalId:  '',
customField: '20091124-104958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52954',
internalId:  '',
customField: '20091124-104958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52912',
internalId:  '',
customField: '20091221-122420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54844',
internalId:  '',
customField: '20100122-073522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52333',
internalId:  '',
customField: '20091203-145927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56465',
internalId:  '',
customField: '20100729-114248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56486',
internalId:  '',
customField: '20100701-081230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56423',
internalId:  '',
customField: '20100113-151024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54823',
internalId:  '',
customField: '20091203-144512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52733',
internalId:  '',
customField: '20091124-104707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56507',
internalId:  '',
customField: '20100721-124244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56444',
internalId:  '',
customField: '20100817-092258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69386',
internalId:  '',
customField: '20100701-080838'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1901',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-15208946']={
webappId:    '1501',
documentId:  '1901',
internalId:  '15208946',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56549',
internalId:  '',
customField: '20100812-083522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52975',
internalId:  '',
customField: '20091126-133139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69323',
internalId:  '',
customField: '20100113-134657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69344',
internalId:  '',
customField: '20100831-083721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57523',
internalId:  '',
customField: '20091126-131842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56570',
internalId:  '',
customField: '20100505-124952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57628',
internalId:  '',
customField: '20100514-083335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56528',
internalId:  '',
customField: '20100825-094634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142267',
internalId:  '',
customField: '20100617-090551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53175',
internalId:  '',
customField: '20100218-134744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53196',
internalId:  '',
customField: '20091124-105421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142288',
internalId:  '',
customField: '20100312-072038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52312',
internalId:  '',
customField: '20091221-122259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57544',
internalId:  '',
customField: '20091126-131918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57565',
internalId:  '',
customField: '20100120-105922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69365',
internalId:  '',
customField: '20100324-081257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60123',
internalId:  '',
customField: '20100825-095406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57649',
internalId:  '',
customField: '20100721-124052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57586',
internalId:  '',
customField: '20100401-122702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57670',
internalId:  '',
customField: '20100617-090045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70123',
internalId:  '',
customField: '20091204-061849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70144',
internalId:  '',
customField: '20091204-061849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70165',
internalId:  '',
customField: '20091204-061849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70186',
internalId:  '',
customField: '20091204-061849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72444',
internalId:  '',
customField: '20100312-092623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72623',
internalId:  '',
customField: '20100128-070121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72644',
internalId:  '',
customField: '20091228-121735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72423',
internalId:  '',
customField: '20100312-074653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105667',
internalId:  '',
customField: '20100512-101129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112867',
internalId:  '',
customField: '20100312-073019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112567',
internalId:  '',
customField: '20100126-065157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112588',
internalId:  '',
customField: '20100126-065157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112609',
internalId:  '',
customField: '20100126-065157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112630',
internalId:  '',
customField: '20100126-065157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112651',
internalId:  '',
customField: '20100126-065157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131888',
internalId:  '',
customField: '20100208-103031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131867',
internalId:  '',
customField: '20100707-145136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131909',
internalId:  '',
customField: '20100208-100501'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHHDB';
var companyName   = 'Nova+Resid%C3%AAncia+Im%C3%B3veis++++++++++++++++++++CRECI+17.236-J';
var htmlTitle	  = 'Nova+Resid%C3%AAncia+Im%C3%B3veis';
var metaKeywords  = '';
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();
};
