// JavaScript Document
function preload()
{
	var imgs = new Array(
				"images/quisommesnous.gif","images/quisommesnous-over.gif","images/produits.gif","images/produits-over.gif","images/fonctionne.gif","images/fonctionne-over.gif"
				);
	for (var i = 0; i < imgs.length; i++ )
	{
		var tmp = imgs[i];
		(imgs[i] = new Image()).src = tmp;
	}
}

function Alerte (valeur_champ,nom_champ)
{
 alert("Veuillez renseigner le champ : \""+nom_champ+"\".");
 valeur_champ.focus();
 return (false);
}

function desole()
{
 alert("Nous vous remercions de l'int\351r\352t que vous portez \340 notre soci\351t\351, mais votre demande d'agr\351ment ne correspond pas aux crit\352res d'acceptation de notre soci\351t\351.");
 document.location.href="http://www.cofiparc-vo.fr";
 return (false);
}

function Valide_Inscription(theForm)
{
 if (theForm.societe.value == "") return (Alerte(theForm.societe,'Raison sociale'));
 if ((theForm.siret.value == "") || (theForm.siret.value.length < 14)) return (Alerte(theForm.siret,'Siret'));
 if (theForm.date_creation.value == "") return (Alerte(theForm.date_creation,'Date de creation'));
 if (theForm.activite.value == "0") return (Alerte(theForm.activite,'Activit\351'));
 if (theForm.nom_prenom.value == "") return (Alerte(theForm.nom_prenom,'Nom / Pr\351nom'));
 if (theForm.adresse1.value == "") return (Alerte(theForm.adresse1,'Adresse'));
 if (theForm.code_postal.value == "") return (Alerte(theForm.code_postal,'Code postal'));
 if (theForm.ville.value == "") return (Alerte(theForm.ville,'Ville'));
 if (theForm.tel.value == "") return (Alerte(theForm.tel,'T\351l\351phone'));
 if (theForm.email.value == "") return (Alerte(theForm.email,'E-mail'));
 if ((!theForm.loueur[0].checked) && (!theForm.loueur[1].checked)) return (Alerte(theForm.loueur[0],'Achat loueur'));
 if ((!theForm.volume[0].checked) && (!theForm.volume[1].checked) && (!theForm.volume[2].checked)) return (Alerte(theForm.volume[0],'Volume de vente'));
 if (theForm.volume[0].checked) return (desole());
 if (theForm.volume[1].checked) return (desole());
 if (theForm.loueur[1].checked) return (desole());
 if (!(confirm('Valider mon inscription ?'))) { return (false); }
}
