/* [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','11',jdecode('Home'),jdecode(''),'/11/index.html','true',[ 
		['PAGE','2879',jdecode('Artist+Introduction'),jdecode(''),'/11/2879.html','true',[],'','']
	],'',''],
	['PAGE','18601',jdecode('Recent+News+'),jdecode(''),'/18601.html','true',[],'',''],
	['PAGE','4220',jdecode('Available+for+Purchase'),jdecode(''),'/4220/index.html','true',[ 
		['PAGE','44112',jdecode('Limited+Editions'),jdecode(''),'/4220/44112.html','true',[],'','']
	],'',''],
	['PAGE','4312',jdecode('Private+Collections'),jdecode(''),'/4312.html','true',[],'',''],
	['PAGE','41',jdecode('View+Books'),jdecode(''),'/41/index.html','true',[ 
		['PAGE','1137',jdecode('Riflessioni+Italiane'),jdecode(''),'/41/1137.html','true',[],'',''],
		['PAGE','2363',jdecode('Land+of+Dreams'),jdecode(''),'/41/2363.html','true',[],'','']
	],'',''],
	['PAGE','77',jdecode('The+Critics+Speak'),jdecode(''),'/77/index.html','true',[ 
		['PAGE','3093',jdecode('Sister+Wendy+Critique'),jdecode(''),'/77/3093.html','true',[],'','']
	],'',''],
	['PAGE','86',jdecode('Exhibitions'),jdecode(''),'/86.html','true',[],'',''],
	['PAGE','2533',jdecode('Gallery+Links'),jdecode(''),'/2533.html','true',[],'',''],
	['PAGE','2413',jdecode('PodCasts%2FVideos'),jdecode(''),'/2413/index.html','true',[ 
		['PAGE','48612',jdecode('Vid+1%3A+Meets+William'),jdecode(''),'/2413/48612.html','true',[],'',''],
		['PAGE','48633',jdecode('Vid+2%3A+Picks+Favorite'),jdecode(''),'/2413/48633.html','true',[],'',''],
		['PAGE','48654',jdecode('Vid+3%3A+Background'),jdecode(''),'/2413/48654.html','true',[],'',''],
		['PAGE','48675',jdecode('Vid+4%3A+Patron+Saint'),jdecode(''),'/2413/48675.html','true',[],'','']
	],'',''],
	['PAGE','2422',jdecode('Artist%26%23x27%3Bs+Blog'),jdecode(''),'/2422.html','true',[],'',''],
	['PAGE','3102',jdecode('Press+Release'),jdecode(''),'/3102.html','true',[],'',''],
	['PAGE','13201',jdecode('Pre-Release+Photos'),jdecode(''),'/13201.html','true',[],'',''],
	['PAGE','26301',jdecode('Contact'),jdecode(''),'/26301.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Evident';
theSitetree.paletteFamily='4C7D51';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10631';
theSitetree.graphicsetId='10775';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='F9F9D6';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Evident',
				paletteFamily: 	'4C7D51',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10631',
				graphicsetId: 	'10775',
				contentColor: 	'666666',
				contentBGColor: 'F9F9D6',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'4C7C50',
				e_color: 		'1F4D23',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20100511-145546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20100525-155419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2879',
internalId:  '',
customField: '20060829-102041'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-e9d002665f566b1c919f6e73c56e91cc']={
webappId:    '7060',
documentId:  '1137',
internalId:  'e9d002665f566b1c919f6e73c56e91cc',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-4d0437046167bd16fe015af41771c856']={
webappId:    '7060',
documentId:  '2363',
internalId:  '4d0437046167bd16fe015af41771c856',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20100901-143849'
};
webappMappings['7060']=webappMappings['7060-aaf7a01c31e23c11dcd593a22036ba2a']={
webappId:    '7060',
documentId:  '4220',
internalId:  'aaf7a01c31e23c11dcd593a22036ba2a',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-2273192']={
webappId:    '1501',
documentId:  '11',
internalId:  '2273192',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4220',
internalId:  '',
customField: '20090213-120213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44112',
internalId:  '',
customField: '20081125-173111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4312',
internalId:  '',
customField: '20100525-154101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41',
internalId:  '',
customField: '20060718-113259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1137',
internalId:  '',
customField: '20090213-120155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2363',
internalId:  '',
customField: '20090213-115936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77',
internalId:  '',
customField: '20100304-132313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3093',
internalId:  '',
customField: '20060808-092248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86',
internalId:  '',
customField: '20090430-113556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2533',
internalId:  '',
customField: '20081125-171445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2413',
internalId:  '',
customField: '20090318-080532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48675',
internalId:  '',
customField: '20090318-074614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2422',
internalId:  '',
customField: '20060723-195111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3102',
internalId:  '',
customField: '20060904-133509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26301',
internalId:  '',
customField: '20081125-141924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48654',
internalId:  '',
customField: '20090318-075510'
};
webappMappings['7060']=webappMappings['7060-9e87f32b249c8b03d2429ade8dd40d03']={
webappId:    '7060',
documentId:  '48612',
internalId:  '9e87f32b249c8b03d2429ade8dd40d03',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-d986d2216c18eda52eef268a6a808c70']={
webappId:    '7060',
documentId:  '48633',
internalId:  'd986d2216c18eda52eef268a6a808c70',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-b168a466275e86326af717affd3ee939']={
webappId:    '7060',
documentId:  '48654',
internalId:  'b168a466275e86326af717affd3ee939',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-144a7e37476cd1a8224c6a822c23c9d9']={
webappId:    '7060',
documentId:  '48675',
internalId:  '144a7e37476cd1a8224c6a822c23c9d9',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48633',
internalId:  '',
customField: '20090318-080657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48612',
internalId:  '',
customField: '20090318-080403'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2AI9';
var companyName   = 'William+Kelley+Paintings';
var htmlTitle	  = 'William+Kelley+Paintings';
var metaKeywords  = 'Sister+Wendy+William+Kelley+PBS+fine+art+++Lorenzo+de+Medici+Fine+Arts+Institute%2C+Florence%2C+Italy++School+of+The+Museum+of+Fine+Arts%2C+Boston%2C+MA++Sarasota';
var metaContents  = 'William+Kelley+Painting++Fine+Art+++Oil+on+canvas++';
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();
};
