function SelectDate(chemin, champdate)
{
    D = document.getElementById(champdate).value;
    if(D){
        D = D.split('/');
    }else{
        Dat = new Date();
        D = new Array(Dat.getDate(), Dat.getMonth()+1, Dat.getFullYear());
    }
	 /* win = window.showModalDialog(chemin+"date-picker.php?champ="+champdate,null,"dialogWidth:150px;dialogHeight:150px;center:1;scroll:0;help:0;status:0");*/
  win = window.open(chemin+"date-picker.php?champ="+champdate,"win","status=no,scrollbars=no,toolbar=no,menubar=no,height=150,width=150,left=500,top=200");
    if (parseInt(navigator.appVersion) == 2 && navigator.appName == "Netscape")
        win = window.open("date-picker.html","win","status=yes,height=325,width=250");
        //win'MakeDate',D[2], D[1],D[0], 'SetDate');
        //win.MakeDate(D[2], D[1], D[0]);
}
function SetDate(Day, Month, Year, champdate)
{
	if (Month.toString().length == 1) Month="0"+Month.toString(); 
	if (Day.toString().length == 1) Day="0"+Day.toString();
	
    document.getElementById(champdate).value = Year + '' + Month + '' + Day;
}

