/* [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','6201',jdecode('Home+Page'),jdecode(''), jdecode('%2F6201.html'), 'true',[],'',''],
	['PAGE','8471',jdecode('Trunks+for+Sale'),jdecode(''), jdecode('%2F8471.html'), 'true',[],'',''],
	['PAGE','107427',jdecode('Trunk+Purchase'),jdecode(''), jdecode('%2F107427.html'), 'true',[],'',''],
	['PAGE','123327',jdecode('Trunk+FAQs+%2F+Myths'),jdecode(''), jdecode('%2F123327.html'), 'true',[],'',''],
	['PAGE','22335',jdecode('Completed+Trunks'),jdecode(''), jdecode('%2F22335.html'), 'true',[],'',''],
	['PAGE','24435',jdecode('Before+%26+After+Trunks'),jdecode(''), jdecode('%2F24435.html'), 'true',[],'',''],
	['PAGE','31063',jdecode('Contact'),jdecode(''), jdecode('%2F31063.html'), 'true',[],'',''],
	['PAGE','25935',jdecode('Shipping'),jdecode(''), jdecode('%2F25935.html'), 'true',[],'',''],
	['PAGE','31463',jdecode('Guestbook'),jdecode(''), jdecode('%2F31463.html'), 'true',[],'',''],
	['PAGE','46715',jdecode('Antique+Trunk+links'),jdecode(''), jdecode('%2F46715.html'), 'true',[],'',''],
	['PAGE','144127',jdecode('1880s+Large+Saratoga+Round+Top+Trunk'),jdecode(''), jdecode('%2F144127.html'), 'false',[],'',''],
	['PAGE','141427',jdecode('1880s+Crystalized+Metal+Toy+Trunk'),jdecode(''), jdecode('%2F141427.html'), 'false',[],'',''],
	['PAGE','119027',jdecode('1860s+4+Band+Jenny+Lind+'),jdecode(''), jdecode('%2F119027.html'), 'false',[],'',''],
	['PAGE','116427',jdecode('1830s+Dome+Top'),jdecode(''), jdecode('%2F116427.html'), 'false',[],'',''],
	['PAGE','115227',jdecode('1870s+Stagecoach+Trunk'),jdecode(''), jdecode('%2F115227.html'), 'false',[],'',''],
	['PAGE','109527',jdecode('Gold+Rush+Trunk'),jdecode(''), jdecode('%2F109527.html'), 'false',[],'',''],
	['PAGE','111327',jdecode('1870+Valise'),jdecode(''), jdecode('%2F111327.html'), 'false',[],'',''],
	['PAGE','113227',jdecode('Jas+Mathieson+Trunk'),jdecode(''), jdecode('%2F113227.html'), 'false',[],'',''],
	['PAGE','120927',jdecode('Rare+Jenny+Lind+Doll%2FChild%26%23x27%3Bs+Trunk'),jdecode(''), jdecode('%2F120927.html'), 'false',[],'',''],
	['PAGE','130427',jdecode('1880s+Flat+Top+Trunk'),jdecode(''), jdecode('%2F130427.html'), 'false',[],'',''],
	['PAGE','133227',jdecode('1870%26%23x27%3Bs+Leather+Hat%2FHalf+Trunk'),jdecode(''), jdecode('%2F133227.html'), 'false',[],'',''],
	['PAGE','135927',jdecode('Rare+Original+Condition+Civil+War+Era+Antique+Valise'),jdecode(''), jdecode('%2F135927.html'), 'false',[],'',''],
	['PAGE','138627',jdecode('Romadka+Trunk'),jdecode(''), jdecode('%2F138627.html'), 'false',[],'',''],
	['PAGE','146827',jdecode('Early+1870s+Saratoga+Trunk'),jdecode(''), jdecode('%2F146827.html'), 'false',[],'',''],
	['PAGE','150827',jdecode('Leather+Saratoga+w%2FGrape+Hardware'),jdecode(''), jdecode('%2F150827.html'), 'false',[],'',''],
	['PAGE','152427',jdecode('Small+Embossed+Metal+Trunk'),jdecode(''), jdecode('%2F152427.html'), 'false',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Antique';
theSitetree.paletteFamily='E58F12';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11064';
theSitetree.graphicsetId='11833';
theSitetree.contentColor='D1C3A6';
theSitetree.contentBGColor='856A3B';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRNU'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antique',
				paletteFamily: 	'E58F12',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11064',
				graphicsetId: 	'11833',
				contentColor: 	'D1C3A6',
				contentBGColor: '856A3B',
				a_color: 		'664F23',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20120124-233650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25935',
internalId:  '',
customField: '20111102-121954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150827',
internalId:  '',
customField: '20120122-130850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8471',
internalId:  '',
customField: '20120123-023753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31063',
internalId:  '',
customField: '20090304-030950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130427',
internalId:  '',
customField: '20110612-130555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31463',
internalId:  '',
customField: '20090304-030519'
};
webappMappings['1002']=webappMappings['1002-31463aendu0inehu3']={
webappId:    '1002',
documentId:  '31463',
internalId:  '31463aendu0inehu3',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144127',
internalId:  '',
customField: '20111122-130036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107427',
internalId:  '',
customField: '20111102-122044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109527',
internalId:  '',
customField: '20111021-165415'
};
webappMappings['7060']=webappMappings['7060-3bddf0e3fb17a54a40299facaed5d3d5']={
webappId:    '7060',
documentId:  '22335',
internalId:  '3bddf0e3fb17a54a40299facaed5d3d5',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22335',
internalId:  '',
customField: '20090226-205821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24435',
internalId:  '',
customField: '20110915-225955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141427',
internalId:  '',
customField: '20111109-112410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133227',
internalId:  '',
customField: '20111021-223653'
};
webappMappings['7008']=webappMappings['7008-13930']={
webappId:    '7008',
documentId:  '31063',
internalId:  '13930',
customField: 'language:en;country:US;'
};
webappMappings['4001']=webappMappings['4001-36544151']={
webappId:    '4001',
documentId:  '107427',
internalId:  '36544151',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146827',
internalId:  '',
customField: '20120120-232234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46715',
internalId:  '',
customField: '20111102-122014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '152427',
internalId:  '',
customField: '20120123-030021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138627',
internalId:  '',
customField: '20111022-021013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111327',
internalId:  '',
customField: '20111021-224112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113227',
internalId:  '',
customField: '20111021-223931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116427',
internalId:  '',
customField: '20111021-224926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115227',
internalId:  '',
customField: '20111021-224815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119027',
internalId:  '',
customField: '20111021-225045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120927',
internalId:  '',
customField: '20111021-223737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123327',
internalId:  '',
customField: '20120128-120415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135927',
internalId:  '',
customField: '20111021-223506'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INEHU3';
var companyName   = 'HMS+Antique+Trunks';
var htmlTitle	  = 'HMS+Antique+Trunks';
var metaKeywords  = 'Antique+trunks%2C+Antique+trunk+sales%2C+parts%2C+Dome%2C+Hump%2C+Back%2C+Barrel%2C+Stave%2C+Flat%2C+top%2C+Steamer%2C+Antique%2C+Vintage%2C+Leather%2C+wood%2C+draw+bolts%2C+cast%2C+oak%2C+hasp%2C+trunk%2C+casters%2C+Topham%2C+wicker%2C+sale%2C+1870s%2C+1880s%2C+trunk%2C+old%2C+Victorian%2C+1600%2C+1800%2C+1900%2C+Taylor%2C+Louis%2C+slats%2C+vintage%2C+antique%2C+Grecian%2C+pattern%2C+hardware%2C+Basket+weave%2C+Basket+weave%2C+history%2C+trunk+styles%2C+case%2C+solid+brass%2C+oak+slat%2C+history%2C+end+caps%2C+cloth%2C+fabric%2C+canvas%2C+leather%2C+slat+clamps%2C+grooved+slats%2C+zinc%2C+copper%2C+gold%2C+black%2C+Brass%2C+Crouch%2C+Fitzgerald%2C+CrouchFitzgerald';
var metaContents  = 'Restored+Antique+Trunks+and+original+Antique+trunk+parts+for+sale.+Repair+and+restoration+of+antique+trunks.+Oak+slat%2C+Flat+top%2C+Hump+back%2C+and+all+other+styles+of+trunks.+Specializing+in+rare%2C+and+hard+to+find+high+end+trunks.+';
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();
};

