/* [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(''), jdecode('%2F1201.html'), 'true',[],'',''],
	['PAGE','12743',jdecode('Bedroom'),jdecode(''), jdecode('%2F12743%2Findex.html'), 'true',[ 
		['PAGE','16901',jdecode('Ashley'),jdecode(''), jdecode('%2F12743%2F16901.html'), 'true',[],'',''],
		['PAGE','16943',jdecode('Crown+Mark'),jdecode(''), jdecode('%2F12743%2F16943.html'), 'true',[],'',''],
		['PAGE','16964',jdecode('Harden'),jdecode(''), jdecode('%2F12743%2F16964.html'), 'true',[],'',''],
		['PAGE','211456',jdecode('Kith'),jdecode(''), jdecode('%2F12743%2F211456.html'), 'true',[],'',''],
		['PAGE','208556',jdecode('Woodcrest'),jdecode(''), jdecode('%2F12743%2F208556.html'), 'true',[],'',''],
		['PAGE','180934',jdecode('World+Imports'),jdecode(''), jdecode('%2F12743%2F180934.html'), 'true',[],'','']
	],'',''],
	['PAGE','12764',jdecode('Dining+Room'),jdecode(''), jdecode('%2F12764%2Findex.html'), 'true',[ 
		['PAGE','17006',jdecode('Ashley'),jdecode(''), jdecode('%2F12764%2F17006.html'), 'true',[],'',''],
		['PAGE','144323',jdecode('Cramco'),jdecode(''), jdecode('%2F12764%2F144323.html'), 'true',[],'',''],
		['PAGE','17048',jdecode('Crown+Mark'),jdecode(''), jdecode('%2F12764%2F17048.html'), 'true',[],'',''],
		['PAGE','180955',jdecode('World+Imports'),jdecode(''), jdecode('%2F12764%2F180955.html'), 'true',[],'','']
	],'',''],
	['PAGE','12785',jdecode('Living+Room'),jdecode(''), jdecode('%2F12785%2Findex.html'), 'true',[ 
		['PAGE','17111',jdecode('Ashley'),jdecode(''), jdecode('%2F12785%2F17111.html'), 'true',[],'',''],
		['PAGE','199556',jdecode('Catnapper'),jdecode(''), jdecode('%2F12785%2F199556.html'), 'true',[],'',''],
		['PAGE','171934',jdecode('Crown+Mark'),jdecode(''), jdecode('%2F12785%2F171934.html'), 'true',[],'',''],
		['PAGE','199256',jdecode('Delta'),jdecode(''), jdecode('%2F12785%2F199256.html'), 'true',[],'',''],
		['PAGE','17237',jdecode('Golden'),jdecode(''), jdecode('%2F12785%2F17237.html'), 'true',[],'',''],
		['PAGE','17279',jdecode('Hughes+*Serta*'),jdecode(''), jdecode('%2F12785%2F17279.html'), 'true',[],'',''],
		['PAGE','167934',jdecode('Kidz+World'),jdecode(''), jdecode('%2F12785%2F167934.html'), 'true',[],'',''],
		['PAGE','17342',jdecode('Townhouse'),jdecode(''), jdecode('%2F12785%2F17342.html'), 'true',[],'',''],
		['PAGE','216256',jdecode('Washington+NEW'),jdecode(''), jdecode('%2F12785%2F216256.html'), 'true',[],'','']
	],'',''],
	['PAGE','12806',jdecode('Occasional'),jdecode(''), jdecode('%2F12806%2Findex.html'), 'true',[ 
		['PAGE','68901',jdecode('Ashley+Desks'),jdecode(''), jdecode('%2F12806%2F68901.html'), 'true',[],'',''],
		['PAGE','65801',jdecode('Ashley+End+Tables'),jdecode(''), jdecode('%2F12806%2F65801.html'), 'true',[],'',''],
		['PAGE','170934',jdecode('Ashely+Entertainment'),jdecode(''), jdecode('%2F12806%2F170934.html'), 'true',[],'',''],
		['PAGE','17426',jdecode('Crown+Mark'),jdecode(''), jdecode('%2F12806%2F17426.html'), 'true',[],'',''],
		['PAGE','17489',jdecode('Harden'),jdecode(''), jdecode('%2F12806%2F17489.html'), 'true',[],'',''],
		['PAGE','180976',jdecode('World+Imports'),jdecode(''), jdecode('%2F12806%2F180976.html'), 'true',[],'','']
	],'',''],
	['PAGE','213756',jdecode('**+NEW+**'),jdecode(''), jdecode('%2F213756.html'), 'true',[],'','']];
var siteelementCount=31;
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 prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
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: '20120102-133627'
};
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:  '211456',
internalId:  '',
customField: '20111103-141301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16901',
internalId:  '',
customField: '20111227-110912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16943',
internalId:  '',
customField: '20110419-105757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16964',
internalId:  '',
customField: '20111117-110646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '216256',
internalId:  '',
customField: '20111227-144733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12764',
internalId:  '',
customField: '20090608-102933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17006',
internalId:  '',
customField: '20111227-112514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17048',
internalId:  '',
customField: '20111227-112635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12785',
internalId:  '',
customField: '20091104-091229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17111',
internalId:  '',
customField: '20111227-115525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144323',
internalId:  '',
customField: '20111117-110936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17237',
internalId:  '',
customField: '20100216-084438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17279',
internalId:  '',
customField: '20111227-143006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '208556',
internalId:  '',
customField: '20111227-111641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17342',
internalId:  '',
customField: '20111227-143412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12806',
internalId:  '',
customField: '20090608-103330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '213756',
internalId:  '',
customField: '20120102-133604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65801',
internalId:  '',
customField: '20120102-122750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68901',
internalId:  '',
customField: '20120102-121913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17426',
internalId:  '',
customField: '20120102-122904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17489',
internalId:  '',
customField: '20120102-124732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167934',
internalId:  '',
customField: '20111117-113655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170934',
internalId:  '',
customField: '20120102-121954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171934',
internalId:  '',
customField: '20111227-120040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '180934',
internalId:  '',
customField: '20111227-111726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '180955',
internalId:  '',
customField: '20111227-113331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '180976',
internalId:  '',
customField: '20120102-125218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '199556',
internalId:  '',
customField: '20111227-115756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '199256',
internalId:  '',
customField: '20111006-120119'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
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();
};

