SISAL.MATCHPOINT=(function MATCHPOINT(){var pageId,parentId,portalPath="/online",externalGameCookie="externalGame";function doTrackingGoogleAnalytics(trackingName){try{if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("doTrackingGoogleAnalytics - inizio");SISAL.logger.debug("doTrackingGoogleAnalytics - trackingName: '"+trackingName+"'")}_gaq.push(['_trackPageview',trackingName]);if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("doTrackingGoogleAnalytics - fine")}}catch(e){if(SISAL.logger.isErrorEnabled()){SISAL.logger.error("doTrackingGoogleAnalytics - ",e)}}}function slideToggle_menu(targetDiv,options){options=SISAL.isNullOrEmpty(options)?{}:SISAL.copy(options);options.velocity=SISAL.isNullOrEmpty(options.velocity)?'slow':options.velocity;options.cssTarget=(SISAL.isNullOrEmpty(options.cssTarget)||(typeof options.cssTarget!=="string"))?"":options.cssTarget;options.cssOpen=(SISAL.isNullOrEmpty(options.cssOpen)||(typeof options.cssOpen!=="string"))?"":options.cssOpen;options.cssClose=(SISAL.isNullOrEmpty(options.cssClose)||(typeof options.cssClose!=="string"))?"":options.cssClose;var obj,display="";display=$('#'+targetDiv).css('display');if(display==="block"){display="none";if(!SISAL.isNullOrEmpty(options.cssTarget)){obj=document.getElementById(options.cssTarget);obj.className=options.cssClose}}else{display="block";if(!SISAL.isNullOrEmpty(options.cssTarget)){obj=document.getElementById(options.cssTarget);obj.className=options.cssOpen}}SISAL.FX.slideToggle(targetDiv,{velocity:options.velocity});return display}function slideToggle_boxAScomparsa(targetDiv,TargetCss){var display=0;if(!SISAL.isNullOrEmpty(TargetCss)){display=slideToggle_menu(targetDiv,{velocity:'fast',cssTarget:TargetCss,cssOpen:'tableScomparsa_title tableScomparsa_open',cssClose:'tableScomparsa_title tableScomparsa_close'})}else{display=slideToggle_menu(targetDiv,{velocity:'fast'})}return display}function manageBoxAScomparsa(targetDiv,TargetCss){var display=0,numeroBox=0,i=0,idAnalizzato="",idDaElaborare="";if(SISAL.isNullOrEmpty(targetDiv)||SISAL.isNullOrEmpty(TargetCss)){numeroBox=$('.tableScomparsa_title').get().length;if(numeroBox>0){for(i=0;i<numeroBox;i+=1){idAnalizzato=$('.tableScomparsa_title').get()[i].id.replace('BoxAScomparsa_title_','');if($('#BoxAScomparsa_title_'+idAnalizzato).hasClass('tableScomparsa_opened_')&&(i===0)){slideToggle_boxAScomparsa('BoxAScomparsa_content_'+idAnalizzato,'BoxAScomparsa_title_'+idAnalizzato)}else if($('#BoxAScomparsa_title_'+idAnalizzato).hasClass('tableScomparsa_opened_si')){slideToggle_boxAScomparsa('BoxAScomparsa_content_'+idAnalizzato,'BoxAScomparsa_title_'+idAnalizzato)}}}}else{numeroBox=$('.tableScomparsa_title').get().length;if(numeroBox>0){idDaElaborare=targetDiv.replace('BoxAScomparsa_content_','');for(i=0;i<numeroBox;i+=1){idAnalizzato=$('.tableScomparsa_title').get()[i].id.replace('BoxAScomparsa_title_','');if(idAnalizzato!==idDaElaborare){if($('#BoxAScomparsa_content_'+idAnalizzato).css('display')!=='none'){slideToggle_boxAScomparsa('BoxAScomparsa_content_'+idAnalizzato,'BoxAScomparsa_title_'+idAnalizzato)}}else{slideToggle_boxAScomparsa(targetDiv,TargetCss)}}}}return display}function slideToggle_menustat_liv2(targetDiv,TargetCss){var display;if(!SISAL.isNullOrEmpty(TargetCss)){display=slideToggle_menu(targetDiv,{velocity:'fast',cssTarget:TargetCss,cssOpen:'menustat_voce1 color_menustat_voce1_sel',cssClose:'menustat_voce1 color_menustat_voce1'})}else{display=slideToggle_menu(targetDiv,{velocity:'fast'})}return display}function slideToggle_menustat_liv2_link(targetDiv,TargetCss){var display;if(!SISAL.isNullOrEmpty(TargetCss)){display=slideToggle_menu(targetDiv,{velocity:'fast',cssTarget:TargetCss,cssOpen:'menustat_voce1_link color_menustat_voce1_sel',cssClose:'menustat_voce1_link color_menustat_voce1'})}else{display=slideToggle_menu(targetDiv,{velocity:'fast'})}return display}function slideToggle_menudin_liv2(targetDiv,TargetCss){var display;if(!SISAL.isNullOrEmpty(TargetCss)){display=slideToggle_menu(targetDiv,{velocity:'fast',cssTarget:TargetCss,cssOpen:'menudin_voce1 color_menudin_voce1_sel',cssClose:'menudin_voce1 color_menudin_voce1'})}else{display=slideToggle_menu(targetDiv,{velocity:'fast'})}return display}function controlloPartner(){var partner=SISAL.getParameter("mppartner");if(!SISAL.isNullOrEmpty(partner)){SISAL.setCookie("mppartner",{value:partner,days:30})}}function notificaPartner(){var iframeElement=document.createElement("iframe");iframeElement.src="/RegistrazioneNuovo/pubblico/notificaPartner.jsp";iframeElement.style.width="0px";iframeElement.style.height="0px";$(document).ready(function(){document.getElementsByTagName("body")[0].appendChild(iframeElement)})}function numberToValuta(number){var numberStr=parseFloat(number).toFixed(2).toString(),numFormatDec,numFormat=[];numFormatDec=numberStr.slice(-2);numberStr=numberStr.substring(0,numberStr.length-3);while(numberStr.length>3){numFormat.unshift(numberStr.slice(-3));numberStr=numberStr.substring(0,numberStr.length-3)}numFormat.unshift(numberStr);return numFormat.join('.')+','+numFormatDec}function mantenimentoSessioneLogin(options){options=SISAL.isNullOrEmpty(options)?{}:SISAL.copy(options);if(!SISAL.isNullOrEmpty(SISAL.getCookie('login'))){SISAL.ajax("https://"+location.hostname+"/LoginNuovo/pubblico/servlet/keepalive",options)}}function controlloLogin(){var cookie_successoLogin=SISAL.getCookie('successoLogin'),cookie_logout=SISAL.getCookie('logout'),cookie_login=SISAL.getCookie('login'),cookie_anagrafica=SISAL.getCookie('anagrafica'),cookie_erroreLogin,cookie_codiceConto=SISAL.getCookie('codiceConto'),messaggio,saldo,bonus,scaduto,scadenza,statoPassword,scadenzaPassword,sessionTimeout,impostazioniSicurezza,controlloSicurezza,passwordObbligatoria,urlSicurezza,urlProfilo,dataUltimoLogin,data,ora,urlRegistrazione,urlRecuperoPassword,redirect,popupLogin=true,URLAccettazione,urlNuovoContratto;if(!SISAL.isNullOrEmpty(cookie_login)){$('#logoutNomeCognome').html(SISAL.getCookieField("anagrafica","nome")+" "+SISAL.getCookieField("anagrafica","cognome"));$('#logoutCodiceConto').html(SISAL.getCookieField("login","codiceConto"));$('#logoutCodiceFiscale').html(SISAL.getCookieField("anagrafica","codiceFiscale"));saldo=SISAL.getCookieField("saldo","saldoDisponibile");saldo=isNaN(saldo)?"":numberToValuta(saldo/100)+" &euro;";$('#logoutSaldo').html(saldo);bonus=SISAL.getCookieField("saldo","bonus");bonus=isNaN(bonus)?"":numberToValuta(bonus/100)+" &euro;";$('#logoutBonus').html(bonus);dataUltimoLogin=SISAL.getCookieField("login","dataUltimoLogin");data=dataUltimoLogin.match(new RegExp("\\d\\d\/\\d\\d\/\\d\\d\\d\\d"));data=data===null?null:data[0];ora=dataUltimoLogin.match(new RegExp("\\d\\d:\\d\\d:\\d\\d"));ora=ora===null?null:ora[0];$('#logoutDataUltimoLogin').html(data);$('#logoutOraUltimoLogin').html(ora);$('#containerHTML_login').css('display','none');$('#containerHTML_logout').css('display','');sessionTimeout=(SISAL.getCookieField("infoLogin","timeoutSessione")/(60*24));impostazioniSicurezza=SISAL.getCookieField("login","impostazioniSicurezza");controlloSicurezza=SISAL.getCookieField("infoLogin","controlloSicurezza");urlSicurezza=SISAL.getCookieField("infoLogin","urlSicurezza");URLAccettazione=SISAL.getCookieField("infoLogin","URLAccettazione");urlNuovoContratto="https://"+window.document.domain+"/online/My-Sisal/Nuovo-Contratto";scadenza=SISAL.getCookieField("login","giorniScadenza");scadenza=parseInt(scadenza,10);passwordObbligatoria=SISAL.getCookieField("infoLogin","passwordObbligatoria");urlProfilo=SISAL.getCookieField("infoLogin","urlProfilo");if(!SISAL.isNullOrEmpty(SISAL.getCookieField("login","scaduto"))&&!SISAL.isNullOrEmpty(SISAL.getCookieField("login","giorniScadenzaPassword"))&&!SISAL.isNullOrEmpty(SISAL.getCookieField("login","statoPassword"))&&!SISAL.isNullOrEmpty(SISAL.getCookieField("infoLogin","passwordObbligatoria"))){scaduto=SISAL.getCookieField("login","scaduto");scadenzaPassword=SISAL.getCookieField("login","giorniScadenzaPassword");statoPassword=SISAL.getCookieField("login","statoPassword");if(SISAL.isNullOrEmpty(SISAL.getCookieField("infoLogin","scaduto"))&&SISAL.isNullOrEmpty(SISAL.getCookieField("infoLogin","scadenzaPassword"))&&SISAL.isNullOrEmpty(SISAL.getCookieField("infoLogin","statoPassword"))){SISAL.setCookie('infoLogin',{value:SISAL.getCookie('infoLogin')+";scaduto="+scaduto+";scadenzaPassword="+scadenzaPassword+";statoPassword="+statoPassword,secure:true})}}else{scaduto=SISAL.getCookieField('infoLogin','scaduto');scadenzaPassword=SISAL.getCookieField('infoLogin','scadenzaPassword');statoPassword=SISAL.getCookieField('infoLogin','statoPassword')}if(URLAccettazione*1===0){if(location.href.replace(location.search,"")!==urlNuovoContratto){location.href="/online/My-Sisal/Nuovo-Contratto"}return false}if(passwordObbligatoria==="true"&&statoPassword==="0"&&location.href.replace(location.search,"")!==urlSicurezza&&location.href.replace(location.search,"")!==urlSicurezza+"/benvenuto"){redirect=urlSicurezza}if(SISAL.isNullOrEmpty(redirect)&&statoPassword==="2"&&location.href.replace(location.search,"")!==urlProfilo){redirect=urlProfilo}if(!SISAL.isNullOrEmpty(cookie_successoLogin)&&SISAL.isNullOrEmpty(redirect)){if(controlloSicurezza==="true"&&impostazioniSicurezza!=="5"&&impostazioniSicurezza!=="7"&&location.href.replace(location.search,"")!==urlSicurezza&&location.href.replace(location.search,"")!==urlSicurezza+"/benvenuto"&&location.href.replace(location.search,"")!==urlProfilo){redirect=urlSicurezza}if(statoPassword==="2"&&location.href.replace(location.search,"")!==urlProfilo){redirect=urlProfilo}else if(statoPassword==="1"&&scadenzaPassword>0){messaggio="<div style=\"text-align: justify;\">"+"<p>Tra "+scadenzaPassword+" giorni"+" la tua password scadr&agrave.</p>"+"<p>Vuoi cambiarla subito?</p>"+"</div>";SISAL.FX.showOnElement_TemplatePopup('errorBody','mp.alert.buttonconfannulla.html',{"{title}":"Password","{content}":messaggio,"{buttonclickAnnulla}":"<hideThis>","{buttontextAnnulla}":"Annulla","{buttonclickConferma}":"<href:"+urlProfilo+"?attivaModificaPassword=true"+">","{buttontextConferma}":"Cambia la password",width:'540px'});cookie_login=cookie_login.replace("giorniScadenzaPassword=","giorniPassword=");SISAL.setCookie('login',{value:cookie_login,secure:true})}else if(scaduto==="true"){cookie_login=cookie_login.replace("scaduto=true","scaduto=false");SISAL.setCookie('login',{value:cookie_login,secure:true})}else if(scadenza>=0){messaggio="<div style=\"text-align: justify;\">"+"<p>Gentile Cliente,</p>"+"<p style=\"color: red;\">Ti ricordiamo che il tuo conto di gioco "+(scadenza>0?"scadr&agrave tra "+scadenza+" giorni":"scade oggi")+"</p>"+"<b>Torna in gioco con Sisal Matchpoint !</b>"+"<br><br>"+"Effettua subito una scommessa o gioca al gratta e vinci !"+"<br><br>"+"Il tuo saldo non ti consente di giocare ?<br>"+"Effettua subito un deposito con carta di credito !"+"</div>";SISAL.FX.showOnElement_TemplatePopup('errorBody','mp.alert.buttonok.html',{"{title}":"Login","{content}":messaggio,"{buttonclick}":"<hideThis>","{buttontext}":"OK",width:'540px'});cookie_login=cookie_login.replace("giorniScadenza=","giorni=");SISAL.setCookie('login',{value:cookie_login,secure:true})}else{scadenza=SISAL.getCookieField("anagrafica","giorniScadenzaDocumentazione");scadenza=parseInt(scadenza,10);if(SISAL.getCookieField("anagrafica","statoProtocollo")==="0"){messaggio="<div style=\"text-align: justify;\"><p><strong>Benvenuto!</strong></p>"+"<p>Ti ricordiamo di inviarci copia leggibile (fotocopia, scansione o foto digitale) del documento d'identit&agrave; fronte-retro (Carta d'Identit&agrave;, Passaporto o Patente).</p>"+"<p>Invialo al pi&ugrave; presto e comunque <b>entro "+scadenza+" giorni</b> via e-mail a <a href=\"mailto:ufficiocontratti@match-point.it \">ufficiocontratti@match-point.it </a> oppure via fax al numero <strong>02.301.852.00</strong>.</p>"+"<p>Potrai cos&igrave; continuare a giocare con noi e riscuotere le tue vincite.</p>"+"<p>Se non riceveremo la documentazione richiesta entro la scadenza il tuo Conto sar&agrave; sospeso. "+"<p>In tal caso, il tuo Conto potr&agrave; essere riattivato solo dopo che avremo ricevuto la documentazione"+"</div>";SISAL.FX.showOnElement_TemplatePopup('errorBody','mp.alert.buttonok.html',{"{title}":"Login","{content}":messaggio,"{buttonclick}":"<hideThis>","{buttontext}":"OK",width:'540px'});cookie_anagrafica=cookie_anagrafica.replace("statoProtocollo=0","statoProtocollo=2");SISAL.setCookie('anagrafica',{value:cookie_anagrafica,secure:true})}}SISAL.setCookie('login',{value:cookie_login,secure:true,days:sessionTimeout});SISAL.setCookie('anagrafica',{value:cookie_anagrafica,secure:true,days:sessionTimeout});SISAL.setCookie('saldo',{value:SISAL.getCookie('saldo'),secure:true,days:sessionTimeout});SISAL.unsetCookie("disanonimazione",{secure:true});SISAL.unsetCookie("recuperoPassword",{secure:true});if(SISAL.isNullOrEmpty(redirect)){SISAL.unsetCookie("successoLogin",{secure:true})}}else{mantenimentoSessioneLogin()}if(!SISAL.isNullOrEmpty(redirect)){location.href=redirect}}else{$('#containerHTML_logout').css('display','none');$('#containerHTML_login').css('display','');cookie_erroreLogin=SISAL.getCookie('erroreLogin');if(!SISAL.isNullOrEmpty(cookie_erroreLogin)){messaggio=SISAL.getCookieField('erroreLogin','messaggio');SISAL.unsetCookie('erroreLogin');SISAL.FX.showOnElement_TemplatePopup('errorBody','mp.alert.buttonok.html',{"{title}":"Login","{content}":messaggio,"{buttonclick}":"<hideThis>","{buttontext}":"OK",width:'360px'})}urlRecuperoPassword=SISAL.getCookieField('recuperoPassword','urlRecuperoPassword');urlRegistrazione=SISAL.getCookieField('disanonimazione','urlRegistrazione');if(!SISAL.isNullOrEmpty(SISAL.getCookie('recuperoPassword'))&&location.href.replace(location.search,"")!==urlRecuperoPassword){popupLogin=false;messaggio="<div style=\"text-align: justify;\">"+"<p>La tua password non &egrave stata utilizzata da oltre sei mesi ed &egrave stata disattivata.</p>"+"<p>Puoi riattivarla utilizzando il modulo di \"Recupero Password\".</p>"+"</div>";SISAL.FX.showOnElement_TemplatePopup('errorBody','mp.alert.buttonconfannulla.html',{"{title}":"Password","{content}":messaggio,"{buttonclickAnnulla}":"<href:"+location.href.replace("https:","http:")+">","{buttontextAnnulla}":"Annulla","{buttonclickConferma}":"<href:"+urlRecuperoPassword+">","{buttontextConferma}":"Recupera la tua password",width:'540px'})}else if(!SISAL.isNullOrEmpty(SISAL.getCookie('disanonimazione'))&&location.href.replace(location.search,"")!==urlRegistrazione){redirect=urlRegistrazione}if(!SISAL.isNullOrEmpty(cookie_logout)){SISAL.unsetCookie("logout",{secure:true});SISAL.unsetCookie("login",{secure:true});SISAL.unsetCookie("anagrafica",{secure:true});SISAL.unsetCookie("saldo",{secure:true})}if(!SISAL.isNullOrEmpty(redirect)){location.href=redirect}}if(!SISAL.isNullOrEmpty(cookie_codiceConto)){$('#utente').attr('value',cookie_codiceConto)}return popupLogin}function login(form){try{if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("login - inizio");SISAL.logger.debug("login - form: "+form)}var myForm=SISAL.isNull(form)?document.getElementById('loginForm'):document.getElementById(form),utente=myForm.utente.value,pin=myForm.pin.value,checkUtente=false,checkPin=false,errore;if(!SISAL.isNullOrEmpty(utente)&&(utente!=="N.conto/Username")&&!SISAL.isNullOrEmpty(pin)&&(pin!=="Pin/Password")){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("login - utente: "+utente);SISAL.logger.debug("login - utente - isNum: "+SISAL.AMS.isNum(utente));SISAL.logger.debug("login - utente - isLong(16): "+SISAL.AMS.isLong(utente,16));SISAL.logger.debug("login - utente - isAlphaNumSp('._-'): "+SISAL.AMS.isAlphaNumSp(utente,"._-"));SISAL.logger.debug("login - utente - isLong(6, 16): "+SISAL.AMS.isLong(utente,6,16));SISAL.logger.debug("login - pin - isNum: "+SISAL.AMS.isNum(pin));SISAL.logger.debug("login - pin - isLong(16): "+SISAL.AMS.isLong(pin,4));SISAL.logger.debug("login - pin - isStrictAlphaNum: "+SISAL.AMS.isStrictAlphaNum(pin));SISAL.logger.debug("login - pin - isLong(8, 12): "+SISAL.AMS.isLong(pin,8,12));SISAL.logger.debug("login - checkUtente: "+((SISAL.AMS.isNum(utente)&&SISAL.AMS.isLong(utente,16))||(SISAL.AMS.isAlphaNumSp(utente,"._-")&&SISAL.AMS.isLong(utente,6,16))));SISAL.logger.debug("login - checkPin: "+((SISAL.AMS.isNum(pin)&&SISAL.AMS.isLong(pin,4))||(SISAL.AMS.isStrictAlphaNum(pin)&&SISAL.AMS.isLong(pin,8,12))))}if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("login - fine")}if((SISAL.AMS.isNum(utente)&&SISAL.AMS.isLong(utente,16))||(SISAL.AMS.isAlphaNumSp(utente,"._-")&&SISAL.AMS.isLong(utente,6,16))){checkUtente=true}if((SISAL.AMS.isNum(pin)&&SISAL.AMS.isLong(pin,4))||(SISAL.AMS.isStrictAlphaNum(pin)&&SISAL.AMS.isLong(pin,8,12))){checkPin=true}}if(checkUtente&&checkPin){myForm.action="https://"+location.hostname+"/LoginNuovo/pubblico/servlet/login";SISAL.FX.showOnElement_TemplatePopup('body','mp.loading.html',{"{content}":"Autenticazione in corso...",width:'360px'});myForm.submit()}else{if((SISAL.isNullOrEmpty(utente)||(utente==="N.conto/Username"))&&(!SISAL.isNullOrEmpty(pin)&&(pin!=="Pin/Password"))){errore="<p>Ti sei dimenticato di inserire il tuo username o il numero del tuo conto.</p>"}else if((!SISAL.isNullOrEmpty(utente)&&(utente!=="N.conto/Username"))&&(SISAL.isNullOrEmpty(pin)||(pin==="Pin/Password"))){errore="<p>Ti sei dimenticato di inserire la tua password.</p>"}else if((SISAL.isNullOrEmpty(utente)||(utente==="N.conto/Username"))&&(SISAL.isNullOrEmpty(pin)||(pin==="Pin/Password"))){errore="<p>Ti sei dimenticato di inserire le credenziali per accedere al tuo conto.</p>"}else{errore="<p>Il campo &lt;N.conto/Username&gt; deve essere:<ul><li>o un numero di 16 cifre</li><li>o una stringa contentente caratteri alfanumerici e/o [.-_], di lunghezza compresa tra 6 e 16</li></ul></p>";errore=errore+"<p>Il campo &lt;Pin/Password&gt; deve essere:<ul><li>o un numero di 4 cifre</li><li>o una stringa contentente caratteri alfanumerici (almeno una lettera e almeno un numero), di lunghezza compresa tra 8 e 12</li></ul></p>"}SISAL.FX.showOnElement_TemplatePopup('errorBody','mp.alert.buttonok.html',{"TextAlign_default":"TextAlign_left","{title}":"Login","{content}":errore,"{buttonclick}":"<hideThis>","{buttontext}":"OK",width:'360px'})}}catch(e){if(SISAL.logger.isErrorEnabled()){SISAL.logger.error("login - ",e)}}}function pinKeypressSubmit(e){var key=null,keychar=null;key=window.event?e.keyCode:e.which;keychar=String.fromCharCode(key);if(key===13){SISAL.MATCHPOINT.login()}}function popuppinKeypressSubmit(e){var key=null,keychar=null;key=window.event?e.keyCode:e.which;keychar=String.fromCharCode(key);if(key===13){SISAL.MATCHPOINT.login('popupLoginForm')}}function abilitaProdotto(prodotto,testo){SISAL.FX.showOnElement_TemplatePopup('errorBody','mp.alert.buttonconfannulla.html',{"{title}":"Abilitazione Prodotto","{content}":testo,"{buttonclickAnnulla}":"<hideThis>","{buttontextAnnulla}":"Chiudi","{buttonclickConferma}":"SISAL.ajax('/LoginNuovo/pubblico/servlet/abilitaprodotto?prodotto="+prodotto+"');","{buttontextConferma}":"Accetta",width:'480px'})}function popupLogin(options){options=SISAL.isNullOrEmpty(options)?{}:SISAL.copy(options);options.html=SISAL.isNullOrEmpty(options.html)?'':options.html;options.annullaRedirect=SISAL.isNullOrEmpty(options.annullaRedirect)?'':'<href:'+options.annullaRedirect+'>';options.annullaScript=SISAL.isNullOrEmpty(options.annullaScript)?'<hideThis>':options.annullaScript;var link='https://'+location.hostname+'/online/Homepage/Apri-un-Conto';if(!SISAL.isNullOrEmpty($('#codPromoReg').val())){link=link+'?codicePromozione='+$('#codPromoReg').val();$('#id_apriUnConto').attr('href',link)}else{$('#id_apriUnConto').attr('href',link)}var subcontent="<br>Non sei ancora registrato?<br>Clicca <a class=\"articolo_link_pagine_interne\" href="+link+">qui</a>, registrati e inizia subito a giocare!",annullaclick="";try{if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("popupLogin - inizio");SISAL.logger.debug("popupLogin - html: "+options.html)}if(SISAL.isNullOrEmpty(options.annullaRedirect)){annullaclick=options.annullaScript}else{annullaclick=options.annullaRedirect}SISAL.ajax("/file/html/popupLogin.html",{method:"GET",response:true,success:function(content){SISAL.FX.showOnElement_TemplatePopup('body','mp.alertblue.duebuttons.html',{"TextAlign_default":"TextAlign_left","{title}":"Login","{content}":(SISAL.isNull(options.html)?"":options.html)+content,"{subcontent}":subcontent,"{buttonclickAnnulla}":annullaclick,'{buttontextAnnulla}':'ANNULLA',"{buttonclickConferma}":"SISAL.MATCHPOINT.login('popupLoginForm');",'{buttontextConferma}':'LOGIN',width:'440px'})}});if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("popupLogin - fine")}}catch(e){if(SISAL.logger.isErrorEnabled()){SISAL.logger.error("popupLogin - ",e)}}}function controlloSessioneLogin(options){options=SISAL.isNullOrEmpty(options)?{}:SISAL.copy(options);options.http=options.http!==true?false:options.http;if(options.http&&SISAL.isNullOrEmpty(SISAL.getCookie('login'))){options.html=null;controlloLogin();popupLogin(options);return false}else if(("https:"===document.location.protocol)&&SISAL.isNullOrEmpty(SISAL.getCookie('login'))&&SISAL.isNullOrEmpty(SISAL.getCookie('disanonimazione'))){options.annullaRedirect=SISAL.isNullOrEmpty(options.annullaRedirect)?location.href.replace("https:","http:"):options.annullaRedirect;if(controlloLogin()){options.html=SISAL.isNullOrEmpty(options.html)?"La sessione di gioco &egrave; scaduta. Per continuare a giocare effettua un nuovo login.":options.html;popupLogin(options)}return false}return true}function aggiornaSaldo(){var cookie_login=SISAL.getCookie('login');if(!SISAL.isNullOrEmpty(cookie_login)){SISAL.ajax('/LoginNuovo/pubblico/servlet/saldo',{success:function(){var saldo=SISAL.getCookieField("saldo","saldoDisponibile"),bonus=SISAL.getCookieField("saldo","bonus");saldo=isNaN(saldo)?"":numberToValuta(saldo/100)+" &euro;";$('#logoutSaldo').html(saldo);bonus=isNaN(bonus)?"":numberToValuta(bonus/100)+" &euro;";$('#logoutBonus').html(bonus)}})}else{controlloSessioneLogin()}}function manageStaticMenu(){var voceAttiva,sottovoci,sottovociDinamiche,sottovoceAttiva,i=0;try{if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - inizio")}pageId=document.getElementsByTagName("body")[0].id;pageId=SISAL.isNull(pageId)?pageId:pageId.replace("pageId_","");if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - pageId: "+pageId)}if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - ricerca voce attiva: voce_menu_"+pageId)}voceAttiva=document.getElementById("voce_menu_"+pageId);if(!SISAL.isNullOrEmpty(voceAttiva)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - voce attiva trovata")}sottovoci=document.getElementById("sottovoci_menu_"+pageId);sottovociDinamiche=document.getElementById("sottovoci_menu_dinamiche_"+pageId);if(!SISAL.isNullOrEmpty(sottovoci)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - espansione sottovoci")}SISAL.MATCHPOINT.slideToggle_menustat_liv2_link("sottovoci_menu_"+pageId,"voce_menu_"+pageId)}else if(!SISAL.isNullOrEmpty(sottovociDinamiche)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - espansione sottovoci dinamiche")}SISAL.MATCHPOINT.slideToggle_menustat_liv2_link("sottovoci_menu_dinamiche_"+pageId,"voce_menu_"+pageId)}else{voceAttiva.className=voceAttiva.className+" color_menustat_voce1_sel1"}}else{if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - ricerca sottovoce attiva: voce_sottomenu_"+pageId)}sottovoceAttiva=document.getElementById("voce_sottomenu_"+pageId);if(!SISAL.isNullOrEmpty(sottovoceAttiva)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - sottovoce attiva trovata")}sottovoceAttiva.className=sottovoceAttiva.className+" color_menustat_voce2_sel";voceAttiva=sottovoceAttiva.parentNode.previousSibling;if(voceAttiva.className.search("menustat_voce1_link")!==-1){voceAttiva.className="menustat_voce1_link color_menustat_voce1_open"}else{voceAttiva.className="menustat_voce1 color_menustat_voce1_open"}sottovoceAttiva.parentNode.style.display="block"}else{do{parentId=document.getElementById("parentIds").getElementsByTagName("div")[i];parentId=SISAL.isNull(parentId)?parentId:parentId.id.replace("parentId_","");if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - parentId "+i+": "+parentId)}voceAttiva=document.getElementById("voce_menu_"+parentId);if(!SISAL.isNullOrEmpty(voceAttiva)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - voce indiretta attiva trovata")}sottovoci=document.getElementById("sottovoci_menu_"+parentId);sottovociDinamiche=document.getElementById("sottovoci_menu_dinamiche_"+parentId);if(!SISAL.isNullOrEmpty(sottovoci)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - espansione sottovoci indirette")}SISAL.MATCHPOINT.slideToggle_menustat_liv2_link("sottovoci_menu_"+parentId,"voce_menu_"+parentId)}else if(!SISAL.isNullOrEmpty(sottovociDinamiche)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - espansione sottovoci dinamiche indirette")}SISAL.MATCHPOINT.slideToggle_menustat_liv2_link("sottovoci_menu_dinamiche_"+parentId,"voce_menu_"+parentId)}else{voceAttiva.className=voceAttiva.className+" color_menustat_voce1_sel1"}break}else{if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - ricerca sottovoce indiretta attiva: voce_sottomenu_"+parentId)}sottovoceAttiva=document.getElementById("voce_sottomenu_"+parentId);if(!SISAL.isNullOrEmpty(sottovoceAttiva)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - sottovoce indiretta attiva trovata")}sottovoceAttiva.className=sottovoceAttiva.className+" color_menustat_voce2_sel";voceAttiva=sottovoceAttiva.parentNode.previousSibling;if(voceAttiva.className.search("menustat_voce1_link")!==-1){voceAttiva.className="menustat_voce1_link color_menustat_voce1_open"}else{voceAttiva.className="menustat_voce1 color_menustat_voce1_open"}sottovoceAttiva.parentNode.style.display="block";break}}i=i+1}while(parentId>0)}}if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageStaticMenu - fine")}}catch(e){if(SISAL.logger.isErrorEnabled()){SISAL.logger.error("manageStaticMenu - ",e)}}}function manageDynamicMenu(pageId){var voceAttiva,sottovoci,sottovociDinamiche,sottovoceAttiva,i=0;try{if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageDynamicMenu - inizio")}if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageDynamicMenu - pageId: "+pageId)}if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageDynamicMenu - ricerca voce attiva: voce_menu_"+pageId)}voceAttiva=document.getElementById("voce_menu_"+pageId);if(!SISAL.isNullOrEmpty(voceAttiva)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageDynamicMenu - voce attiva trovata")}sottovociDinamiche=document.getElementById("sottovoci_menu_dinamiche_"+pageId);if(!SISAL.isNullOrEmpty(sottovociDinamiche)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageDynamicMenu - espansione sottovoci dinamiche")}SISAL.MATCHPOINT.slideToggle_menustat_liv2_link("sottovoci_menu_dinamiche_"+pageId,"voce_menu_"+pageId)}}if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageDynamicMenu - fine")}}catch(e){if(SISAL.logger.isErrorEnabled()){SISAL.logger.error("manageDynamicMenu - ",e)}}}function isLogged(){var cookie_login=SISAL.getCookie('login');if(!SISAL.isNullOrEmpty(cookie_login)){return true}return false}function popupLogin_forTableVetrina(idGioco){if(isLogged()){SISAL.setCookie("gioco",{value:""+idGioco+""});location.href=portalPath+"/Gratta-e-Vinci/Tutti-i-Giochi"}else{SISAL.setCookie("gioco",{value:""+idGioco+""});SISAL.MATCHPOINT.popupLogin({annullaScript:"SISAL.unsetCookie('gioco');|<hideThis>"})}}function playSkillGames(urlSSO,url){var redirect=url;if(isLogged()){redirect=urlSSO+"?token="+SISAL.getCookieField("login","token")+"&codiceConto="+SISAL.getCookieField("login","codiceConto")}window.open(redirect,"_blank")}function playExternalGames(options,game){var redirect;options=SISAL.copy(options);options.gameId=SISAL.isNullOrEmpty(options.gameId)?game:options.gameId;if(!isLogged()){if(SISAL.isNullOrEmpty(options.gameId)){redirect=options.playUrlNotLoggedMode}else{SISAL.setCookie(externalGameCookie,{value:options.gameId});popupLogin({annullaScript:"SISAL.unsetCookie('"+externalGameCookie+"');|<hideThis>"});return}}else{redirect=options.playUrlLoggedMode+"?"+options.tokenParameter+"="+SISAL.getCookieField("login","token")+"&"+options.accountParameter+"="+SISAL.getCookieField("login","codiceConto");if(!SISAL.isNullOrEmpty(options.gameId)){redirect=redirect+"&"+options.gameParameter+"="+options.gameId}}window.open(redirect,"_blank")}function checkExternalGame(options){var game,myOptions;if(isLogged()){game=SISAL.getCookie(externalGameCookie);if(!SISAL.isNullOrEmpty(game)){SISAL.unsetCookie(externalGameCookie);myOptions=SISAL.copy(options);myOptions.gameId=game;playExternalGames(myOptions)}}}function manageMenuOnmouseover(anchor){var element;try{if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - inizio")}if(!SISAL.isNullOrEmpty(anchor)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - ancora trovata")}element=anchor.parentNode.previousSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - td di sinistra trovato")}element.className=element.className.replace("menu_sx","menu_sx_over")}element=element.nextSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - td centrale trovato")}element.className=element.className.replace("menu_center","menu_center_over")}element=element.nextSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - td di destra trovato")}element.className=element.className.replace("menu_dx","menu_dx_over")}}if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - fine")}}catch(e){if(SISAL.logger.isErrorEnabled()){SISAL.logger.error("manageMenuOnmouseover - ",e)}}}function manageMenuOnmouseout(anchor){var element;try{if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - inizio")}if(!SISAL.isNullOrEmpty(anchor)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - ancora trovata")}element=anchor.parentNode.previousSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - td di sinistra trovato")}element.className=element.className.replace("menu_sx_over","menu_sx")}element=element.nextSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - td centrale trovato")}element.className=element.className.replace("menu_center_over","menu_center")}element=element.nextSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - td di destra trovato")}element.className=element.className.replace("menu_dx_over","menu_dx")}}if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - fine")}}catch(e){if(SISAL.logger.isErrorEnabled()){SISAL.logger.error("manageMenuOnmouseout - ",e)}}}function manageMenuOnmouseoverPromo(anchor){var element;try{if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - inizio")}if(!SISAL.isNullOrEmpty(anchor)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - ancora trovata")}element=anchor.parentNode.previousSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - td di sinistra trovato")}element.className=element.className.replace("menuPromo_sx","menuPromo_sx_over")}element=element.nextSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - td centrale trovato")}element.className=element.className.replace("menuPromo_center","menuPromo_center_over")}element=element.nextSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - td di destra trovato")}element.className=element.className.replace("menuPromo_dx","menuPromo_dx_over")}}if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseover - fine")}}catch(e){if(SISAL.logger.isErrorEnabled()){SISAL.logger.error("manageMenuOnmouseover - ",e)}}}function manageMenuOnmouseoutPromo(anchor){var element;try{if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - inizio")}if(!SISAL.isNullOrEmpty(anchor)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - ancora trovata")}element=anchor.parentNode.previousSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - td di sinistra trovato")}element.className=element.className.replace("menuPromo_sx_over","menuPromo_sx")}element=element.nextSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - td centrale trovato")}element.className=element.className.replace("menuPromo_center_over","menuPromo_center")}element=element.nextSibling;if(!SISAL.isNullOrEmpty(element)){if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - td di destra trovato")}element.className=element.className.replace("menuPromo_dx_over","menuPromo_dx")}}if(SISAL.logger.isDebugEnabled()){SISAL.logger.debug("manageMenuOnmouseout - fine")}}catch(e){if(SISAL.logger.isErrorEnabled()){SISAL.logger.error("manageMenuOnmouseout - ",e)}}}function changePointer(id){var idH2="h2_"+id,_id,idImg;$("#tdPointer img").each(function(i,el){var attr=$(el).attr("src"),idImg=el.id,cssObjSel={"font-size":"14px","color":"#5B605B"},cssObjNoSel={"font-size":"13px","color":"#0060A9"};_id=id+"";idImg=idImg+"";if(_id===idImg){if(attr.search("aperta")!==-1){$(el).attr("src","/img/matchpoint/freccia_interna_chiusa.gif");$("#"+idH2).css(cssObjSel)}else{$(el).attr("src","/img/matchpoint/freccia_interna_aperta.gif");$("#"+idH2).css(cssObjNoSel)}}})}function showApp(){var wfl='',wflg='';wfl=SISAL.getCookie('wfl');wflg=SISAL.getCookie('wflgold');if(wfl==='wfl'){$('#archivio_wfl').show();$('#archivio_wflgold').hide()}else if(wflg==='wflgold'){$('div#archivio_wfl').hide();$('div#archivio_wflgold').show()}else{$('#archivio_wfl').show();$('#archivio_wflgold').hide()}}return{doTrackingGoogleAnalytics:doTrackingGoogleAnalytics,slideToggle_menu:slideToggle_menu,slideToggle_boxAScomparsa:slideToggle_boxAScomparsa,manageBoxAScomparsa:manageBoxAScomparsa,slideToggle_menustat_liv2:slideToggle_menustat_liv2,slideToggle_menustat_liv2_link:slideToggle_menustat_liv2_link,slideToggle_menudin_liv2:slideToggle_menudin_liv2,controlloPartner:controlloPartner,notificaPartner:notificaPartner,mantenimentoSessioneLogin:mantenimentoSessioneLogin,controlloLogin:controlloLogin,login:login,pinKeypressSubmit:pinKeypressSubmit,popuppinKeypressSubmit:popuppinKeypressSubmit,abilitaProdotto:abilitaProdotto,popupLogin:popupLogin,controlloSessioneLogin:controlloSessioneLogin,aggiornaSaldo:aggiornaSaldo,manageStaticMenu:manageStaticMenu,manageDynamicMenu:manageDynamicMenu,isLogged:isLogged,popupLogin_forTableVetrina:popupLogin_forTableVetrina,playSkillGames:playSkillGames,playExternalGames:playExternalGames,checkExternalGame:checkExternalGame,manageMenuOnmouseover:manageMenuOnmouseover,manageMenuOnmouseout:manageMenuOnmouseout,manageMenuOnmouseoverPromo:manageMenuOnmouseoverPromo,manageMenuOnmouseoutPromo:manageMenuOnmouseoutPromo,changePointer:changePointer,showApp:showApp}}());var MP=SISAL.MATCHPOINT;if(SISAL.logger.isInfoEnabled()){SISAL.logger.info("SISAL.MATCHPOINT - namespace creato (scorciatoia: MP)")}
