function conditions()
{
document.write("YOUR ORDER WILL ALWAYS BE CONFIRMED.<br />");
document.write("It will be shipped to you by Parcel Post after pre-payment either through bank transfer or via PayPal.<br />");
document.write("In Switzerland, the orders are normally shipped directely to the Sporting Goods Store of your choice,<br />without additional charges.<br />");
document.write("Outside of Switzerland, VAT, Sales Tax and Customs Duties if any are for the account of the buyer.<br /><br />");
document.write("For additional informations, please refer to our <a href='e40cond.html' class='nored'>General Sales Conditions</a>");
}

function verif(formulaire)
{
indsize = formulaire.Shoe_Size.selectedIndex ;
ccc=(formulaire.Helmet_Color.selectedIndex == 0) ;
ttt=(formulaire.Helmet_Size.selectedIndex == 0) ;
if (indsize == 0 && formulaire.Foot_Length.value == "")
{alert("Please input the desired shoe size or indicate a foot length.") ;}
else if ((ccc || ttt) && !(ccc && ttt))
{alert("To order a helmet, you must indicate both color AND size.") ;} 
else
verifxx(formulaire) ;
}

function verifxx(formulaire)
{
if (formulaire.Name.value == "") alert("Please input your full name.") ;
else if(formulaire.Town.value == "" || formulaire.Country.value == "")
alert("The address where to send your order is missing or is incomplete.");
else if (formulaire.Telephone.value=="") alert("A telephone number would be helpful to let you know when your order has been sent.");
else emval=formulaire.E_mail.value; posat=emval.indexOf("@"); posdot=emval.lastIndexOf("."); 
if (posat<1 || posdot-posat<2 || emval.length<posdot+3) alert("Your e-mail address is missing or is not valid.\n\nIt is needed to send you an order confirmation and maybe clarify a few points.");
else for (ckpay=0; ckpay<3; ckpay++) {if (formulaire.Payment[ckpay].checked) break; } 
if (ckpay==3) alert("Please select a method of payment.");
else if (formulaire.Payment[ckpay].value=="Store")  typepay(formulaire);
else formulaire.submit() ;
}

function typepay(formulaire)
{
formulaire.Country.value="Switzerland"; 
if (formulaire.Store.value=="") alert("Please indicate the name and the address of the Sporting Goods Store where to send your order."); 
else formulaire.submit() ; }
