function ConfirmSingUp() {
	
	
	
	var espressione = /^[_a-z0-9+-]+(\.[_a-z0-9+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/;	
	if (!espressione.test(document.singup.mail.value))	{	    
		alert("La mail inserita non e\' valida!");	
		return(false);
	}
	if (document.singup.mail.value != document.singup.mail_2.value)
	{
		alert('Attenzione, le due e-mail non coincidono');
		return(false);
	}
	if (document.singup.ctrl_privacy_check.value == 0)
	{
		alert('Attenzione, devi acconsentire al trattamento dei tuoi dati personali');
		return(false);
	}
	
	
	
	if (document.singup.RegDisney.value==1)
	{
		
		if (document.singup.name.value == '')
		{
			alert('Attenzione, inserisci il tuo nome!');
			return(false);
		}
		if (document.singup.surname.value == '')
		{
			alert('Attenzione, inserisci il tuo cognome!');
			return(false);
		}
		if (document.singup.address.value == '')
		{
			alert('Attenzione, inserisci l\'indirizzo!');
			return(false);	
		}
		
		if (document.singup.cap.value == '')
		{
			alert('Attenzione, inserisci il cap!');
			return(false);
		}
		if (document.singup.comune.value == '')
		{
			alert('Attenzione, seleziona la citta\'!');
			return(false);
		}
		
		
	}
	
		
}


function ConfirmProfile() {
	
	if (document.singup.name.value == '')
	{
		alert('Attenzione, inserisci il tuo nome!');
		return(false);
	}
	if (document.singup.surname.value == '')
	{
		alert('Attenzione, inserisci il tuo cognome!');
		return(false);
	}
	if (document.singup.address.value == '')
	{
		alert('Attenzione, inserisci l\'indirizzo!');
		return(false);	
	}
	
	if (document.singup.cap.value == '')
	{
		alert('Attenzione, inserisci il cap!');
		return(false);
	}
	if (document.singup.comune.value == '')
	{
		alert('Attenzione, seleziona la citta\'!');
		return(false);
	}
	
}

function SigCr() {
	if (document.singup.name.value == '')
	{
		alert('Attenzione, inserisci il tuo nome!');
		return(false);
	}
	if (document.singup.surname.value == '')
	{
		alert('Attenzione, inserisci il tuo cognome!');
		return(false);
	}
	var espressione = /^[_a-z0-9+-]+(\.[_a-z0-9+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/;	
	if (!espressione.test(document.singup.mail.value))	{	    
		alert("La mail inserita non � valida!");	
		return(false);
	}
	if (document.singup.mail.value != document.singup.mail_2.value)
	{
		alert('Attenzione, le due e-mail non coincidono');
		return(false);
	}
	if (document.singup.ctrl_privacy_check.value == 0)
	{
		alert('Attenzione, devi acconsentire al trattamento dei tuoi dati personali');
		return(false);
	}
}
function Newsletter() {
	if (document.singup.name.value == '')
	{
		alert('Attenzione, inserisci il tuo nome!');
		return(false);
	}
        if (document.singup.surname.value == '')
	{
		alert('Attenzione, inserisci il tuo cognome!');
		return(false);
	}
	var espressione = /^[_a-z0-9+-]+(\.[_a-z0-9+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/;	
	if (!espressione.test(document.singup.email.value))	{	    
		alert("La mail inserita non � valida!");	
		return(false);
	}
	if (document.singup.email.value != document.singup.mail_2.value)
	{
		alert('Attenzione, le due e-mail non coincidono');
		return(false);
	}
	if (document.singup.ctrl_privacy_check.value == 0)
	{
		alert('Attenzione, devi acconsentire al trattamento dei tuoi dati personali');
		return(false);
	}
}

function Tele2() {

	if (document.singup.name.value == '')

	{

		alert('Attenzione, inserisci il tuo nome!');

		return(false);

	}

	if (document.singup.surname.value == '')

	{

		alert('Attenzione, inserisci il tuo cognome!');

		return(false);

	}

	

	var espressione = /^[_a-z0-9+-]+(\.[_a-z0-9+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/;	

	if (!espressione.test(document.singup.mail.value))	{	    

		alert("La mail inserita non � valida!");	

		return(false);

	}



	if (document.singup.mail.value != document.singup.mail_2.value)

	{

		alert('Attenzione, le due e-mail non coincidono');

		return(false);

	}

	

}



function ChangeClass(id, class_name) {

	document.getElementById(id).className = class_name;

}



function LoadPict(path, id) {

	document.getElementById('last_img_id').src = path+'/images/ultimiarrivi/'+id+'.jpg';

}



function DownloadMovie() {

	



	if (document.download.ctrl_termini_check.value == 0)

	{

		alert('Attenzione, devi acconsentire ai termini di condizioni e utilizzo');

		return(false);

	}



	if (document.download.ctrl_clausole_check.value == 0)

	{

		alert('Attenzione, devi acconsentire alla clausola vessatoria');

		return(false);

	}

	if (document.download.ctrl_privacy_check.value == 0)

	{

		alert('Attenzione, devi acconsentire al trattamento dei tuoi dati personali');

		return(false);

	}

}

function mytime(phptime) {
	ko = new Date();
	var gg, mm, aaaa, Hh, Mm, Ss;
	
	gg = ko.getDate() + "/";
	mm = ko.getMonth() + 1 + "/";
	aaaa = ko.getYear();
	Hh = ko.getHours() + ":";
	Mm = ko.getMinutes() + ":";
	Ss = ko.getSeconds();
	
	jstime = parseInt(ko.getTime()/1000);
	difftime=parseInt((phptime-jstime)/60);
	
	return difftime;
}
