/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','96701',jdecode('PRESS'),jdecode(''),'/96701/index.html','true',[ 
		['PAGE','189901',jdecode('PRESS+%28follow+up+page%29'),jdecode(''),'/96701/189901.html','false',[],'','']
	],'',''],
	['PAGE','94501',jdecode('GROUP+SHOWS'),jdecode(''),'/94501.html','true',[],'',''],
	['PAGE','192901',jdecode('EXHIBITIONS+2010'),jdecode(''),'/192901.html','true',[],'',''],
	['PAGE','211701',jdecode('broken+dishes+blue'),jdecode(''),'/211701.html','true',[],'',''],
	['PAGE','211722',jdecode('mafas+project'),jdecode(''),'/211722.html','true',[],'',''],
	['PAGE','198701',jdecode('nightmares'),jdecode(''),'/198701.html','true',[],'',''],
	['PAGE','198722',jdecode('obsession+heat'),jdecode(''),'/198722.html','true',[],'',''],
	['PAGE','193501',jdecode('live+bull'),jdecode(''),'/193501.html','true',[],'',''],
	['PAGE','193522',jdecode('I%26%23x27%3Bm+a+killer'),jdecode(''),'/193522.html','true',[],'',''],
	['PAGE','80501',jdecode('EXHIBITIONS+2009'),jdecode(''),'/80501.html','true',[],'',''],
	['PAGE','192401',jdecode('the+best...'),jdecode(''),'/192401.html','true',[],'',''],
	['PAGE','201801',jdecode('live+popes'),jdecode(''),'/201801.html','true',[],'',''],
	['PAGE','202901',jdecode('tied'),jdecode(''),'/202901.html','true',[],'',''],
	['PAGE','180201',jdecode('the+studio'),jdecode(''),'/180201.html','true',[],'',''],
	['PAGE','205301',jdecode('neoprene'),jdecode(''),'/205301.html','true',[],'',''],
	['PAGE','204101',jdecode('boots'),jdecode(''),'/204101.html','true',[],'',''],
	['PAGE','169401',jdecode('per+catalunya'),jdecode(''),'/169401.html','true',[],'',''],
	['PAGE','172201',jdecode('requiem'),jdecode(''),'/172201.html','true',[],'',''],
	['PAGE','205322',jdecode('self+portrait'),jdecode(''),'/205322.html','true',[],'',''],
	['PAGE','100222',jdecode('le+nozze+di+figaro'),jdecode(''),'/100222.html','true',[],'',''],
	['PAGE','216401',jdecode('obsessi%C3%B3+d%26%23x27%3Bun+cap+B%2FN'),jdecode(''),'/216401.html','true',[],'',''],
	['PAGE','91464',jdecode('trilogy+of+a+chair'),jdecode(''),'/91464.html','true',[],'',''],
	['PAGE','113201',jdecode('16-versions'),jdecode(''),'/113201.html','true',[],'',''],
	['PAGE','205364',jdecode('identitat+transformada'),jdecode(''),'/205364.html','true',[],'',''],
	['PAGE','205385',jdecode('interiors'),jdecode(''),'/205385.html','true',[],'',''],
	['PAGE','205406',jdecode('triptic+d%26%23x27%3Bun+cap+pintat'),jdecode(''),'/205406.html','true',[],'',''],
	['PAGE','209401',jdecode('retrat+d%26%23x27%3Bun+cap+taronja'),jdecode(''),'/209401.html','true',[],'',''],
	['PAGE','73801',jdecode('caps'),jdecode(''),'/73801.html','true',[],'',''],
	['PAGE','85201',jdecode('EXHIBITIONS+2008'),jdecode(''),'/85201.html','true',[],'',''],
	['PAGE','85222',jdecode('trastorns+de+personalitat'),jdecode(''),'/85222.html','true',[],'',''],
	['PAGE','205343',jdecode('obsessi%C3%B3+d%26%23x27%3Bun+cap+blanc'),jdecode(''),'/205343.html','true',[],'',''],
	['PAGE','85264',jdecode('pintura+2007%2F08'),jdecode(''),'/85264.html','true',[],'',''],
	['PAGE','85285',jdecode('obsessi%C3%B3+d%26%23x27%3Bun+llit'),jdecode(''),'/85285.html','true',[],'',''],
	['PAGE','91401',jdecode('crucifixions+sobre+paper'),jdecode(''),'/91401.html','true',[],'',''],
	['PAGE','91422',jdecode('creu+amb+escombreries'),jdecode(''),'/91422.html','true',[],'',''],
	['PAGE','91443',jdecode('divertimenti'),jdecode(''),'/91443.html','true',[],'',''],
	['PAGE','210201',jdecode('paranoia+de+montage'),jdecode(''),'/210201.html','true',[],'',''],
	['PAGE','120701',jdecode('retrospective'),jdecode(''),'/120701.html','true',[],'',''],
	['PAGE','100243',jdecode('personatge+lligat'),jdecode(''),'/100243.html','true',[],'','']];
