/* [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','601',jdecode('Leire+Ituarte'),jdecode(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','652',jdecode('Creaciones'),jdecode(''), jdecode('%2F652%2Findex.html'), 'true',[ 
		['PAGE','673',jdecode('Delicias+de+la+civilizaci%C3%B3n'),jdecode(''), jdecode('%2F652%2F673.html'), 'true',[],'',''],
		['PAGE','694',jdecode('Azul+en+tres+actos'),jdecode(''), jdecode('%2F652%2F694.html'), 'true',[],'',''],
		['PAGE','18834',jdecode('Azul+en+tres+actos+%28Extracto%29'),jdecode(''), jdecode('%2F652%2F18834.html'), 'true',[],'',''],
		['PAGE','18234',jdecode('Look+at+me%2C+Bang+Bang'),jdecode(''), jdecode('%2F652%2F18234.html'), 'true',[],'',''],
		['PAGE','24834',jdecode('Mazing'),jdecode(''), jdecode('%2F652%2F24834.html'), 'true',[],'',''],
		['PAGE','27634',jdecode('%40leph'),jdecode(''), jdecode('%2F652%2F27634.html'), 'true',[],'',''],
		['PAGE','22334',jdecode('Riders'),jdecode(''), jdecode('%2F652%2F22334.html'), 'true',[],'','']
	],'',''],
	['PAGE','736',jdecode('%C3%81lbum+de+fotos'),jdecode(''), jdecode('%2F736.html'), 'true',[],'',''],
	['PAGE','757',jdecode('V%C3%ADdeos'),jdecode(''), jdecode('%2F757.html'), 'true',[],'',''],
	['PAGE','22355',jdecode('Prensa'),jdecode(''), jdecode('%2F22355.html'), 'true',[],'',''],
	['PAGE','778',jdecode('Enlaces'),jdecode(''), jdecode('%2F778.html'), 'true',[],'',''],
	['PAGE','17139',jdecode('Libro+de+visitas'),jdecode(''), jdecode('%2F17139%2Findex.html'), 'true',[ 
		['PAGE','17134',jdecode('Leer+el+libro+de+Visitas'),jdecode(''), jdecode('%2F17139%2F17134.html'), 'false',[],'','']
	],'',''],
	['PAGE','799',jdecode('Contacto'),jdecode(''), jdecode('%2F799.html'), 'true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Art';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='1817';
theSitetree.keyvisualName='zeit2.jpg';
theSitetree.fontsetId='283';
theSitetree.graphicsetId='350';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
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: 			'Art',
				paletteFamily: 	'000000',
				keyvisualId: 	'1817',
				keyvisualName: 	'zeit2.jpg',
				fontsetId: 		'283',
				graphicsetId: 	'350',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20111101-202735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20111029-162506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20111029-162717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24834',
internalId:  '',
customField: '20110319-170454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17139',
internalId:  '',
customField: '20100115-195238'
};
webappMappings['1002']=webappMappings['1002-17139aars20inles0']={
webappId:    '1002',
documentId:  '17139',
internalId:  '17139aars20inles0',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20100110-122040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20100115-172538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18234',
internalId:  '',
customField: '20110319-114036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20100115-195113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20100122-163758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '799',
internalId:  '',
customField: '20111101-202534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18834',
internalId:  '',
customField: '20100115-172732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17134',
internalId:  '',
customField: '20100115-155947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22334',
internalId:  '',
customField: '20100122-170837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22355',
internalId:  '',
customField: '20100129-153101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27634',
internalId:  '',
customField: '20111028-164836'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INLES0';
var companyName   = 'Leire+Ituarte';
var htmlTitle	  = 'Leire+Ituarte';
var metaKeywords  = 'Leire+Ituarte+danza+baile+coreografa+Azul+en+tres+actos+Look+at+me+bang+bang+Delicias+de+la+civilizaci%C3%B3n+Helena+Golab+Sibophot+Olatz+de+Andres';
var metaContents  = 'Esta+es+la+p%C3%A1gina+de+la+bailarina+y+core%C3%B3grafa+vasca+Leire+Ituarte.';
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();
};

