/* [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('INICI'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','15601',jdecode('INICIO'),jdecode(''),'/15601.html','false',[],'',''],
	['PAGE','18401',jdecode('ESPECTACLE+AL+CARRER'),jdecode(''),'/18401/index.html','true',[ 
		['PAGE','18422',jdecode('DE+CARRER'),jdecode(''),'/18401/18422.html','true',[],'',''],
		['PAGE','18443',jdecode('D%26%23x27%3BENVELAT'),jdecode(''),'/18401/18443.html','true',[],'',''],
		['PAGE','18464',jdecode('INFANTILS'),jdecode(''),'/18401/18464.html','true',[],'',''],
		['PAGE','18485',jdecode('TEATRE'),jdecode(''),'/18401/18485.html','true',[],'',''],
		['PAGE','18506',jdecode('DESFILADA'),jdecode(''),'/18401/18506.html','true',[],'','']
	],'',''],
	['PAGE','18527',jdecode('FIESTAS+MAYORES'),jdecode(''),'/18527/index.html','false',[ 
		['PAGE','18548',jdecode('PASACALLES++'),jdecode(''),'/18527/18548.html','true',[],'',''],
		['PAGE','18569',jdecode('ESCENARIO'),jdecode(''),'/18527/18569.html','true',[],'',''],
		['PAGE','18590',jdecode('INFANTILES'),jdecode(''),'/18527/18590.html','true',[],'',''],
		['PAGE','18611',jdecode('TEATRO'),jdecode(''),'/18527/18611.html','true',[],'',''],
		['PAGE','18632',jdecode('DESFILES'),jdecode(''),'/18527/18632.html','true',[],'','']
	],'',''],
	['PAGE','105301',jdecode('ESPECIAL+NADAL'),jdecode(''),'/105301.html','true',[],'',''],
	['PAGE','18653',jdecode('RECREACIONS+HIST%C3%92RIQUES'),jdecode(''),'/18653/index.html','true',[ 
		['PAGE','18674',jdecode('A+MIDA'),jdecode(''),'/18653/18674.html','true',[],'',''],
		['PAGE','18695',jdecode('PROPIS'),jdecode(''),'/18653/18695.html','true',[],'',''],
		['PAGE','18716',jdecode('GRAN+FORMAT'),jdecode(''),'/18653/18716.html','true',[],'','']
	],'',''],
	['PAGE','15769',jdecode('RECREACIONES+HIST%C3%93RICAS'),jdecode(''),'/15769/index.html','false',[ 
		['PAGE','18737',jdecode('A+MEDIDA'),jdecode(''),'/15769/18737.html','true',[],'',''],
		['PAGE','18758',jdecode('PROPIOS'),jdecode(''),'/15769/18758.html','true',[],'',''],
		['PAGE','18779',jdecode('GRAN+FORMATO'),jdecode(''),'/15769/18779.html','true',[],'','']
	],'',''],
	['PAGE','18800',jdecode('TEATRE'),jdecode(''),'/18800/index.html','true',[ 
		['PAGE','18821',jdecode('INFANTIL'),jdecode(''),'/18800/18821.html','true',[],'',''],
		['PAGE','18842',jdecode('ADULTS'),jdecode(''),'/18800/18842.html','true',[],'','']
	],'',''],
	['PAGE','18863',jdecode('TEATRO'),jdecode(''),'/18863/index.html','false',[ 
		['PAGE','18884',jdecode('INFANTIL'),jdecode(''),'/18863/18884.html','true',[],'',''],
		['PAGE','18905',jdecode('ADULTOS'),jdecode(''),'/18863/18905.html','true',[],'','']
	],'',''],
	['PAGE','18926',jdecode('ESDEVENIMENTS+D%26%23x27%3BEMPRESA'),jdecode(''),'/18926/index.html','true',[ 
		['PAGE','18947',jdecode('ESPECTACLE'),jdecode(''),'/18926/18947.html','false',[],'',''],
		['PAGE','18968',jdecode('TEM%C3%80TICS'),jdecode(''),'/18926/18968.html','true',[],'',''],
		['PAGE','18989',jdecode('TEAMBUILDING'),jdecode(''),'/18926/18989.html','true',[],'',''],
		['PAGE','23501',jdecode('FORMACI%C3%93'),jdecode(''),'/18926/23501.html','true',[],'',''],
		['PAGE','23522',jdecode('DECORACI%C3%93+'),jdecode(''),'/18926/23522.html','false',[],'','']
	],'',''],
	['PAGE','19010',jdecode('EVENTOS+DE+EMPRESA'),jdecode(''),'/19010/index.html','false',[ 
		['PAGE','19031',jdecode('DIVERSOS'),jdecode(''),'/19010/19031.html','true',[],'',''],
		['PAGE','19052',jdecode('TEM%C3%81TICOS'),jdecode(''),'/19010/19052.html','true',[],'',''],
		['PAGE','19073',jdecode('TEAMBUILDING'),jdecode(''),'/19010/19073.html','true',[],'',''],
		['PAGE','23543',jdecode('FORMACI%C3%93N'),jdecode(''),'/19010/23543.html','true',[],'',''],
		['PAGE','23564',jdecode('DECORACI%C3%93N+'),jdecode(''),'/19010/23564.html','true',[],'','']
	],'',''],
	['PAGE','19115',jdecode('CELEBRACIONS+PRIVADES'),jdecode(''),'/19115.html','true',[],'',''],
	['PAGE','19199',jdecode('CELEBRACIONES+PRIVADAS'),jdecode(''),'/19199/index.html','false',[ 
		['PAGE','19220',jdecode('BODAS'),jdecode(''),'/19199/19220.html','true',[],'',''],
		['PAGE','19241',jdecode('ANIVERSARIOS'),jdecode(''),'/19199/19241.html','true',[],'',''],
		['PAGE','19262',jdecode('COMUNIONES'),jdecode(''),'/19199/19262.html','true',[],'',''],
		['PAGE','19283',jdecode('JUBILACIONES'),jdecode(''),'/19199/19283.html','true',[],'','']
	],'',''],
	['PAGE','19304',jdecode('ESCOLA+DE+TEATRE'),jdecode(''),'/19304.html','true',[],'',''],
	['PAGE','19325',jdecode('ESCUELA+DE+TEATRO'),jdecode(''),'/19325.html','false',[],'',''],
	['PAGE','16201',jdecode('CONTACTE'),jdecode(''),'/16201.html','true',[],'',''],
	['PAGE','19346',jdecode('CONTACTO'),jdecode(''),'/19346.html','false',[],'','']];
var siteelementCount=51;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='AC2323';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='356';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AC2323';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'AC2323',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'356',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AC2323',
				a_color: 		'AC2323',
				b_color: 		'480F0F',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20101105-103120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18527',
internalId:  '',
customField: '20101104-122255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18422',
internalId:  '',
customField: '20101105-131714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18443',
internalId:  '',
customField: '20101105-131053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15769',
internalId:  '',
customField: '20080916-105057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20101104-121819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20101104-180425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18653',
internalId:  '',
customField: '20101104-180824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18674',
internalId:  '',
customField: '20101105-132418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18800',
internalId:  '',
customField: '20101104-194313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18926',
internalId:  '',
customField: '20101104-195938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18968',
internalId:  '',
customField: '20101105-110137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23522',
internalId:  '',
customField: '20080822-140140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19010',
internalId:  '',
customField: '20080916-105153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18464',
internalId:  '',
customField: '20101104-133100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18863',
internalId:  '',
customField: '20080916-105126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19115',
internalId:  '',
customField: '20101105-133628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19304',
internalId:  '',
customField: '20101105-133746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19199',
internalId:  '',
customField: '20080916-105218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19325',
internalId:  '',
customField: '20080916-113209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16201',
internalId:  '',
customField: '20080916-111106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19346',
internalId:  '',
customField: '20080916-111419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18485',
internalId:  '',
customField: '20101105-131530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18506',
internalId:  '',
customField: '20101104-175603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18548',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18569',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18590',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18611',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18632',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18695',
internalId:  '',
customField: '20101104-193434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18716',
internalId:  '',
customField: '20101104-194103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18737',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18758',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18779',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18821',
internalId:  '',
customField: '20101105-132741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18842',
internalId:  '',
customField: '20101104-195402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18884',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18905',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18947',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18989',
internalId:  '',
customField: '20101105-133049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23501',
internalId:  '',
customField: '20101105-133358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19031',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19052',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19073',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23543',
internalId:  '',
customField: '20080822-140140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23564',
internalId:  '',
customField: '20080822-140140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105301',
internalId:  '',
customField: '20101105-132243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19220',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19241',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19262',
internalId:  '',
customField: '20080822-131629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19283',
internalId:  '',
customField: '20080822-131629'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20IN3LHU';
var companyName   = 'TAMQUAM%2C+creant+espectacle';
var htmlTitle	  = 'TAMQUAM+GRUP';
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();
};

