	function ChangeTitle(withAdeli){
		myForm = document.forms['SubmitForm'];
		if (myForm.select_title.value == 3){
			// is interne
			document.getElementById("medic_num_DHTML").style.display = 'none';
			if (withAdeli) document.getElementById("adeli_num_DHTML").style.display = 'none';
		} else {
			// is not interne	
			document.getElementById("medic_num_DHTML").style.display = '';
			if (withAdeli) document.getElementById("adeli_num_DHTML").style.display = '';
			
		}
	}

		function CheckMandatory(myForm, myObjName, myObjType, myAlertMessage) {
			myReturn = true;
			switch(myObjType){
				case 'text':
					myReturn = (myForm.elements[myObjName].value != "");
					break;
				case 'select':
					myReturn = (myForm.elements[myObjName].selectedIndex > 0);
					break;
				case 'checked':
					myReturn = false;
					for (cpt = 0; cpt < myForm.elements.length; cpt++){
						if (myForm.elements[cpt].name == myObjName) myReturn = (myReturn || (myForm.elements[cpt].checked));
					}
					break;
					
			}
			if (!myReturn) {
				if ((myObjType == 'text') || (myObjType == 'select')) {
					myForm.elements[myObjName].focus();
				} else {
					if (myObjType == 'checked') {
						myObjToSetFocus = "";
						for (cpt = 0; cpt < myForm.elements.length; cpt++){
							if (myObjToSetFocus == "")
								if (myForm.elements[cpt].name == myObjName) myObjToSetFocus = myForm.elements[cpt];
						}
						myObjToSetFocus.focus();
					}
				}
				if (myAlertMessage != "") alert(myAlertMessage);
			}

			return(myReturn);
		}
		
		function CheckMaxChecked(myForm, myObjName, myNumberOfMaxOccurs, myAlertMessage) {
			myNumberOfChecks = 0;
			myObjToSetFocus = "";
			for (cpt = 0; cpt < myForm.elements.length; cpt++){
				if (myForm.elements[cpt].name == myObjName) 
					if (myForm.elements[cpt].checked) {
						if (myObjToSetFocus == "") myObjToSetFocus = myForm.elements[cpt];
						myNumberOfChecks++;
					}
			}
			if (myNumberOfChecks > myNumberOfMaxOccurs){
				myObjToSetFocus.focus();
				alert(myAlertMessage);
				return(false);
			}
			return(true);
		}
		

		function CheckRegisterCompany(){
			myForm = document.forms['SubmitFormCompany'];

			// general data
			if (!CheckMandatory(myForm, 'rd_company_type', 'checked', 'Indiquez un type de compagnie')) return(false);
			if (!CheckMandatory(myForm, 'txt_company_name', 'text', 'Indiquez un nom')) return(false);
			
			// address & phone data
			if (!CheckMandatory(myForm, 'txt_address1', 'text', 'Indiquez une adresse')) return(false);
			if (!CheckMandatory(myForm, 'txt_zip', 'text', 'Indiquez un code postal')) return(false);
			if (!CheckMandatory(myForm, 'txt_city', 'text', 'Indiquez une ville')) return(false);
			
			if (!CheckMandatory(myForm, 'txt_phone', 'text', 'Indiquez un numéro de téléphone')) return(false);
			
			return(true);

		}

		function CheckContactPartner(){
			myForm = document.forms['ContactForm'];
			if (!CheckMandatory(myForm, 'rd_institution_type', 'checked', 'Indiquez un type d\'institution')) return(false);
			if (!CheckMandatory(myForm, 'txt_company_name', 'text', 'Indiquez une raison sociale')) return(false);
			if (!CheckMandatory(myForm, 'txt_address', 'text', 'Indiquez une adresse')) return(false);
			if (!CheckMandatory(myForm, 'txt_zip', 'text', 'Indiquez un code postal')) return(false);
			if (!CheckMandatory(myForm, 'txt_city', 'text', 'Indiquez une ville')) return(false);
			if (!CheckMandatory(myForm, 'txt_lastname', 'text', 'Indiquez un nom')) return(false);
			if (!CheckMandatory(myForm, 'txt_firstname', 'text', 'Indiquez un prénom')) return(false);
			if (!CheckMandatory(myForm, 'txt_job_title', 'text', 'Indiquez une fonction')) return(false);
			if (!CheckMandatory(myForm, 'txt_phone', 'text', 'Indiquez un téléphone')) return(false);
			if (!CheckMandatory(myForm, 'txt_email', 'text', 'Indiquez un email')) return(false);
			if (!CheckEmail(myForm.txt_email.value)){
				myForm.txt_email.focus();
				alert('L\'email n\'a pas une structure valide');
				return(false);
			}
			return(true);
		}


		function CheckRegisterPartner(){
			myForm = document.forms['SubmitFormPartner'];
			// perso data
			if (!CheckMandatory(myForm, 'rd_prefix', 'checked', 'Indiquez une civilité')) return(false);
			if (!CheckMandatory(myForm, 'txt_lastname', 'text', 'Indiquez un nom')) return(false);
			if (!CheckAlphabetic(myForm.txt_lastname.value)){
				myForm.txt_lastname.focus();
				alert('Le nom ne doit contenir que des lettres ou de caractères spéciaux');
				return(false);
			}
			if (!CheckMandatory(myForm, 'txt_firstname', 'text', 'Indiquez un prénom')) return(false);
			if (!CheckAlphabetic(myForm.txt_firstname.value)){
				myForm.txt_firstname.focus();
				alert('Le prénom ne doit contenir que des lettres ou de caractères spéciaux');
				return(false);
			}

			if (myForm.txt_dob.value)
				if (!ValideInputDate(myForm.txt_dob)) return (false)
			
			// pro data
			if (!CheckMandatory(myForm, 'txt_address1', 'text', 'Indiquez une adresse')) return(false);
			if (!CheckMandatory(myForm, 'txt_zip', 'text', 'Indiquez un code postal')) return(false);
			if (!CheckMandatory(myForm, 'txt_city', 'text', 'Indiquez une ville')) return(false);
			
			if (!CheckMandatory(myForm, 'txt_phone', 'text', 'Indiquez un numéro de téléphone')) return(false);

			// login/password
			if (!CheckMandatory(myForm, 'txt_login', 'text', 'Indiquez un identifiant')) return(false);
			if (!CheckAlphanumeric(myForm.txt_login.value)){
				myForm.txt_login.focus();
				alert('L\'identifiant n\'a pas une structure valide (lettres et chiffres uniquement)');
				return(false);
			}

			if (!CheckMandatory(myForm, 'txt_psw', 'text', 'Indiquez un mot de passe')) return(false);
			if (!CheckAlphanumeric(myForm.txt_psw.value)){
				myForm.txt_psw.focus();
				alert('Le mot de passe n\'a pas une structure valide (lettres et chiffres uniquement)');
				return(false);
			}
			if (!CheckMandatory(myForm, 'txt_psw_confirm', 'text', 'Confirmez votre mot de passe')) return(false);
			if (myForm.txt_psw.value != myForm.txt_psw_confirm.value) {
				myForm.txt_psw.focus();
				alert('Le mot de passe et sa confirmation ne sont pas identiques!');
				return(false);
			}
			if (!CheckMandatory(myForm, 'txt_email', 'text', 'Indiquez un email')) return(false);
			if (!CheckEmail(myForm.txt_email.value)){
				myForm.txt_email.focus();
				alert('L\'email n\'a pas une structure valide');
				return(false);
			}
			if (!CheckMandatory(myForm, 'txt_email_confirm', 'text', 'Confirmez votre email')) return(false);
			if (myForm.txt_email.value != myForm.txt_email_confirm.value) {
				myForm.txt_email_confirm.focus();
				alert('L\'email et sa confirmation ne sont pas identiques!');
				return(false);
			}

			// questions
			if (!CheckMandatory(myForm, 'rd_newsletter', 'checked', 'Indiquez si vous voulez vous inscrire à la Newsletter de MedHubVideo.com')) return(false);
			
			return(true);
		}


		function CheckRegister(){
			myForm = document.forms['SubmitForm'];
			
			// perso data
			if (!CheckMandatory(myForm, 'rd_prefix', 'checked', 'Indiquez une civilité')) return(false);
			if (!CheckMandatory(myForm, 'select_title', 'select', 'Indiquez un titre')) return(false);
			if (!CheckMandatory(myForm, 'txt_lastname', 'text', 'Indiquez un nom')) return(false);
			if (!CheckAlphabetic(myForm.txt_lastname.value)){
				myForm.txt_lastname.focus();
				alert('Le nom ne doit contenir que des lettres ou de caractères spéciaux');
				return(false);
			}
			if (!CheckMandatory(myForm, 'txt_firstname', 'text', 'Indiquez un prénom')) return(false);
			if (!CheckAlphabetic(myForm.txt_firstname.value)){
				myForm.txt_firstname.focus();
				alert('Le prénom ne doit contenir que des lettres ou de caractères spéciaux');
				return(false);
			}

//			if (!CheckMandatory(myForm, 'txt_dob', 'text', 'Indiquez une date de naissance')) return(false);
			if(myForm.elements["txt_dob"] != null)
				if (myForm.txt_dob.value != "")
					if (!ValideInputDate(myForm.txt_dob)) return (false)
			
//			if (!CheckMandatory(myForm, 'rd_spec', 'checked', 'Indiquez au moins une spécialité')) return(false);
			if (!CheckMandatory(myForm, 'select_spec', 'select', 'Indiquez au moins une spécialité')) return(false);
//			if (!CheckMandatory(myForm, 'select_practice_mode', 'select', 'Indiquez un mode d\'exercice')) return(false);
			if (myForm.select_title.value != 3){
				// don't do the check if user is "interne"
				if (!CheckMandatory(myForm, 'txt_medical_num', 'text', 'Indiquez un numéro d\'ordre des médecins')) return(false);
//				if (!CheckMandatory(myForm, 'txt_adeli_num', 'text', 'Indiquez un numéro Adeli')) return(false);
			}

			// pro data
//			if (!CheckMandatory(myForm, 'txt_address1', 'text', 'Indiquez une adresse')) return(false);
			if (!CheckMandatory(myForm, 'txt_zip', 'text', 'Indiquez un code postal')) return(false);
			if (!CheckMandatory(myForm, 'txt_city', 'text', 'Indiquez une ville')) return(false);
			
//			if (!CheckMandatory(myForm, 'txt_phone', 'text', 'Indiquez un numéro de téléphone')) return(false);

			// login/password
			if (!CheckMandatory(myForm, 'txt_login', 'text', 'Indiquez un identifiant')) return(false);
			if (!CheckAlphanumeric(myForm.txt_login.value)){
				myForm.txt_login.focus();
				alert('L\'identifiant n\'a pas une structure valide (lettres et chiffres uniquement)');
				return(false);
			}

			if (!CheckMandatory(myForm, 'txt_psw', 'text', 'Indiquez un mot de passe')) return(false);
			if (!CheckAlphanumeric(myForm.txt_psw.value)){
				myForm.txt_psw.focus();
				alert('Le mot de passe n\'a pas une structure valide (lettres et chiffres uniquement)');
				return(false);
			}
			if (!CheckMandatory(myForm, 'txt_psw_confirm', 'text', 'Confirmez votre mot de passe')) return(false);
			if (myForm.txt_psw.value != myForm.txt_psw_confirm.value) {
				myForm.txt_psw.focus();
				alert('Le mot de passe et sa confirmation ne sont pas identiques!');
				return(false);
			}
			if (!CheckMandatory(myForm, 'txt_email', 'text', 'Indiquez un email')) return(false);
			if (!CheckEmail(myForm.txt_email.value)){
				myForm.txt_email.focus();
				alert('L\'email n\'a pas une structure valide');
				return(false);
			}
			if (!CheckMandatory(myForm, 'txt_email_confirm', 'text', 'Confirmez votre email')) return(false);
			if (myForm.txt_email.value != myForm.txt_email_confirm.value) {
				myForm.txt_email_confirm.focus();
				alert('L\'email et sa confirmation ne sont pas identiques!');
				return(false);
			}

			// questions
			if (!CheckMandatory(myForm, 'rd_newsletter', 'checked', 'Indiquez si vous voulez vous inscrire à la Newsletter de MedHubVideo.com')) return(false);
			if (!CheckMandatory(myForm, 'rd_health_studies', 'checked', 'Indiquez si vous souhaitez participer à des études de santé')) return(false);
			if (!CheckMandatory(myForm, 'CB_Certif_medecin', 'checked', 'Veuillez confirmer et certifier que vous êtes médecin')) return(false);
			
			return(true);
		}