var siteelementCount=41;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='142F4A';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='74';
theSitetree.graphicsetId='76';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='828D98';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Galerie',
				paletteFamily: 	'142F4A',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'74',
				graphicsetId: 	'76',
				contentColor: 	'000000',
				contentBGColor: '828D98',
				a_color: 		'142F4A',
				b_color: 		'FFFFFF',
				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:  '501',
internalId:  '',
customField: '20100305-091417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100243',
internalId:  '',
customField: '20100210-092809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '210201',
internalId:  '',
customField: '20100210-091520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100222',
internalId:  '',
customField: '20100210-081110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91401',
internalId:  '',
customField: '20090408-091625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91422',
internalId:  '',
customField: '20100210-091218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91443',
internalId:  '',
customField: '20090408-091737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91464',
internalId:  '',
customField: '20100210-081257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94501',
internalId:  '',
customField: '20100305-091715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '211701',
internalId:  '',
customField: '20100305-104746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96701',
internalId:  '',
customField: '20091027-155748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '205364',
internalId:  '',
customField: '20100210-084419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73801',
internalId:  '',
customField: '20100210-091338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80501',
internalId:  '',
customField: '20100210-082947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '209401',
internalId:  '',
customField: '20100305-113859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '205385',
internalId:  '',
customField: '20100305-112352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '205322',
internalId:  '',
customField: '20100210-073915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85201',
internalId:  '',
customField: '20090408-091324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85222',
internalId:  '',
customField: '20100210-085746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '216401',
internalId:  '',
customField: '20100305-122722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85264',
internalId:  '',
customField: '20090408-091525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85285',
internalId:  '',
customField: '20100210-090206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '211722',
internalId:  '',
customField: '20100305-094036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '205406',
internalId:  '',
customField: '20100210-085247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198701',
internalId:  '',
customField: '20100205-085713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198722',
internalId:  '',
customField: '20100205-091306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '202901',
internalId:  '',
customField: '20100205-095842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '180201',
internalId:  '',
customField: '20100205-100037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '205343',
internalId:  '',
customField: '20100305-112213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120701',
internalId:  '',
customField: '20090408-092445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '172201',
internalId:  '',
customField: '20100210-080827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169401',
internalId:  '',
customField: '20100210-080655'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '205301',
internalId:  '',
customField: '20100210-080150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '204101',
internalId:  '',
customField: '20100205-102116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113201',
internalId:  '',
customField: '20100210-082856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '189901',
internalId:  '',
customField: '20091027-155421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201801',
internalId:  '',
customField: '20100205-093720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '192401',
internalId:  '',
customField: '20091201-071835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '192901',
internalId:  '',
customField: '20100305-091850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193501',
internalId:  '',
customField: '20100205-074925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193522',
internalId:  '',
customField: '20100205-081606'
};
webappMappings['7008']=webappMappings['7008-6863']={
webappId:    '7008',
documentId:  '96701',
internalId:  '6863',
customField: 'language:es;country:ES;'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INV565';
var companyName   = 'ALBERT+SALVADOR+Virtual+Catalogue+Raisonn%C3%A9';
var htmlTitle	  = 'www.albertsalvador.com';
var metaKeywords  = '';
var metaContents  = 'pintura+fotografia+escultura+dibujo+video-arte+photography+painting+drawing+sculpture';
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();
};
