/* [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('About+the+Store'),jdecode(''),'/452.html','true',[],''],
	['PAGE','473',jdecode('Interior+Design'),jdecode(''),'/473/index.html','true',[ 
		['PAGE','18573',jdecode('Design+Services'),jdecode(''),'/473/18573.html','true',[],''],
		['PAGE','18582',jdecode('Portfolio'),jdecode(''),'/473/18582.html','true',[],'']
	],''],
	['PAGE','515',jdecode('About+Sandra+John'),jdecode(''),'/515.html','true',[],''],
	['PAGE','5464',jdecode('Shop+Sandra+John'),jdecode(''),'/5464.html','true',[],''],
	['PAGE','18124',jdecode('Furniture'),jdecode(''),'/18124/index.html','true',[ 
		['PAGE','22212',jdecode('Century+Upholstery+Program'),jdecode(''),'/18124/22212.html','true',[],'']
	],''],
	['PAGE','18133',jdecode('Window+Treatments'),jdecode(''),'/18133.html','true',[],''],
	['PAGE','18142',jdecode('Fabrics+%26+Wallpaper'),jdecode(''),'/18142.html','true',[],''],
	['PAGE','18151',jdecode('Bedding'),jdecode(''),'/18151.html','true',[],''],
	['PAGE','18160',jdecode('Kitchens+%26+Baths'),jdecode(''),'/18160.html','true',[],''],
	['PAGE','13601',jdecode('Contact+Us+and+Directions'),jdecode(''),'/13601.html','true',[],'']];
var siteelementCount=14;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='479949';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10895';
theSitetree.contentColor='00A000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'479949',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10895',
				contentColor: 	'00A000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'479949',
				e_color: 		'479949',
				f_color: 		'479949',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '13601',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100130-135305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20080507-172909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20090612-140529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20090601-171158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18151',
internalId:  '',
customField: '20100119-172336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18582',
internalId:  '',
customField: '20090620-111006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18573',
internalId:  '',
customField: '20090611-173114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18142',
internalId:  '',
customField: '20090615-160814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18124',
internalId:  '',
customField: '20091228-144516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18133',
internalId:  '',
customField: '20090620-112515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18160',
internalId:  '',
customField: '20090609-163753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22212',
internalId:  '',
customField: '20100129-144746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5464',
internalId:  '',
customField: '20090611-165015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20100103-112244'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INEKJN';
var companyName   = 'S+A+N+D+R+A+++J+O+H+N';
var htmlTitle	  = 'Sandra+John+Interior+Design';
var metaKeywords  = 'Furniture%2C+Beds%2C+Dining+Chairs%2C+Dining+Tables%2C+Tables%2C+Sofa%2C+Chairs%2C+Childrens%2C+Silhouettes%2C+Shutters%2C+Woven+Woods%2C+Wood+Blinds%2C+Kitchen+Cabinets%2C+Countertops%2C+Drexel+Heritage%2C+Hickory+Chair%2C+Henredon%2C+Kindel%2C+Century%2C+Stanley%2C+Sherrill%2C+Theodore+Alexander%2C+Lexington%2C+Custom+Furniture%2C+Kravet%2C+Lee+Jofa%2C+Cowtan+and+Tout%2C+Schumacher%2C+Thibaut%2C+Strohiem+and+Roman%2C+Duralee%2C+Ralph+Lauren%2C+Folia%2C+Greef%2C+Nina+Campbell%2C+Anna+French%2C+Visual+Comfort%2C+Currey+and+Company%2C+Vaughan%2C+Hunter+Douglas%2C+Lane+Venture%2C+Graber%2C+';
var metaContents  = 'Interior+Design%2C+Home+Furnishings%2C+Window+Treaments%2C+Wallpaper%2C+Lamps%2C+Lighting%2C+Dining+Rooms%2C+Home+Office%2C+Bedrooms%2C+Childrens+Bedrooms%2C+Custom+Kitchens%2C+Bedding%2C+Outdoor+Furniture';
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();
};
