/* [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','8001',jdecode('Home%2C+Work+%26+Life'),jdecode(''),'/8001.html','true',[],''],
	['PAGE','8052',jdecode('Simplify+Your+Home'),jdecode(''),'/8052.html','true',[],''],
	['PAGE','8073',jdecode('Simplify+Home+Office'),jdecode(''),'/8073.html','true',[],''],
	['PAGE','8115',jdecode('Stage+Home+-++To+Sell'),jdecode(''),'/8115.html','true',[],''],
	['PAGE','8157',jdecode('E-Books+%26+Workshops'),jdecode(''),'/8157.html','true',[],''],
	['PAGE','32301',jdecode('Products+%26+Services'),jdecode(''),'/32301.html','true',[],''],
	['PAGE','10601',jdecode('About+Mindy'),jdecode(''),'/10601.html','true',[],''],
	['PAGE','8136',jdecode('E-Mail+Mindy'),jdecode(''),'/8136.html','true',[],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='333333';
theSitetree.keyvisualId='1267';
theSitetree.keyvisualName='alte_moebel.jpg';
theSitetree.fontsetId='190';
theSitetree.graphicsetId='226';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Profile',
				paletteFamily: 	'333333',
				keyvisualId: 	'1267',
				keyvisualName: 	'alte_moebel.jpg',
				fontsetId: 		'190',
				graphicsetId: 	'226',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'333333',
				b_color: 		'999999',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-19898']={
webappId:    '7008',
documentId:  '8136',
internalId:  '19898',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8001',
internalId:  '',
customField: '20100412-152527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8052',
internalId:  '',
customField: '20100412-154829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8073',
internalId:  '',
customField: '20100412-160536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32301',
internalId:  '',
customField: '20100320-223136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8115',
internalId:  '',
customField: '20100412-164034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8136',
internalId:  '',
customField: '20100412-215454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8157',
internalId:  '',
customField: '20100412-214709'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '8001',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-21425079']={
webappId:    '1501',
documentId:  '8001',
internalId:  '21425079',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20100606-231659'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INVCZA';
var companyName   = 'Joyful+Simplicity+++Mindy+J+Kaleta%2C+CPC%2C+ASP';
var htmlTitle	  = 'The+Joyful+Simplicity+of+Creating+Your+Home%2C+Work+%26+Life+by+Design%21';
var metaKeywords  = 'pataskala%2C+columbus%2C+granville%2C+newark%2C+johnstown%2C+staging%2C+home%2C+sell%2C+live%2C+work%2C+simplicity%2C+simple%2C+win%2C+coach%2C+coaching%2C+chaotic%2C+stress%2C+emotions%2C+clutter%2C+marketplace%2C+buyers%2C+sellers%2C+real+estate%2C+real+estate+agent%2C+family%2C+love%2C+joyful%2C+serene%2C+calm%2C+nurturing%2C+pack%2C+move%2C+moved%2C+accessorize%2C+homes%2C+house%2C+quality%2C+overwhelmed%2C+stuff%2C+comfort%2C+energy%2C+less%2C+more%2C+work+life%2C+workspaces%2C+growth%2C+success%2C+redesign%2C+re-design%2C+certified%2C+professional%2C+insured%2C+international%2C+local%2C+ohio%2C+pataskala%2C+pickerington%2C+Baltimore%2C+Johnstown%2C+Newark%2C+Granville%2C+Reynoldsburg%2C+Canal+Winchester%2C+Mindy%2C+Kaleta%2C+ASP%2C+Certified%2C+Coach%2C+Life%2C+maintenance%2C+repair%2C+repairs%2C+paint%2C+painting%2C+curb+appeal%2C+curb%2C+appeal%2C+landscaping%2C+trimming%2C+sell%2C+designed%2C+decorating%2C+Staged%2C+sold%2C+staged';
var metaContents  = 'Joyful+Simplicity%2C+LLC%2C+Mindy+J+Kaleta%2C+an+Accredited+Staging+Professional+and+Certified+Life+Coach+is+passionate+about+simplifying+womens+lives%2C+making+sellers+homes+irresistible+to+buyers%2C+creating+calm+and+simplifying+our+present+living+spaces+and+organizing+home+based+business+offices+for+efficiency+and+success%21';
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();
};
