// JavaScript Document

function popupCenter(mURL, mTitle, mWidth, mHeight) {

    var w = mWidth, h = mHeight;

    if (document.all) {

       /* the following is only available after onLoad */

       w = document.body.clientWidth;

       h = document.body.clientHeight;

    }

    else if (document.layers) {

       w = window.innerWidth;

       h = window.innerHeight;

    }

    w = screen.width -10;

    h = screen.height -10;

    

    var popW = mWidth, popH = mHeight;

    

    var leftPos = (w-popW)/2, topPos = (h-popH)/2;

    

    window.open(mURL,mTitle,'width=' + popW + ',height='+popH+',top='+topPos+',left='+leftPos+',scrollbars='+1+',resizable='+1);

  }

function RetourJour(iAnnee,iMois,iJour)
{
	var tableau = new Array (0,3,2,5,0,3,5,1,4,6,2,4);
	if (iMois < 3)
		iAnnee--;
	return ((iAnnee + parseInt(iAnnee/4) - parseInt(iAnnee/100) + parseInt(iAnnee/400) + tableau[iMois - 1] + iJour) % 7);
}
function Ecrire() 
{
	today = new Date ();
	mois = today.getMonth();
	annee = today.getFullYear();
	jour = today.getDate();

	if (mois == 0)
		nom_mois = 'janvier';
	if (mois == 1)
		nom_mois = 'f&eacute;vrier';
	if (mois == 2)
		nom_mois = 'mars';
	if (mois == 3)
		nom_mois = 'avril';
	if (mois == 4)
		nom_mois = 'mai';
	if (mois == 5)
		nom_mois = 'juin';
	if (mois == 6)
		nom_mois = 'juillet';
	if (mois == 7)
		nom_mois = 'ao&ucirc;t';
	if (mois == 8)
		nom_mois = 'septembre';
	if (mois == 9)
		nom_mois = 'octobre';
	if (mois == 10)
		nom_mois = 'novembre';
	if (mois == 11)
		nom_mois = 'd&eacute;cembre';

	nouveau_mois = mois + 1;
	nom_jour = RetourJour(annee,nouveau_mois,jour);
	if (nom_jour == 1)
		jour_semaine = 'Lundi';
	if (nom_jour == 2)
		jour_semaine = 'Mardi';
	if (nom_jour == 3)
		jour_semaine = 'Mercredi';
	if (nom_jour == 4)
		jour_semaine = 'Jeudi';
	if (nom_jour == 5)
		jour_semaine = 'Vendredi';
	if (nom_jour == 6)
		jour_semaine = 'Samedi';
	if (nom_jour == 7)
		jour_semaine = 'Dimanche';
	document.write (jour_semaine + ' ' + jour + ' ' + nom_mois + ' ' + annee);
}
