function waitPreloadPage(){if(document.getElementById){$("ajaxwheel").style.visibility="hidden";$("bottigliefantasma").style.visibility="hidden";}else{if(document.layers){$("ajaxwheel").style.visibility="hidden";$("bottigliefantasma").style.visibility="hidden";}else{$("ajaxwheel").style.visibility="hidden";$("bottigliefantasma").style.visibility="hidden";}}};var csct;csct=0;function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++){x.src=x.oSrc;}};function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p){d.MM_p=new Array();}var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++){if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}};function MM_findObj(n,d){var p,i,x;if(!d){d=document;}if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}if(!(x=d[n])&&d.all){x=d.all[n];}for(i=0;!x&&i<d.forms.length;i++){x=d.forms[i][n];}for(i=0;!x&&d.layers&&i<d.layers.length;i++){x=MM_findObj(n,d.layers[i].document);}if(!x&&d.getElementById){x=d.getElementById(n);}return x;};function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3){if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc){x.oSrc=x.src;}x.src=a[i+2];}}};pantext=new Array();var ciccio="1234";var conto=0;function temppiubottiglie(){conto=conto+1;$("voto"+conto).src="../images/vota_bottigliapiena.gif";};function tempmenobottiglie(){$("voto"+conto).src="../images/vota_bottigliavuota.gif";conto=conto-1;};function aggiornalog(_1,_2,_3,_4,_5){var _6=new Ajax.Request("dynamic_save_updatelog.asp",{method:"post",parameters:"userupdate="+_1+"&actionupdate="+_2+"&onupdate="+_3+"&howupdate=&onupdateimg="+_4+"&onupdatenick="+_5});};function chiusaslidesx(){$("contienetendina").style.width="0px";};function preaprislidesx(){$("contienetendina").style.width="224px";};function preaprislidesxlog(){$("contienetendina").style.width="236px";};function ajaxwheelvisibile(){};function toglispostament(){spostament=0;determinaprossimi();};function toglistopothers(){};function spostalcentro(){};var effects=[];function imageover(_9){oggetto=_9.getElementsByTagName("img")[0];if(typeof effects[oggetto.id]=="undefined"){imgup=0;setTimeout("var imggrow = new Spry.Effect.DoGrow(oggetto, {from: '44px', to: '100px',duration:350});",250);}};function velonerovisible(){$("velonero").style.display="block";$("velonero").style.top="0px";$("velonero").style.left="0px";$("velonero").style.width="100%";$("velonero").style.height="100%";$("velonero").width="100%";$("velonero").height="100%";};function mostraschedina(_a){if($("overbottlecont").style.visibility=="visible"){$("overbottlecont").style.visibility="hidden";ShrinkThumbnail($("qualechiud").title);chiudischedina();}else{if(finestraperta==0){GrowThumbnail(_a,"59","170","44","110");}fissabottgrowed=1;if($("overbottlecont").style.visibility!="visible"){imgdacercare=_a.src.substring(_a.src.lastIndexOf("/")+1,_a.src.lastIndexOf("_"));var _b=new Ajax.Updater("overbottlecont","dynamicschedina.asp",{method:"post",parameters:"image="+imgdacercare});}if($("overbottlecont").style.visibility!="visible"&&growing==0){divpostop=getPos(_a.parentNode).top;divposleft=getPos(_a.parentNode).left;$("overbottlecont").style.top=divpostop-divparentpostop+160-$('boundingvisualizza').scrollTop+"px";$("overbottlecont").style.left=divposleft-divparentposleft-70+"px";$("overbottlecont").style.zIndex=2000000;verificaposizione(_a);var _c=new Spry.Effect.Squish("overbottlecont",{duration:300,from:"0%",to:"100%",finish:toglifissabottgrowed});imgselezionatasrc=_a.src;_c.start();}}};function toglifissabottgrowed(){fissabottgrowed=0;};function chiudischedina(){$("overbottlecont").innerHTML=$("overbottlecontcopia").innerHTML;};function verificaposizione(_d){Xdivpostop=getPos(_d.parentNode).top;Xdivposbottom=Xdivpostop+130;Xdivposleft=getPos(_d.parentNode).left;Xdivposright=Xdivposleft+94;Xcontentmargintop=getPos($("boundingvisualizza")).top;Xcontentmarginbottom=getPos($("boundingvisualizza")).top+$("boundingvisualizza").offsetHeight;Xcontentmarginleft=getPos($("boundingvisualizza")).left;Xcontentmarginright=getPos($("boundingvisualizza")).left+$("boundingvisualizza").offsetWidth;Xdivparentpostop=getPos($("contenitore")).top;Xdivparentposleft=getPos($("contenitore")).left;if(Xdivpostop<Xcontentmargintop){spostament=1;}if(Xdivposbottom>Xcontentmarginbottom+$('boundingvisualizza').scrollTop){$("overbottlecont").style.top = getPos($("overbottlecont")).top - 250+"px";$('boundingvisualizza').scrollTop = $('boundingvisualizza').scrollTop + 100;}if(Xdivposleft<Xcontentmarginleft){spostament=1;}if(Xdivposright>Xcontentmarginright){spostament=1;}};function verificaslidedown(){if(slidedownpos==0){slidedownpos=1;$("droppablearea").style.height=110+"px";$("frecciabianca").src="../images/arrowslidedown2.gif";$("allineatotale").vAlign="middle";}else{slidedownpos=0;$("droppablearea").style.height=80+"px";$("frecciabianca").src="../images/frecciabianca.gif";$("allineatotale").vAlign="top";$("slidedown").style.height=88+"px";}};function imageout(_e){var _f=[];oggetto=_e.getElementsByTagName("img")[0];if(typeof _f[oggetto.id]=="undefined"){var _10=new Spry.Effect.DoGrow(oggetto,{from:"100px",to:"44px",duration:150});}};
function getPos(obj){var _11=new Object();var _12=0,_13=0;while(obj){_12+=obj.offsetTop;_13+=obj.offsetLeft;obj=obj.offsetParent;}_11.left=_13;_11.top=_12;return _11;};function determinaprossimi(){};function indicatop(){var _15=document.getElementsByClassName("dragimg");for(var i=0;i<_15.length;i++){_15[i].innerHTML=_15[i].id;}};function scomparewheel(_16){var _17=new Ajax.Updater("boundingvisualizza","demorisultato_REGIONE.asp",{method:"post",parameters:"region=1",onComplete:self.setTimeout("rimuoviajaxwheel()",2000)});};function rimuoviajaxwheel(){$("ajaxwheel").style.visibility="hidden";$("bottigliefantasma").style.visibility="hidden";growing=0;};function avviaricerca(_18){$("ajaxwheel").style.visibility="visible";$("bottigliefantasma").style.visibility="visible";growing=1;scomparewheel(_18);};var schedafronte;schedafronte=1;function scopridipiu(){if(schedafronte==1){schedafronte=0;new Effect.Move("apDiv1",{x:-160,y:0,mode:"relative",transition:Effect.Transitions.sinoidal,duration:0.3});$("descscheda").style.visibility="hidden";$("prezzoscheda").style.visibility="hidden";$("storiascheda").style.visibility="hidden";$("retroschedainfo").style.visibility="visible";$("piuinformazioni").innerHTML="torna alla scheda";return true;}if(schedafronte==0){schedafronte=1;new Effect.Move("apDiv1",{x:160,y:0,mode:"relative",transition:Effect.Transitions.sinoidal,duration:0.3});$("bottiglioneimg").src=imgselezionatasrc.replace("bottles_s","bottlespng_big").replace("_s.gif",".png");if(idusr!="n"){var _19=new Ajax.Updater("schedagrande","dynamicscheda.asp",{method:"post",parameters:"image="+imgdacercare+"&loggato=1"});}else{var _19=new Ajax.Updater("schedagrande","dynamicscheda.asp",{method:"post",parameters:"image="+imgdacercare});}return true;}};var chiusa;var chiusa2;chiusa=0;chiusa2=0;function giraorecchia(){};function spostaarrowtextleft(){if(chiusa==0){chiusa=1;$("orecchia2img").src="../images/orecchiagirata.gif";slideEffectclose.start();if(idusr!="n"){$("arrowlefttext").style.marginLeft="255px";$("arrowlefttext2").style.marginLeft="250px";}else{$("arrowlefttext").style.marginLeft="15px";$("arrowlefttext2").style.marginLeft="10px";}return true;}if(chiusa==1){slideEffectopen.start();chiusa=0;$("orecchia2img").src="../images/orecchia4.gif";if(idusr!="n"){$("arrowlefttext").style.marginLeft="455px";$("arrowlefttext2").style.marginLeft="450px";}else{$("arrowlefttext").style.marginLeft="215px";$("arrowlefttext2").style.marginLeft="210px";}return true;}};function spostaarrowtextleft2(){if(chiusa2==0){slideEffectloggedclose.start();chiusa2=1;$("orecchia2img").src="../images/orecchiagirata.gif";chiusa=1;return true;}if(chiusa2==1){slideEffectloggedopen.start();chiusa2=0;chiusa=0;$("orecchia2img").src="../images/orecchia4.gif";return true;}};function aumentabottordine(_1a){if(parseFloat($("quantcart"+_1a).innerHTML)<101){$("quantcart"+_1a).innerHTML=parseFloat($("quantcart"+_1a).innerHTML)+1;cosaserchiqua3="prezzcart"+_1a;subtotordine3=parseFloat($(cosaserchiqua3).innerHTML.replace(",","."))+parseFloat($("prezzunitordine"+_1a).innerHTML.replace(",","."));$(cosaserchiqua3).innerHTML=subtotordine3.toFixed(2).replace(".",",");aggiornatotaledettaglio();dragimgfile=_1a;inserisciarticolonelcart2();}};function riducibottordine(_1b){if(parseFloat($("quantcart"+_1b).innerHTML)>0){$("quantcart"+_1b).innerHTML=parseFloat($("quantcart"+_1b).innerHTML)-1;cosaserchiqua4="prezzcart"+_1b;subtotordine4=parseFloat($(cosaserchiqua4).innerHTML.replace(",","."))-parseFloat($("prezzunitordine"+_1b).innerHTML.replace(",","."));$(cosaserchiqua4).innerHTML=subtotordine4.toFixed(2).replace(".",",");aggiornatotaledettaglio();cicciok="tablecartOK"+_1b;rimuovidalcart($(cicciok));}};function aggiornatotaledettaglio(){bottdet=0;pricedet=0;var _1c=document.getElementsByClassName("quantcart");for(ix=0;ix<_1c.length;ix++){bottdet=bottdet+parseFloat(_1c[ix].innerHTML);}var _1d=document.getElementsByClassName("prezzcart");for(ix=0;ix<_1d.length;ix++){pricedet=pricedet+parseFloat(_1d[ix].innerHTML.replace(",","."));}$("totaleordinebott").innerHTML=bottdet;$("totaleordineprice").innerHTML=pricedet.toFixed(2).replace(".",",");$("totaleordineprice").innerHTML="€ "+$("totaleordineprice").innerHTML;verificamultiploordine();aggiornaspesespedizione();};function aggiornaspesespedizione(){if(parseFloat($("totaleordinebott").innerHTML)<=6){$("totalespesespediz").innerHTML="€ 9,50";}if(parseFloat($("totaleordinebott").innerHTML)>6&&parseFloat($("totaleordinebott").innerHTML)<=12){$("totalespesespediz").innerHTML="€ 14,00";}if(parseFloat($("totaleordinebott").innerHTML)<=18&&parseFloat($("totaleordinebott").innerHTML)>12){$("totalespesespediz").innerHTML="€ 18,00";}if(parseFloat($("totaleordinebott").innerHTML)<=24&&parseFloat($("totaleordinebott").innerHTML)>18){$("totalespesespediz").innerHTML="€ 21,00";}if(parseFloat($("totaleordinebott").innerHTML)<=30&&parseFloat($("totaleordinebott").innerHTML)>24){$("totalespesespediz").innerHTML="€ 24,00";}if(parseFloat($("totaleordinebott").innerHTML)<=36&&parseFloat($("totaleordinebott").innerHTML)>30){$("totalespesespediz").innerHTML="€ 27,00";}if(parseFloat($("totaleordinebott").innerHTML)>36&&parseFloat($("totaleordinebott").innerHTML)<42){$("totalespesespediz").innerHTML="€ 30,00";}if(csct==1){if(parseFloat($("discountrate").innerHTML.replace("€ ","").replace(",","."))>180){$("totalespesespediz").innerHTML="€ 0,00";}}else{if(csct==3){$("totalespesespediz").innerHTML="€ 0,00";$("totalespesespediz").style.fontWeight = "bold";$("totalespesespediz").style.color="#090";}else{if(parseFloat($("totaleordineprice").innerHTML.replace("€ ","").replace(",","."))>180){$("totalespesespediz").innerHTML="€ 0,00";}}}if($('totaleordineprice').style.textDecoration != 'line-through'){quantotot=parseFloat($("totaleordineprice").innerHTML.replace("€ ","").replace(",","."))+parseFloat($("totalespesespediz").innerHTML.replace("€ ","").replace(",","."));}else{quantotot=parseFloat($("discountrate").innerHTML.replace("€ ","").replace(",","."))+parseFloat($("totalespesespediz").innerHTML.replace("€ ","").replace(",","."));}$("totalegeneralepriceval").innerHTML=quantotot.toFixed(2).replace(".",",");};function aggiornatotale(){x=0;spesatot=0;for(x=1;x<contenutocart[0].length;x++){if(parseFloat(contenutocart[1][x])>0){spesatot=spesatot+parseFloat(contenutocart[1][x]);}};if (bottnocanc !="") spesatot=spesatot-bottnocancprice;$("totalespesa").innerHTML="€ "+spesatot.toFixed(2).replace(".",","); };function dettaglicart(_1e){if(cartridotto==1){detailscartquale="detailscart"+_1e;var _1f=document.getElementsByClassName("detailscart");for(var i=0;i<_1f.length;i++){_1f[i].style.display="none";}$(detailscartquale).style.display="inline";}};function fumettocartin(_20){if(cartridotto==1){fumettocartquale="fumettocart"+_20;$(fumettocartquale).style.visibility="visible";}};function fumettocartout(_21){if(cartridotto==1){fumettocartquale="fumettocart"+_21;$(fumettocartquale).style.visibility="hidden";}};function verificamultiploordine(){multiploordine=parseInt($("totaleordinebott").innerHTML)/3;multiploordineint=$("totaleordinebott").innerHTML/3;if(multiploordine==multiploordineint.round(0)){$("multiplo6").style.visibility="hidden";$("multiplono").style.visibility="hidden";$("procedipaga").src="../images/conferma1.gif";}else{$("multiplo6").style.visibility="visible";$("multiplono").style.visibility="visible";$("procedipaga").src="../images/conferma1_stdby.gif";}};function preparalogin(_22){if(_22=="ordine"){$("postacarrello").value=$("contenutoslidedown").innerHTML.replace("cartelement","");$("postaarray0").value=contenutocart[0];$("postaarray1").value=contenutocart[1];$("usern").value=$("usernord").value;$("passw").value=$("password").value;$("logintype").value="ordine";$("loginform").submit();}if(_22=="normale"){$("postacarrello").value=$("contenutoslidedown").innerHTML.replace("cartelement","");$("postaarray0").value=contenutocart[0];$("postaarray1").value=contenutocart[1];$("logintype").value="normale";$("loginform").submit();}};function getStaticCollectionOfBottles(){var _23=$$("img.dragimg");tuttebottiglie=new Array;for(i=0;i<_23.length;i++){tuttebottiglie.push(_23[i]);}divparentpostop=getPos($("contenitore")).top;divparentposleft=getPos($("contenitore")).left;posizioneboundingtop=(getPos($("boundingvisualizza")).top)-100;posizioneboundingleft=(getPos($("boundingvisualizza")).left)-80;rif1=(posizioneboundingtop+120+($("boundingvisualizza").offsetHeight));rif2=(posizioneboundingleft+80+($("boundingvisualizza").offsetWidth));};function determinabounding(){posizioneboundingtop=(getPos($("boundingvisualizza")).top)-100;posizioneboundingleft=(getPos($("boundingvisualizza")).left)-80;rif1=(posizioneboundingtop+120+($("boundingvisualizza").offsetHeight));rif2=(posizioneboundingleft+80+($("boundingvisualizza").offsetWidth));$("slidedown").style.width="100%";};function scopribottiglie(){if(ricercaincorso!=1){$("ajaxwheelbottles").style.visibility="visible";for(var i=0,_24;_24=tuttebottiglie[i];i++){var _25=(getPos(_24).top);var _26=(getPos(_24).left);if(_25>posizioneboundingtop+$('boundingvisualizza').scrollTop&&_26>posizioneboundingleft&&(_25<rif1+$('boundingvisualizza').scrollTop)&&(_26<rif2)){_24.src="../octopusstorage/wineimagesB/bottlespng_ss/"+_24.getAttribute("imago");}}}$("ajaxwheelbottles").style.visibility="hidden";};function inizioricerca(){if(($("cercatesto").value!="cerca nome"&&$("cercatesto").value.replace(" ","")!="")||$("cercaregione").value!="0"||$("cercadenominazione").value!="0"||$("cercatipologia").value!="0"||$("cercaproduttore").value!="0"||$("cercaprezzo").value!="0"){var _27=new Ajax.Request("dynamic_presearch.asp",{method:"post",onComplete:function(_28){if(_28.responseText!="ZERORISULTATI"){$("resetricerca").style.visibility="visible";$("ajaxwheel").style.visibility="visible";$("bottigliefantasma").style.visibility="visible";$("chiudiricerca").style.visibility="visible";$('strisciarosa').style.visibility='hidden';var _29=new Ajax.Updater("newmappamondo","dynamic_search.asp",{method:"post",onComplete:function(_2a){ricercaincorso=1;$("ajaxwheel").style.visibility="hidden";$("bottigliefantasma").style.visibility="hidden";},parameters:"tx="+$("cercatesto").value+"&r="+$("cercaregione").value+"&d="+$("cercadenominazione").value+"&ti="+$("cercatipologia").value+"&pro="+$("cercaproduttore").value+"&pre="+$("cercaprezzo").value});var _2b="";if($("cercatesto").value!="cerca nome"){_2b=_2b+"Nome: <STRONG>"+$("cercatesto").value+"</STRONG><br />";}if($("cercaregione").value!="0"){_2b=_2b+"Regione: <STRONG>"+$("cercaregione").options[$("cercaregione").selectedIndex].text+"</STRONG><br />";}if($("cercadenominazione").value!="0"){_2b=_2b+"Denominazione:<br /><STRONG>"+$("cercadenominazione").options[$("cercadenominazione").selectedIndex].text+"</STRONG><br />";}if($("cercatipologia").value!="0"){_2b=_2b+"Tipologia: <STRONG>"+$("cercatipologia").options[$("cercatipologia").selectedIndex].text+"</STRONG><br />";}if($("cercaproduttore").value!="0"){_2b=_2b+"Produttore: <STRONG>"+$("cercaproduttore").options[$("cercaproduttore").selectedIndex].text+"</STRONG><br />";}if($("cercaprezzo").value!="0"){_2b=_2b+"Prezzo: <STRONG>"+$("cercaprezzo").options[$("cercaprezzo").selectedIndex].text+"</STRONG><br />";}$("searchwhat").innerHTML=_2b;}else{alert("Nessun bottiglia trovata. Prova a cambiare i parametri di ricerca");}},parameters:"tx="+$("cercatesto").value+"&r="+$("cercaregione").value+"&d="+$("cercadenominazione").value+"&ti="+$("cercatipologia").value+"&pro="+$("cercaproduttore").value+"&pre="+$("cercaprezzo").value});}else{alert("Seleziona almeno un parametro per la ricerca");}};function chiudiricerca(){$("ajaxwheel").style.visibility="visible";$("bottigliefantasma").style.visibility="visible";$("chiudiricerca").style.visibility="hidden";$('strisciarosa').style.visibility='visible';$("cercatesto").value="cerca nome";$("cercatipologia").options[0].selected="true";$("cercaregione").options[0].selected="true";$("cercaproduttore").options[0].selected="true";$("cercadenominazione").options[0].selected="true";$("cercaprezzo").options[0].selected="true";aggsearch($("cercatesto"));$("resetricerca").style.visibility="hidden";var _2c=new Ajax.Updater("newmappamondo","dynamic2_resetmap.asp",{method:"get",onComplete:function(_2d){getStaticCollectionOfBottles();ricercaincorso=0;$("ajaxwheel").style.visibility="hidden";$("bottigliefantasma").style.visibility="hidden";determinaprossimi();scopribottiglie();},parameters:"tx=ciccio"});};function spostaarisultati(){};function verificaonclick(_2f){if(_2f.value=="campo obbligatorio"){_2f.value="";}};function registranuovouser(){pageTracker._trackPageview("/store/registrazione_inizio.html");poliTracker._trackPageview("/store/registrazione_inizio.html");validato=1;if($("nomereg").value==""||$("nomereg").value=="campo obbligatorio"){$("nomereg").style.backgroundColor="#FF9999";$("nomereg").value="campo obbligatorio";validato=0;}if($("cognomereg").value==""||$("cognomereg").value=="campo obbligatorio"){$("cognomereg").style.backgroundColor="#FF9999";$("cognomereg").value="campo obbligatorio";validato=0;}if($("emailreg").value.indexOf("@")==-1){$("emailreg").style.backgroundColor="#FF9999";$("emailreg").value="email non corretta";validato=0;}if($("viaspedreg").value==""||$("viaspedreg").value=="campo obbligatorio"){$("viaspedreg").style.backgroundColor="#FF9999";$("viaspedreg").value="campo obbligatorio";validato=0;}if($("cittaspedreg").value==""||$("cittaspedreg").value=="campo obbligatorio"){$("cittaspedreg").style.backgroundColor="#FF9999";$("cittaspedreg").value="campo obbligatorio";validato=0;}if($("capspedreg").value==""||$("capspedreg").value=="campo obbligatorio"){$("capspedreg").style.backgroundColor="#FF9999";$("capspedreg").value="campo obbligatorio";validato=0;}if($("telefonoreg").value==""||$("telefonoreg").value=="campo obbligatorio"){$("telefonoreg").style.backgroundColor="#FF9999";$("telefonoreg").value="campo obbligatorio";validato=0;}if($("provinciaspedreg").options[$("provinciaspedreg").selectedIndex].value=="0"){$("provinciaspedreg").style.backgroundColor="#FF9999";validato=0;}if(validato==1){if($("privacyreg").checked==false){alert("E' necessario il tuo consenso alle regole sulla privacy");}else{$("datadinascitareg").value=$("birthyear").value+"/"+$("birthmonth").value+"/"+$("birthday").value;var _30=new Ajax.Request("dynamic_save_newuser.asp",{method:"post",parameters:"email="+$("emailreg").value+"&nome="+$("nomereg").value.replace("'","''")+"&cognome="+$("cognomereg").value.replace("'","''")+"&nascita="+$("datadinascitareg").value+"&professione="+$("professionereg").value.replace("'","''")+"&conoscenzavino="+$("conoscenzavinoreg").value+"&indirizzo_fatt="+$("viafattreg").value.replace("'","''")+"&citta_fatt="+$("cittafattreg").value.replace("'","''")+"&  provincia_fatt="+$("provinciafattreg").value.replace("'","''")+"&cap_fatt="+$("capfattreg").value+"&telefono_fatt="+$("telefonoreg").value+"&partitaiva="+$("partitaiva").value+"&indirizzo_sped="+$("viaspedreg").value.replace("'","''")+"&azienda_sped="+$("ragsocialereg").value.replace("'","''")+"&citta_sped="+$("cittaspedreg").value.replace("'","''")+"&provincia_sped="+$("provinciaspedreg").value+"&cap_sped="+$("capspedreg").value+"&telefono_sped="+$("telefonoreg").value});chiudischedaregistrazione();pageTracker._trackPageview("/store/registrazione_fine.html");poliTracker._trackPageview("/store/registrazione_fine.html");alert("Grazie. A breve controlla la tua posta elettronica!");}}if(registrazionedaordine==1){$("usernord").value=$("emailreg").value;var _30=new Ajax.Request("recuperapasswordutente.asp",{method:"post",onSuccess:function(_31){registrazionedaordine=0;$("password").value=_31.responseText.replace(" ","");preparalogin("ordine");},parameters:"email="+$("emailvisitor").value});}};function copiadati(){$("viafattreg").value=$("viaspedreg").value;$("cittafattreg").value=$("cittaspedreg").value;$("capfattreg").value=$("capspedreg").value;$("provinciafattreg").options[$("provinciaspedreg").selectedIndex].selected=true;};function modificadatispediz(){$("datispediz").style.visibility="hidden";$("datispedizmod").style.visibility="visible";};function rendivisibilepromo(){};function avvia_ricerca_mixer(_32){if(_32=="abbinamenti"){if($("aperitivo").checked!=false||$("carnebianca").checked!=false||$("formaggierb").checked!=false||$("primicarne").checked!=false||$("carnerossa").checked!=false||$("formaggistag").checked!=false||$("primipesce").checked!=false||$("carnegriglia").checked!=false||$("pasticceriafre").checked!=false||$("crostacei").checked!=false||$("cacciagione").checked!=false||$("pasticceriasec").checked!=false||$("pescedelic").checked!=false||$("arrosti").checked!=false||$("meditazione").checked!=false||$("pescegrande").checked!=false||$("formaggifr").checked){mixervuoto=0;$("mixer_non_trovato").style.visibility="hidden";$("avvia_ricerca_mixer_gif").src="../images/avvia_ricerca_grey.gif";$("mixer_ajaxwheel").style.visibility="visible";var _33=new Ajax.Request("dynamic_mixer_verificaresults.asp",{method:"post",onSuccess:function(_34){if(_34.responseText.search("Totalbottles0")<0){$('strisciarosa').style.visibility='hidden';var _35=new Ajax.Updater("newmappamondo","dynamic_mixer_results.asp",{method:"post",onComplete:spostaarisultati,onSuccess:function(_36){chiudischedadyn();$("avvia_ricerca_mixer_gif").src="../images/avvia_ricerca_mixer.gif";$("mixer_ajaxwheel").style.visibility="hidden";$("chiudiricerca").style.visibility="visible";ricercaincorso=1;},parameters:"aperitivo="+$("aperitivo").checked+"&carnebianca="+$("carnebianca").checked+"&formaggierb="+$("formaggierb").checked+"&primicarne="+$("primicarne").checked+"&carnerossa="+$("carnerossa").checked+"&formaggistag="+$("formaggistag").checked+"&primipesce="+$("primipesce").checked+"&carnegriglia="+$("carnegriglia").checked+"&pasticceriafre="+$("pasticceriafre").checked+"&crostacei="+$("crostacei").checked+"&cacciagione="+$("cacciagione").checked+"&pasticceriasec="+$("pasticceriasec").checked+"&pescedelic="+$("pescedelic").checked+"&arrosti="+$("arrosti").checked+"&meditazione="+$("meditazione").checked+"&pescegrande="+$("pescegrande").checked+"&formaggifr="+$("formaggifr").checked});var _37="<strong>vini adatti per</strong><br>";if($("aperitivo").checked!=false){_37=_37+"<STRONG>aperitivo,</STRONG> ";}if($("primicarne").checked!=false){_37=_37+"<STRONG>primi di carne, </STRONG> ";}if($("primipesce").checked!=false){_37=_37+"<STRONG>primi di pesce, </STRONG> ";}if($("crostacei").checked!=false){_37=_37+"<STRONG>crostacei, </STRONG> ";}if($("pescedelic").checked!=false){_37=_37+"<STRONG>pesci delicati, </STRONG> ";}if($("pescegrande").checked!=false){_37=_37+"<STRONG>pesci saporiti, </STRONG> ";}if($("carnebianca").checked!=false){_37=_37+"<STRONG>secondi di carne bianca,</STRONG> ";}if($("carnerossa").checked!=false){_37=_37+"<STRONG>secondi di carne rossa, </STRONG> ";}if($("carnegriglia").checked!=false){_37=_37+"<STRONG>carne alla griglia, </STRONG> ";}if($("cacciagione").checked!=false){_37=_37+"<STRONG>cacciagione, </STRONG> ";}if($("arrosti").checked!=false){_37=_37+"<STRONG>arrosti, </STRONG> ";}if($("formaggifr").checked!=false){_37=_37+"<STRONG>formaggi freschi, </STRONG> ";}if($("formaggierb").checked!=false){_37=_37+"<STRONG>formaggi speziati, </STRONG> ";}if($("formaggistag").checked!=false){_37=_37+"<STRONG>formaggi stagionati, </STRONG> ";}if($("pasticceriafre").checked!=false){_37=_37+"<STRONG>pasticceria fresca, </STRONG> ";}if($("pasticceriasec").checked!=false){_37=_37+"<STRONG>pasticceria secca, </STRONG> ";}if($("meditazione").checked!=false){_37=_37+"<STRONG>per meditare, </STRONG> ";}ultimavirgola=_37.lastIndexOf(",");penultimo=ultimavirgola;_37=_37.substr(0,penultimo);$("searchwhat").innerHTML=_37+"</STRONG>";}else{$("avvia_ricerca_mixer_gif").src="../images/avvia_ricerca_mixer.gif";$("mixer_ajaxwheel").style.visibility="hidden";$("mixer_non_trovato").style.visibility="visible";}},parameters:"aperitivo="+$("aperitivo").checked+"&carnebianca="+$("carnebianca").checked+"&formaggierb="+$("formaggierb").checked+"&primicarne="+$("primicarne").checked+"&carnerossa="+$("carnerossa").checked+"&formaggistag="+$("formaggistag").checked+"&primipesce="+$("primipesce").checked+"&carnegriglia="+$("carnegriglia").checked+"&pasticceriafre="+$("pasticceriafre").checked+"&crostacei="+$("crostacei").checked+"&cacciagione="+$("cacciagione").checked+"&pasticceriasec="+$("pasticceriasec").checked+"&pescedelic="+$("pescedelic").checked+"&arrosti="+$("arrosti").checked+"&meditazione="+$("meditazione").checked+"&pescegrande="+$("pescegrande").checked+"&formaggifr="+$("formaggifr").checked});}else{alert("Seleziona almeno un'opzione");}}if(_32=="gusto"){if($("barricato_mix").value!="1"||$("strutturato_mix").value!="1"||$("vivace_mix").value!="1"||$("aromatico_mix").value!="1"||$("fresco_mix").value!="1"||$("persistente_mix").value!="1"||$("profumato_mix").value!="1"||$("speziato_mix").value!="1"){mixervuoto=0;$("mixer_non_trovato").style.visibility="hidden";$("avvia_ricerca_mixer_gif").src="../images/avvia_ricerca_grey.gif";$("mixer_ajaxwheel").style.visibility="visible";var _33=new Ajax.Request("dynamic_mixer_verificaresults_gusto.asp",{method:"post",onSuccess:function(_38){if(_38.responseText.search("Totalbottles0")<0){$('strisciarosa').style.visibility='hidden';var _39=new Ajax.Updater("newmappamondo","dynamic_mixer_results_gusto.asp",{method:"post",onSuccess:function(_3a){chiudischedadyn();$("avvia_ricerca_mixer_gif").src="../images/avvia_ricerca_mixer.gif";$("mixer_ajaxwheel").style.visibility="hidden";$("chiudiricerca").style.visibility="visible";ricercaincorso=1;},parameters:"barricato_mix="+$("barricato_mix").value+"&strutturato_mix="+$("strutturato_mix").value+"&vivace_mix="+$("vivace_mix").value+"&aromatico_mix="+$("aromatico_mix").value+"&fresco_mix="+$("fresco_mix").value+"&persistente_mix="+$("persistente_mix").value+"&profumato_mix="+$("profumato_mix").value+"&speziato_mix="+$("speziato_mix").value});var _3b=new Array();_3b[0]="<STRONG>no</STRONG>,<br />";_3b[2]="<STRONG>s??</STRONG>,<br />";var _3c="";if($("barricato_mix").value!="1"){_3c=_3c+"<STRONG>Barricato:</STRONG> "+_3b[$("barricato_mix").value];}if($("vivace_mix").value!="1"){_3c=_3c+"<STRONG>Vivace:</STRONG> "+_3b[$("vivace_mix").value];}if($("fresco_mix").value!="1"){_3c=_3c+"<STRONG>Fresco:</STRONG> "+_3b[$("fresco_mix").value];}if($("profumato_mix").value!="1"){_3c=_3c+"<STRONG>Profumato:</STRONG> "+_3b[$("profumato_mix").value];}if($("strutturato_mix").value!="1"){_3c=_3c+"<STRONG>Strutturato:</STRONG> "+_3b[$("strutturato_mix").value];}if($("aromatico_mix").value!="1"){_3c=_3c+"<STRONG>Aromatico:</STRONG> "+_3b[$("aromatico_mix").value];}if($("persistente_mix").value!="1"){_3c=_3c+"<STRONG>Persistente:</STRONG> "+_3b[$("persistente_mix").value];}if($("speziato_mix").value!="1"){_3c=_3c+"<STRONG>Speziato:</STRONG> "+_3b[$("speziato_mix").value];}ultimavirgola=_3c.lastIndexOf(",");penultimo=ultimavirgola;_3c=_3c.substr(0,penultimo);$("searchwhat").innerHTML=_3c+"</STRONG>";}else{$("avvia_ricerca_mixer_gif").src="../images/avvia_ricerca_mixer.gif";$("mixer_ajaxwheel").style.visibility="hidden";$("mixer_non_trovato").style.visibility="visible";}},parameters:"barricato_mix="+$("barricato_mix").value+"&strutturato_mix="+$("strutturato_mix").value+"&vivace_mix="+$("vivace_mix").value+"&aromatico_mix="+$("aromatico_mix").value+"&fresco_mix="+$("fresco_mix").value+"&persistente_mix="+$("persistente_mix").value+"&profumato_mix="+$("profumato_mix").value+"&speziato_mix="+$("speziato_mix").value});}else{alert("Modificate almeno uno dei parametri del mixer");}}if(_32=="consiglio"){if($("consiglio_nome").value!=""&&$("consiglio_testo").value!=""&&$("consiglio_email").value.search("@")!=-1){var _33=new Ajax.Request("dynamic_mixer_invia_consiglio.asp",{method:"post",onSuccess:function(_3d){alert("Grazie. Riceverai presto una email!");chiudischedadyn();},parameters:"consiglio_nome="+encodeURIComponent($("consiglio_nome").value)+"&consiglio_email="+encodeURIComponent($("consiglio_email").value)+"&consiglio_testo="+encodeURIComponent($("consiglio_testo").value)});}else{alert("Riempi tutti i campi del modulo e verifica che l'email sia corretta!");}}if(_32=="contattaci"){if($("consiglio_nome").value!=""&&$("consiglio_testo").value!=""&&$("consiglio_email").value.search("@")!=-1){var _33=new Ajax.Request("dynamic_mixer_invia_contattaci.asp",{method:"post",onSuccess:function(_3e){alert("Grazie per averci scritto!");chiudischedadyn();},parameters:"consiglio_nome="+encodeURIComponent($("consiglio_nome").value)+"&consiglio_email="+encodeURIComponent($("consiglio_email").value)+"&consiglio_testo="+encodeURIComponent($("consiglio_testo").value)});}else{alert("Riempi tutti i campi del modulo e verifica che l'email sia corretta!");}}};function getRadioValue(_3f){var _40=null;var _41=$(_3f);var _42=null;if(_41==null){_42=_3f;}else{_42=_41.name;}if(_42==null){return null;}var _43=document.getElementsByTagName("input");for(var i=0;i<_43.length;i++){var _44=_43[i];if(_44.type=="radio"&&_44.name==_42&&_44.checked){_40=_44.value;break;}}return _40;};function openfullscreen(url){var _45=(navigator.appName=="Netscape")?1:0;var _46=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;var _47=(navigator.platform.indexOf("Mac")>-1)?1:0;var _48=(navigator.platform.indexOf("Win")>-1)?1:0;var _49="toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizeable=no,copyhistory=no,menubar=no";if(_45){_49=_49+",outerWidth="+screen.availWidth+",outerHeight="+screen.availHeight+",??screenX=0,screenY=0";}else{if(_46){_49=_49+",left=0,top=0";if(_47){_49=_49+",width="+(screen.availWidth-13)+",height="+(screen.availHeight-32);}else{if(_48){_49=_49+",width="+(screen.availWidth-12)+",height="+(screen.availHeight-25);}else{_49=_49+",width="+screen.availWidth+",height="+screen.availHeight;}}}else{return;}}var _4a=window.open(url,"Newwindow",_49);_4a.focus();if(parseInt(navigator.appVersion)>=4){_4a.moveTo(0,0);}};function cambiaaltezza(){if(document.documentElement.clientHeight<690&&document.documentElement.clientHeight>365){$("contenitore").style.height=document.documentElement.clientHeight-172+"px";$("boundingvisualizza").style.height=document.documentElement.clientHeight-282+"px";$("tendinachiudiok").style.height=$("contenitore").offsetHeight-88+"px";if(idusr!="n"){$("tendinachiudioklogged").style.height=$("contenitore").offsetHeight-88+"px";$("contenitoreuser").style.height=$("contenitore").offsetHeight-96+"px";$("contenitoreuser").style.overflowY="scroll";$("contenitoreuser").style.overflowX="hidden";}}if(document.documentElement.clientHeight>689){$("contenitore").style.height=530+"px";$("tendinachiudiok").style.height="100%";$("boundingvisualizza").style.height=420+"px";if(idusr!="n"){$("tendinachiudioklogged").style.height="100%";$("contenitoreuser").style.height=434+"px";$("contenitoreuser").style.overflowY="hidden";$("contenitoreuser").style.overflowX="hidden";}}divparentpostop=getPos($("contenitore")).top;divparentposleft=getPos($("contenitore")).left;posizioneboundingtop=(getPos($("boundingvisualizza")).top)-100;posizioneboundingleft=(getPos($("boundingvisualizza")).left)-80;rif1=(posizioneboundingtop+120+($("boundingvisualizza").offsetHeight));rif2=(posizioneboundingleft+80+($("boundingvisualizza").offsetWidth));};function verificaaltezza(){cambiaaltezza();if(document.documentElement.clientHeight<690){$("screenheight").style.display="block";}};function aggsearch(_4b){if(_4b.style.backgroundColor.search("204")!=-1){if(_4b.id!="cercaregione"){$("cercaregione").style.backgroundColor="#FFFFFF";}if(_4b.id!="cercaproduttore"){$("cercaproduttore").style.backgroundColor="#FFFFFF";}if(_4b.id!="cercatipologia"){$("cercatipologia").style.backgroundColor="#FFFFFF";}if(_4b.id!="cercaprezzo"){$("cercaprezzo").style.backgroundColor="#FFFFFF";}if(_4b.id!="cercadenominazione"){$("cercadenominazione").style.backgroundColor="#FFFFFF";}if(_4b.id!="cercaregione"){$("cercaregione").options[0].selected=true;}if(_4b.id!="cercaproduttore"){$("cercaproduttore").options[0].selected=true;}if(_4b.id!="cercatipologia"){$("cercatipologia").options[0].selected=true;}if(_4b.id!="cercaprezzo"){$("cercaprezzo").options[0].selected=true;}if(_4b.id!="cercadenominazione"){$("cercadenominazione").options[0].selected=true;}}if(_4b.id!="cercatesto"){$(_4b).style.backgroundColor="rgb(255, 204, 204)";$("searchwheel").style.visibility="visible";$("resetricerca").style.visibility="visible";}else{$("cercaregione").style.backgroundColor="#FFFFFF";$("cercaproduttore").style.backgroundColor="#FFFFFF";$("cercatipologia").style.backgroundColor="#FFFFFF";$("cercaprezzo").style.backgroundColor="#FFFFFF";$("cercadenominazione").style.backgroundColor="#FFFFFF";}if(_4b.id!="cercaregione"&&$("cercaregione").value=="0"){$("cercaregione").disabled=true;}if(_4b.id!="cercaproduttore"&&$("cercaproduttore").value=="0"){$("cercaproduttore").disabled=true;}if(_4b.id!="cercatipologia"&&$("cercatipologia").value=="0"){$("cercatipologia").disabled=true;}if(_4b.id!="cercaprezzo"&&$("cercaprezzo").value=="0"){$("cercaprezzo").disabled=true;}if(_4b.id!="cercadenominazione"&&$("cercadenominazione").value=="0"){$("cercadenominazione").disabled=true;}if(_4b.id!="cercatesto"){$("cercatesto").disabled=true;}if(_4b.id!="cercaregione"&&$("cercaregione").value=="0"){regc=1;var _4c=new Ajax.Updater("cercaregione","dynamic_menu_search_reg.asp",{method:"post",onComplete:function(_4d){$("cercaregione").disabled=false;$("searchwheel").style.visibility="hidden";},parameters:"tx="+$("cercatesto").value+"&r="+$("cercaregione").value+"&d="+$("cercadenominazione").value+"&ti="+$("cercatipologia").value+"&pro="+$("cercaproduttore").value+"&pre="+$("cercaprezzo").value});}if(_4b.id!="cercaproduttore"&&$("cercaproduttore").value=="0"){proc=1;var _4c=new Ajax.Updater("cercaproduttore","dynamic_menu_search_pro.asp",{method:"post",onComplete:function(_4e){$("cercaproduttore").disabled=false;$("searchwheel").style.visibility="hidden";},parameters:"tx="+$("cercatesto").value+"&r="+$("cercaregione").value+"&d="+$("cercadenominazione").value+"&ti="+$("cercatipologia").value+"&pro="+$("cercaproduttore").value+"&pre="+$("cercaprezzo").value});}if(_4b.id!="cercatipologia"&&$("cercatipologia").value=="0"){tipc=1;var _4c=new Ajax.Updater("cercatipologia","dynamic_menu_search_tip.asp",{method:"post",onComplete:function(_4f){$("cercatipologia").disabled=false;$("searchwheel").style.visibility="hidden";},parameters:"tx="+$("cercatesto").value+"&r="+$("cercaregione").value+"&d="+$("cercadenominazione").value+"&ti="+$("cercatipologia").value+"&pro="+$("cercaproduttore").value+"&pre="+$("cercaprezzo").value});}if(_4b.id!="cercaprezzo"&&$("cercaprezzo").value=="0"){prec=1;var _4c=new Ajax.Updater("cercaprezzo","dynamic_menu_search_pre.asp",{method:"post",onComplete:function(_50){$("cercaprezzo").disabled=false;$("searchwheel").style.visibility="hidden";},parameters:"tx="+$("cercatesto").value+"&r="+$("cercaregione").value+"&d="+$("cercadenominazione").value+"&ti="+$("cercatipologia").value+"&pro="+$("cercaproduttore").value+"&pre="+$("cercaprezzo").value});}if(_4b.id!="cercadenominazione"&&$("cercadenominazione").value=="0"){denc=1;var _4c=new Ajax.Updater("cercadenominazione","dynamic_menu_search_den.asp",{method:"post",onComplete:function(_51){$("cercadenominazione").disabled=false;$("searchwheel").style.visibility="hidden";},parameters:"tx="+$("cercatesto").value+"&r="+$("cercaregione").value+"&d="+$("cercadenominazione").value+"&ti="+$("cercatipologia").value+"&pro="+$("cercaproduttore").value+"&pre="+$("cercaprezzo").value});}$("cercatesto").disabled=false;};function resetric(){if($("chiudiricerca").style.visibility=="visible"){chiudiricerca();}$("cercaregione").options[0].selected=true;$("cercaproduttore").options[0].selected=true;$("cercatipologia").options[0].selected=true;$("cercaprezzo").options[0].selected=true;$("cercadenominazione").options[0].selected=true;$("cercatesto").value="cerca nome";aggsearch($("cercatesto"));$("resetricerca").style.visibility="hidden";};