/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','452',jdecode('Meet+the+Designer'),jdecode(''),'/452.html','true',[],''],
	['PAGE','641',jdecode('Contact'),jdecode(''),'/641/index.html','true',[ 
		['PAGE','683',jdecode('How+to+find+us'),jdecode(''),'/641/683.html','true',[],'']
	],''],
	['PAGE','19701',jdecode('Current+Promotions'),jdecode(''),'/19701.html','true',[],''],
	['PAGE','36027',jdecode('Designer+Sale+'),jdecode(''),'/36027.html','true',[],''],
	['PAGE','473',jdecode('Services+and+Fees'),jdecode(''),'/473.html','true',[],''],
	['PAGE','494',jdecode('Custom+Window+Treatments'),jdecode(''),'/494.html','true',[],''],
	['PAGE','515',jdecode('Construction+Consultation+'),jdecode(''),'/515.html','true',[],''],
	['PAGE','536',jdecode('Home+staging'),jdecode(''),'/536.html','true',[],''],
	['PAGE','32401',jdecode('Office+Refurbishing'),jdecode(''),'/32401.html','true',[],''],
	['PAGE','33001',jdecode('Senior-Living+Design'),jdecode(''),'/33001.html','true',[],''],
	['PAGE','557',jdecode('Q+%26+A'),jdecode(''),'/557.html','true',[],''],
	['PAGE','578',jdecode('Project+Photos'),jdecode(''),'/578.html','true',[],''],
	['PAGE','36533',jdecode('My+Blog'),jdecode(''),'/36533.html','true',[],''],
	['PAGE','620',jdecode('Useful+Links'),jdecode(''),'/620.html','true',[],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Dispose';
theSitetree.paletteFamily='718DF8';
theSitetree.keyvisualId='9684';
theSitetree.keyvisualName='kv_9684.gif';
theSitetree.fontsetId='10671';
theSitetree.graphicsetId='11186';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCCACA';
var theTemplate={
				name: 			'Dispose',
				paletteFamily: 	'718DF8',
				keyvisualId: 	'9684',
				keyvisualName: 	'kv_9684.gif',
				fontsetId: 		'10671',
				graphicsetId: 	'11186',
				contentColor: 	'000000',
				contentBGColor: 'CCCACA',
				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: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090401-214556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090401-204952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20090207-143456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36533',
internalId:  '',
customField: '20090624-225848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20090401-205909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20090401-210318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20090207-144641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20080510-220649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20080902-094530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20090401-210113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20090401-210149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33001',
internalId:  '',
customField: '20090401-210217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20090401-210441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '683',
internalId:  '',
customField: '20090207-143655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20090207-145946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36027',
internalId:  '',
customField: '20090207-135518'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3QY';
var companyName   = 'Suzanne+Marie%27s+Interiors+503-364-4237';
var htmlTitle	  = 'Suzanne+Maries+Interiors';
var metaKeywords  = '%2Finterior+designer%2C+decorator%2C+interior+decorator%2C+furniture%2C+draperies%2C+window+treatments%2C+blinds%2C+shutters%2C+shades%2C+fabric%2C+tile%2C+design%2C+decorate%2C+model+home%2C+consultation%2C+space+planning%2C+colorizing%2C+NWSID%2C++new+construction%2C+remodeling%2C+curtains%2C+swags%2C+valances%2C+drapes%2C+Hunter+Douglas%2C+cornices%2C+samples%2C+upholstery%2C+bedding%2C+pillows%2C+art%2C+framing%2C+Salem+Oregon%2C+Bend+Oregon%2C+Central+Oregon%2C+Pacific+Northwest%2C+Street+of+Dreams%2C+Suzanne+Swarthout%2C+Suzanne+Denning%2C+Suzanne+Swarthout-Denning%2C+home+staging%2C+senior-living+design%2C+office+refurbishing%2Cturn-key+design%2Cdentist+office%2C+Dr.+office%2C+office+design%2C+Green+design%2C+green+products%2C';
var metaContents  = 'Full+service+interior+design++decorating+business.+Salem+Oregon+based+company.+Window+treatments%2C+new+construction+and+remodeling+consultation%2C+home+staging%2C+furnishings%2C+custom+bedding+and+furniture+rearrangement.+Design+and+++procurement+for+residential+and++small+to+medium+sized+commercial+projects.+Senior-living+design+and++decor.+Office+redesign.+Art+selction+and+hanging.';
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();
};
