/* [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 theSitetree=[ 
	['PAGE','5301',jdecode('Home'),jdecode(''),'/5301.html','true',[],''],
	['PAGE','5901',jdecode('Services'),jdecode(''),'/5901.html','true',[],''],
	['PAGE','5922',jdecode('About+Us'),jdecode(''),'/5922.html','true',[],''],
	['PAGE','5943',jdecode('Selected+Transactions'),jdecode(''),'/5943/index.html','true',[ 
		['PAGE','5964',jdecode('Office+Buildings'),jdecode(''),'/5943/5964.html','true',[],''],
		['PAGE','5985',jdecode('Multi-Family+Residential'),jdecode(''),'/5943/5985.html','true',[],''],
		['PAGE','6006',jdecode('Hospitality+%26+Hotels'),jdecode(''),'/5943/6006.html','true',[],''],
		['PAGE','6027',jdecode('Retail'),jdecode(''),'/5943/6027.html','true',[],''],
		['PAGE','6048',jdecode('Industrial+%26+Special+Purpose'),jdecode(''),'/5943/6048.html','true',[],''],
		['PAGE','6069',jdecode('Land+Assemblage'),jdecode(''),'/5943/6069.html','true',[],''],
		['PAGE','9801',jdecode('Company+Sales'),jdecode(''),'/5943/9801.html','true',[],'']
	],''],
	['PAGE','6090',jdecode('Current+Listings'),jdecode(''),'/6090.html','true',[],''],
	['PAGE','15601',jdecode('Related+Links'),jdecode(''),'/15601.html','true',[],''],
	['PAGE','6132',jdecode('Contact+Us'),jdecode(''),'/6132.html','true',[],'']];
var siteelementCount=14;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='385CA9';
theSitetree.keyvisualId='7154';
theSitetree.keyvisualName='kv_7154.jpg';
theSitetree.fontsetId='16409';
theSitetree.graphicsetId='12134';
theSitetree.contentColor='17336F';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Capri',
				paletteFamily: 	'385CA9',
				keyvisualId: 	'7154',
				keyvisualName: 	'kv_7154.jpg',
				fontsetId: 		'16409',
				graphicsetId: 	'12134',
				contentColor: 	'17336F',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20081219-145259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20081224-102344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5922',
internalId:  '',
customField: '20081224-102344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5943',
internalId:  '',
customField: '20081224-102344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5964',
internalId:  '',
customField: '20081224-102344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5985',
internalId:  '',
customField: '20081224-102344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6069',
internalId:  '',
customField: '20081224-102344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6006',
internalId:  '',
customField: '20081224-102344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6027',
internalId:  '',
customField: '20081224-102344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6048',
internalId:  '',
customField: '20081224-102344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20081224-130454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6132',
internalId:  '',
customField: '20081224-102344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6090',
internalId:  '',
customField: '20081224-102344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20090217-165617'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INVEPV';
var companyName   = 'Beacon+Realty+Advisors%2C+Inc';
var htmlTitle	  = 'Beacon+Realty+Advisors%2C+Inc.+-+Miami+%2F+South+Florida+Commercial+Real+Estate+Experts';
var metaKeywords  = 'Real+Estate%2C+Consulting%2C+Brokerage%2C+South+Florida%2C+Miami%2C+Ft.+Lauderdale%2C+Palm+Beach%2C+Dade%2C+Broward%2C+investment%2C+sales%2C+financing%2C+commercial%2C+debt%2C+equity%2C+asset+management%2C+retail%2C+hospitality%2C+multi-family%2C+office%2C+industrial%2C+mixed-use%2C+development%2C+distressed%2C+property%2C+work-out%2C+market+analysis%2C+strategic+planning%2C+marketing%2C+contruction%2C+services%2C+permitting%2C+reviews%2C+architecture%2C+interior+design%2C+end+users%2C+end+buyers%2C+leasing%2C+build+out%2C+Treister%2C+Charles+Treister%2C+Treister+Design++Development%2C+coral+gables%2C+land+assemblage%2C+info%40beacon-realty.com';
var metaContents  = 'Beacon+Realty+Advisors+is+a+Miami-based+real+estate+brokerage+and+consulting+firm+involved+in+investment+sales%2C+financing+and+consulting+services+for+all+types+of+commercial+and+multi-family+residential+real+estate+in+South+Florida.';
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();
};
