/* [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','32',jdecode('HOME'),jdecode(''),'/32.html','true',[],'',''],
	['PAGE','53',jdecode('ESTATE+SALE+SERVICE'),jdecode(''),'/53.html','true',[],'',''],
	['PAGE','62',jdecode('AUCTION+SERVICE'),jdecode(''),'/62.html','true',[],'',''],
	['PAGE','71',jdecode('ANTIQUE+SHOP+LOCALE'),jdecode(''),'/71.html','true',[],'',''],
	['PAGE','80',jdecode('UPCOMING+SALES'),jdecode(''),'/80.html','true',[],'',''],
	['PAGE','639',jdecode('BLOG+SITE'),jdecode(''),'/639.html','true',[],'',''],
	['PAGE','19634',jdecode('ANTIQUE+IDENTIFICATION'),jdecode(''),'/19634.html','true',[],'',''],
	['PAGE','730',jdecode('ABOUT+US'),jdecode(''),'/730.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Bombay';
theSitetree.paletteFamily='8B0B22';
theSitetree.keyvisualId='7520';
theSitetree.keyvisualName='kv_7520.jpg';
theSitetree.fontsetId='16583';
theSitetree.graphicsetId='12199';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='AEC6B8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Bombay',
				paletteFamily: 	'8B0B22',
				keyvisualId: 	'7520',
				keyvisualName: 	'kv_7520.jpg',
				fontsetId: 		'16583',
				graphicsetId: 	'12199',
				contentColor: 	'000000',
				contentBGColor: 'AEC6B8',
				a_color: 		'8B0B22',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20100720-094608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71',
internalId:  '',
customField: '20090914-220917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62',
internalId:  '',
customField: '20100720-090844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20100720-094013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80',
internalId:  '',
customField: '20100720-090641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '639',
internalId:  '',
customField: '20090914-221200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '730',
internalId:  '',
customField: '20100720-092229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19634',
internalId:  '',
customField: '20091112-183021'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN31XW';
var companyName   = 'CT%27S+TREASURE+HAVEN';
var htmlTitle	  = '';
var metaKeywords  = 'Michigan%2C+Detroit%2C+Antique%2C+Antiques%2C+Collectible%2C+Collectibles%2C+Estate%2C+Estates%2C+Sale%2C+Sales%2C+Auction%2C+Auctions%2C+Liquidation%2C+Liquidations%2C+Allen+Park%2C+Ann+Arbor%2C+Auburn+Hills%2C+Belleville%2C+Berkley%2C+Beverly+Hills%2C+Bingham+Farms%2C+Birmingham%2C+Bloomfield+Hills%2C+Brighton%2C+Canton%2C+Carleton%2C+Center+Line%2C+Chesterfield+Township%2C+Clawson%2C+Commerce+Township%2C+Dearborn%2C+Dearborn+Heights%2C+Detroit%2C+Dundee%2C+Eastpointe%2C+Ecorse%2C+Farmington%2C+Farmington+Hills%2C+Fenton%2C+Ferndale%2C+Flat+Rock%2C+Fowlerville%2C+Fraser%2C+Garden+City%2C+Grosse+Ille%2C+Grosse+Pointe+%28Farms%2C+Park%2C+Shores+and+Woods%29%2C+Hamburg%2C+Hamtramck%2C+Harper+Woods%2C+Hartland%2C+Hazel+Park%2C+Highland+Park%2C+Huntington+Woods%2C+Inkster%2C+Keego+Harbor%2C+Lathrup+Village%2C+Lincoln+Park%2C+Livonia%2C+Madison+Heights%2C+Maybee%2C+Melvindale%2C+Milford%2C+Monroe%2C+New+Boston%2C+New+Hudson%2C+Northville%2C+Novi%2C+Oak+Park%2C+Orchard+Lake%2C+Pinckney%2C+Pleasant+Ridge%2C+Plymouth%2C+Pontiac%2C+Redford+Township%2C+River+Rouge%2C+Riverview%2C+Rochester%2C+Rochester+Hills%2C+Romulus%2C+Roseville%2C+Royal+Oak%2C+St.+Clair+Shores%2C+Salem+Township%2C+South+Lyon%2C+Southfield%2C+Southgate%2C+Sterling+Heights%2C+Sylvan+Lake%2C+Taylor%2C+Trenton%2C+Troy%2C+Walled+Lake%2C+Warren%2C+Waterford%2C+Wayne%2C+West+Bloomfield%2C+Westland%2C+Whitmore+Lake%2C+Willis%2C+Wixom%2C+Wolverine+Lake%2C+Woodhaven%2C+Wyandotte%2C+Ypsilanti';
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();
};
