function openAlumni(){
	switch(browsername)	{
		case "MSIE":
			ypos = document.body.scrollTop;
			break;
		case "NS":
			ypos = window.scrollY;
			break;
		default:
			ypos = document.body.scrollTop;
			break;
	}
	
	  var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    myWidth = window.innerWidth;
	    myHeight = window.innerHeight;
	  } else if( document.documentElement &&
	      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    myWidth = document.documentElement.clientWidth;
	    myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    myWidth = document.body.clientWidth;
	    myHeight = document.body.clientHeight;
	  }

		document.getElementById("popupalert_html").style.top = ypos + (myHeight/2) - 166;
		document.getElementById("popupalert_html").style.visibility = "visible";
		document.getElementById("popupalert_html").style.display = "block";
}

function closePopupAlumni(){
	document.getElementById("popupalert_html").style.visibility = "hidden";
	document.getElementById("popupalert_html").style.display = "none";
	document.getElementById("validate_send").style.visibility = "hidden";
}
function checkEmail(to_check) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,5})+$/.test(to_check)){
	return (true)}
}
function validate_form_alumni(){
	Goon = 0;
	var msg = "";
	if(document.forms.send.name_title.value == ""){
		Goon = Goon + 1;
		msg = msg + "Titre<br>";
	}
	if(document.forms.send.join_name.value == ""){
		Goon = Goon + 1;
		msg = msg + "Prénom<br>";
	}
	if(document.forms.send.join_lastname.value== ""){
		Goon = Goon + 1;
		msg = msg + "Nom de famille<br>";
	}
	if(document.forms.send.address.value == ""){
		Goon = Goon + 1;
		msg = msg + "Adresse<br>";
	}
	if(document.forms.send.city.value == ""){
		Goon = Goon + 1;
		msg = msg + "Ville<br>";
	}
	if(document.forms.send.province.value == ""){
		Goon = Goon + 1;
		msg = msg + "Province<br>";
	}
	if(document.forms.send.country.value == ""){
		Goon = Goon + 1;
		msg = msg + "Pays<br>";
	}
	if(document.forms.send.postal_code.value == ""){
		Goon = Goon + 1;
		msg = msg + "Code postal<br>";
	}
	if(!checkEmail(document.forms.send.join_email.value)){
		Goon = Goon + 1;
		msg = msg + "Courriel<br>";
	}
	if(document.forms.send.telephone1.value == ""){
		Goon = Goon + 1;
		msg = msg + "Téléphone no.1<br>";
	}
	if(document.forms.send.camper.checked){
		if(document.forms.send.camper_year1.value == "aaaa" || document.forms.send.camper_year2.value == "aaaa"){
			Goon = Goon + 1;
			msg = msg + "Historique : Campeur<br>";
		}
	}	
	if(document.forms.send.ranger.checked){
		if(document.forms.send.ranger_year1.value == "aaaa"){
			Goon = Goon + 1;
			msg = msg + "Historique : Ranger<br>";
		}
	}
	if(document.forms.send.citlit.checked){
		if(document.forms.send.citlit_year1.value == "aaaa"){
			Goon = Goon + 1;
			msg = msg + "Historique : App. Mon.<br>";
		}
	}
	if(document.forms.send.staff.checked){
		if(document.forms.send.staff_year1.value == "aaaa" || document.forms.send.staff_year2.value == "aaaa"  || document.forms.send.staff_position.value == ""){
			Goon = Goon + 1;
			msg = msg + "Historique : Employé<br>";
		}
	}	
	if(document.forms.send.volunteer.checked){
		if(document.forms.send.volunteer_year1.value == "aaaa" || document.forms.send.staff_year2.value == "aaaa"){
			Goon = Goon + 1;
			msg = msg + "Historique : Bénévole<br>";
		}
	}
	if(document.forms.send.parent.checked){
		if(document.forms.send.parent_year1.value == "aaaa, aaaa, aaaa, aaaa" || document.forms.send.child_name.value == "" ){
			Goon = Goon + 1;
			msg = msg + "Historique : Parent<br>";
		}
	}


	if(Goon == 0)
	{
	document.forms.send.method="post";
	document.forms.send.action = "db_join_alumni.asp";
	document.forms.send.submit();	
	}else{
	
		switch(browsername)	{
			case "MSIE":
				ypos = document.body.scrollTop;
				break;
			case "NS":
				ypos = window.scrollY;
				break;
			default:
				ypos = document.body.scrollTop;
				break;
		}
	
		  var myWidth = 0, myHeight = 0;
		  if( typeof( window.innerWidth ) == 'number' ) {
		    //Non-IE
		    myWidth = window.innerWidth;
		    myHeight = window.innerHeight;
		  } else if( document.documentElement &&
		      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		    //IE 6+ in 'standards compliant mode'
		    myWidth = document.documentElement.clientWidth;
		    myHeight = document.documentElement.clientHeight;
		  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		    //IE 4 compatible
		    myWidth = document.body.clientWidth;
		    myHeight = document.body.clientHeight;
		  }
		document.getElementById("popupalert_html").style.top = ypos + (myHeight/2) - 166;
		document.getElementById("popupalert_html").style.visibility = "visible";
		document.getElementById("popupalert_html").style.display = "block";
		document.getElementById("popupalert_html_txt").innerHTML = "<b>Veuillez remplir ou corriger les champs suivant avant de soumettre :</b><br><br>" + msg;
	}
}


function closeAlert(){
	document.getElementById("popupalert_html").style.visibility = "hidden";
	document.getElementById("popupalert_html").style.display = "none";
}