/* [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','66142',jdecode('SALE+books+'),jdecode(''),'/66142/index.html','true',[ 
		['PAGE','65963',jdecode('Art+Resources'),jdecode(''),'/66142/65963.html','true',[],'',''],
		['PAGE','66642',jdecode('Antique+Resources'),jdecode(''),'/66142/66642.html','true',[],'',''],
		['PAGE','68942',jdecode('Auction+Catalogs'),jdecode(''),'/66142/68942.html','true',[],'',''],
		['PAGE','65942',jdecode('Asian'),jdecode(''),'/66142/65942.html','true',[],'',''],
		['PAGE','67542',jdecode('Ceramics%2FGlass'),jdecode(''),'/66142/67542.html','true',[],'',''],
		['PAGE','65742',jdecode('1st+-+Fine+-+Old'),jdecode(''),'/66142/65742.html','true',[],'','']
	],'',''],
	['PAGE','7264',jdecode('Paintings+%2F+Drawings'),jdecode(''),'/7264/index.html','true',[ 
		['PAGE','11443',jdecode('Abstract+%2F+Surrealist'),jdecode(''),'/7264/11443.html','true',[],'',''],
		['PAGE','28212',jdecode('Asian'),jdecode(''),'/7264/28212.html','true',[],'',''],
		['PAGE','11401',jdecode('City+scenes'),jdecode(''),'/7264/11401.html','true',[],'',''],
		['PAGE','11422',jdecode('Figural'),jdecode(''),'/7264/11422.html','true',[],'',''],
		['PAGE','7285',jdecode('Land+%2F+Seascapes'),jdecode(''),'/7264/7285.html','true',[],'',''],
		['PAGE','11464',jdecode('Still+Lifes'),jdecode(''),'/7264/11464.html','true',[],'',''],
		['PAGE','45672',jdecode('Michael+Knigin'),jdecode(''),'/7264/45672.html','true',[],'',''],
		['PAGE','37923',jdecode('Sidney+Gross'),jdecode(''),'/7264/37923.html','true',[],'',''],
		['PAGE','74942',jdecode('Helen+West+Heller'),jdecode(''),'/7264/74942.html','true',[],'','']
	],'',''],
	['PAGE','28823',jdecode('Sculpture'),jdecode(''),'/28823.html','true',[],'',''],
	['PAGE','7222',jdecode('Prints+%2F+Multiples'),jdecode(''),'/7222.html','true',[],'',''],
	['PAGE','7201',jdecode('Glass+%2F+Ceramics'),jdecode(''),'/7201/index.html','true',[ 
		['PAGE','6701',jdecode('American+Studio+Ceramics'),jdecode(''),'/7201/6701.html','true',[],'',''],
		['PAGE','7243',jdecode('Asian+Ceramics'),jdecode(''),'/7201/7243.html','true',[],'',''],
		['PAGE','45651',jdecode('Birchbark+Pottery'),jdecode(''),'/7201/45651.html','true',[],'',''],
		['PAGE','9001',jdecode('European+Ceramics'),jdecode(''),'/7201/9001.html','true',[],'','']
	],'',''],
	['PAGE','47609',jdecode('Furniture'),jdecode(''),'/47609/index.html','true',[ 
		['PAGE','42309',jdecode('Atwood+Furniture'),jdecode(''),'/47609/42309.html','true',[],'','']
	],'',''],
	['PAGE','47651',jdecode('general+antiques'),jdecode(''),'/47651.html','true',[],'',''],
	['PAGE','30823',jdecode('Beauties%2C+but+hurt'),jdecode(''),'/30823.html','true',[],'',''],
	['PAGE','5201',jdecode('Home'),jdecode(''),'/5201.html','true',[],'',''],
	['PAGE','13401',jdecode('Contact+us'),jdecode(''),'/13401.html','true',[],'',''],
	['PAGE','32423',jdecode('Guests+%2F+open+forum'),jdecode(''),'/32423.html','true',[],'',''],
	['PAGE','34823',jdecode('Links+worth+checking'),jdecode(''),'/34823.html','true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20100613-084941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6701',
internalId:  '',
customField: '20100226-103604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7201',
internalId:  '',
customField: '20091217-121658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7222',
internalId:  '',
customField: '20100613-091751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7243',
internalId:  '',
customField: '20090114-112015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7264',
internalId:  '',
customField: '20091228-111708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7285',
internalId:  '',
customField: '20100613-124610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20091217-121321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20090114-111743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11422',
internalId:  '',
customField: '20100414-103105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11443',
internalId:  '',
customField: '20100613-092704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11464',
internalId:  '',
customField: '20090114-111828'
};
webappMappings['7008']=webappMappings['7008-1272']={
webappId:    '7008',
documentId:  '13401',
internalId:  '1272',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20090222-142205'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5201',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-3435508']={
webappId:    '1501',
documentId:  '5201',
internalId:  '3435508',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28212',
internalId:  '',
customField: '20090208-130855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28823',
internalId:  '',
customField: '20091228-131009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30823',
internalId:  '',
customField: '20090720-164838'
};
webappMappings['1002']=webappMappings['1002-32423ahw050invvbl']={
webappId:    '1002',
documentId:  '32423',
internalId:  '32423ahw050invvbl',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32423',
internalId:  '',
customField: '20090222-170047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34823',
internalId:  '',
customField: '20100307-201924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42309',
internalId:  '',
customField: '20090809-083640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37923',
internalId:  '',
customField: '20090809-162518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66142',
internalId:  '',
customField: '20091228-110722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45651',
internalId:  '',
customField: '20090925-091300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45672',
internalId:  '',
customField: '20090916-075822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65742',
internalId:  '',
customField: '20091228-100901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65942',
internalId:  '',
customField: '20100225-144036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47609',
internalId:  '',
customField: '20090916-125659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47651',
internalId:  '',
customField: '20100624-165413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65963',
internalId:  '',
customField: '20091228-200635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66642',
internalId:  '',
customField: '20100308-094155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67542',
internalId:  '',
customField: '20100308-155305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68942',
internalId:  '',
customField: '20100225-150301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74942',
internalId:  '',
customField: '20100307-202524'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INVVBL';
var companyName   = 'Leonard+Davenport+Fine+Arts';
var htmlTitle	  = 'Leonard+Davenport+Fine+Arts+%26+LSDArt.com';
var metaKeywords  = 'Graphics+lithograph+etching+serigraph+modern+Japanese+art+antiques+rare+books+glass+ceramics+sculpture+acrylic+oil+watercolor+bronze+furniture+painting+';
var metaContents  = 'An+eclectic+bargain-priced+compantion+site+to+LSDArt.com%2C+featuring+Fine+Arts%2C+Antiques%2C+and+Books';
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();
};
