/* [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(''),'/501.html','true',[],'',''],
	['PAGE','31001',jdecode('Power+and+Control'),jdecode(''),'/31001.html','true',[],'',''],
	['PAGE','13601',jdecode('Contact'),jdecode(''),'/13601/index.html','true',[ 
		['PAGE','24401',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/13601/24401.html','true',[],'','']
	],'',''],
	['PAGE','34601',jdecode('Default+Workout+Plan'),jdecode(''),'/34601.html','true',[],'',''],
	['PAGE','13622',jdecode('Membership+'),jdecode(''),'/13622.html','true',[],'',''],
	['PAGE','25601',jdecode('Q+%26+A+Section'),jdecode(''),'/25601.html','true',[],'',''],
	['PAGE','15101',jdecode('Membership+Levels'),jdecode(''),'/15101.html','true',[],'',''],
	['PAGE','32201',jdecode('Florida+E-Book%2FManual'),jdecode(''),'/32201.html','true',[],'',''],
	['PAGE','38001',jdecode('Consulting+Services'),jdecode(''),'/38001.html','true',[],'',''],
	['PAGE','39201',jdecode('Management'),jdecode(''),'/39201.html','true',[],'',''],
	['PAGE','15122',jdecode('Pricing'),jdecode(''),'/15122.html','true',[],'',''],
	['PAGE','16201',jdecode('Shop'),jdecode(''),'/16201.html','true',[],'',''],
	['PAGE','21122',jdecode('Investment+Land'),jdecode(''),'/21122.html','true',[],'',''],
	['PAGE','22901',jdecode('News+%26+Links'),jdecode(''),'/22901.html','true',[],'',''],
	['PAGE','16306',jdecode('Guestbook'),jdecode(''),'/16306/index.html','true',[ 
		['PAGE','16301',jdecode('Read+Guestbook'),jdecode(''),'/16306/16301.html','true',[],'','']
	],'',''],
	['PAGE','35301',jdecode('Florida+Statute+Changes'),jdecode(''),'/35301.html','true',[],'',''],
	['PAGE','30001',jdecode('About+US'),jdecode(''),'/30001.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Simple';
theSitetree.paletteFamily='C1BCB6';
theSitetree.keyvisualId='2572';
theSitetree.keyvisualName='haus.jpg';
theSitetree.fontsetId='10753';
theSitetree.graphicsetId='10456';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='c1bcb6';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Simple',
				paletteFamily: 	'C1BCB6',
				keyvisualId: 	'2572',
				keyvisualName: 	'haus.jpg',
				fontsetId: 		'10753',
				graphicsetId: 	'10456',
				contentColor: 	'000000',
				contentBGColor: 'c1bcb6',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'857157',
				e_color: 		'FFFFFF',
				f_color: 		'817E7E',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['4001']=webappMappings['4001-10194410']={
webappId:    '4001',
documentId:  '16201',
internalId:  '10194410',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-16306aen010invmw4']={
webappId:    '1002',
documentId:  '16306',
internalId:  '16306aen010invmw4',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100220-171121'
};
webappMappings['1501']=webappMappings['1501-10221346']={
webappId:    '1501',
documentId:  '501',
internalId:  '10221346',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39201',
internalId:  '',
customField: '20091220-132747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38001',
internalId:  '',
customField: '20091220-131942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31001',
internalId:  '',
customField: '20071107-115423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20080103-124536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24401',
internalId:  '',
customField: '20070913-173814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34601',
internalId:  '',
customField: '20091220-131824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13622',
internalId:  '',
customField: '20071020-165317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25601',
internalId:  '',
customField: '20080401-064009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20080622-065812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32201',
internalId:  '',
customField: '20071129-171411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15122',
internalId:  '',
customField: '20080720-155845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16201',
internalId:  '',
customField: '20070908-134906'
};
webappMappings['7008']=webappMappings['7008-1237']={
webappId:    '7008',
documentId:  '13601',
internalId:  '1237',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21122',
internalId:  '',
customField: '20090505-103931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22901',
internalId:  '',
customField: '20090314-191034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16306',
internalId:  '',
customField: '20070908-135932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16301',
internalId:  '',
customField: '20070908-135932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35301',
internalId:  '',
customField: '20091228-080232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20090505-104229'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010INVMW4';
var companyName   = 'The+HOA+and+Condo+Experts';
var htmlTitle	  = 'Condo+and+HOA+Corporate+Set-Up+and+Administration+Packages';
var metaKeywords  = 'HOA%2C++CONDO%2C+ANSWERS%2C++HOW+TO%2C+GOVERN%2C+HOMEOWNER%2C+ASSOCIATION%2C+ADMINISTRATION%2C++SOLUTIONS%2C++REAL+ESTATE%2C+REALTY+EXPERTS%2C++EDUCATION%2C+TEMPLATES%2C++INSTRUCTIONS%2C+PACKAGES%2C+COLLECTIONS%2C+ASSESSMENTS%2C+DUES%2C+FEES%2C+CONSULTING%2C+CONSULTANTS%2C+FLORIDA%2C+REALTY%2C+REAL+ESTATE%2C+REALTOR%2C+HOMES%2C+VILLAS%2C+TOWNHOUSES%2C+CONDOS%2C+INSTRUCTION%2C+ARIZONA%2C+GEORGIA%2C+MISSISSIPPI%2C+NEW+JERSEY%2C+NEW+YORK%2C+CALIFORNIA%2C+PALM+BEACH%2C+LAKE+WORTH%2C+TEACH%2C+GROW%2C+LEARN';
var metaContents  = 'HOA%2C++CONDO%2C+ANSWERS%2C++HOW+TO%2C+GOVERN%2C+HOMEOWNER%2C+ASSOCIATION%2C+ADMINISTRATION%2C++SOLUTIONS%2C++REAL+ESTATE%2C+REALTY+EXPERTS%2C++EDUCATION%2C+TEMPLATES%2C++INSTRUCTIONS%2C+PACKAGES%2C+COLLECTIONS%2C+ASSESSMENTS%2C+DUES%2C+FEES%2C+CONSULTING%2C+CONSULTANTS%2C+FLORIDA%2C+REALTY%2C+REAL+ESTATE%2C+REALTOR%2C+HOMES%2C+VILLAS%2C+TOWNHOUSES%2C+CONDOS%2C+INSTRUCTION%2C+ARIZONA%2C+GEORGIA%2C+MISSISSIPPI%2C+NEW+JERSEY%2C+NEW+YORK%2C+CALIFORNIA%2C+PALM+BEACH%2C+LAKE+WORTH%2C+TEACH%2C+GROW%2C+LEARN';
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();
};
