function command_cheque(f)
{
	if (f.cgv.checked)
	{	
		var quantite_ok = false;
		for (var i = 0; i < f.elements.length; i++) 
			if (f.elements[i].type == 'select-one')
				if (f.elements[i].options[f.elements[i].selectedIndex].value != "0")
				{
					quantite_ok=true
					break;
				}

		if (quantite_ok)
		{
			f.action="../payment/bdc_cheque.asp"
			f.submit();
		}
		else
			alert("You must choose at least one item");
	}
	else
		alert("You don't accept the terms and conditions");
}

function command_cb(f)
{
	if (f.cgv.checked)
	{	
		var quantite_ok = false;

		for (var i = 0; i < f.elements.length; i++) 
			if (f.elements[i].type == 'select-one')
				if (f.elements[i].options[f.elements[i].selectedIndex].value != "0")
				{
					quantite_ok=true
					break;
				}

		if (quantite_ok)
		{
			f.action="../payment/bdc_cb.asp"
			f.submit();
		}
		else
			alert("You must choose at least one item");
	}
	else
		alert("You don't accept the terms and conditions");
}

function check(f)
{
	var erreur=''
	if (f.prenom.value=='') erreur+='\r- Surname'
	if (f.nom.value=='') erreur+='\r- Name'
	if (f.adresse1.value=='') erreur+='\r- Adress 1'
	if (f.cp.value=='') erreur+='\r- Zip Code'
	if (f.ville.value=='') erreur+='\r- Town'
	if (f.pays.value=='') erreur+='\r- Country'
	if (f.tel.value=='') erreur+='\r- Phone'
	if ((f.email.value=="")||(f.email.value.indexOf("@")==-1)		||(f.email.value.lastIndexOf(".")<f.email.value.indexOf("@")))
		{erreur+='\r- E-mail'}

	erreur?alert('Please fill the field :'+erreur):f.submit()
}
