/* [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','4593',jdecode('+Inici'),jdecode(''), jdecode('%2F4593.html'), 'true',[],'',''],
	['PAGE','5028',jdecode('Hist%C3%B2ria+'),jdecode(''), jdecode('%2F5028%2Findex.html'), 'true',[ 
		['PAGE','5109',jdecode('Cronologia+'),jdecode(''), jdecode('%2F5028%2F5109.html'), 'true',[],'',''],
		['PAGE','5082',jdecode('Etiqueta+'),jdecode(''), jdecode('%2F5028%2F5082.html'), 'true',[],'',''],
		['PAGE','5055',jdecode('Jiujitsu+%2F+Judo'),jdecode(''), jdecode('%2F5028%2F5055.html'), 'true',[],'',''],
		['PAGE','4650',jdecode('Dedicat%C3%B2ria'),jdecode(''), jdecode('%2F5028%2F4650.html'), 'true',[],'','']
	],'',''],
	['PAGE','36651',jdecode('Associaci%C3%B3+Esportiva'),jdecode(''), jdecode('%2F36651%2Findex.html'), 'true',[ 
		['PAGE','64749',jdecode('President'),jdecode(''), jdecode('%2F36651%2F64749.html'), 'true',[],'',''],
		['PAGE','64770',jdecode('Codi+Intern'),jdecode(''), jdecode('%2F36651%2F64770.html'), 'true',[],'','']
	],'',''],
	['PAGE','4677',jdecode('Organitzaci%C3%B3'),jdecode(''), jdecode('%2F4677%2Findex.html'), 'true',[ 
		['PAGE','5001',jdecode('President'),jdecode(''), jdecode('%2F4677%2F5001.html'), 'true',[],'','']
	],'',''],
	['PAGE','85749',jdecode('GOKIO'),jdecode(''), jdecode('%2F85749%2Findex.html'), 'true',[ 
		['PAGE','93849',jdecode('Programa+Oficial'),jdecode(''), jdecode('%2F85749%2F93849.html'), 'true',[],'',''],
		['PAGE','38851',jdecode('Educaci%C3%B3++F%C3%ADsica'),jdecode(''), jdecode('%2F85749%2F38851.html'), 'true',[],'',''],
		['PAGE','45349',jdecode('Ki+'),jdecode(''), jdecode('%2F85749%2F45349.html'), 'true',[],'',''],
		['PAGE','63149',jdecode('Atemi-waza'),jdecode(''), jdecode('%2F85749%2F63149.html'), 'true',[],'',''],
		['PAGE','103749',jdecode('kyusho-Jitsu+'),jdecode(''), jdecode('%2F85749%2F103749.html'), 'true',[],'',''],
		['PAGE','63170',jdecode('Anatomia'),jdecode(''), jdecode('%2F85749%2F63170.html'), 'true',[],'','']
	],'',''],
	['PAGE','31151',jdecode('Quadre+de+cinturons+'),jdecode(''), jdecode('%2F31151%2Findex.html'), 'true',[ 
		['PAGE','32763',jdecode('Cinturons+negres+'),jdecode(''), jdecode('%2F31151%2F32763.html'), 'true',[],'','']
	],'',''],
	['PAGE','5299',jdecode('Galeria+d%C2%B4imatges'),jdecode(''), jdecode('%2F5299%2Findex.html'), 'true',[ 
		['PAGE','7215',jdecode('Mestres+del+Budo+'),jdecode(''), jdecode('%2F5299%2F7215.html'), 'true',[],'','']
	],'',''],
	['PAGE','45370',jdecode('Glossari+Japon%C3%A8s'),jdecode(''), jdecode('%2F45370.html'), 'true',[],'',''],
	['PAGE','58449',jdecode('Filosof%C3%ADa++Oriental'),jdecode(''), jdecode('%2F58449%2Findex.html'), 'true',[ 
		['PAGE','38878',jdecode('Geografia+'),jdecode(''), jdecode('%2F58449%2F38878.html'), 'true',[],'',''],
		['PAGE','38905',jdecode('Pensament+i+religi%C3%B3+'),jdecode(''), jdecode('%2F58449%2F38905.html'), 'true',[],'','']
	],'',''],
	['PAGE','59749',jdecode('Calendari+de+Tecnificaci%C3%B3'),jdecode(''), jdecode('%2F59749.html'), 'true',[],'',''],
	['PAGE','91649',jdecode('Entitats+colaboradores'),jdecode(''), jdecode('%2F91649.html'), 'true',[],'',''],
	['PAGE','71549',jdecode('not%C3%ADcies'),jdecode(''), jdecode('%2F71549%2Findex.html'), 'true',[ 
		['PAGE','71570',jdecode('retalls+de+prensa'),jdecode(''), jdecode('%2F71549%2F71570.html'), 'true',[],'','']
	],'',''],
	['PAGE','5136',jdecode('Contactar+'),jdecode(''), jdecode('%2F5136%2Findex.html'), 'true',[ 
		['PAGE','5163',jdecode('Links+d%C2%B4inter%C3%A9s'),jdecode(''), jdecode('%2F5136%2F5163.html'), 'true',[],'',''],
		['PAGE','5190',jdecode('+On+ens+pots+trobar%3F'),jdecode(''), jdecode('%2F5136%2F5190.html'), 'true',[],'','']
	],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Pain';
theSitetree.paletteFamily='4C4C4C';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10379';
theSitetree.graphicsetId='10551';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='4C4C4C';
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: 			'Pain',
				paletteFamily: 	'4C4C4C',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10379',
				graphicsetId: 	'10551',
				contentColor: 	'FFFFFF',
				contentBGColor: '4C4C4C',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-3459083']={
webappId:    '1501',
documentId:  '4593',
internalId:  '3459083',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4593',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-83dff376b849e172c43549cc8ca7aa11']={
webappId:    '7060',
documentId:  '5299',
internalId:  '83dff376b849e172c43549cc8ca7aa11',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-f55fe5169695b8944688f3d6997dbd68']={
webappId:    '7060',
documentId:  '7215',
internalId:  'f55fe5169695b8944688f3d6997dbd68',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-12d96a3dd60403901e0bc1d18f833150']={
webappId:    '7060',
documentId:  '32763',
internalId:  '12d96a3dd60403901e0bc1d18f833150',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4593',
internalId:  '',
customField: '20120115-193656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36651',
internalId:  '',
customField: '20100221-225239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64770',
internalId:  '',
customField: '20100417-230159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64749',
internalId:  '',
customField: '20111126-232132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5299',
internalId:  '',
customField: '20070831-183424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5028',
internalId:  '',
customField: '20120115-200242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5055',
internalId:  '',
customField: '20100218-225207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5082',
internalId:  '',
customField: '20111210-190539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5109',
internalId:  '',
customField: '20100218-224947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4650',
internalId:  '',
customField: '20100417-230035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4677',
internalId:  '',
customField: '20111127-135221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20110703-155436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7215',
internalId:  '',
customField: '20080210-202142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31151',
internalId:  '',
customField: '20090214-154519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32763',
internalId:  '',
customField: '20070429-114725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38851',
internalId:  '',
customField: '20080413-185929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45349',
internalId:  '',
customField: '20100417-230310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63149',
internalId:  '',
customField: '20071125-101750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63170',
internalId:  '',
customField: '20080321-143437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58449',
internalId:  '',
customField: '20120115-192245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38878',
internalId:  '',
customField: '20070831-183852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38905',
internalId:  '',
customField: '20070828-231349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45370',
internalId:  '',
customField: '20111210-194831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59749',
internalId:  '',
customField: '20100828-152118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5136',
internalId:  '',
customField: '20080228-220257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5163',
internalId:  '',
customField: '20080301-233004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5190',
internalId:  '',
customField: '20111002-000107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71549',
internalId:  '',
customField: '20101128-093843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71570',
internalId:  '',
customField: '20101128-094210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85749',
internalId:  '',
customField: '20100218-203918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91649',
internalId:  '',
customField: '20100417-234326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93849',
internalId:  '',
customField: '20100218-204014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103749',
internalId:  '',
customField: '20080413-130023'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010INEZOT';
var companyName   = '';
var htmlTitle	  = 'JIUJITSU.CAT';
var metaKeywords  = 'qwertyui';
var metaContents  = 'Informaci%EF%BF%BDn+i+divulgaci%EF%BF%BDn+del+arte+marcial+del+jiujitsu';
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();
};

