/* [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','11',jdecode('Home'),jdecode(''),'/11.html','true',[],''],
	['PAGE','32',jdecode('Custom+Products'),jdecode(''),'/32/index.html','true',[ 
		['PAGE','41',jdecode('Bedding+%26+Pillows'),jdecode(''),'/32/41.html','true',[],''],
		['PAGE','9501',jdecode('Custom+Window+Displays'),jdecode(''),'/32/9501.html','true',[],'']
	],''],
	['PAGE','1205',jdecode('Home+Decor'),jdecode(''),'/1205/index.html','true',[ 
		['PAGE','12801',jdecode('Accessories'),jdecode(''),'/1205/12801.html','true',[],''],
		['PAGE','11301',jdecode('Artwork'),jdecode(''),'/1205/11301.html','true',[],''],
		['PAGE','11322',jdecode('Lamps'),jdecode(''),'/1205/11322.html','true',[],'']
	],''],
	['PAGE','59',jdecode('Fabrics'),jdecode(''),'/59.html','true',[],''],
	['PAGE','32201',jdecode('Trims'),jdecode(''),'/32201/index.html','true',[ 
		['PAGE','32701',jdecode('Beaded+Trim'),jdecode(''),'/32201/32701.html','true',[],''],
		['PAGE','32722',jdecode('Braid+%26+Cord'),jdecode(''),'/32201/32722.html','true',[],''],
		['PAGE','32743',jdecode('Brush+%26+Loop+Fringe'),jdecode(''),'/32201/32743.html','true',[],''],
		['PAGE','32764',jdecode('Tassels+%26++Tassel+Trim'),jdecode(''),'/32201/32764.html','true',[],'']
	],''],
	['PAGE','50',jdecode('In-Store+Furniture'),jdecode(''),'/50/index.html','true',[ 
		['PAGE','5301',jdecode('Side+Tables'),jdecode(''),'/50/5301.html','true',[],''],
		['PAGE','5322',jdecode('Desks+%26+Side+Chairs'),jdecode(''),'/50/5322.html','true',[],''],
		['PAGE','5343',jdecode('Chests+%26+Hutchs'),jdecode(''),'/50/5343.html','true',[],''],
		['PAGE','5364',jdecode('Mirrors+and+Bookcases'),jdecode(''),'/50/5364.html','true',[],'']
	],''],
	['PAGE','68',jdecode('About+us'),jdecode(''),'/68/index.html','true',[ 
		['PAGE','77',jdecode('Contact+Us'),jdecode(''),'/68/77.html','true',[],'']
	],''],
	['PAGE','1371',jdecode('Guestbook'),jdecode(''),'/1371/index.html','true',[ 
		['PAGE','1370',jdecode('Read+Guestbook'),jdecode(''),'/1371/1370.html','false',[],'']
	],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='8CBBD8';
theSitetree.keyvisualId='1712';
theSitetree.keyvisualName='museum.jpg';
theSitetree.fontsetId='305';
theSitetree.graphicsetId='348';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='8CBBD8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Architekt',
				paletteFamily: 	'8CBBD8',
				keyvisualId: 	'1712',
				keyvisualName: 	'museum.jpg',
				fontsetId: 		'305',
				graphicsetId: 	'348',
				contentColor: 	'000000',
				contentBGColor: '8CBBD8',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'8CBBD8',
				b_color: 		'338299',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20070207-171025'
};
webappMappings['1002']=webappMappings['1002-1371AVEC10IN24U3']={
webappId:    '1002',
documentId:  '1371',
internalId:  '1371AVEC10IN24U3',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20080430-151259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50',
internalId:  '',
customField: '20080314-131117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20070207-115036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1205',
internalId:  '',
customField: '20070207-172606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20080312-154419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20080430-154041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11322',
internalId:  '',
customField: '20070305-165139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59',
internalId:  '',
customField: '20080430-155920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32201',
internalId:  '',
customField: '20070306-161624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32701',
internalId:  '',
customField: '20070308-140344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32722',
internalId:  '',
customField: '20070308-140439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32743',
internalId:  '',
customField: '20070308-140225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32764',
internalId:  '',
customField: '20070308-140311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20070201-170044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5322',
internalId:  '',
customField: '20070201-173610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5343',
internalId:  '',
customField: '20070201-175613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5364',
internalId:  '',
customField: '20080312-140258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68',
internalId:  '',
customField: '20070215-121659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77',
internalId:  '',
customField: '20060407-164025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1371',
internalId:  '',
customField: '20060816-160135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41',
internalId:  '',
customField: '20070207-173842'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN24U3';
var companyName   = 'Check+It+Out+Home+Designs';
var htmlTitle	  = 'Check+It+Out+Fabrics';
var metaKeywords  = 'Fabrics%2C+Wallpaper%2C+Window+Treatments%2C+Custom+Curtains%2C+Furniture%2C+Waxahachie%2C+Texas%2C+Ralph+Lauren%2C+Waverly%2C+Osborne++Little%2C+Seabrook%2C+Thibault';
var metaContents  = 'Fabrics%2C+Wallpaper%2C+Window+Treatments%2C+Custom+Curtains%2C+Furniture%2C+Waxahachie%2C+Texas%2C+Ralph+Lauren%2C+Waverly%2C+Osborne++Little%2C+Seabrook%2C+Thibault';
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();
};

