var datecour = new Date();


function getMois() {

	return(datecour.getMonth()+1);

}

function getJour() {

	return(datecour.getDate());

}

function getAnnee() {

	return(datecour.getYear());

}

function getMoisPlusDelta(nbMois) {

	var dateTemp = new Date();

	dateTemp.setMonth(dateTemp.getMonth()+nbMois);

	return(dateTemp.getMonth()+1);
}

function popupC(page) {
	w = 550;
	h = 350;
	window.open(page,'_blank','width=' + w + ', height=' + h + ', toolbar=false, scrollbars=yes, resizable=yes' );
}

function showInfos(dateSoiree) {
	window.open('infos.php?dateSoiree='+dateSoiree,'popup','width=600, height=400, toolbar=false, scrollbars=yes, resizable=yes' );
}

function verifSoiree(f) {
	
	if(f.desc.value == '' || f.libelle.value == '' || f.dateSoiree.value == '') { 
			alert("Merci de saisir tous les champs obligatoires svp"); }
	else f.submit();
	
}
function _verifSoiree(f) {
	
	if(f.desc.value == '' || f.libelle.value == '' || f.jour.value == '' || f.mois.value == '' || f.annee.value == '') {
			alert("Merci de saisir tous les champs obligatoires svp"); }
	else f.submit();
	
}
function addSaut() {
	document.forms["planning"].desc.value=document.forms["planning"].desc.value+'<br />'
}

function testKey(elt) {
	if(window.event.keyCode == 13) document.getElementById(elt).value = document.getElementById(elt).value + "<br />"
}
