/* [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','14',jdecode('Home'),jdecode(''),'/14.html','true',[],'',''],
	['PAGE','35',jdecode('Services'),jdecode(''),'/35/index.html','true',[ 
		['PAGE','44',jdecode('Interior+Redesign'),jdecode(''),'/35/44.html','true',[],'',''],
		['PAGE','53',jdecode('Design+Consultation'),jdecode(''),'/35/53.html','true',[],'',''],
		['PAGE','62',jdecode('Home+Staging'),jdecode(''),'/35/62.html','true',[],'','']
	],'',''],
	['PAGE','89',jdecode('About+Us'),jdecode(''),'/89.html','true',[],'',''],
	['PAGE','13801',jdecode('Training+%26+Workshops'),jdecode(''),'/13801.html','true',[],'',''],
	['PAGE','15901',jdecode('Join+the+Network'),jdecode(''),'/15901.html','true',[],'',''],
	['PAGE','17101',jdecode('Locate+an+Interior+Stylist'),jdecode(''),'/17101.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Inspiration';
theSitetree.paletteFamily='819B9B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='105';
theSitetree.graphicsetId='126';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='819B9B';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Inspiration',
				paletteFamily: 	'819B9B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'105',
				graphicsetId: 	'126',
				contentColor: 	'FFFFFF',
				contentBGColor: '819B9B',
				a_color: 		'819B9B',
				b_color: 		'C8C899',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89',
internalId:  '',
customField: '20100112-134529'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '14',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14',
internalId:  '',
customField: '20100215-193954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20100215-182110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35',
internalId:  '',
customField: '20100215-183058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44',
internalId:  '',
customField: '20100215-183549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20091014-090623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62',
internalId:  '',
customField: '20091014-091024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20100215-182310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20100215-184413'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN24RJ';
var companyName   = 'Interior+Stylist+-+Redesign+%26+Home+Staging';
var htmlTitle	  = '';
var metaKeywords  = 'interior+stylist%2C+interior+redesign+training%2C+certified+home+staging+chicago%2C+home+staging+training%2C+house+staging%2C+real+estate+staging+chicago%2C+interior+styling%2C+interior+redesign%2C+interior+arrangement%2C+home+staging%2C+real+estate+staging%2C+interior+decorating+Chicago%2C+interior+decorating+IL%2C+interior+design+il%2C+interior+design+chicago%2C+model+home+enhancement%2C+interior+design+chicago%2C+interior+design+IL%2C+interior+redesign+IL%2C+interior+redesign+Chicago%2C+house+staging+Chicago%2C+home+staging+chicago%2C+model+merchandising%2C+model+decorating%2C+Julea+Joseph%2C+Illinois%2C+Indiana%2C+London%2C+Naperville%2C+Shereville%2C+Crete%2C+Palos+Park%2C+Glen+Ellyn%2C+New+Lenox%2C+Frankfort%2C+Palos+Heights%2C+Orland+Park%2C+Burr+Ridge%2C+Oak+Brook%2C+Hinsdale%2C+Lockport%2C+Orland+Park%2C+Barrington%2C+ABC7+Chicago%2C+';
var metaContents  = 'Interior+Stylist+-+Certified+Interior+Redesign%2C+Home+Staging%2C+and+Decorating+Professionals.+';
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();
};
