/* [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','901',jdecode('Home'),jdecode(''),'/901.html','true',[],''],
	['PAGE','92745',jdecode('SOS+Blog'),jdecode(''),'/92745.html','true',[],''],
	['PAGE','12022',jdecode('Information'),jdecode(''),'/12022/index.html','true',[ 
		['PAGE','12043',jdecode('Our+Process'),jdecode(''),'/12022/12043.html','true',[],''],
		['PAGE','67401',jdecode('FAQ%26%23x27%3Bs'),jdecode(''),'/12022/67401.html','true',[],''],
		['PAGE','24322',jdecode('Clutter+Calculators'),jdecode(''),'/12022/24322.html','true',[],''],
		['PAGE','12064',jdecode('Code+of+Ethics'),jdecode(''),'/12022/12064.html','true',[],''],
		['PAGE','1078',jdecode('Tips+%26+Tricks'),jdecode(''),'/12022/1078.html','true',[],''],
		['PAGE','17801',jdecode('Photo+Gallery'),jdecode(''),'/12022/17801.html','true',[],''],
		['PAGE','1099',jdecode('Interesting+links'),jdecode(''),'/12022/1099.html','true',[],'']
	],''],
	['PAGE','994',jdecode('Services'),jdecode(''),'/994/index.html','true',[ 
		['PAGE','1015',jdecode('Homes'),jdecode(''),'/994/1015.html','true',[],''],
		['PAGE','1036',jdecode('Offices'),jdecode(''),'/994/1036.html','true',[],''],
		['PAGE','24301',jdecode('Consulting'),jdecode(''),'/994/24301.html','true',[],''],
		['PAGE','67501',jdecode('Coaching'),jdecode(''),'/994/67501.html','true',[],''],
		['PAGE','12001',jdecode('Seminars+%26+Workshops'),jdecode(''),'/994/12001.html','true',[],''],
		['PAGE','88245',jdecode('Other+Services'),jdecode(''),'/994/88245.html','true',[],''],
		['PAGE','90445',jdecode('Favorite+Products'),jdecode(''),'/994/90445.html','true',[],'']
	],''],
	['PAGE','952',jdecode('About+us'),jdecode(''),'/952.html','true',[],''],
	['PAGE','12106',jdecode('Contact+Us'),jdecode(''),'/12106.html','true',[],''],
	['PAGE','92145',jdecode('Media+Links'),jdecode(''),'/92145.html','true',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='B85454';
theSitetree.keyvisualId='11157';
theSitetree.keyvisualName='kv_11157.jpg';
theSitetree.fontsetId='32064';
theSitetree.graphicsetId='13878';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Office',
				paletteFamily: 	'B85454',
				keyvisualId: 	'11157',
				keyvisualName: 	'kv_11157.jpg',
				fontsetId: 		'32064',
				graphicsetId: 	'13878',
				contentColor: 	'000000',
				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:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20090328-082018'
};
webappMappings['7008']=webappMappings['7008-630']={
webappId:    '7008',
documentId:  '12106',
internalId:  '630',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12106',
internalId:  '',
customField: '20090303-151805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '994',
internalId:  '',
customField: '20090303-204326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '952',
internalId:  '',
customField: '20090303-201036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1036',
internalId:  '',
customField: '20090303-192237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1015',
internalId:  '',
customField: '20090303-192116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12001',
internalId:  '',
customField: '20090303-200951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12022',
internalId:  '',
customField: '20090328-081929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12043',
internalId:  '',
customField: '20090328-082110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12064',
internalId:  '',
customField: '20090328-082341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1078',
internalId:  '',
customField: '20090328-082552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20090303-195320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1099',
internalId:  '',
customField: '20090303-195953'
};
webappMappings['7050']=webappMappings['7050-7642']={
webappId:    '7050',
documentId:  '92745',
internalId:  '7642',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92145',
internalId:  '',
customField: '20090327-141115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24301',
internalId:  '',
customField: '20090303-200744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24322',
internalId:  '',
customField: '20090303-162057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90445',
internalId:  '',
customField: '20090310-185847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67401',
internalId:  '',
customField: '20090328-082237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67501',
internalId:  '',
customField: '20090303-200818'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-15530171']={
webappId:    '1501',
documentId:  '901',
internalId:  '15530171',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88245',
internalId:  '',
customField: '20090303-191933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92745',
internalId:  '',
customField: '20090729-125316'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INXHUF';
var companyName   = 'Simply+Organized+Solutions%2C+Inc.+++++++++++++++++++++++++++++++631-363-9208';
var htmlTitle	  = 'SOS+-+Professional+Organizing%3B+Consulting+%26+Coaching+Services';
var metaKeywords  = 'professional+organizer%2C+organizing+professional%2C+home+organizer%2C+business+consultant%2C+organizing+service%2C+home%2C+office%2C+business%2C+attic%2C+basement%2C+closet%2C+long+island%2C+Suffolk%2C+Nassau%2C++organize%2C+get+organized%2C+organized%2C+organizer%2C+clutter%2C+disorganized%2C+order';
var metaContents  = 'Your+Connection+To+Getting++Staying+Organized%21++Simply+Organized+Solutions%2C+631-363-9208%2C+a+professional+organizing+company+located+on+Long+Island%2C+NY%2C+serving+Nassau++Suffolk%2C++is+dedicated+to+eliminating+clutter+and+chaos+from+your+life+whether+at+home+or+in+the+office.++';
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();
};
