/* [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','67823',jdecode('arquitectura%7Carchitect.'),jdecode(''), jdecode('%2F67823.html'), 'true',[],'',''],
	['PAGE','83623',jdecode('interiorismo%7Cinteriors'),jdecode(''), jdecode('%2F83623.html'), 'true',[],'',''],
	['PAGE','60023',jdecode('%C3%BAltimos+reportajes%7Cnew'),jdecode(''), jdecode('%2F60023.html'), 'true',[],'',''],
	['PAGE','4612',jdecode('noticias+%7C+news'),jdecode(''), jdecode('%2F4612.html'), 'true',[],'',''],
	['PAGE','37723',jdecode('archivo+%7C+archive'),jdecode(''), jdecode('%2F37723.html'), 'true',[],'',''],
	['PAGE','43323',jdecode('publicado%7Cpublished'),jdecode(''), jdecode('%2F43323.html'), 'true',[],'',''],
	['PAGE','66123',jdecode('encargos%7Cassignments'),jdecode(''), jdecode('%2F66123.html'), 'true',[],'',''],
	['PAGE','64823',jdecode('exposiciones%7Cexhibitions'),jdecode(''), jdecode('%2F64823.html'), 'true',[],'',''],
	['PAGE','4555',jdecode('sobre+m%C3%AD+%7C+about+me'),jdecode(''), jdecode('%2F4555.html'), 'true',[],'',''],
	['PAGE','4666',jdecode('clientes+%7C+clients'),jdecode(''), jdecode('%2F4666.html'), 'true',[],'',''],
	['PAGE','4693',jdecode('contacto+%7C+contact'),jdecode(''), jdecode('%2F4693.html'), 'true',[],'',''],
	['PAGE','72423',jdecode('metropol+parasol'),jdecode(''), jdecode('%2F72423.html'), 'false',[],'','']];
var siteelementCount=12;
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:  '83623',
internalId:  '',
customField: '20111007-181859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4612',
internalId:  '',
customField: '20111215-181437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72423',
internalId:  '',
customField: '20110513-110426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4555',
internalId:  '',
customField: '20110908-165346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66123',
internalId:  '',
customField: '20110908-170131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4666',
internalId:  '',
customField: '20110908-165426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4693',
internalId:  '',
customField: '20111003-161949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37723',
internalId:  '',
customField: '20110929-174854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67823',
internalId:  '',
customField: '20120113-184252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43323',
internalId:  '',
customField: '20111215-182717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60023',
internalId:  '',
customField: '20110909-100003'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '67823',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64823',
internalId:  '',
customField: '20110805-163730'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010INEV78';
var companyName   = 'fot%C3%B3grafo+de+arquitectura+%7C+architectural+photographer++++++++++MADRID+%2F+SEVILLA';
var htmlTitle	  = 'V%C3%ADctor+S%C3%A1jara.+Fot%C3%B3grafo+de+Arquitectura+e+Interiorismo+%7C+Architectural+Photographer';
var metaKeywords  = 'fot%EF%BF%BDgrafo+fotografo+fotograf%EF%BF%BDa+fotografia+sevilla+arquitectura+publicidad+foto+fotos+stock+publicitaria+arquitectos+arquitecto+editorial+andalucia+espa%C3%B1a+spain+photographer+spanish+estudio+fotografico+fotogr%C3%A1fico+fotografica+fotogr%C3%A1fica+hoteles+hotel+studio+andaluc%C3%ADa+interiorismo+decoraci%C3%B3n+decoracion+editorial+industrial+fachadas+bodeg%C3%B3n+publicitario+agencia+fotografos+fot%C3%B3grafos+interiores+interior+photography+architectural+architecture+revistas+revista+';
var metaContents  = 'Fot%EF%BF%BDgrafo+especializado+en+fotograf%EF%BF%BDa+de+arquitectura+e+interiorismo.+Radicado+en+Sevilla.+fotografo-publicidad-sevilla-arquitectura-interiorismo.+';
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();
};

