function openVincite(){var C=500;var B=500;var D=(screen.width-C)/2;var E=(screen.height-B)/2;var A="http://lit.grattaevinci.com/infoprodotti/gev_levincite.html";window.open(A,"info","left="+D+", top="+E+", width="+C+", height="+B+", scrollbars=yes, resizable=yes")}function openRegolamento(){var C=500;var B=500;var D=(screen.width-C)/2;var E=(screen.height-B)/2;var A="http://lit.grattaevinci.com/infoprodotti/gev_regolamento.html ";window.open(A,"info","left="+D+", top="+E+", width="+C+", height="+B+", scrollbars=yes, resizable=yes")}function openFaq(){var C=500;var B=500;var D=(screen.width-C)/2;var E=(screen.height-B)/2;var A="http://lit.grattaevinci.com/infoprodotti/gev_faq.html";window.open(A,"info","left="+D+", top="+E+", width="+C+", height="+B+", scrollbars=yes, resizable=yes")}function openWhatis(){var C=500;var B=500;var D=(screen.width-C)/2;var E=(screen.height-B)/2;var A="http://lit.grattaevinci.com/infoprodotti/gev_checose.html";window.open(A,"info","left="+D+", top="+E+", width="+C+", height="+B+", scrollbars=yes, resizable=no")}function apri(){miafin=window.open("http://lit.grattaevinci.com/infoprodotti/gev_regolamento.html","","width=450,height=480,resizable=no,scrollbars=yes,menubar=no")}var API_GV="/api-gv/getToken";var API_CONTROLLO_SALDO="/contogioco/getSaldoAggiornato.html?NOME_WEB_APP=GRATTAVINCI";var ALERT_COM_ANAGRAFICA="/grattaevinci/alert.jsp";var ALERT_COM_SALDO="?saldo=0";var ALERT_COM_VERSA="/contogioco/versa.html";var ID_RIVENDITORE="LI0004";var ID_CONTO_DIV="idContoGioco";var LIVELLO_DIV="livUtente";var SALDO_DIV="saldo";var TAG_ID_GV="lgd";var LIVELLO_VERSAMENTO=2;var LIVELLO_COM_ANAGRAFICA=64;var LIVELLO_AUTORIZZATO_GV=256;var token;function launchGV(){var C=document.location.search.substring(1,255);var B=C.split("&");var A=B.length;for(i=0;i<A;i++){if(B[i].indexOf(TAG_ID_GV)>=0){parametersArray1=B[i].split("=");var D=parametersArray1[1];buyLauncherG(D)}}}function buyLauncherG(C){var B=API_GV;var A=getBrowserVersion();if(A==EXPLORER){token=getPageOldExplorer(B)}else{token=getPageMozilla(B)}buyLauncherGV(C)}function buyLauncherGV(H){var E=document.getElementsByName(ID_CONTO_DIV)[0].value;var D=document.getElementsByName(LIVELLO_DIV)[0].value;var F=document.getElementsByName(SALDO_DIV)[0].value;var C="OK";if((D&LIVELLO_AUTORIZZATO_GV)!=LIVELLO_AUTORIZZATO_GV){window.location.href="/grattaevinci/index.html?lgd";return }if((D&LIVELLO_COM_ANAGRAFICA)!=LIVELLO_COM_ANAGRAFICA){if(!checkSaldoFromApiGTZero()){C=ALERT_COM_VERSA}}if(C=="OK"&&!checkSaldoGTZero(F)&&!checkSaldoFromApiGTZero()){C=ALERT_COM_VERSA}switch(C){case"OK":if((token)&&(token!="ko")){var G=E;var B=H;var I=ID_RIVENDITORE;var A=removeNL(token);buyLauncher(B,A,G,I)}else{alert("Malfunzionamento XMLHttpRequest")}break;case ALERT_COM_VERSA:case ALERT_COM_VERSA+ALERT_COM_SALDO:window.location.href=C;break;case ALERT_COM_ANAGRAFICA:openPopup(ALERT_COM_ANAGRAFICA,500,670,"Gioco Digitale Italia - Comunicazione di servizio");break}}function upScroll(A){for(var C=0;C<10;C++){var B=getObject(C);B.style.position="absolute";B.style.width="179px";B.style.top=32+C*24+"px"}var D=A*1+1;for(var C=D;C<10;C++){var B=getObject(C);B.style.top=32+120+C*24+"px"}}function checkSaldoFromApiGTZero(){var B=false;var A=getPage(API_CONTROLLO_SALDO);if(A>0){B=true}return B};

function open3x7(tipo) { var widht3x7 = screen.width / 2 - 160;var height3x7 = screen.height / 2 - 205; var param3x7;var url =" /scommesse/link3x7.html?tipo3x7=" +tipo;
if (isMicrosoft(0)) { param3x7 = "scrollbars=yes,resizable=yes,width=345,height=620,left=" + widht3x7 + ",top=" + height3x7;}else{ param3x7 = "scrollbars=yes,resizable=yes,width=345,height=620,screenX=" + widht3x7 + ",screenY=" + height3x7;}
var pop3x7 =  window.open(url, '3X7'+tipo, param3x7);pop3x7.focus();}
function open3x7Double(tipo) {var widht3x7 = screen.width / 2 - 160;var height3x7 = screen.height / 2 - 205;var param3x7;var url =" /scommesse/link3x7Double.html?tipo3x7=" + tipo;
if (isMicrosoft(0)) {param3x7 = "scrollbars=yes,resizable=yes,width=345,height=670,left=" + widht3x7 + ",top=" + height3x7;}else{param3x7 = "scrollbars=yes,resizable=yes,width=345,height=670,screenX=" + widht3x7 + ",screenY=" + height3x7;}
var pop3x7 =  window.open(url, '3X7Double'+tipo, param3x7);pop3x7.focus();}
