/* [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(''), jdecode('%2F32.html'), 'true',[],'',''],
	['PAGE','53',jdecode('James+Coignard'),jdecode(''), jdecode('%2F53%2Findex.html'), 'true',[ 
		['PAGE','3187',jdecode('graphics'),jdecode(''), jdecode('%2F53%2F3187.html'), 'true',[],'',''],
		['PAGE','3272',jdecode('originals'),jdecode(''), jdecode('%2F53%2F3272.html'), 'true',[],'','']
	],'',''],
	['PAGE','1322',jdecode('Nissan+Engel'),jdecode(''), jdecode('%2F1322%2Findex.html'), 'true',[ 
		['PAGE','3391',jdecode('graphics'),jdecode(''), jdecode('%2F1322%2F3391.html'), 'true',[],'','']
	],'',''],
	['PAGE','62',jdecode('Raimundo+Figueroa'),jdecode(''), jdecode('%2F62%2Findex.html'), 'true',[ 
		['PAGE','3502',jdecode('originals'),jdecode(''), jdecode('%2F62%2F3502.html'), 'true',[],'',''],
		['PAGE','2573',jdecode('originals+-+Faces+Series'),jdecode(''), jdecode('%2F62%2F2573.html'), 'true',[],'',''],
		['PAGE','4257',jdecode('originals+-+Abloom-Abroad+Series'),jdecode(''), jdecode('%2F62%2F4257.html'), 'true',[],'',''],
		['PAGE','4266',jdecode('originals+-+New+York+Series'),jdecode(''), jdecode('%2F62%2F4266.html'), 'true',[],'',''],
		['PAGE','3511',jdecode('silkscreens'),jdecode(''), jdecode('%2F62%2F3511.html'), 'true',[],'','']
	],'',''],
	['PAGE','71',jdecode('Thomas+Hamann'),jdecode(''), jdecode('%2F71%2Findex.html'), 'true',[ 
		['PAGE','2829',jdecode('engravings'),jdecode(''), jdecode('%2F71%2F2829.html'), 'true',[],'',''],
		['PAGE','4826',jdecode('engravings+-+Zodiac+Series'),jdecode(''), jdecode('%2F71%2F4826.html'), 'true',[],'','']
	],'',''],
	['PAGE','80',jdecode('Ken+Kenan'),jdecode(''), jdecode('%2F80%2Findex.html'), 'true',[ 
		['PAGE','14301',jdecode('transfer+rubbings'),jdecode(''), jdecode('%2F80%2F14301.html'), 'true',[],'',''],
		['PAGE','1860',jdecode('silkscreens'),jdecode(''), jdecode('%2F80%2F1860.html'), 'true',[],'',''],
		['PAGE','4421',jdecode('drawings+-+Excursions+series'),jdecode(''), jdecode('%2F80%2F4421.html'), 'true',[],'',''],
		['PAGE','3646',jdecode('drawings+2005-2008'),jdecode(''), jdecode('%2F80%2F3646.html'), 'true',[],'',''],
		['PAGE','17701',jdecode('transfer+rubbings+-+Love+Portraits'),jdecode(''), jdecode('%2F80%2F17701.html'), 'true',[],'',''],
		['PAGE','13701',jdecode('works+on+canvas+2009'),jdecode(''), jdecode('%2F80%2F13701.html'), 'true',[],'',''],
		['PAGE','1716',jdecode('silkscreens+-+New+Orleans+theme'),jdecode(''), jdecode('%2F80%2F1716.html'), 'true',[],'','']
	],'',''],
	['PAGE','476',jdecode('Max+Papart'),jdecode(''), jdecode('%2F476%2Findex.html'), 'true',[ 
		['PAGE','3109',jdecode('graphics'),jdecode(''), jdecode('%2F476%2F3109.html'), 'true',[],'',''],
		['PAGE','3118',jdecode('originals'),jdecode(''), jdecode('%2F476%2F3118.html'), 'true',[],'','']
	],'',''],
	['PAGE','531',jdecode('Theo+Tobiasse'),jdecode(''), jdecode('%2F531%2Findex.html'), 'true',[ 
		['PAGE','3876',jdecode('graphics'),jdecode(''), jdecode('%2F531%2F3876.html'), 'true',[],'',''],
		['PAGE','3885',jdecode('originals'),jdecode(''), jdecode('%2F531%2F3885.html'), 'true',[],'','']
	],'',''],
	['PAGE','540',jdecode('Cecil+Touchon'),jdecode(''), jdecode('%2F540%2Findex.html'), 'true',[ 
		['PAGE','3894',jdecode('collages+-+Fusion+Series'),jdecode(''), jdecode('%2F540%2F3894.html'), 'true',[],'',''],
		['PAGE','4076',jdecode('collages+-+Iberian+Variations'),jdecode(''), jdecode('%2F540%2F4076.html'), 'true',[],'','']
	],'',''],
	['PAGE','549',jdecode('Zhou+Brothers'),jdecode(''), jdecode('%2F549%2Findex.html'), 'true',[ 
		['PAGE','3903',jdecode('originals'),jdecode(''), jdecode('%2F549%2F3903.html'), 'true',[],'','']
	],'',''],
	['PAGE','558',jdecode('Various+Artists'),jdecode(''), jdecode('%2F558.html'), 'true',[],'',''],
	['PAGE','2196',jdecode('Custom+Framing'),jdecode(''), jdecode('%2F2196.html'), 'true',[],'',''],
	['PAGE','567',jdecode('About+Us'),jdecode(''), jdecode('%2F567.html'), 'true',[],'',''],
	['PAGE','576',jdecode('Contact+Us'),jdecode(''), jdecode('%2F576.html'), 'true',[],'',''],
	['PAGE','2118',jdecode('Guestbook'),jdecode(''), jdecode('%2F2118%2Findex.html'), 'true',[ 
		['PAGE','2117',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F2118%2F2117.html'), 'false',[],'','']
	],'','']];
var siteelementCount=40;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='D72B2B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10893';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'D72B2B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10893',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D72B2B',
				e_color: 		'D72B2B',
				f_color: 		'D72B2B',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, 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:  '53',
internalId:  '',
customField: '20080319-114255'
};
webappMappings['1002']=webappMappings['1002-2118AHW050INXEGU']={
webappId:    '1002',
documentId:  '2118',
internalId:  '2118AHW050INXEGU',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20120110-084758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3187',
internalId:  '',
customField: '20110805-062900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3272',
internalId:  '',
customField: '20080320-190716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1322',
internalId:  '',
customField: '20080305-154601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3391',
internalId:  '',
customField: '20080320-192800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62',
internalId:  '',
customField: '20080319-111713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3502',
internalId:  '',
customField: '20080322-155511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2573',
internalId:  '',
customField: '20080321-155246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4257',
internalId:  '',
customField: '20080322-152917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4266',
internalId:  '',
customField: '20080322-153323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3511',
internalId:  '',
customField: '20080322-153347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71',
internalId:  '',
customField: '20100411-072543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2829',
internalId:  '',
customField: '20100523-065604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4826',
internalId:  '',
customField: '20080405-162755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80',
internalId:  '',
customField: '20111222-085952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13701',
internalId:  '',
customField: '20090903-111352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3646',
internalId:  '',
customField: '20091003-052112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4421',
internalId:  '',
customField: '20091110-075944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1716',
internalId:  '',
customField: '20101222-161822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1860',
internalId:  '',
customField: '20110207-091855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '476',
internalId:  '',
customField: '20080305-151055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3109',
internalId:  '',
customField: '20110805-062930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3118',
internalId:  '',
customField: '20110207-092709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '531',
internalId:  '',
customField: '20080305-151702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3876',
internalId:  '',
customField: '20080321-171931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3885',
internalId:  '',
customField: '20100523-065514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '540',
internalId:  '',
customField: '20080305-155939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3894',
internalId:  '',
customField: '20080321-180754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4076',
internalId:  '',
customField: '20080321-180707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '549',
internalId:  '',
customField: '20080403-021448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3903',
internalId:  '',
customField: '20080321-185144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '558',
internalId:  '',
customField: '20080330-123543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2196',
internalId:  '',
customField: '20080401-144554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '567',
internalId:  '',
customField: '20090216-115357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '576',
internalId:  '',
customField: '20080401-144644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2118',
internalId:  '',
customField: '20091003-062458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2117',
internalId:  '',
customField: '20080316-164006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20120110-084126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17701',
internalId:  '',
customField: '20091029-081438'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXEGU';
var companyName   = 'Nahan+Fine+Art';
var htmlTitle	  = 'Nahan+Fine+Art';
var metaKeywords  = 'James+Coignard%2C+Nissan+Engel%2C+Raimundo+Figueroa%2C+Thomas+Hamann%2C+Ken+Kenan%2C+Theo+Tobiasse%2C+Cecil+Touchon%2C+Zhou+Brothers%2C+Ken+Nahan%2C+New+Orleans%2C+Artists%2C+Custom+Framing%2C+Art+Dealer';
var metaContents  = 'James+Coignard%2C+Nissan+Engel%2C+Raimundo+Figueroa%2C+Thomas+Hamann%2C+Ken+Kenan%2C+Theo+Tobiasse%2C+Cecil+Touchon%2C+Zhou+Brothers%2C+Ken+Nahan%2C+New+Orleans%2C+Artists%2C+Custom+Framing%2C+Private+Art+Dealer';
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();
};

