function addFav()
{
	if (document.all)
	{
		window.external.AddFavorite(location.href, document.title);
	}
	else
	{
		alert('Vous pouvez faire CTRL + D pour ajouter cette page dans vos signets, ou favoris.')
	}
} 


function video(id){
	url = 'http://www.g-envie.com/hit2.php?id=' + id ;
	winwidth = screen.availWidth - 10;
	winheight = screen.availHeight - 30;
	window.open(url, '_blank', 'scrollbars=yes, width=' + winwidth + ', height=' + winheight + ', top=0, left=0, resizable');
}

function fermer_cadre(id) {
	variable = eval ('document.getElementById(\''+id+'\')');
	variable2 = eval ('document.getElementById(\''+id+'ouvrir\')');
	if (variable.style.display=="none") {
		variable.style.display="";
		variable2.style.display="none";
	}
	else {
		variable.style.display="none";
		variable2.style.display="";
	}
}

function VerifEmail(email)
{
	var place = email.indexOf("@",1);
	var point = email.indexOf(".",place+1);
	if ((place > -1)&&(email.length >2)&&(point > 1)&&(point < email.length))
	{
		return true;
	}
	else
	{
		return false;
	}
}

function VerifForm(form)
{
    if (! VerifEmail(form.email.value))
    {
		alert('Une adresse email valide est obligatoire'); 
		return false;
    }

	return true;
}