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.mon-sexshop.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 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;
}



function showsup()
	{
	if(document.getElementById && ScanCookie("monsexshop")==0)
		{
		document.getElementById("pub").style.width = larg;
		document.getElementById("pub").style.height = haut;
		document.getElementById("pub").innerHTML = html_haut+html_mil+html_bas;
		setTimeout("closeSup()",30000);
		CreationCookie("monsexshop",false);
		}
	}

function closeSup()
	{
	if(document.getElementById)
		{
		document.getElementById("pub").style.width = 1;
		document.getElementById("pub").style.height = 1;
		document.getElementById("pub").innerHTML = '';
		}
	}

function ScanCookie(variable)
{
cook = document.cookie;
variable += "=";
place = cook.indexOf(variable,0);
if (place <= -1)
	return("0");
else
	{
	end = cook.indexOf(";",place)
	if (end <= -1)
		return(unescape(cook.substring(place+variable.length,cook.length)));
	else
		return(unescape(cook.substring(place+variable.length,end)));
	}
}

function CreationCookie(nom,valeur,permanent)
{
	if(permanent)
		{
		dateExp = new Date(2020,11,11);
		dateExp = dateExp.toGMTString();
		ifpermanent = '; expires=' + dateExp + ';';
		}
	else
		ifpermanent = '';
	document.cookie = nom + '=' + escape(valeur) + ifpermanent;
}