/*******************************/
/*   FONCTIONS DE CALENDRIER   */
/*******************************/
function chgParentVal(champ,valeur)
{
	document.forms['form1'].elements[champ].value=valeur;
}

function ajoutParentVal(champ,valeur)
{
	document.forms['form1'].elements[champ].value+=valeur+'/\n';
}

var monCalendrier;
var monCalendrierStyle;
function showmonCalendrier(e){ // Place le sommaire et l'affiche à l'écran

	var cX = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.clientX;
	var cY = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.clientY;
	var rightedge= document.body.clientWidth-cX;
	var bottomedge= document.body.clientHeight-cY;
	//alert(cX+";"+cY);
	if (rightedge>monCalendrier.offsetWidth)
	{
		monCalendrierStyle.left=document.body.scrollLeft+cX;
	}
	else
	{
		monCalendrierStyle.left=document.body.scrollLeft+cX-monCalendrier.offsetWidth;
	}
	if (document.body.scrollLeft>document.body.scrollLeft+cX-monCalendrier.offsetWidth && rightedge<monCalendrier.offsetWidth)
	{
		monCalendrierStyle.left=document.body.scrollLeft;
	}
	if (bottomedge>monCalendrier.offsetHeight)
	{
		monCalendrierStyle.top=document.body.scrollTop+cY;
	}
	else
	{
		monCalendrierStyle.top=document.body.scrollTop+cY-monCalendrier.offsetHeight;
	}
	if (document.body.scrollTop>document.body.scrollTop+cY-monCalendrier.offsetHeight && bottomedge<monCalendrier.offsetHeight)
	{
		monCalendrierStyle.top=document.body.scrollTop;
	}
	monCalendrierStyle.visibility="visible";
	return false;
}

function hidemonCalendrier()
{
	
	monCalendrierStyle.visibility="hidden";	
	
} // Cache le sommaire.

function reloadmonCalendrier(thechamp)
{
	window.open('include/calendar.php?champ='+thechamp,'calendarframe');
}
/*******************************/
/* FIN FONCTIONS DE CALENDRIER */
/*******************************/