/* [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','26601',jdecode('Home'),jdecode(''), jdecode('%2F26601.html'), 'true',[],'',''],
	['PAGE','26652',jdecode('Chi+siamo'),jdecode(''), jdecode('%2F26652%2Findex.html'), 'true',[ 
		['PAGE','26715',jdecode('Comitato+'),jdecode(''), jdecode('%2F26652%2F26715.html'), 'true',[],'',''],
		['PAGE','53701',jdecode('Insegnanti'),jdecode(''), jdecode('%2F26652%2F53701.html'), 'true',[],'',''],
		['PAGE','53301',jdecode('Monitrici'),jdecode(''), jdecode('%2F26652%2F53301.html'), 'true',[],'',''],
		['PAGE','52222',jdecode('Statuto'),jdecode(''), jdecode('%2F26652%2F52222.html'), 'true',[],'',''],
		['PAGE','344301',jdecode('Regolamento+'),jdecode(''), jdecode('%2F26652%2F344301.html'), 'true',[],'','']
	],'',''],
	['PAGE','359212',jdecode('Contatto'),jdecode(''), jdecode('%2F359212.html'), 'true',[],'',''],
	['PAGE','205901',jdecode('I+nostri+Sponsor'),jdecode(''), jdecode('%2F205901.html'), 'true',[],'',''],
	['PAGE','343001',jdecode('Risultati+test'),jdecode(''), jdecode('%2F343001%2Findex.html'), 'true',[ 
		['PAGE','212501',jdecode('stagione+2010+-+2011'),jdecode(''), jdecode('%2F343001%2F212501.html'), 'true',[],'',''],
		['PAGE','307501',jdecode('stagione+2009+-+2010'),jdecode(''), jdecode('%2F343001%2F307501.html'), 'true',[],'','']
	],'',''],
	['PAGE','342701',jdecode('Risultati+gare'),jdecode(''), jdecode('%2F342701%2Findex.html'), 'true',[ 
		['PAGE','59943',jdecode('stagione+2010+-+2011'),jdecode(''), jdecode('%2F342701%2F59943.html'), 'true',[],'',''],
		['PAGE','124101',jdecode('stagione+2009+-2010'),jdecode(''), jdecode('%2F342701%2F124101.html'), 'true',[],'','']
	],'',''],
	['PAGE','311101',jdecode('Annuncio+gare'),jdecode(''), jdecode('%2F311101.html'), 'true',[],'',''],
	['PAGE','342722',jdecode('Lugano+Cup'),jdecode(''), jdecode('%2F342722%2Findex.html'), 'true',[ 
		['PAGE','311801',jdecode('stagione+2010+-+2011'),jdecode(''), jdecode('%2F342722%2F311801.html'), 'true',[],'',''],
		['PAGE','158601',jdecode('Stagione+2009+-2010'),jdecode(''), jdecode('%2F342722%2F158601.html'), 'true',[],'',''],
		['PAGE','250901',jdecode('Stagione+2008+-+2009'),jdecode(''), jdecode('%2F342722%2F250901.html'), 'true',[],'','']
	],'',''],
	['PAGE','342743',jdecode('Trofeo+del+lago'),jdecode(''), jdecode('%2F342743%2Findex.html'), 'true',[ 
		['PAGE','311822',jdecode('stagione+2010+-+2011'),jdecode(''), jdecode('%2F342743%2F311822.html'), 'true',[],'',''],
		['PAGE','60090',jdecode('Stagione+2009+-+2010'),jdecode(''), jdecode('%2F342743%2F60090.html'), 'true',[],'',''],
		['PAGE','251401',jdecode('Stagione+2008+-+2009'),jdecode(''), jdecode('%2F342743%2F251401.html'), 'true',[],'','']
	],'',''],
	['PAGE','342522',jdecode('Gara+sociale'),jdecode(''), jdecode('%2F342522%2Findex.html'), 'true',[ 
		['PAGE','312001',jdecode('stagione+2010+-+2011'),jdecode(''), jdecode('%2F342522%2F312001.html'), 'true',[],'',''],
		['PAGE','251422',jdecode('Stagione+2009+-+2010'),jdecode(''), jdecode('%2F342522%2F251422.html'), 'true',[],'',''],
		['PAGE','251443',jdecode('Stagione+2008+-+2009'),jdecode(''), jdecode('%2F342522%2F251443.html'), 'true',[],'','']
	],'',''],
	['PAGE','76601',jdecode('Orari+e+tariffe+Sezioni'),jdecode(''), jdecode('%2F76601%2Findex.html'), 'true',[ 
		['PAGE','59922',jdecode('Orari+Amministrazione'),jdecode(''), jdecode('%2F76601%2F59922.html'), 'true',[],'',''],
		['PAGE','69101',jdecode('Pulcini'),jdecode(''), jdecode('%2F76601%2F69101.html'), 'true',[],'',''],
		['PAGE','68122',jdecode('Amatori++'),jdecode(''), jdecode('%2F76601%2F68122.html'), 'true',[],'',''],
		['PAGE','252401',jdecode('Goldies'),jdecode(''), jdecode('%2F76601%2F252401.html'), 'true',[],'',''],
		['PAGE','68101',jdecode('Artistica'),jdecode(''), jdecode('%2F76601%2F68101.html'), 'true',[],'',''],
		['PAGE','76622',jdecode('Danza'),jdecode(''), jdecode('%2F76601%2F76622.html'), 'true',[],'','']
	],'',''],
	['PAGE','26862',jdecode('Sezioni'),jdecode(''), jdecode('%2F26862%2Findex.html'), 'true',[ 
		['PAGE','252443',jdecode('Pulcini'),jdecode(''), jdecode('%2F26862%2F252443.html'), 'true',[],'',''],
		['PAGE','252422',jdecode('Amatori'),jdecode(''), jdecode('%2F26862%2F252422.html'), 'true',[],'',''],
		['PAGE','252464',jdecode('Goldies'),jdecode(''), jdecode('%2F26862%2F252464.html'), 'true',[],'',''],
		['PAGE','59985',jdecode('Artistica'),jdecode(''), jdecode('%2F26862%2F59985.html'), 'true',[],'',''],
		['PAGE','345301',jdecode('Danza'),jdecode(''), jdecode('%2F26862%2F345301.html'), 'true',[],'',''],
		['PAGE','317101',jdecode('Adulti'),jdecode(''), jdecode('%2F26862%2F317101.html'), 'true',[],'','']
	],'',''],
	['PAGE','256101',jdecode('Cool+%26+Clean'),jdecode(''), jdecode('%2F256101.html'), 'true',[],'',''],
	['PAGE','312401',jdecode('Comunicazioni'),jdecode(''), jdecode('%2F312401%2Findex.html'), 'true',[ 
		['PAGE','76643',jdecode('Stagione+2009+-+2010'),jdecode(''), jdecode('%2F312401%2F76643.html'), 'true',[],'','']
	],'',''],
	['PAGE','97101',jdecode('Programma+Stagionale'),jdecode(''), jdecode('%2F97101.html'), 'true',[],'',''],
	['PAGE','312701',jdecode('Photo+Gallery'),jdecode(''), jdecode('%2F312701%2Findex.html'), 'true',[ 
		['PAGE','258401',jdecode('Stagione+2009+-+2010'),jdecode(''), jdecode('%2F312701%2F258401.html'), 'true',[],'',''],
		['PAGE','91101',jdecode('Stagione+2008+-+2009'),jdecode(''), jdecode('%2F312701%2F91101.html'), 'true',[],'','']
	],'',''],
	['PAGE','128201',jdecode('Curiosit%C3%A0+'),jdecode(''), jdecode('%2F128201%2Findex.html'), 'true',[ 
		['PAGE','98606',jdecode('Libro+degli+ospiti'),jdecode(''), jdecode('%2F128201%2F98606.html'), 'true',[],'',''],
		['PAGE','98601',jdecode('Registro'),jdecode(''), jdecode('%2F128201%2F98601.html'), 'true',[],'','']
	],'',''],
	['PAGE','114701',jdecode('Links'),jdecode(''), jdecode('%2F114701.html'), 'true',[],'',''],
	['PAGE','98701',jdecode('Mappa'),jdecode(''), jdecode('%2F98701.html'), 'true',[],'',''],
	['PAGE','98801',jdecode('Calcolo+itinerario'),jdecode(''), jdecode('%2F98801.html'), 'true',[],'','']];
var siteelementCount=55;
theSitetree.topTemplateName='Match';
theSitetree.paletteFamily='2354B7';
theSitetree.keyvisualId='2709';
theSitetree.keyvisualName='kv_2709.jpg';
theSitetree.fontsetId='10404';
theSitetree.graphicsetId='10633';
theSitetree.contentColor='2354B7';
theSitetree.contentBGColor='C6E2FE';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Match',
				paletteFamily: 	'2354B7',
				keyvisualId: 	'2709',
				keyvisualName: 	'kv_2709.jpg',
				fontsetId: 		'10404',
				graphicsetId: 	'10633',
				contentColor: 	'2354B7',
				contentBGColor: 'C6E2FE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'2354B7',
				e_color: 		'707070',
				f_color: 		'707070',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-17178673']={
webappId:    '1501',
documentId:  '26601',
internalId:  '17178673',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26652',
internalId:  '',
customField: '20111114-153912'
};
webappMappings['1002']=webappMappings['1002-98606abw0x0in2une']={
webappId:    '1002',
documentId:  '98606',
internalId:  '98606abw0x0in2une',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20120202-145040'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '26601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '343001',
internalId:  '',
customField: '20111223-164309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '311101',
internalId:  '',
customField: '20110719-165623'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '98801',
internalId:  'routing',
customField: 'fr_FR'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '98701',
internalId:  'location',
customField: 'language:fr;country:FR;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26715',
internalId:  '',
customField: '20111125-150223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53701',
internalId:  '',
customField: '20111004-162636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53301',
internalId:  '',
customField: '20111004-164152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52222',
internalId:  '',
customField: '20111114-154009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '311822',
internalId:  '',
customField: '20110402-190555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '205901',
internalId:  '',
customField: '20111004-164447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212501',
internalId:  '',
customField: '20110719-165046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124101',
internalId:  '',
customField: '20100719-142305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59943',
internalId:  '',
customField: '20110315-180149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158601',
internalId:  '',
customField: '20091102-105350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60090',
internalId:  '',
customField: '20100320-191242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76601',
internalId:  '',
customField: '20071220-230648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59922',
internalId:  '',
customField: '20111006-161213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69101',
internalId:  '',
customField: '20090728-162746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68122',
internalId:  '',
customField: '20090728-170811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68101',
internalId:  '',
customField: '20111006-161526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76622',
internalId:  '',
customField: '20071003-202246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76643',
internalId:  '',
customField: '20100514-145256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '317101',
internalId:  '',
customField: '20110805-161009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '252422',
internalId:  '',
customField: '20111210-121701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '252443',
internalId:  '',
customField: '20110805-160902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97101',
internalId:  '',
customField: '20110719-173631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26862',
internalId:  '',
customField: '20100812-215702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59985',
internalId:  '',
customField: '20110804-162400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '252401',
internalId:  '',
customField: '20090727-203842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91101',
internalId:  '',
customField: '20090730-170833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128201',
internalId:  '',
customField: '20090727-183455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98606',
internalId:  '',
customField: '20071008-231007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98601',
internalId:  '',
customField: '20071008-231007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98701',
internalId:  '',
customField: '20090731-204245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98801',
internalId:  '',
customField: '20090731-205918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114701',
internalId:  '',
customField: '20111207-163927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '307501',
internalId:  '',
customField: '20100514-153323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '250901',
internalId:  '',
customField: '20090727-181521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '251401',
internalId:  '',
customField: '20090727-182615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '251422',
internalId:  '',
customField: '20100320-191220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '251443',
internalId:  '',
customField: '20090727-182749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '252464',
internalId:  '',
customField: '20110804-161021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '256101',
internalId:  '',
customField: '20090729-232652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '258401',
internalId:  '',
customField: '20100321-124850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '312001',
internalId:  '',
customField: '20110402-191308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '342522',
internalId:  '',
customField: '20110719-163934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '311801',
internalId:  '',
customField: '20110114-143444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '312401',
internalId:  '',
customField: '20120110-175411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '312701',
internalId:  '',
customField: '20120112-172336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '342701',
internalId:  '',
customField: '20120201-161812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '342722',
internalId:  '',
customField: '20111205-164050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '342743',
internalId:  '',
customField: '20120131-171357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '344301',
internalId:  '',
customField: '20110728-175034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '345301',
internalId:  '',
customField: '20110804-162039'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '359212',
internalId:  '-',
customField: '20111124-163504'
};
webappMappings['7008']=webappMappings['7008-13198']={
webappId:    '7008',
documentId:  '359212',
internalId:  '13198',
customField: 'language:fr;country:FR;'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2UNE';
var companyName   = 'CLUB+PATTINAGGIO+LUGANO';
var htmlTitle	  = 'Club+Pattinaggio+Lugano';
var metaKeywords  = 'skating%2C+pattinaggio';
var metaContents  = 'skating%2Cpattinaggio';
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();
};

