function openSend(){
	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("popupsend_html").style.top = ypos + (myHeight/2) - 166;
	document.getElementById("popupsend_html").style.visibility = "visible";
	document.getElementById("popupsend_html").style.display = "block";
}

function closePopupSend(){
	document.getElementById("popupsend_html").style.visibility = "hidden";
	document.getElementById("popupsend_html").style.display = "none";
	document.getElementById("validate_send").style.visibility = "hidden";
}
function checkEmail(to_check) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(to_check)){
	return (true)}
}

function validate_form(){
	Goon = "0";
	var msg = "";
	if(document.forms.send.name.value == ""){
		Goon = "1";
		msg = msg + "Votre nom<br>";
	}
	if(!checkEmail(document.forms.send.email.value)){
		Goon = "1";
		msg = msg + "Votre courriel<br>";
	}
	if(document.forms.send.friendname.value == ""){
		Goon = "1";
		msg = msg + "Le nom de votre ami(e)<br>";
	}
	if(!checkEmail(document.forms.send.friendemail.value)){
		Goon = "1";
		msg = msg + "Le courriel de votre ami(e)<br>";
	}
	if(Goon == "0")
	{
	document.forms.send.method="post";
	document.forms.send.action = "send.asp";
	document.forms.send.submit();	
	}else{
		document.getElementById("validate_send").style.visibility = "visible";
	}
}