function setSpeseSpedizione(tipologia){  
	objCarrelloAzione       = getObj('carrello_azione');
	objCarrelloAzione.value  = 'spedizione';

  document.formCarrello.submit();  
}

function azioniCarrello(azione,quantita,id_articolo,sottocartella){  

  if(id_articolo || azione=='svuota' || azione=='coupon_add' || azione=='coupon_del'){  
  	objCarrelloAzione       = getObj('carrello_azione');
  	objCarrelloAzione.value = azione;
  
  	objCarrelloAzione       = getObj('carrello_quantita');
  	objCarrelloAzione.value = quantita;
  
  	objCarrelloAzione       = getObj('carrello_id_articolo');
  	objCarrelloAzione.value = id_articolo;
 	  
     document.formCarrello.submit();  
  } else {
 		window.location.href = sottocartella+'/?file=carrello'; 
  }
}
function sendForm_carrello() {
	
	check_form = true;
	
	var inputObj = document.getElementsByTagName('input');

	for (var i=0;i<inputObj.length;i++) {
		if (inputObj[i].lang == 'registrati_obbligatiorio') {
			if (inputObj[i].type=='text') {
				if (inputObj[i].value == 0) {
					inputObj[i].style.backgroundColor = '#ffff00';
					check_form = false;
				} else {
					inputObj[i].style.backgroundColor = '';
				}
			}
		}
	}
	emailObj			= document.getElementById('informazioni_utente_email');
	
	email_valida = true;
	email_corrisponde = true;
	
	if (emailObj.value.length > 0) {
		if (!emailCheck(emailObj.value)) {
			email_valida = false;
			check_form = false;
		}

		if ((email_corrisponde == false) || (email_valida == false)) {
			emailObj.style.backgroundColor = '#ffff00';
		} else {
			emailObj.style.backgroundColor = '';
		}
	}
	else
	{
		email_valida = false;
	}
	
	if (check_form == false) {
		document.getElementById('alert_form').style.display = '';
		if (email_valida == false) {
			alert('Il formato dell\'Email inserita non e\' corretto');
		} else if (email_corrisponde == false) {
			alert('la Email e la Conferma Email non corrispondono');
		}
		return false
	} else {
		return true;	
	}
}
