/* SWFObject v2.1
Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License
*/
var boxLoginShow = 0;
function showBoxLogin(){
var oBoxLogin = document.getElementById("boxLogin");
if(boxLoginShow == 0){
oBoxLogin.style.visibility = 'visible';
oBoxLogin.style.display = 'block';
boxLoginShow = 1;
}
else{
oBoxLogin.style.visibility = 'hidden';
oBoxLogin.style.display = 'none';
boxLoginShow = 0;
}
}
function controlloForm(oForm){
if(oForm.nome.value == ''){
alert("Inserire il proprio nome");
oForm.nome.focus();
return false;
}
if(oForm.cognome.value == ''){
alert("Inserire il proprio cognome");
oForm.cognome.focus();
return false;
}
if(oForm.email.value == ''){
alert("Inserire il proprio indirizzo email");
oForm.email.focus();
return false;
}
if(oForm.emailDest.value == ''){
alert("Inserire l'indirizzo email del destinatario");
oForm.emailDest.focus();
return false;
}
return true;
}
function checkForm(oForm){
aInput = oForm.getElementsByTagName("input");
for(var i = 0; i != aInput.length; i++){
sNome = aInput[i].getAttribute("name");
sValore = aInput[i].value;
switch(sNome){
case "nome":
if(sValore == ""){
alert("Inserire il proprio nome");
aInput[i].focus();
return false;
}
else{
break;
}
case "cognome":
if(sValore == ""){
alert("Inserire il proprio cognome");
aInput[i].focus();
return false;
}
else{
break;
}
case "tel": case "telefono": case "cellulare":
if(sValore != ""){
if((sValore.substr(0, 1) != "0") && (sValore.substr(0, 1) != "3")){
alert("Il numero di telefono inserito non e' valido");
aInput[i].focus();
return false;
}
else{
if(aInput[i].getAttribute("cambioTelCell") == "1"){
if(sValore.substr(0, 1) == "0"){
aInput[i].name = "telefono";
}
else{
aInput[i].name = "cellulare";
}
}
break;
}
}
else{
break;
}
case "email":
if(sValore == ""){
alert("Inserire l'indirizzo e-mail");
aInput[i].focus();
return false;
}
else{
if(!isValidEmail(sValore)){
alert("L'indirizzo e-mail inserito non e' valido");
aInput[i].focus();
return false;
}
else{
break;
}
}
case "via":
if(sValore == ""){
alert("Inserire l'indirizzo");
aInput[i].focus();
return false;
}
else{
break;
}
case "cap":
if(sValore == ""){
alert("Inserire il cap");
aInput[i].focus();
return false;
}
else{
break;
}
case "citta":
if(sValore == ""){
alert("Inserire la citta' di residenza");
aInput[i].focus();
return false;
}
else{
break;
}
case "provincia":
if(sValore == ""){
alert("Inserire la provincia");
aInput[i].focus();
return false;
}
else{
break;
}
case "PRODOTTO":
alert(sValore);
if(sValore == ""){
alert("Inserire la provincia");
return false;
}
else{
break;
}
}
if(oForm.privacy[0].checked == false){
alert("Per proseguire e' necessario acconsentire al trattamento dei dati ai sensi dell'art.23 del D. Lg. n. 196/2003 per le finalita' di cui al punto a) della predetta informativa e relative alla richiesta della carta di credito, al trattamento dei tuoi dati personali raccolti tramite il presente questionario");
return false;
}
if((oForm.consensoOffSocGruppo[0].checked == false) && (oForm.consensoOffSocGruppo[1].checked == false)){
alert("Per proseguire e' necessario comunicare la scelta per il trattamento dei dati ai sensi dell'art.23 del D. Lg. n. 196/2003 per le finalita' di cui al punto b) della predetta informativa e aventi natura promozionale, al trattamento dei tuoi dati personali raccolti tramite il presente questionario");
return false;
}
try{
if((oForm.prodotto[0].checked == false) && (oForm.prodotto[1].checked == false)){
alert("Per proseguire e' necessario comunicare la scelta per il rimborso degli acquisti");
return false;
}
}
catch (exc) {}
}
return true;
}
function isValidEmail(emailAddress){
var address = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
return address.test(emailAddress);
}
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("