/* [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','1201',jdecode('Home'),jdecode(''),'/1201.html','true',[],'',''],
	['PAGE','12743',jdecode('Bedroom'),jdecode(''),'/12743/index.html','true',[ 
		['PAGE','16901',jdecode('Ashley'),jdecode(''),'/12743/16901.html','true',[],'',''],
		['PAGE','92701',jdecode('Bernards'),jdecode(''),'/12743/92701.html','true',[],'',''],
		['PAGE','16943',jdecode('Crown+Mark'),jdecode(''),'/12743/16943.html','true',[],'',''],
		['PAGE','16964',jdecode('Harden'),jdecode(''),'/12743/16964.html','true',[],'',''],
		['PAGE','16985',jdecode('Woodcrest'),jdecode(''),'/12743/16985.html','true',[],'','']
	],'',''],
	['PAGE','12764',jdecode('Dining+Room'),jdecode(''),'/12764/index.html','true',[ 
		['PAGE','17006',jdecode('Ashley'),jdecode(''),'/12764/17006.html','true',[],'',''],
		['PAGE','103001',jdecode('Bernards'),jdecode(''),'/12764/103001.html','true',[],'',''],
		['PAGE','144323',jdecode('Cramco'),jdecode(''),'/12764/144323.html','true',[],'',''],
		['PAGE','17048',jdecode('Crown+Mark'),jdecode(''),'/12764/17048.html','true',[],'','']
	],'',''],
	['PAGE','12785',jdecode('Living+Room'),jdecode(''),'/12785/index.html','true',[ 
		['PAGE','17069',jdecode('American'),jdecode(''),'/12785/17069.html','true',[],'',''],
		['PAGE','17111',jdecode('Ashley'),jdecode(''),'/12785/17111.html','true',[],'',''],
		['PAGE','17153',jdecode('Catnapper'),jdecode(''),'/12785/17153.html','true',[],'',''],
		['PAGE','17237',jdecode('Golden'),jdecode(''),'/12785/17237.html','true',[],'',''],
		['PAGE','17279',jdecode('Hughes'),jdecode(''),'/12785/17279.html','true',[],'',''],
		['PAGE','17342',jdecode('Townhouse'),jdecode(''),'/12785/17342.html','true',[],'',''],
		['PAGE','156834',jdecode('Woodcrest'),jdecode(''),'/12785/156834.html','true',[],'','']
	],'',''],
	['PAGE','12806',jdecode('Occasional'),jdecode(''),'/12806/index.html','true',[ 
		['PAGE','82901',jdecode('American+Mirror'),jdecode(''),'/12806/82901.html','true',[],'',''],
		['PAGE','68901',jdecode('Ashley+Desks'),jdecode(''),'/12806/68901.html','true',[],'',''],
		['PAGE','65801',jdecode('Ashley+End+Tables'),jdecode(''),'/12806/65801.html','true',[],'',''],
		['PAGE','82922',jdecode('Bernards'),jdecode(''),'/12806/82922.html','true',[],'',''],
		['PAGE','17426',jdecode('Crown+Mark'),jdecode(''),'/12806/17426.html','true',[],'',''],
		['PAGE','17489',jdecode('Harden'),jdecode(''),'/12806/17489.html','true',[],'','']
	],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='003399';
theSitetree.keyvisualId='1267';
theSitetree.keyvisualName='alte_moebel.jpg';
theSitetree.fontsetId='191';
theSitetree.graphicsetId='228';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Profile',
				paletteFamily: 	'003399',
				keyvisualId: 	'1267',
				keyvisualName: 	'alte_moebel.jpg',
				fontsetId: 		'191',
				graphicsetId: 	'228',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'003399',
				b_color: 		'000066',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1201',
internalId:  '',
customField: '20100715-113051'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12743',
internalId:  '',
customField: '20070711-114851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16985',
internalId:  '',
customField: '20100715-105046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16901',
internalId:  '',
customField: '20100715-105306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92701',
internalId:  '',
customField: '20090909-095029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16943',
internalId:  '',
customField: '20070731-122706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16964',
internalId:  '',
customField: '20100603-093131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12764',
internalId:  '',
customField: '20090608-102933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17006',
internalId:  '',
customField: '20100715-105647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103001',
internalId:  '',
customField: '20100715-110826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17048',
internalId:  '',
customField: '20100715-111008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12785',
internalId:  '',
customField: '20091104-091229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17069',
internalId:  '',
customField: '20100715-111250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17111',
internalId:  '',
customField: '20100715-112413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17153',
internalId:  '',
customField: '20100528-124231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144323',
internalId:  '',
customField: '20100603-093221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17237',
internalId:  '',
customField: '20100216-084438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17279',
internalId:  '',
customField: '20100715-113028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156834',
internalId:  '',
customField: '20100429-124338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17342',
internalId:  '',
customField: '20100603-093844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12806',
internalId:  '',
customField: '20090608-103330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82901',
internalId:  '',
customField: '20100304-105741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65801',
internalId:  '',
customField: '20100715-121158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68901',
internalId:  '',
customField: '20100715-114115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82922',
internalId:  '',
customField: '20100715-123903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17426',
internalId:  '',
customField: '20100521-081902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17489',
internalId:  '',
customField: '20100119-101512'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INVFYD';
var companyName   = 'FURNITURE+DISTRIBUTORS%2C+INC.';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};
