//' Version :
//' ---------
//' 1.01 / 2002-09-03 / CB => Modif 'checkUserPIN'
//' 1.00 / 2002-02-14 / CB => Création

var vLOC_type_9_checkForm_1=	null;
var vLOC_type_9_checkForm_2=	'Vous devez remplir au moins un numéro de téléphone';
var vLOC_type_9_checkForm_3=	'Ligne 1';
var vLOC_type_9_checkForm_4=	'Ligne 2';
var vLOC_type_9_checkForm_5=	'Code personnel ';
var vLOC_type_9_checkForm_6=	'EMail';
var vLOC_type_9_checkForm_7=	'l\'adresse e-mail d\' un ami';
var vLOC_type_9_checkForm_8=	'l\'adresse e-mail d\' un autre ami';
var vLOC_type_9_checkForm_9=	'l\'adresse e-mail d\' un troisieme ami';

function submit_form_offer() {
	//' Check CLIs
	if (document.form_offer.cli_1.value=="") {
		alert(vLOC_type_9_checkForm_2);
		return;
	}
	if (checkPhone(document.form_offer.cli_1,				vLOC_type_9_checkForm_3						, 10	)==false)	return;
	
	if (document.form_offer.cli_2.value!="" &&
		 checkPhone(document.form_offer.cli_2,				vLOC_type_9_checkForm_4						, 10	)==false)	return;


	if (checkUserPIN	(document.form_offer.cli_userPin,	vLOC_type_9_checkForm_5	, 4	)==false)	return;
	if (checkEMailField	(document.form_offer.email,		vLOC_type_9_checkForm_6							, 5	)==false)	return;
	    
	if (document.form_offer.Email_1.value!="" && 
		checkEMailField (document.form_offer.Email_1, vLOC_type_9_checkForm_7, 5)==false) return;
	
	if (document.form_offer.Email_2.value!="" && 
		checkEMailField (document.form_offer.Email_1, vLOC_type_9_checkForm_8, 5)==false) return;
	
	if (document.form_offer.Email_3.value!="" &&
		checkEMailField (document.form_offer.Email_1, vLOC_type_9_checkForm_9, 5)==false) return;
	
	document.form_offer.action= 'OfferDelivery.asp';
	document.form_offer.submit();
}


function submit_form_OfferMDM() {

	if (checkEMailField (document.form_OfferMDM.Email_1, vLOC_type_9_checkForm_7, 5)==false) return;
	
	if (document.form_OfferMDM.Email_2.value!="" && 
		checkEMailField (document.form_OfferMDM.Email_1, vLOC_type_9_checkForm_8, 5)==false) return;
	
	document.form_OfferMDM.action= 'MDMToFriendOK.asp';
	document.form_OfferMDM.submit();
}
