$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
  $('#login').hide();
 // shows the slickbox on clicking the noted link
  $('a#slick-show').click(function() {
 $('#login').slideDown('slow');
 return false;
  });
 // hides the slickbox on clicking the noted link
  $('a#slick-hide').click(function() {
 $('#login').slideUp('fast');
 return false;
  });
 // toggles the slickbox on clicking the noted link
  $('a#slick-toggle').click(function() {
 $('#slickbox').toggle(400);
 return false;
  });
});

//nuovo slickbox//
$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
  $('#rss').hide();
 // shows the slickbox on clicking the noted link
  $('a#slick-show').click(function() {
 $('#rss').slideDown('slow');
 return false;
  });
 // hides the slickbox on clicking the noted link
  $('a#slick-hide').click(function() {
 $('#rss').slideUp('fast');
 return false;
  });
 // toggles the slickbox on clicking the noted link
  $('a#slick-toggle').click(function() {
 $('#rss').slideToggle(600);
 return false;
  });
});

$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
  $('#privacy').hide();
 // shows the slickbox on clicking the noted link
  $('a#slick-show').click(function() {
 $('#privacy').slideDown('slow');
 return false;
  });
 // hides the slickbox on clicking the noted link
  $('a#slick-hide').click(function() {
 $('#privacy').slideUp('fast');
 return false;
  });
 // toggles the slickbox on clicking the noted link
  $('a#slick-toggle').click(function() {
 $('#privacy').slideToggle(600);
 return false;
  });
});

$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
  $('#login').hide();
 // shows the slickbox on clicking the noted link
  $('a#slick-show').click(function() {
 $('#login').slideDown('slow');
 return false;
  });
 // hides the slickbox on clicking the noted link
  $('a#slick-hide').click(function() {
 $('#login').slideUp('fast');
 return false;
  });
 // toggles the slickbox on clicking the noted link
  $('a#slick-toggle').click(function() {
 $('#slickbox').toggle(400);
 return false;
  });
});

$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
  $('#truffa').show();
 // shows the slickbox on clicking the noted link
  $('body').load(function() {
 $('#truffa').slideDown('slow');
 return false;
  });
 // hides the slickbox on clicking the noted link
  $('#sarasu').click(function() {
 $('#truffa').slideUp('fast');
 return false;
  });
 });

function control1(){
	rag=document.subscribe1.rag.value;
	tel=document.subscribe1.tel.value;
	mail=document.subscribe1.mail.value;
	var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/; 
	if((rag=="")||(tel=="")||(mail=="")){
		
		alert("Tutti i campi obbligatori devono essere compilati");
		return;
	}
	if(isNaN(tel)){
		alert("Il campo TELEFONO deve contenere solo caratteri numerici");
		return;
	}
	if (!email_reg_exp.test(mail)){
							
				alert("Il campo MAIL non è stato compilato in modo corretto");
		return;			
							}
	document.subscribe1.submit();						
	
}
function control2(){
	rag=document.subscribe2.rag.value;
	tel=document.subscribe2.tel.value;
	mail=document.subscribe2.mail.value;
	var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/; 
	if((rag=="")||(tel=="")||(mail=="")){
		
		alert("Tutti i campi obbligatori devono essere compilati");
		return;
	}
	if(isNaN(tel)){
		alert("Il campo TELEFONO deve contenere solo caratteri numerici");
		return;
	}
	if (!email_reg_exp.test(mail)){
							
				alert("Il campo MAIL non è stato compilato in modo corretto");
		return;			
							}
	document.subscribe2.submit();						
	
}
function control3(){
	rag=document.subscribe3.rag.value;
	tel=document.subscribe3.tel.value;
	mail=document.subscribe3.mail.value;
	var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/; 
	if((rag=="")||(tel=="")||(mail=="")){
		
		alert("Tutti i campi obbligatori devono essere compilati");
		return;
	}
	if(isNaN(tel)){
		alert("Il campo TELEFONO deve contenere solo caratteri numerici");
		return;
	}
	if (!email_reg_exp.test(mail)){
							
				alert("Il campo MAIL non è stato compilato in modo corretto");
		return;			
							}
	document.subscribe3.submit();						
	
}
function control4(){
	rag=document.subscribe4.rag.value;
	tel=document.subscribe4.tel.value;
	mail=document.subscribe4.mail.value;
	var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/; 
	if((rag=="")||(tel=="")||(mail=="")){
		
		alert("Tutti i campi obbligatori devono essere compilati");
		return;
	}
	if(isNaN(tel)){
		alert("Il campo TELEFONO deve contenere solo caratteri numerici");
		return;
	}
	if (!email_reg_exp.test(mail)){
							
				alert("Il campo MAIL non è stato compilato in modo corretto");
		return;			
							}
	document.subscribe4.submit();						
	
}
