// ### Legacy / Backward compat
function popJeu(num, w, h){
	popLogin2('../jeux/pages'+num+'/jpage_'+num+'.php?PHPSESSID=<?echo $PHPSESSID?>&amp;id_codjeu='+num, w, h);
}

function popLogin(page){
	var DFviewer = window.open (page,'DFviewer','location=no,toolbar=n,directories=no,menubar=no,top=200,left=200,resizable=yes,scrollbars=1,status=no,width=550,height=350');
	DFviewer.focus();
}

function popLogin2(page, w, h){
	var DFviewer2 = window.open (page,'DFviewer2','location=no,toolbar=n,directories=no,menubar=no,top=200,left=200,resizable=yes,scrollbars=1,status=no,width='+w+',height='+h);
	DFviewer2.focus();
}

function civil(val){
	document.form.fciv.value = val;
}

function checkDate (dstr, mstr, ystr)
{
/*
_________________________________________________________________
	_>>	Cette fonction vérifie la validité d'une date

	__?	Paramètre :
		-	dstr, mstr, ystr : une date sous forme STRING

	-->	Cette fonction retourne false si la chaîne passée n'est pas une date
_________________________________________________________________
*/
var d = parseInt(dstr, 10);
var m = parseInt(mstr, 10);
var y = parseInt(ystr, 10);

if ( (dstr.length != 2) || (mstr.length != 2) || (ystr.length != 4) )	{ return false; }
if ( (d < 1) || (m < 1) || (m > 12) ) { return false; } 

var dt = new Date();
if (y < 1850 || y > dt.getFullYear()) { return false; }

var mref = ( ( (m == 1) || (m == 3) || (m == 5) || (m == 7) || (m == 8) || (m == 10) || (m == 12) ) ? 31 : (m == 2) ? 29 : 30 );
if (m == 2) { mref = ((y % 4) ? 28 : 29); } // annees bissextiles

if ( d > mref )	{ return false; }

return true;	
}//Fin de la fonction checkDate()

