function Desabonner() {
	if (confirm("Êtes-vous sûr de vouloir vous désabonner du cyberbulletin «des Nouvelles de SAM EN LIGNE» ?")) {
		self.location.href = '/Bulletin/Abonnement/Desabonnement.asp';
		}
	return false;
}

function SubmitForm(objForm, strAction) {
	objForm.action = strAction;
	objForm.submit();
}

function Envoi_Test(format) {

	var tmp = "";

	tmp = "Envoi_Mail.asp?Courriel=" + document.frmFormulaireTestAbonnement.Courriel_Test.value + "&Type=" + format;
	if (document.frmFormulaireTestAbonnement.Courriel_Test.value == "") {
		alert("Vous devez entrer votre courriel pour ce test!");
	} else {
		PopUp(tmp,100,250,1,0,0,0,0,0,0,0);
	}
}

function ShowHideObjDiv(id, value) {
        if (document.getElementById) {
                          x = document.getElementById(id);
                          x.style.display = value;
        } else if (document.all) {
                          x = document.all[id];
		x.style.display = value;
        } else if (document.layers) {
                          x = document.layers[id];
		x.style.display = value;
        }
}

function ChangeTravail(TravailID) {
        if (TravailID == 1) {
                ShowHideObjDiv('TravailTexte', 'none');
                ShowHideObjDiv('TravailMun', 'block');
        } else if (TravailID == 0) {
                ShowHideObjDiv('TravailTexte', 'none');
                ShowHideObjDiv('TravailMun', 'none');
        } else {
                ShowHideObjDiv('TravailMun', 'none')
                ShowHideObjDiv('TravailTexte', 'block')
        }
}
