var xmlHttp_x;
function check_email(a,b){var c;if(window.XMLHttpRequest)c=new XMLHttpRequest,c.overrideMimeType&&c.overrideMimeType("text/xml");else if(window.ActiveXObject)try{c=new ActiveXObject("Msxml2.xmlHttp_x")}catch(d){try{c=new ActiveXObject("Microsoft.xmlHttp_x")}catch(f){}}if(!c)return alert("Giving up :( Cannot create(1) an xmlHttp_x instance"),false;var e;e="check_email.asp?w_email="+a+"&w_tipo="+b+"&sid="+Math.random();c.onreadystatechange=function(){alertContents_x(c)};c.open("GET",e,true);c.send("")}
function alertContents_x(a){if(a.readyState==4&&a.status==200)if(riga=document.getElementById("txtHint_log").innerHTML=a.responseText,w_check=riga.split("*")[0],w_check=="4")alert("E-mail utente inesistente eseguire registrazione "),window.location.href="registrati.asp?sw_acquisto="+sw_acquisto+"&email_log="+document.form.cl_email.value+"&cod_art="+cod_art;else if(w_check=="5")alert("E-mail esistente per piu clienti");else if(w_check!=="0")alert("Utente registrato  solo alle news letter \n deve completare registrazionex"),
window.location.href="registrati.asp?sw_acquisto="+sw_acquisto+"&email_log="+document.form.cl_email.value+"&cod_art="+cod_art}var xmlHttp_au;
function menu_autori_sx(){var a;if(window.XMLHttpRequest)a=new XMLHttpRequest,a.overrideMimeType&&a.overrideMimeType("text/xml");else if(window.ActiveXObject)try{a=new ActiveXObject("Msxml2.xmlHttp_au")}catch(b){try{a=new ActiveXObject("Microsoft.xmlHttp_au")}catch(c){}}if(!a)return alert("Giving up :( Cannot create(1) an xmlHttp_au instance"),false;w_email="m";var d;d="menu_sx_ajx.asp?w_email="+w_email+"&sid="+Math.random();a.onreadystatechange=function(){alertContents_au(a)};a.open("GET",d,true);
a.send("")}function alertContents_au(a){if(a.readyState==4&&a.status==200)document.getElementById("txtHint_aut").innerHTML=a.responseText}var xmlHttp_cat;
function menu_cat_sx(){var a;if(window.XMLHttpRequest)a=new XMLHttpRequest,a.overrideMimeType&&a.overrideMimeType("text/xml");else if(window.ActiveXObject)try{a=new ActiveXObject("Msxml2.xmlHttp_cat")}catch(b){try{a=new ActiveXObject("Microsoft.xmlHttp_cat")}catch(c){}}if(!a)return alert("Giving up :( Cannot create(1) an xmlHttp_cat instance"),false;w_email="m";var d;d="menu_sxct_ajx.asp?w_email="+w_email+"&sid="+Math.random();a.onreadystatechange=function(){alertContents_cat(a)};a.open("GET",d,true);
a.send("")}function alertContents_cat(a){if(a.readyState==4&&a.status==200)document.getElementById("txtHint_cat").innerHTML=a.responseText}function on_overx(a,b){document.getElementById(a).className=b}function on_outx(a,b){document.getElementById(a).className=b}var xmlHttp_cr;
function carrello_dx(a,b,c){var d;if(window.XMLHttpRequest)d=new XMLHttpRequest,d.overrideMimeType&&d.overrideMimeType("text/xml");else if(window.ActiveXObject)try{d=new ActiveXObject("Msxml2.xmlHttp_cr")}catch(f){try{d=new ActiveXObject("Microsoft.xmlHttp_cr")}catch(e){}}if(!d)return alert("Giving up :( Cannot create(1) an xmlHttp_cr instance"),false;a="carrello_dx_rd_wr.asp?w_ord_num="+a+"&w_ord_aa="+b+"&w_stato="+c+"&sid="+Math.random();d.onreadystatechange=function(){alertContents_cr(d)};d.open("GET",
a,true);d.send("")}function alertContents_cr(a){if(a.readyState==4&&a.status==200)document.getElementById("txtHint_log").innerHTML=a.responseText}function startmenu(){document.getElementById("menu5").style.display="none";document.getElementById("menu6").style.display="none"}function menufunc(a){document.getElementById(a).style.display=="none"?(startmenu(),document.getElementById(a).style.display="block"):startmenu()}
function amico(a){window.open("amico.asp?w_indir_vol="+a+'"',"","width=650,height=600,resizable,scrollbars,toolbar=yes")}var sagscroller1=new sagscroller({id:"mysagscroller",mode:"auto",pause:1500,inittype:"onload",animatespeed:4E3}),sagscroller2=new sagscroller({id:"mysagscroller2",mode:"auto",pause:1500,animatespeed:4E3});
function controlla(a,b){if(b=="0")window.location.href=document.form.log_sn.value==""?"login.asp?sw_acquisto=1&cod_art="+a:"carrello.asp?sw_acquisto=1&cod_art="+a;if(b=="1")window.location.href=document.form.log_sn.value==""?"login_e.asp?sw_acquisto=1&cod_art="+a:"carrello_e.asp?sw_acquisto=1&cod_art="+a}
function bookmarksite(a,b){if(window.sidebar)window.sidebar.addPanel(a,b,"");else if(window.opera&&window.print){var c=document.createElement("a");c.setAttribute("href",b);c.setAttribute("title",a);c.setAttribute("rel","sidebar");c.click()}else document.all&&window.external.AddFavorite(b,a)}
function spacchetta_titolo(a,b){if(document.form1.cerca_titolo.value.indexOf("*")==-1)b=="0"&&(alert("Non hai selezionato alcun titolo"),document.form1.cerca_titolo.select(),document.form1.cerca_titolo.focus()),b=="1"&&(alert("You did not select any title"),document.form1.cerca_titolo.select(),document.form1.cerca_titolo.focus());else{var c=document.form1.cerca_titolo.value.split("*")[1];document.form1.cerca_titolo.value="";var d=document.form1.w_ricerca.value;if(b=="0")document.location.href=d==
"A"?"autore.asp?cod_aut="+c:"testo.asp?cod_art="+c;if(b=="1")document.location.href=d=="A"?"autore_e.asp?cod_aut="+c:"testo_e.asp?cod_art="+c}}function imposta_ric(){w_ricerca_ck=document.form1.w_ricerca.value;document.cookie="w_tipo_ric="+w_ricerca_ck+"; path=/"}function trimm(a){for(;a.substring(0,1)==" ";)a=a.substring(1,a.length);for(;a.substring(a.length-1,a.length)==" ";)a=a.substring(0,a.length-1);return a}
function sostituisci_out(a){testo_in=document.getElementById(a).value;testo_in=document.getElementById(a).value;document.getElementById(a).value=testo_in.replace(RegExp(String.fromCharCode(224),"g"),"a`");testo_in=document.getElementById(a).value;document.getElementById(a).value=testo_in.replace(RegExp(String.fromCharCode(232),"g"),"e`");testo_in=document.getElementById(a).value;document.getElementById(a).value=testo_in.replace(RegExp(String.fromCharCode(249),"g"),"u`");testo_in=document.getElementById(a).value;
document.getElementById(a).value=testo_in.replace(RegExp(String.fromCharCode(236),"g"),"i`");testo_in=document.getElementById(a).value;document.getElementById(a).value=testo_in.replace(RegExp(String.fromCharCode(242),"g"),"o`")}
function sostituisci_in(a){testo_in=document.getElementById(a).value;document.getElementById(a).value=testo_in.replace(RegExp("a`","g"),String.fromCharCode(224));testo_in=document.getElementById(a).value;document.getElementById(a).value=testo_in.replace(RegExp("e`","g"),String.fromCharCode(232));testo_in=document.getElementById(a).value;document.getElementById(a).value=testo_in.replace(RegExp("u`","g"),String.fromCharCode(249));testo_in=document.getElementById(a).value;document.getElementById(a).value=
testo_in.replace(RegExp("i`","g"),String.fromCharCode(236));testo_in=document.getElementById(a).value;document.getElementById(a).value=testo_in.replace(RegExp("o`","g"),String.fromCharCode(242))}function colore_focus(a,b,c){if(a=="0")document.getElementById(b).style.background="#BFDBA1";else{document.getElementById(b).style.background="#FFFFFF";if(b=="cl_emailx")w_emailx=document.form.cl_emailx.value;b=="cl_confpsw"&&document.getElementById(c).focus()}};
