var req=null;var divId=0;function fadeIt(strEle,url){var ele=document.getElementById(strEle);cover(ele);Spry.Utils.updateContent(ele,url,function(){})}function fadeItAndDo(strEle,url,f){var ele=document.getElementById(strEle);Spry.Effect.DoFade(ele,{duration:20,from:100,to:30,finish:function(){Spry.Utils.updateContent(ele,url,function(){Spry.Effect.DoFade(ele,{duration:50,from:30,to:100});f()})}})}function cover(e){var scanObj=e;var lleft=0;var ttop=0;while(scanObj){lleft+=scanObj.offsetLeft;ttop+=scanObj.offsetTop;scanObj=scanObj.offsetParent}var d0=createObject("div");d0.style.width=e.offsetWidth+"px";d0.style.height=e.offsetHeight+"px";d0.style.position="absolute";d0.style.top=ttop+"px";d0.style.left=lleft+"px";d0.style.backgroundColor="#FFFFFF";d0.style.opacity=0.5;d0.style.filter="alpha(opacity="+50+")";d0.innerHTML="";e.appendChild(d0)}function updateInterval(strEle,url,interval){var ele=document.getElementById(strEle);Spry.Utils.updateContent(ele,url);var strSet="Spry.Utils.updateContent( document.getElementById('"+strEle+"'), '"+url+"');";setInterval(strSet,interval)}function addDiv(gruppo,txtGruppo,manifestazione){if(document.getElementById("div_"+manifestazione)){spAlert("Manifestazione gi&agrave; presente")}else{if(!document.getElementById("divG_"+gruppo)){var d0=createObject("div","class","box99");d0.style.marginRight="20px";d0.style.width="100%";var d1=createObject("div","class","topLeft2");d0.appendChild(d1);var d2=createObject("div","class","topRight bg01");d1.appendChild(d2);var d3=createObject("div","class","heading");d2.appendChild(d3);var d4=createObject("h1");d4.innerHTML=txtGruppo;d3.appendChild(d4);var d5=createObject("div","class","clearBox");d2.appendChild(d5);var d=createObject("div","id","divG_"+gruppo,"class","contenuto");d0.appendChild(d);var d6=createObject("div","class","bottomLeft");d0.appendChild(d6);var d7=createObject("div","class","bottomRight");d6.appendChild(d7);document.getElementById("containerGruppi").appendChild(d0)}else{var d=document.getElementById("divG_"+gruppo)}var m=createObject("div","id","div_"+manifestazione);d.appendChild(m);tmp="apriChiudi_div_"+manifestazione;fadeIt("div_"+manifestazione,"/boxeventi.asp?a="+Math.floor(10000000*Math.random())+"&desgruppo="+txtGruppo+"&divid=div_"+manifestazione+"&manifestazione="+manifestazione);divId++}}function addDiv2(gruppo,txtGruppo,manifestazione,datasel){if(document.getElementById("div_"+manifestazione)){spAlert("Manifestazione gi&agrave; presente")}else{if(!document.getElementById("divG_"+gruppo)){var d0=createObject("div","class","box99");d0.style.marginRight="20px";d0.style.width="100%";var d1=createObject("div","class","topLeft2");d0.appendChild(d1);var d2=createObject("div","class","topRight bg01");d1.appendChild(d2);var d3=createObject("div","class","heading");d2.appendChild(d3);var d4=createObject("h1");d4.innerHTML=txtGruppo;d3.appendChild(d4);var d5=createObject("div","class","clearBox");d2.appendChild(d5);var d=createObject("div","id","divG_"+gruppo,"class","contenuto");d0.appendChild(d);var d6=createObject("div","class","bottomLeft");d0.appendChild(d6);var d7=createObject("div","class","bottomRight");d6.appendChild(d7);document.getElementById("containerGruppi").appendChild(d0)}else{var d=document.getElementById("divG_"+gruppo)}var m=createObject("div","id","div_"+manifestazione);d.appendChild(m);tmp="apriChiudi_div_"+manifestazione;fadeIt("div_"+manifestazione,"/boxeventi.asp?a="+Math.floor(10000000*Math.random())+"&desgruppo="+txtGruppo+"&divid=div_"+manifestazione+"&manifestazione="+manifestazione+"&data="+datasel);divId++}}function addDiv2gruppo(gruppo,txtGruppo,datasel){if(document.getElementById("divgr_"+gruppo)){spAlert("Gruppo gi&agrave; presente")}else{if(!document.getElementById("divG_"+gruppo)){var d0=createObject("div","class","box99");d0.style.marginRight="20px";d0.style.width="100%";var d1=createObject("div","class","topLeft2");d0.appendChild(d1);var d2=createObject("div","class","topRight bg01");d1.appendChild(d2);var d3=createObject("div","class","heading");d2.appendChild(d3);var d4=createObject("h1");d4.innerHTML=txtGruppo;d3.appendChild(d4);var d5=createObject("div","class","clearBox");d2.appendChild(d5);var d=createObject("div","id","divG_"+gruppo,"class","contenuto");d0.appendChild(d);var d6=createObject("div","class","bottomLeft");d0.appendChild(d6);var d7=createObject("div","class","bottomRight");d6.appendChild(d7);document.getElementById("containerGruppi").appendChild(d0)}else{var d=document.getElementById("divG_"+gruppo)}var m=createObject("div","id","divgr_"+gruppo);m.innerHTML="<div style='width:100%;text-align:center;'>...attendere...</div>";d.appendChild(m);tmp="apriChiudi_div_"+gruppo;fadeIt("divgr_"+gruppo,"/boxeventi_gruppo.asp?a="+Math.floor(10000000*Math.random())+"&desgruppo="+txtGruppo+"&divid=divgr_"+gruppo+"&gruppo="+gruppo+"&data="+datasel);divId++}}function createObject(){args=arguments;var newObj=document.createElement(args[0]);for(var i=1;i<args.length;i=i+2){if(args[i]=="class"){newObj.className=args[i+1]}else{newObj.setAttribute(args[i],args[i+1])}}return newObj}function visTotaleEsiti(obj,idEvento,desgruppo){var scanObj=obj;var lleft=0;var ttop=0;while(scanObj){lleft+=scanObj.offsetLeft;ttop+=scanObj.offsetTop;scanObj=scanObj.offsetParent}var d0=createObject("div","id","tuttiEsiti","class","tuttiEsiti");d0=document.getElementById("tuttiEsiti");d0.innerHTML='<div style="text-align:center;background-color:#ffffff;">...caricamento in corso...</div>';d0.style.display="block";d0.style.left=(lleft+15)+"px";d0.style.top=(ttop+15)+"px";fadeIt("tuttiEsiti","/include/tuttiRisultati.asp?evid="+idEvento+"&desgruppo="+desgruppo)}function addBet(rid,desgruppo){var strChk=getCarrelloChkQueryString();var req=Spry.Utils.loadURL("GET","/boxcarrello.asp?a="+Math.floor(10000000*Math.random())+"&act=test&rid="+rid+"&desgruppo="+desgruppo+strChk,false);var r=req.xhRequest.responseText;eval(r);switch(r_carrello.codice){case"0":fadeIt("container_carrello","/boxcarrello.asp?a="+Math.floor(10000000*Math.random())+"&act=add&rid="+rid+"&desgruppo="+desgruppo+strChk);break;case"1":break;case"2":fadeIt("container_carrello","/boxcarrello.asp?a="+Math.floor(10000000*Math.random())+"&act=add&rid="+rid+"&desgruppo="+desgruppo+strChk);break;case"100":break;case"1000":fadeIt("container_carrello","/boxcarrello.asp?a="+Math.floor(10000000*Math.random()));break;default:}}function delBet(rid){var strChk=getCarrelloChkQueryString();fadeIt("container_carrello","/boxcarrello.asp?a="+Math.floor(10000000*Math.random())+strChk+"&act=del&rid="+rid)}function delAllBet(){var strChk=getCarrelloChkQueryString();fadeIt("container_carrello","/boxcarrello.asp?a="+Math.floor(10000000*Math.random())+strChk+"&act=delAll")}function getCarrelloChkQueryString(){var strChk="";var arrChk=document.getElementsByName("chkQuota");for(var j=0;j<arrChk.length;j++){if(!arrChk[j].checked){strChk+="&"+arrChk[j].value+"=0"}}return strChk}function spAlert(a){var d=document.getElementById("alertDiv");var b=document.getElementById("disab");d.innerHTML=a;ttop=document.documentElement.scrollTop;lleft=50;var winW=document.compatMode=="CSS1Compat"&&!window.opera?document.documentElement.clientWidth:document.body.clientWidth;var winH=document.compatMode=="CSS1Compat"&&!window.opera?document.documentElement.clientHeight:document.body.clientHeight;b.style.top=ttop+"px";b.style.left="0px";b.style.width=winW+"px";b.style.height=winH+"px";b.style.display="block";d.style.display="block";d.style.top=(ttop+(winH-d.offsetHeight)/2)+"px";d.style.left=((winW-d.offsetWidth)/2)+"px";Spry.Effect.DoFade(d,{duration:100,from:0,to:100,finish:function(){setTimeout("Spry.Effect.DoFade(document.getElementById('alertDiv'),{ duration: 150, from: 100, to: 0, finish: function(){document.getElementById('alertDiv').style.display='none';document.getElementById('disab').style.display='none';}});",1500)}})}function dropElement(strId){o=document.getElementById(strId);p=o.parentNode;p.removeChild(o);if(!p.hasChildNodes()){p.parentNode.parentNode.removeChild(p.parentNode)}}function gratta(idm,width,heigth){window.open("http://lit.grattaevinci.com/gioco-igp-web/template/demo.jsp?IDConcorso="+idm+"&widthFlash="+width+"&heightFlash="+heigth+"&posx=426&posy=229&title=Miliardario","newwindow","height=470,width=520,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=0,toolbar=0,z-lock=0,screenX=0,screeny=0,left=0,top=0")}function grattagioca(idm,width,heigth){window.open("http://lit.grattaevinci.com/gioco-igp-web/template/demo.jsp?IDConcorso="+idm+"&widthFlash="+width+"&heightFlash="+heigth+"&posx=426&posy=229&title=Miliardario","newwindow","height=470,width=520,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=0,toolbar=0,z-lock=0,screenX=0,screeny=0,left=0,top=0")}function buyLauncher(IDConcorso,Token,IDConto,width,height){var title="Gratta&Vinci";var pLeft=(screen.width-width)/2;var pRight=(screen.height-height)/2;var URL="https://lit.grattaevinci.com/gioco-igp-web/template/template_incl_flash.jsp";URL=URL+"?IDConcorso="+IDConcorso;URL=URL+"&Token="+Token;URL=URL+"&IDConto="+IDConto;URL=URL+"&IDRivenditore=3471";URL=URL+"&widthFlash="+width;URL=URL+"&heightFlash="+height;URL=URL+"&posx="+pLeft;URL=URL+"&posy="+pRight;URL=URL+"&title="+title;window.open(URL,"game","left="+pLeft+",top="+pRight+",width="+width+",height="+height+",scrollbars=no,resizable=no,status=yes")}function grattahelp(idm){window.open("https://lit.grattaevinci.com/infoprodotti/info"+idm+"_popup.html","newwindow","height=290,width=550,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=0,toolbar=0,z-lock=0,screenX=0,screeny=0,left=0,top=0")}function popup(url){document.body.style.overflow="hidden";var d=document.getElementById("popUpDiv");var o=document.getElementById("popUpDivOmbra");var b=document.getElementById("disab");var winW=document.compatMode=="CSS1Compat"&&!window.opera?document.documentElement.clientWidth:document.body.clientWidth;var winH=document.compatMode=="CSS1Compat"&&!window.opera?document.documentElement.clientHeight:document.body.clientHeight;ttop=document.documentElement.scrollTop;lleft=50;b.style.top=ttop+"px";b.style.left="0px";b.style.width=winW+"px";b.style.height=winH+"px";b.style.display="block";Spry.Utils.updateContent(d,url,function(){d.style.display="block";d.style.top=(ttop+(winH-d.offsetHeight)/2)+"px";d.style.left=((winW-d.offsetWidth)/2)+"px";o.style.display="block";o.style.top=(ttop+3+(winH-d.offsetHeight)/2)+"px";o.style.left=((winW+3-d.offsetWidth)/2)+"px";o.style.width=(d.offsetWidth-10)+"px";o.style.height=(d.offsetHeight-10)+"px";Spry.Effect.DoFade(d,{duration:150,from:0,to:100})})}function chiudiPopUP(){document.getElementById("popUpDiv").style.display="none";document.getElementById("disab").style.display="none";document.getElementById("popUpDivOmbra").style.display="none";document.body.style.overflow="auto"}function sendMe2(f,strDiv){$(f).set("send",{onComplete:function(response){var d=document.getElementById(strDiv);d.innerHTML=response}});$(f).send()}function sendMe_old(f,strDiv){var ele=document.getElementById(strDiv);Spry.Effect.DoFade(ele,{duration:50,from:100,to:30,finish:function(){$(f).set("send",{onComplete:function(response){var d=document.getElementById(strDiv);d.innerHTML=response;Spry.Effect.DoFade(d,{duration:50,from:30,to:100})}});$(f).send()}})}function sendMe(strIdForm,strDiv){var ele=document.getElementById(strDiv);cover(ele);var form=jQuery("#"+strIdForm);var dataSerial=form.serialize();jQuery.post(form.attr("action"),dataSerial,complete,"html");function complete(response){var d=document.getElementById(strDiv);d.innerHTML=response;try{document.getElementById("btn_reg").style.display="block";document.getElementById("wait").style.display="none";document.getElementById("sWait").style.display="none"}catch(e){}}}function sendMeDiffAction(strIdForm,strDiv,act){var d=document.getElementById(strDiv);cover(d);var form=jQuery("#"+strIdForm);var dataSerial=form.serialize();jQuery.post(act,dataSerial,complete,"html");function complete(response){var arr=response.split("||finearray||");var d=document.getElementById(strDiv);d.innerHTML=arr[1];if(arr[0]!=""){document.getElementById("str_hd_VObj").value=arr[0]}}}function sendMeCarrello_old(f,strDiv){var ele=document.getElementById(strDiv);Spry.Effect.DoFade(ele,{duration:50,from:100,to:30,finish:function(){$(f).set("send",{onComplete:function(response){var d=document.getElementById(strDiv);d.innerHTML=response;Spry.Effect.DoFade(d,{duration:50,from:30,to:100});aggiornaSaldo()}});$(f).send()}})}function sendMeCarrello(strIdForm,strDiv,qryStr){var ele=document.getElementById(strDiv);cover(ele);var form=jQuery("#"+strIdForm);var dataSerial=form.serialize();jQuery.post("/boxcarrello.asp?a=Math.floor(10000000*Math.random())"+qryStr,dataSerial,complete,"html");function complete(response){var d=document.getElementById(strDiv);d.innerHTML=response;aggiornaSaldo()}}function aggiornaSaldo(){fadeIt("divLogin","/include/login2.asp?login=y&ricalcola=y&a="+Math.floor(10000000*Math.random()))}function popolaCombo(strSelectId,strTabella,strCampoValore,strCampoTxt,strCondizione){var s=document.getElementById("div_"+strSelectId);var req=Spry.Utils.loadURL("GET","/include/popolacombo.asp?a="+Math.floor(10000000*Math.random())+"&tabella="+strTabella+"&campoval="+strCampoValore+"&campotxt="+strCampoTxt+"&condizione="+escape(strCondizione),false);var r=req.xhRequest.responseText;r="<select id='"+strSelectId+"' name='"+strSelectId+"' class='selectReg' style='width:220px;'>"+r+"</select>";s.innerHTML=r}function pulisci(param_id,default_value){if(document.getElementById(param_id).value==default_value){document.getElementById(param_id).value=""}if(document.getElementById(param_id).value!=default_value){}}function inserisci_testoDefault(param_id,default_value){if(document.getElementById(param_id).value==""){document.getElementById(param_id).value=default_value}if(document.getElementById(param_id).value!=default_value){}}function showCal(t){var scanObj=t;var lleft=0;var ttop=0;while(scanObj){lleft+=scanObj.offsetLeft;ttop+=scanObj.offsetTop;scanObj=scanObj.offsetParent}var iframecal=document.getElementById("iframecal");var divCal=document.getElementById("calendarDiv");divCal.style.left=(lleft+110)+"px";divCal.style.top=(ttop)+"px";iframecal.src="/include/cal.asp?campo="+t.id;divCal.style.display="block"}function poker(){width=1024;height=700;var title="Poker";var pLeft=(screen.width-width)/2;var pRight=(screen.height-height)/2;var URL="/include/popPoker.asp";window.open(URL,"game","left="+pLeft+",top="+pRight+",width="+width+",height="+height+",scrollbars=no,resizable=no,status=yes")}function gratta(w,h){width=w;height=h;var title="Gratta&Vinci";var pLeft=(screen.width-width)/2;var pRight=(screen.height-height)/2;var URL="/include/popGratta.asp";window.open(URL,"game","left="+pLeft+",top="+pRight+",width="+width+",height="+height+",scrollbars=no,resizable=no,status=yes")}function totocalcio(){width=1024;height=700;var title="Totocalcio";var pLeft=(screen.width-width)/2;var pRight=(screen.height-height)/2;var URL="/include/totocalcio.asp";window.open(URL,"game","left="+pLeft+",top="+pRight+",width="+width+",height="+height+",scrollbars=no,resizable=no,status=yes")}function ippica(){width=1024;height=700;var title="Ippica";var pLeft=(screen.width-width)/2;var pRight=(screen.height-height)/2;var URL="/include/ippica.asp";window.open(URL,"game","left="+pLeft+",top="+pRight+",width="+width+",height="+height+",scrollbars=no,resizable=no,status=yes")}function bigrace(){width=1024;height=700;var title="Bigrace";var pLeft=(screen.width-width)/2;var pRight=(screen.height-height)/2;var URL="/include/bigrace.asp";window.open(URL,"game","left="+pLeft+",top="+pRight+",width="+width+",height="+height+",scrollbars=no,resizable=no,status=yes")}function ip1Click(cbox,cav,nomeGruppo){if(cbox.checked){var cboxs=document.getElementsByName(cbox.name);for(var j=0;j<cboxs.length;j++){cboxs[j].checked=false}cbox.checked=true;fadeIt("container_carrello","/boxcarrelloippica.asp?act=send&strcav="+cav+"&gruppo="+nomeGruppo+"&a="+Math.floor(10000000*Math.random()))}else{fadeIt("container_carrello","/boxcarrelloippica.asp?act=send&strcav=&gruppo="+nomeGruppo+"&a="+Math.floor(10000000*Math.random()))}}function ip2Click(cbox,nomeGruppo){var cav1="";var cboxs=document.getElementsByName(cbox.name);for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav1+=""+(j+1)+";"}}if(cav1.length>0){cav1=cav1.substring(0,cav1.length-1)}fadeIt("container_carrello","/boxcarrelloippica.asp?act=send&strcav="+cav1+"&gruppo="+nomeGruppo+"&a="+Math.floor(10000000*Math.random()))}function ip4Click(){var cav1="";var cav2="";var cboxs=document.getElementsByName("gruppo1");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav1+=""+(j+1)+";"}}if(cav1.length>0){cav1=cav1.substring(0,cav1.length-1)}var cboxs=document.getElementsByName("gruppo2");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav2+=""+(j+1)+";"}}if(cav2.length>0){cav2=cav2.substring(0,cav2.length-1)}fadeIt("container_carrello","/boxcarrelloippica.asp?act=send&strcav="+cav1+"|"+cav2+'&gruppo=<%=server.urlencode("Piazz.(1)|1??, 2??")%>&a='+Math.floor(10000000*Math.random()))}function ip5Click(){var cav1="";var cav2="";var cav3="";var cboxs=document.getElementsByName("gruppo1");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav1+=""+(j+1)+";"}}if(cav1.length>0){cav1=cav1.substring(0,cav1.length-1)}var cboxs=document.getElementsByName("gruppo2");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav2+=""+(j+1)+";"}}if(cav2.length>0){cav2=cav2.substring(0,cav2.length-1)}var cboxs=document.getElementsByName("gruppo3");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav3+=""+(j+1)+";"}}if(cav3.length>0){cav3=cav3.substring(0,cav3.length-1)}fadeIt("container_carrello","/boxcarrelloippica.asp?act=send&strcav="+cav1+"|"+cav2+"|"+cav3+'&gruppo=<%=server.urlencode("1??|2??|3??")%>&a='+Math.floor(10000000*Math.random()))}function ip6Click(){var cav1="";var cboxs=document.getElementsByName("gruppo1");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav1+=""+(j+1)+";"}}if(cav1.length>0){cav1=cav1.substring(0,cav1.length-1)}fadeIt("container_carrello","/boxcarrelloippica.asp?act=send&strcav="+cav1+'&gruppo=<%=server.urlencode("1??, 2??, 3??")%>&a='+Math.floor(10000000*Math.random()))}function ip7Click(){var cav1="";var cav2="";var cboxs=document.getElementsByName("gruppo1");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav1+=""+(j+1)+";"}}if(cav1.length>0){cav1=cav1.substring(0,cav1.length-1)}var cboxs=document.getElementsByName("gruppo2");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav2+=""+(j+1)+";"}}if(cav2.length>0){cav2=cav2.substring(0,cav2.length-1)}fadeIt("container_carrello","/boxcarrelloippica.asp?act=send&strcav="+cav1+"|"+cav2+'&gruppo=<%=server.urlencode("Vin.(1)|2??, 3??")%>&a='+Math.floor(10000000*Math.random()))}function ip8Click(){var cav1="";var cav2="";var cboxs=document.getElementsByName("gruppo1");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav1+=""+(j+1)+";"}}if(cav1.length>0){cav1=cav1.substring(0,cav1.length-1)}var cboxs=document.getElementsByName("gruppo2");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav2+=""+(j+1)+";"}}if(cav2.length>0){cav2=cav2.substring(0,cav2.length-1)}fadeIt("container_carrello","/boxcarrelloippica.asp?act=send&strcav="+cav1+"|"+cav2+'&gruppo=<%=server.urlencode("Piazz.(1)|1??, 2??, 3??")%>&a='+Math.floor(10000000*Math.random()))}function ip9Click(){var cav1="";var cav2="";var cboxs=document.getElementsByName("gruppo1");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav1+=""+(j+1)+";"}}if(cav1.length>0){cav1=cav1.substring(0,cav1.length-1)}var cboxs=document.getElementsByName("gruppo2");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav2+=""+(j+1)+";"}}if(cav2.length>0){cav2=cav2.substring(0,cav2.length-1)}fadeIt("container_carrello","/boxcarrelloippica.asp?act=send&strcav="+cav1+"|"+cav2+'&gruppo=<%=server.urlencode("Piazz.(2)|1??, 2??, 3??")%>&a='+Math.floor(10000000*Math.random()))}function ip10Click(){var cav1="";var cav2="";var cboxs=document.getElementsByName("gruppo1");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav1+=""+(j+1)+";"}}if(cav1.length>0){cav1=cav1.substring(0,cav1.length-1)}var cboxs=document.getElementsByName("gruppo2");for(var j=0;j<cboxs.length;j++){if(cboxs[j].checked){cav2+=""+(j+1)+";"}}if(cav2.length>0){cav2=cav2.substring(0,cav2.length-1)}fadeIt("container_carrello","/boxcarrelloippica.asp?act=send&strcav="+cav1+"|"+cav2+'&gruppo=<%=server.urlencode("1??,2??|3??")%>&a='+Math.floor(10000000*Math.random()))}function sicuroform(){temp=window.confirm("Hai verificato tutti i dati ? Operazione non reversibile.");if(temp==(false)){return(false)}return(true)}var TINY={};function T$(i){return document.getElementById(i)}function T$$(e,p){return p.getElementsByTagName(e)}TINY.accordion=function(){function slider(n){this.n=n;this.h=[];this.c=[]}slider.prototype.init=function(t,e,m,o,k){var a=T$(t),i=x=0;this.s=k||"",w=[],n=a.childNodes,l=n.length;this.m=m||false;for(i;i<l;i++){if(n[i].nodeType!=3){w[x]=n[i];x++}}this.l=x;for(i=0;i<this.l;i++){var v=w[i];this.h[i]=h=T$$(e,v)[0];this.c[i]=c=T$$("div",v)[0];h.onclick=new Function(this.n+".pr(false,this)");if(o==i){h.className=this.s;c.style.height="auto";c.d=1}else{c.style.height=0;c.d=-1}}};slider.prototype.pr=function(f,d){for(var i=0;i<this.l;i++){var h=this.h[i],c=this.c[i],k=c.style.height;k=k=="auto"?1:parseInt(k);clearInterval(c.t);if((k!=1&&c.d==-1)&&(f==1||h==d)){c.style.height="";c.m=c.offsetHeight;c.style.height=k+"px";c.d=1;h.className=this.s;su(c,1)}else{if(k>0&&(f==-1||this.m||h==d)){c.d=-1;h.className="";su(c,-1)}}}};function su(c){c.t=setInterval(function(){sl(c)},2)}function sl(c){var h=c.offsetHeight,d=c.d==1?c.m-h:h;c.style.height=h+(Math.ceil(d/5)*c.d)+"px";c.style.opacity=h/c.m;c.style.filter="alpha(opacity="+h*100/c.m+")";if((c.d==1&&h>=c.m)||(c.d!=1&&h==1)){if(c.d==1){c.style.height="auto"}clearInterval(c.t)}}return{slider:slider}}();function accSwitch(target,source){if(source.className=="chiuso"){document.getElementById(target).style.display="block";source.className="aperto"}else{document.getElementById(target).style.display="none";source.className="chiuso"}}function salvaSbk(id_sbk){Form01.action.value="save_"+id_sbk;Form01.tmp.value=document.getElementById("titolo_"+id_sbk).value;document.getElementById("htestata").value=document.getElementById("bg"+id_sbk).value;s_data=document.getElementById("sezione_"+id_sbk);v_data=s_data.options[s_data.selectedIndex].value;document.getElementById("hsezione").value=v_data;t_data=document.getElementById("template_"+id_sbk);t_data=t_data.options[t_data.selectedIndex].value;document.getElementById("htemplate").value=t_data;document.getElementById("hurl").value=document.getElementById("url_"+id_sbk).value;document.getElementById("hnumeroelementi").value=document.getElementById("numeroelementi_"+id_sbk).value;document.getElementById("haltezzabox").value=document.getElementById("altezzabox_"+id_sbk).value;document.getElementById("hboxlinkurl").value=document.getElementById("boxlinkurl_"+id_sbk).value;document.getElementById("hboxlinktext").value=document.getElementById("boxlinktext_"+id_sbk).value;mu_select=document.getElementById("modoutente_"+id_sbk);mu_data=mu_select.options[mu_select.selectedIndex].value;document.getElementById("hmodoutente").value=mu_data;document.getElementById("id_sbk_sender").value=id_sbk;sendMeDiffAction("Form01","editIdSbk_"+id_sbk,"paginew_t99_part.asp");Form01.action.value="";Form01.tmp.value="";document.getElementById("htestata").value="";document.getElementById("hurl").value="";document.getElementById("hnumeroelementi").value="";document.getElementById("haltezzabox").value="";document.getElementById("hboxlinkurl").value="";document.getElementById("hboxlinktext").value="";document.getElementById("id_sbk_sender").value="0"}function verifica(){var ret=confirm("test");if(ret){document.loginForm.submit()}}function AggiungiFoto(obj){xmlhttpPost("/insfoto.asp",obj,"risposta","Wait...");return false}function xmlhttpPost(strURL,formname,responsediv,responsemsg){var xmlHttpReq=false;var self=this;if(window.XMLHttpRequest){self.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){self.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}self.xmlHttpReq.open("POST",strURL,true);self.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");self.xmlHttpReq.onreadystatechange=function(){if(self.xmlHttpReq.readyState==4){updatepage(self.xmlHttpReq.responseText,responsediv)}else{if(InStr(formname,"frmfoto")>0){id_hdd=formname.substr(InStr(formname,"_"));try{document.getElementById("loading_"+id_hdd).style.display="block";document.getElementById("loading_"+id_hdd).innerHTML="<img src='/img/wait.gif' />"}catch(e){}try{document.getElementById(id_hdd).style.display="none"}catch(e){}try{document.getElementById("gr"+id_hdd).style.display="none"}catch(e){}}else{updatepage(responsemsg,responsediv)}}};self.xmlHttpReq.send(getquerystring(formname))}function getquerystring(formname){var form=document.forms[formname];var qstr="";function GetElemValue(name,value){qstr+=(qstr.length>0?"&":"")+escape(name).replace(/\+/g,"%2B")+"="+escape(value?value:"").replace(/\+/g,"%2B")}var elemArray=form.elements;for(var i=0;i<elemArray.length;i++){var element=elemArray[i];var elemType=element.type.toUpperCase();var elemName=element.name;if(elemName){if(elemType=="TEXT"||elemType=="TEXTAREA"||elemType=="PASSWORD"||elemType=="BUTTON"||elemType=="RESET"||elemType=="SUBMIT"||elemType=="FILE"||elemType=="IMAGE"||elemType=="HIDDEN"){GetElemValue(elemName,element.value)}else{if(elemType=="CHECKBOX"&&element.checked){GetElemValue(elemName,element.value?element.value:"On")}else{if(elemType=="RADIO"&&element.checked){GetElemValue(elemName,element.value)}else{if(elemType.indexOf("SELECT")!=-1){for(var j=0;j<element.options.length;j++){var option=element.options[j];if(option.selected){GetElemValue(elemName,option.value?option.value:option.text)}}}}}}}}return qstr}function InStr(String1,String2){var a=0;if(String1==null||String2==null){return(false)}String1=String1.toLowerCase();String2=String2.toLowerCase();a=String1.indexOf(String2);if(a==-1){return 0}else{return a+1}}function updatepage(str,responsediv){if(str.substr(0,9)=="Benvenuto"){try{window.location.reload();closeAll();document.getElementById("autenticazione").className="loggato";testoret="";testoret+='<span class="benvenuto">'+str;testoret+='</span><span class="carrellobtn"><a href="#" id="carrello"  title="carrello"></a></form></span><span class="personale"><a href="/areapersonale" id="areapersonale" title="area personale"></a>';testoret+='</span><span class="logoutbtn"><a href="/logout.asp" id="esci" title="esci"></a></span>';document.getElementById("autenticazione").innerHTML=testoret}catch(e){}}else{if(InStr(str,"Wishlist")>0){objid=document.getElementById(str.substr(InStr(str,"Wishlist")+7));id_name=str.substr(InStr(str,"Wishlist")+7);for(var i=0,objs=document.getElementsByTagName("span");i<objs.length;i++){if((objs[i].getAttribute("id")=="loading_"+id_name)){objs[i].innerHTML="";objs[i].style.display="none";break}}document.getElementById(responsediv).innerHTML=str.substr(0,InStr(str,"Wishlist")+7)}else{document.getElementById(responsediv).innerHTML=str}}}function closeAll(){$("button[rel]").each(function(){$(this).overlay().close()})}var fl;var sw;var errori;function Verif(){if(document.forms[0].elements[0].value==""){alert("nName field is mandatory.nnEnter your name.");document.forms[0].elements[0].focus();return false}else{return true}}chkForm=function(){errorinome="";erroripassword2="";erroricognome="";erroriemail="";erroripassword="";errorilogin="";sw=true;frm=document.regForm;if(trim(frm.nome.value)==""){errorinome+="*";sw=false}if(trim(frm.cognome.value)==""){erroricognome+="*";sw=false}if(trim(frm.email.value)==""){erroriemail+="*";sw=false}else{}if(trim(frm.login.value)==""){errorilogin="*";sw=false}else{if((frm.login.value.length<6)||(frm.login.value.length>15)){errorilogin+="*";sw=false}}if(trim(frm.passwordsito.value)==""){erroripassword="*";sw=false}else{if((frm.passwordsito.value.length)<6){erroripassword="*";sw=false}}if(trim(frm.passwordsito2.value)==""){erroripassword2="*";sw=false}else{if(frm.passwordsito.value!=frm.passwordsito2.value){erroripassword2="*";sw=false}}document.getElementById("vnome").innerHTML=errorinome;document.getElementById("vcognome").innerHTML=erroricognome;document.getElementById("vemail").innerHTML=erroriemail;document.getElementById("vlogin").innerHTML=errorilogin;document.getElementById("vpasswordsito").innerHTML=erroripassword;document.getElementById("vpasswordsito2").innerHTML=erroripassword2;return sw};function trim(stringa){while(stringa.substring(0,1)==" "){stringa=stringa.substring(1,stringa.length)}while(stringa.substring(stringa.length-1,stringa.length)==" "){stringa=stringa.substring(0,stringa.length-1)}return stringa}var fl=true;function resizeFrame(f){try{if(fl){f.style.height=f.contentWindow.document.body.scrollHeight+"px"}}catch(e){}}resizeFrameCont=function(h){fl=false;try{document.getElementById("childframe").style.height=h+"px";}catch(e){}};var XMLHTTP;function votazione(voto,path){var url;url="/insvoto.asp?valore="+voto+"&path="+path;XMLHTTP=RicavaBrowser(AddVoto);XMLHTTP.open("GET",url,true);XMLHTTP.send(null)}function AddVoto(){if(XMLHTTP.readyState==4){}}function RicavaBrowser(QualeBrowser){if(navigator.userAgent.indexOf("MSIE")!=(-1)){var Classe="Msxml2.XMLHTTP";if(navigator.appVersion.indexOf("MSIE 5.5")!=(-1)){}Classe="Microsoft.XMLHTTP";try{OggettoXMLHTTP=new ActiveXObject(Classe);OggettoXMLHTTP.onreadystatechange=QualeBrowser;return OggettoXMLHTTP}catch(e){alert("Errore: l'ActiveX non verr?? eseguito!")}}else{if(navigator.userAgent.indexOf("Mozilla")!=(-1)){OggettoXMLHTTP=new XMLHttpRequest();OggettoXMLHTTP.onload=QualeBrowser;OggettoXMLHTTP.onerror=QualeBrowser;return OggettoXMLHTTP}else{alert("L'esempio non funziona con altri browser!")}}};