function CheckEmail(e)
{
	e_ok=true
	car_ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM"
	for (i=0;i<e.length ;i++)
		if (car_ok.indexOf(e.charAt(i))<0)
		 	e_ok=false
	if (document.images)
	{	re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
		if (!(!e.match(re) && e.match(re_two)))
			e_ok=false
	}
	return e_ok
}

function Start(page)
{
	OpenWin = this.open(page, "Aide", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,height=390,width=215");
	OpenWin.focus()
}
function StartPopup(page,hauteur,largeur)
{
	OpenWin = this.open(page, "Aide", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,height="+hauteur+",width="+largeur);
	OpenWin.focus()
}
function StartPopupMessage(page,hauteur,largeur)
{
	OpenWin = this.open(page, "PopUp", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,height="+hauteur+",width="+largeur);
	OpenWin.focus()
}

/* AJOUT MIC : Affiche les favoris. */
function favoris() {
    if ( navigator.appName != 'Microsoft Internet Explorer')
    {
        window.sidebar.addPanel('ActivPharma - Parapharmacie minceur, santé, beauté','http://www.activpharma.com','ActivPharma - Parapharmacie minceur, santé, beauté');
    } else { 
        window.external.AddFavorite('http://www.activpharma.com','ActivPharma - Parapharmacie minceur, santé, beauté');
    }
}

function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase()

    // --- BROWSER VERSION ---
    this.major = parseInt(('0' + navigator.appVersion), 10)
    this.minor = parseFloat(navigator.appVersion)

    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1)))
    this.nav2 = (this.nav && (this.major == 2))
    this.nav3 = (this.nav && (this.major == 3))
    this.nav4 = (this.nav && (this.major == 4))
	
	//Netscape 6
	this.nav5 =	(this.nav && (this.major == 5))
	this.nav6 = (this.nav && (this.major == 5))
	this.gecko = (this.nav && (this.major >= 5))

    this.ie   = (agt.indexOf("msie") != -1)
    this.ie3  = (this.ie && (this.major == 2))
    this.ie4  = (this.ie && (this.major == 3))
    this.ie5  = (this.ie && (this.major == 4))


    this.opera = (agt.indexOf("opera") != -1)
     
    this.nav4up = this.nav && (this.major >= 4)
    this.ie4up  = this.ie  && (this.major >= 4)
}

function Bouton(TypeBt, ClasseBt, OnClickBt, ImageBt, ClasseTxt, TexteTxt)
{
	var is = new Is()
	var win=navigator.userAgent.toLowerCase().indexOf("windows")
	
	if (is.ie4up && win != -1)
	{
		document.write('<button type="'+TypeBt+'" class="'+ClasseBt+'" onclick="'+OnClickBt+'">')
		document.write('<img src="'+ImageBt+'" border="0">')
		document.write('<p class="'+ClasseTxt+'">'+TexteTxt+'</p></button>')
	}
	else
	{
		document.write('<input type="'+TypeBt+'" onclick="'+OnClickBt+'" value="'+TexteTxt+'">')
	}
}