/* [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','701',jdecode('INICI'),jdecode(''),'/701.html','true',[],'',''],
	['PAGE','72712',jdecode('PEDIGRI+OFICIAL+L.C.C.'),jdecode(''),'/72712.html','true',[],'',''],
	['PAGE','815',jdecode('TRAMITS-IMPRESOS'),jdecode(''),'/815/index.html','true',[ 
		['PAGE','29301',jdecode('Impresos'),jdecode(''),'/815/29301.html','true',[],'','']
	],'',''],
	['PAGE','58301',jdecode('RECONEIXEMENT+'),jdecode(''),'/58301.html','true',[],'',''],
	['PAGE','752',jdecode('CURSOS+Introducci%C3%B3'),jdecode(''),'/752.html','true',[],'',''],
	['PAGE','18701',jdecode('Curs+Ensinistrament'),jdecode(''),'/18701.html','true',[],'',''],
	['PAGE','19001',jdecode('Curs+Perruqueria'),jdecode(''),'/19001.html','true',[],'',''],
	['PAGE','19022',jdecode('Curs+Etologia'),jdecode(''),'/19022.html','true',[],'',''],
	['PAGE','19043',jdecode('Curs+Criador+de+gossos'),jdecode(''),'/19043.html','true',[],'',''],
	['PAGE','19106',jdecode('Curs+Clicker'),jdecode(''),'/19106.html','true',[],'',''],
	['PAGE','92312',jdecode('Educaci%C3%B3+pel+Cadell'),jdecode(''),'/92312.html','true',[],'',''],
	['PAGE','19127',jdecode('Curs+Gossos+Assist%C3%A8ncia'),jdecode(''),'/19127/index.html','true',[ 
		['PAGE','23801',jdecode('Rastreig+i+Salvament'),jdecode(''),'/19127/23801.html','true',[],'',''],
		['PAGE','46101',jdecode('Ter%C3%A0pia'),jdecode(''),'/19127/46101.html','true',[],'',''],
		['PAGE','46143',jdecode('Escolta'),jdecode(''),'/19127/46143.html','true',[],'','']
	],'',''],
	['PAGE','41101',jdecode('Altres+Cursos'),jdecode(''),'/41101/index.html','true',[ 
		['PAGE','19064',jdecode('Jutge+Bellesa'),jdecode(''),'/41101/19064.html','true',[],'',''],
		['PAGE','19085',jdecode('Jutge+B.C.C.'),jdecode(''),'/41101/19085.html','true',[],'',''],
		['PAGE','24101',jdecode('Comissari+de+Ring'),jdecode(''),'/41101/24101.html','true',[],'',''],
		['PAGE','41122',jdecode('Figurant'),jdecode(''),'/41101/41122.html','true',[],'','']
	],'',''],
	['PAGE','773',jdecode('EXPO+-+CANINA'),jdecode(''),'/773/index.html','true',[ 
		['PAGE','40801',jdecode('Impresos+Inscripcions+'),jdecode(''),'/773/40801.html','true',[],'',''],
		['PAGE','19985',jdecode('Concurs+Infantil'),jdecode(''),'/773/19985.html','true',[],'',''],
		['PAGE','55701',jdecode('Presentaci%C3%B3+al+ring'),jdecode(''),'/773/55701.html','true',[],'',''],
		['PAGE','19901',jdecode('Bases'),jdecode(''),'/773/19901.html','true',[],'','']
	],'',''],
	['PAGE','19964',jdecode('BON+CIUTAD%C3%80+CAN%C3%8D'),jdecode(''),'/19964.html','true',[],'',''],
	['PAGE','19922',jdecode('CALENDARI+EXPOS'),jdecode(''),'/19922.html','true',[],'',''],
	['PAGE','19943',jdecode('FOTOS+EXPOS'),jdecode(''),'/19943/index.html','true',[ 
		['PAGE','100834',jdecode('Badalona+2010'),jdecode(''),'/19943/100834.html','true',[],'',''],
		['PAGE','100855',jdecode('Mollerussa+2010'),jdecode(''),'/19943/100855.html','true',[],'',''],
		['PAGE','106434',jdecode('Sant+Just+Desvern+2010'),jdecode(''),'/19943/106434.html','true',[],'',''],
		['PAGE','110034',jdecode('Vilafranca+2010'),jdecode(''),'/19943/110034.html','true',[],'',''],
		['PAGE','79412',jdecode('Barber%C3%A0+del+Vall%C3%A8s+2009'),jdecode(''),'/19943/79412.html','true',[],'',''],
		['PAGE','65901',jdecode('Encamp+2009'),jdecode(''),'/19943/65901.html','true',[],'',''],
		['PAGE','48022',jdecode('Puigcerd%C3%A0+2009'),jdecode(''),'/19943/48022.html','true',[],'',''],
		['PAGE','48043',jdecode('Badalona+2009'),jdecode(''),'/19943/48043.html','true',[],'',''],
		['PAGE','48085',jdecode('Vilafranca+2009'),jdecode(''),'/19943/48085.html','true',[],'',''],
		['PAGE','48064',jdecode('Mollerussa+2009'),jdecode(''),'/19943/48064.html','true',[],'',''],
		['PAGE','48106',jdecode('Llavaneres+2009'),jdecode(''),'/19943/48106.html','true',[],'',''],
		['PAGE','48127',jdecode('St.+Just+Desvern+2009'),jdecode(''),'/19943/48127.html','true',[],'',''],
		['PAGE','51301',jdecode('La+Canonja+2009'),jdecode(''),'/19943/51301.html','true',[],'','']
	],'',''],
	['PAGE','33801',jdecode('CADELLADES+'),jdecode(''),'/33801.html','true',[],'',''],
	['PAGE','20901',jdecode('REGISTRE+XIP+gratuit'),jdecode(''),'/20901.html','true',[],'',''],
	['PAGE','23101',jdecode('COM+ARRIBAR'),jdecode(''),'/23101.html','true',[],'','']];
var siteelementCount=45;
theSitetree.topTemplateName='Surround';
theSitetree.paletteFamily='914A94';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10514';
theSitetree.graphicsetId='11134';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='8F3D88';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Surround',
				paletteFamily: 	'914A94',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10514',
				graphicsetId: 	'11134',
				contentColor: 	'FFFFFF',
				contentBGColor: '8F3D88',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'DD7CD6',
				e_color: 		'DD7CD6',
				f_color: 		'DD7CD6',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100324-170939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20090730-172626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20100324-171207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19022',
internalId:  '',
customField: '20090730-173056'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-8658488']={
webappId:    '1501',
documentId:  '701',
internalId:  '8658488',
customField: '1501'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '23101',
internalId:  'routing',
customField: 'es_ES'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20090723-091718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24101',
internalId:  '',
customField: '20090730-173449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20100729-135139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19964',
internalId:  '',
customField: '20090730-173633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19985',
internalId:  '',
customField: '20090720-144255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19922',
internalId:  '',
customField: '20100701-160106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19943',
internalId:  '',
customField: '20090730-173719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20100729-134444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '815',
internalId:  '',
customField: '20090730-172503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20901',
internalId:  '',
customField: '20090722-102133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29301',
internalId:  '',
customField: '20100701-165238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41101',
internalId:  '',
customField: '20090730-173344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19043',
internalId:  '',
customField: '20090730-173118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19106',
internalId:  '',
customField: '20090730-173148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19127',
internalId:  '',
customField: '20090730-173212'
};
webappMappings['7060']=webappMappings['7060-5797d4d4dec7fb544a9cd347604ba09e']={
webappId:    '7060',
documentId:  '33801',
internalId:  '5797d4d4dec7fb544a9cd347604ba09e',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33801',
internalId:  '',
customField: '20090720-080944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20090730-173235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46101',
internalId:  '',
customField: '20090730-173300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40801',
internalId:  '',
customField: '20090730-145934'
};
webappMappings['7060']=webappMappings['7060-8c99260234fff64ec8191248e0708d49']={
webappId:    '7060',
documentId:  '51301',
internalId:  '8c99260234fff64ec8191248e0708d49',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51301',
internalId:  '',
customField: '20090730-173835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46143',
internalId:  '',
customField: '20090730-173322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19064',
internalId:  '',
customField: '20090730-173407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19085',
internalId:  '',
customField: '20090730-173426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41122',
internalId:  '',
customField: '20090730-173509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55701',
internalId:  '',
customField: '20090720-142909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19901',
internalId:  '',
customField: '20100324-173545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65901',
internalId:  '',
customField: '20090730-173812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48022',
internalId:  '',
customField: '20100315-184515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48043',
internalId:  '',
customField: '20090720-150927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48064',
internalId:  '',
customField: '20100528-125333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48085',
internalId:  '',
customField: '20090720-151121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48106',
internalId:  '',
customField: '20090720-151204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48127',
internalId:  '',
customField: '20100528-122331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58301',
internalId:  '',
customField: '20090730-172604'
};
webappMappings['7060']=webappMappings['7060-74772cd135953a7b9da8d11494f5cb99']={
webappId:    '7060',
documentId:  '65901',
internalId:  '74772cd135953a7b9da8d11494f5cb99',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72712',
internalId:  '',
customField: '20090730-172449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79412',
internalId:  '',
customField: '20091214-172446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92312',
internalId:  '',
customField: '20100330-185535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100834',
internalId:  '',
customField: '20100603-130851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100855',
internalId:  '',
customField: '20100602-184209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106434',
internalId:  '',
customField: '20100610-130724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110034',
internalId:  '',
customField: '20100611-102826'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INLMET';
var companyName   = 'REIAL+SOCIETAT+CANINA+DE+CATALUNYA++-++Tel%2FFax+93-285.11.28';
var htmlTitle	  = 'caninacat.org';
var metaKeywords  = 'cursos%2C+adiestramiento%2C+ensinistrament%2C+canina%2C+pedigree%2C+pedigr%C3%AD%2C+perros%2C+gossos%2C+criador%2C+reconocimiento%2C+reconeixement%2C+peluqueria%2C+perruqueria%2C+exposiciones+caninas%2C+exposicions+canines%2C+real+sociedad+canina%2C+reial+societat+canina%2C+bon+ciutad%C3%A0+can%C3%AD%2C+buen+ciudadano+canino.';
var metaContents  = 'Pedigr%C3%AD+Oficial%2C+Reconocimientos+de+Raza%2C+Cursos+de+Adiestramiento%2C+Peluqueria%2C+Etologia%2C+Criador%2C+Exposiciones+Caninas+de+Belleza+y+Prueba+de+Buen+Ciudadano+Canino.+';
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();
};
