/* [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','45501',jdecode('covers-2011'),jdecode(''), jdecode('%2F45501%2Findex.html'), 'true',[ 
		['PAGE','198201',jdecode('covers-2012'),jdecode(''), jdecode('%2F45501%2F198201.html'), 'true',[],'','']
	],'',''],
	['PAGE','182001',jdecode('Ranking+No.1-500'),jdecode(''), jdecode('%2F182001%2Findex.html'), 'true',[ 
		['PAGE','181822',jdecode('artists+101-200'),jdecode(''), jdecode('%2F182001%2F181822.html'), 'true',[],'',''],
		['PAGE','181843',jdecode('artists+201-300'),jdecode(''), jdecode('%2F182001%2F181843.html'), 'true',[],'',''],
		['PAGE','181864',jdecode('artists+301-400'),jdecode(''), jdecode('%2F182001%2F181864.html'), 'true',[],'',''],
		['PAGE','190401',jdecode('artists+401-500'),jdecode(''), jdecode('%2F182001%2F190401.html'), 'true',[],'','']
	],'',''],
	['PAGE','187901',jdecode('architecture'),jdecode(''), jdecode('%2F187901.html'), 'true',[],'',''],
	['PAGE','1899',jdecode('museum'),jdecode(''), jdecode('%2F1899.html'), 'true',[],'',''],
	['PAGE','16501',jdecode('design'),jdecode(''), jdecode('%2F16501.html'), 'true',[],'',''],
	['PAGE','157201',jdecode('home+GALLERIES'),jdecode(''), jdecode('%2F157201.html'), 'true',[],'',''],
	['PAGE','110901',jdecode('MADRID+spain'),jdecode(''), jdecode('%2F110901.html'), 'true',[],'',''],
	['PAGE','110922',jdecode('BARCELONA+'),jdecode(''), jdecode('%2F110922.html'), 'true',[],'',''],
	['PAGE','25222',jdecode('NEW+YORK-I++u.s.a'),jdecode(''), jdecode('%2F25222.html'), 'true',[],'',''],
	['PAGE','136001',jdecode('NEW+YORK-II++'),jdecode(''), jdecode('%2F136001.html'), 'true',[],'',''],
	['PAGE','155222',jdecode('NEW+YORK-III'),jdecode(''), jdecode('%2F155222.html'), 'true',[],'',''],
	['PAGE','136043',jdecode('LOS+ANGELES++'),jdecode(''), jdecode('%2F136043.html'), 'true',[],'',''],
	['PAGE','136064',jdecode('SAN+FRANCISCO++'),jdecode(''), jdecode('%2F136064.html'), 'true',[],'',''],
	['PAGE','25243',jdecode('LONDON-I++u.k'),jdecode(''), jdecode('%2F25243.html'), 'true',[],'',''],
	['PAGE','155201',jdecode('LONDON-II'),jdecode(''), jdecode('%2F155201.html'), 'true',[],'',''],
	['PAGE','112901',jdecode('PARIS+france'),jdecode(''), jdecode('%2F112901.html'), 'true',[],'',''],
	['PAGE','116101',jdecode('BERLIN++germany'),jdecode(''), jdecode('%2F116101.html'), 'true',[],'',''],
	['PAGE','117601',jdecode('MUNICH++'),jdecode(''), jdecode('%2F117601.html'), 'true',[],'',''],
	['PAGE','117622',jdecode('COLOGNE++'),jdecode(''), jdecode('%2F117622.html'), 'true',[],'',''],
	['PAGE','117643',jdecode('DUESSELDORF++'),jdecode(''), jdecode('%2F117643.html'), 'true',[],'',''],
	['PAGE','120401',jdecode('ZURICH+switzerland'),jdecode(''), jdecode('%2F120401.html'), 'true',[],'',''],
	['PAGE','120422',jdecode('BRUSSELS+belgium'),jdecode(''), jdecode('%2F120422.html'), 'true',[],'',''],
	['PAGE','120443',jdecode('MILAN+italy'),jdecode(''), jdecode('%2F120443.html'), 'true',[],'',''],
	['PAGE','198401',jdecode('STAFF'),jdecode(''), jdecode('%2F198401.html'), 'true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='73';
theSitetree.graphicsetId='74';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D0D5DB';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'arsys',
  product: 'WSCSYSSSSLYTC2IR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Galerie',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'73',
				graphicsetId: 	'74',
				contentColor: 	'000000',
				contentBGColor: 'D0D5DB',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181864',
internalId:  '',
customField: '20111230-141237'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '157201',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181843',
internalId:  '',
customField: '20120118-181347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116101',
internalId:  '',
customField: '20120113-134810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155222',
internalId:  '',
customField: '20120113-140634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182001',
internalId:  '',
customField: '20111230-141401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136001',
internalId:  '',
customField: '20120113-140616'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '157201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120422',
internalId:  '',
customField: '20111102-112533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1899',
internalId:  '',
customField: '20111102-121249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45501',
internalId:  '',
customField: '20120206-121436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155201',
internalId:  '',
customField: '20120113-134456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117643',
internalId:  '',
customField: '20111102-111252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25222',
internalId:  '',
customField: '20120113-142207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20111102-121009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25243',
internalId:  '',
customField: '20120113-134411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110901',
internalId:  '',
customField: '20120206-121201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112901',
internalId:  '',
customField: '20120113-135128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117622',
internalId:  '',
customField: '20111102-110710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157201',
internalId:  '',
customField: '20120206-121109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120443',
internalId:  '',
customField: '20120113-135042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117601',
internalId:  '',
customField: '20111102-130251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120401',
internalId:  '',
customField: '20111102-111859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110922',
internalId:  '',
customField: '20120206-121238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198401',
internalId:  '',
customField: '20120109-182112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136043',
internalId:  '',
customField: '20120113-134910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136064',
internalId:  '',
customField: '20120113-135221'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '16501',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '187901',
internalId:  '',
customField: '20111102-144630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198201',
internalId:  '',
customField: '20120109-180653'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1899',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '110901',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '110922',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '112901',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '25243',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '155201',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '116101',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '117601',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '117622',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '117643',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '120401',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '120422',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '120443',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '25222',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '136001',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '155222',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '136043',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '136064',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181822',
internalId:  '',
customField: '20111230-141557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190401',
internalId:  '',
customField: '20111212-174133'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '45501',
internalId:  '',
customField: 'language:es;country:ES;'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AAS340INZMI9';
var companyName   = 'SHOOT-+ART++for+collectors++ORIGINAL+WORKS+OF+LIVING+ARTISTS.+';
var htmlTitle	  = 'shoot-art.com+FOR+COLLECTORS+the+best.';
var metaKeywords  = 'albertsalvador%2C+art+magazine%2C+arte%2C+gallery%2C+museum%2C+ranking%2C+artist%2C+web+art%2C+art+gallery%2C+antiques%2C+books%2C+web+directory%2C+architecture%2C+exhibitions%2C+auction+gallery%2Calbert+salvador%2Cblackcubegallery%2Cblack+cube+gallery%2Cagrygary%2Cdiego+cerero%2Cartgallery%2Calbertsalvador%2Ccollectors%2Cgagosian+gallery%2Cgagosian%2C';
var metaContents  = 'albertsalvador%2C+arte%2C+art%2C+magazines%2C+gallery%2C+museum%2C+ranking%2C+artist%2C+web%2C+art+gallery%2C+antiques%2C+books%2C+web+directory%2C+architecture%2C+exhibitions%2C+auction+gallery%2C+';
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();
};

