/* [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','401',jdecode('HOME'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','7901',jdecode('THE+ARTIST'),jdecode(''),'/7901.html','true',[],'',''],
	['PAGE','452',jdecode('THE+STUDIO'),jdecode(''),'/452.html','true',[],'',''],
	['PAGE','51401',jdecode('GROUP+SHOWS'),jdecode(''),'/51401.html','true',[],'',''],
	['PAGE','35301',jdecode('EXHIBITION+2010'),jdecode(''),'/35301.html','true',[],'',''],
	['PAGE','54001',jdecode('loving+sex'),jdecode(''),'/54001.html','true',[],'',''],
	['PAGE','54022',jdecode('candlestick'),jdecode(''),'/54022.html','true',[],'',''],
	['PAGE','35322',jdecode('mousetrap'),jdecode(''),'/35322.html','true',[],'',''],
	['PAGE','35343',jdecode('bodies'),jdecode(''),'/35343.html','true',[],'',''],
	['PAGE','35364',jdecode('all+together'),jdecode(''),'/35364.html','true',[],'',''],
	['PAGE','35385',jdecode('loving+landscapes'),jdecode(''),'/35385.html','true',[],'',''],
	['PAGE','35406',jdecode('erotic+parties'),jdecode(''),'/35406.html','true',[],'',''],
	['PAGE','35427',jdecode('erotic+landscapes'),jdecode(''),'/35427.html','true',[],'',''],
	['PAGE','35448',jdecode('maniac+sex'),jdecode(''),'/35448.html','true',[],'',''],
	['PAGE','35469',jdecode('manhattan+dream'),jdecode(''),'/35469.html','true',[],'',''],
	['PAGE','35490',jdecode('the+meninas'),jdecode(''),'/35490.html','true',[],'',''],
	['PAGE','52401',jdecode('happy+birthday+II'),jdecode(''),'/52401.html','true',[],'',''],
	['PAGE','52422',jdecode('9-art'),jdecode(''),'/52422.html','true',[],'',''],
	['PAGE','35511',jdecode('cocktail'),jdecode(''),'/35511.html','true',[],'',''],
	['PAGE','35532',jdecode('second+memory'),jdecode(''),'/35532.html','true',[],'',''],
	['PAGE','35553',jdecode('teddies+%26+mugs'),jdecode(''),'/35553.html','true',[],'',''],
	['PAGE','473',jdecode('EXHIBITION+2009'),jdecode(''),'/473.html','true',[],'',''],
	['PAGE','35574',jdecode('great+master+studios'),jdecode(''),'/35574.html','true',[],'',''],
	['PAGE','35595',jdecode('lady+chair'),jdecode(''),'/35595.html','true',[],'',''],
	['PAGE','33901',jdecode('popes'),jdecode(''),'/33901.html','true',[],'',''],
	['PAGE','33001',jdecode('theorems+golden....'),jdecode(''),'/33001.html','true',[],'',''],
	['PAGE','30801',jdecode('black+theorem'),jdecode(''),'/30801.html','true',[],'',''],
	['PAGE','30822',jdecode('fall+theorem'),jdecode(''),'/30822.html','true',[],'',''],
	['PAGE','26701',jdecode('full+tables'),jdecode(''),'/26701.html','true',[],'',''],
	['PAGE','26722',jdecode('classic+heros'),jdecode(''),'/26722.html','true',[],'',''],
	['PAGE','28701',jdecode('summer'),jdecode(''),'/28701.html','true',[],'',''],
	['PAGE','28101',jdecode('frame%26%23x27%3Bs+wall'),jdecode(''),'/28101.html','true',[],'',''],
	['PAGE','24101',jdecode('five+x+five'),jdecode(''),'/24101.html','true',[],'',''],
	['PAGE','24122',jdecode('dining+room'),jdecode(''),'/24122.html','true',[],'',''],
	['PAGE','24143',jdecode('zippers+and+houses'),jdecode(''),'/24143.html','true',[],'',''],
	['PAGE','494',jdecode('four-4'),jdecode(''),'/494.html','true',[],'',''],
	['PAGE','515',jdecode('my+life%26%23x27%3Bs+shadows'),jdecode(''),'/515.html','true',[],'',''],
	['PAGE','536',jdecode('happy+birthday'),jdecode(''),'/536.html','true',[],'',''],
	['PAGE','557',jdecode('happy+birthday'),jdecode(''),'/557.html','true',[],'',''],
	['PAGE','578',jdecode('graceful+women'),jdecode(''),'/578.html','true',[],'',''],
	['PAGE','599',jdecode('group+shows'),jdecode(''),'/599.html','true',[],'',''],
	['PAGE','620',jdecode('eccentric+windows'),jdecode(''),'/620.html','true',[],'',''],
	['PAGE','641',jdecode('dark+landscapes'),jdecode(''),'/641.html','true',[],'',''],
	['PAGE','662',jdecode('bacon+style'),jdecode(''),'/662.html','true',[],'',''],
	['PAGE','683',jdecode('my+cats'),jdecode(''),'/683.html','true',[],'',''],
	['PAGE','704',jdecode('EXHIBITION+2008'),jdecode(''),'/704.html','true',[],'',''],
	['PAGE','12501',jdecode('naughty+women'),jdecode(''),'/12501.html','true',[],'',''],
	['PAGE','12522',jdecode('sketch+women'),jdecode(''),'/12522.html','true',[],'',''],
	['PAGE','12543',jdecode('candlestick'),jdecode(''),'/12543.html','true',[],'',''],
	['PAGE','12564',jdecode('still+life'),jdecode(''),'/12564.html','true',[],'',''],
	['PAGE','12585',jdecode('landscapes'),jdecode(''),'/12585.html','true',[],'',''],
	['PAGE','12606',jdecode('seasonal+fruits+'),jdecode(''),'/12606.html','true',[],'',''],
	['PAGE','12627',jdecode('shy+flowers'),jdecode(''),'/12627.html','true',[],'',''],
	['PAGE','12648',jdecode('intimate+landscapes'),jdecode(''),'/12648.html','true',[],'',''],
	['PAGE','12669',jdecode('dreamed+dwelling'),jdecode(''),'/12669.html','true',[],'',''],
	['PAGE','12690',jdecode('inusual+flowers'),jdecode(''),'/12690.html','true',[],'',''],
	['PAGE','12711',jdecode('complicated+women'),jdecode(''),'/12711.html','true',[],'',''],
	['PAGE','12732',jdecode('fanatic+windows'),jdecode(''),'/12732.html','true',[],'',''],
	['PAGE','12774',jdecode('vain+women'),jdecode(''),'/12774.html','true',[],'',''],
	['PAGE','12795',jdecode('dreamed+landscapes'),jdecode(''),'/12795.html','true',[],'',''],
	['PAGE','12816',jdecode('private+furniture'),jdecode(''),'/12816.html','true',[],'','']];
var siteelementCount=61;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='74';
theSitetree.graphicsetId='81';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D0D5DB';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Galerie',
				paletteFamily: 	'660000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'74',
				graphicsetId: 	'81',
				contentColor: 	'000000',
				contentBGColor: 'D0D5DB',
				a_color: 		'660000',
				b_color: 		'CCCC99',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100713-111704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20091027-095356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20090508-063943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20090508-070856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20090508-065112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20090508-065142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20090508-070336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20090508-071020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20090508-072826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20090508-072142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20090507-163810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '683',
internalId:  '',
customField: '20090507-162713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '704',
internalId:  '',
customField: '20090507-110303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090509-114233'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20090904-155236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12501',
internalId:  '',
customField: '20090511-111706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12522',
internalId:  '',
customField: '20090511-113426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12543',
internalId:  '',
customField: '20090527-113616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12564',
internalId:  '',
customField: '20090511-120908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12585',
internalId:  '',
customField: '20090511-122158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12606',
internalId:  '',
customField: '20090511-122856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12627',
internalId:  '',
customField: '20090511-124428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12648',
internalId:  '',
customField: '20090511-125722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12669',
internalId:  '',
customField: '20090511-130935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12690',
internalId:  '',
customField: '20090511-132231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12711',
internalId:  '',
customField: '20090511-133000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12732',
internalId:  '',
customField: '20090511-135158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24101',
internalId:  '',
customField: '20090527-110315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12774',
internalId:  '',
customField: '20090511-140531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12795',
internalId:  '',
customField: '20090511-141614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12816',
internalId:  '',
customField: '20090511-141744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24122',
internalId:  '',
customField: '20090527-111124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24143',
internalId:  '',
customField: '20090527-113236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26722',
internalId:  '',
customField: '20090904-103830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26701',
internalId:  '',
customField: '20090904-103750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28101',
internalId:  '',
customField: '20090901-165717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28701',
internalId:  '',
customField: '20090901-130723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30801',
internalId:  '',
customField: '20091027-095506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30822',
internalId:  '',
customField: '20091013-081310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33001',
internalId:  '',
customField: '20091027-100025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20100713-143347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35301',
internalId:  '',
customField: '20100713-150106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35322',
internalId:  '',
customField: '20100713-112353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35343',
internalId:  '',
customField: '20100713-114236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35364',
internalId:  '',
customField: '20100713-113708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35385',
internalId:  '',
customField: '20100713-144939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35406',
internalId:  '',
customField: '20100713-115555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35427',
internalId:  '',
customField: '20100713-120804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35448',
internalId:  '',
customField: '20100713-121842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35469',
internalId:  '',
customField: '20100713-123253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35490',
internalId:  '',
customField: '20100713-130431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35511',
internalId:  '',
customField: '20100713-142257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35532',
internalId:  '',
customField: '20100713-125305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35553',
internalId:  '',
customField: '20100713-133341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35574',
internalId:  '',
customField: '20100713-135536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35595',
internalId:  '',
customField: '20100714-141013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51401',
internalId:  '',
customField: '20100714-133022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52422',
internalId:  '',
customField: '20100714-132831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52401',
internalId:  '',
customField: '20100714-132950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54001',
internalId:  '',
customField: '20100723-121828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54022',
internalId:  '',
customField: '20100723-121828'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INL1S0';
var companyName   = 'AGRYGARY++Virtual+Catalogue+Raisonn%C3%A9';
var htmlTitle	  = 'www.gary-artist.com';
var metaKeywords  = '';
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();
};
