// Ouvre une pop-up 
function openWindow(URL, winName, width, height, center)
{
	xposition = 0;
	yposition = 0;
	
	if((parseInt(navigator.appVersion) >= 4 ) && (center))
	{
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
	
    args = "width=" + width + ","
    + "height=" + height + ","
    + "location = 0,"
    + "menubar = 0,"
    + "resizable = 0,"
    + "scrollbars = 0,"
    + "status = 0,"
    + "titlebar = 0,"
    + "toolbar = 0,"
    + "hotkeys = 1,"
    + "screenx = " + xposition + ","
    + "screeny = " + yposition + ","
    + "left = " + xposition
    + "top = " + yposition+ ","
  	+  "replace = false";	
  	winName = window.open(URL, winName, args);
  	winName.focus();
}

// Alterne les couleurs
objl = new Object;

function OvrL(_objl, _class)
{
    if(objl != _objl)
    {
        _objl.className = _class;
    }
}
function OutL(_objl, _class)
{
    if(objl != _objl)
    {
        _objl.className = _class;
    }
}

// Fonction de includes/newsletter.inc.php
function Newsletter(URL)
{
    if(document.FORM_ARESF.email.value == "")
	{
		alert("Désolé mais le champ doit être rempli.");
	}
	else
	{
		document.FORM_ARESF.action=URL+'/pages/newsletter.php';
		document.FORM_ARESF.submit();
	}
}

// Fonction de pages/presse.php
function LireArticle(Indx, Largeur, Hauteur)
{
	openWindow('article.php?indx='+Indx, 'Presse', Largeur, Hauteur, 1);
}

// Fonction de pages/signer.php
function Envoyer()
{
    if(
	(document.FORM_ARESF.pseudo.value == "") ||
	(document.FORM_ARESF.email.value == "") ||
	(document.FORM_ARESF.message.value == "")
	)
	{
	    alert("Désolé mais certaines données sont manquantes.");
	}
	else
	{
	    document.FORM_ARESF.action = "signer.php?envoi=1";
        document.FORM_ARESF.submit();
	}
}