/* 
Affiche un cadre sous la forme de Post-it

Dans la page Html, faire appel aux données de :
<script language="javascript" src="root/javascript/actudate.js"></script>

Dans la page Html, fonctionne avec
<script language="javascript">affichePostIt(num,x,y,niv,texte,date_debut,date_peremption)</script>

num : un entier --> le numéro du post-it
x : un entier --> la position horizontale du coin supérieur gauche du cadre
y : un entier --> la position verticale du coin supérieur gauche du cadre
niv : un entier --> le niveau dans l'aborescence de la page appelante
texte : un entier --> le texte qui figure dans le post-it, au format Html, mais avec des caractères d'échappement pour les guillemets et les apostrophes
date_debut --> La date à partir de laquelle le post-it sera affiché, du type "2005,12,26,23,59,59"
date_peremption --> La date au delà duquel le post-it ne sera plus affiché, du type "2005,12,26,23,59,59"

Ex.
<script language="javascript">affichePostIt(1,350,300,2,"Téléchargement du formulaire de recensement des enseignants (journée de <a href=\"../../ia/drh/2007/cad_01.htm\" target=\"_top\">grève</a> du 15&nbsp;mai.)");</script>

Problèmes connus ou à traiter
...
 */

function affichePostIt(numPostIt,posX,posY,niveau,texte,date_debut,date_peremption)
{	var nivArborescence = arborescence(niveau);
	if (peremption(date_peremption)) 
	{	if (actualite(date_debut)) 
		{	document.write("<div id=\"comm"+numPostIt+"\" style=\"position:absolute; left:"+posX+"px; top:"+posY+"px; visibility:visible; padding:0px; clip:rect(0px 250px 430px 0px); background-color:transparent;\"><table style=\"border:0px; width:213px; background:none; border-collapse:collapse;\" ><tr><td style=\"background: transparent url("+nivArborescence+"images/2007/post-it_haut.gif) no-repeat; height: 20px;\" valign=\'top\'><a  onmouseover=\"fermePostIt"+numPostIt+".src=\'"+nivArborescence+"images/2007/fermer_on.gif\';\" onmouseout=\"fermePostIt"+numPostIt+".src=\'"+nivArborescence+"images/2007/fermer_off.gif\'\"; onclick=\"document.getElementById(\'comm"+numPostIt+"\').style.visibility=\'hidden\';\"><img src=\""+nivArborescence+"images/2007/fermer_off.gif\" id=\"fermePostIt"+numPostIt+"\" style=\"width:11px; height:11px; border-style:none; float:right; margin-top:5px; margin-right:11px;\" title=\"Fermer\" /></a></td></tr><tr><td style=\"background: transparent url("+nivArborescence+"images/2007/post-it_milieu.gif) repeat-y; min-height:35px;\" valign=\"top\"><div style=\"margin:0px; padding:0px 0px 0px 10px; width:194px; overflow:hidden; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 8pt;\">"+texte+"</div></td></tr><tr><td style=\"background: transparent url("+nivArborescence+"images/2007/post-it_bas.gif) no-repeat; height: 35px; text-align:right;\" valign=\'top\'></td></tr></table></div>");
		}
		else
		{	
		}
	}
	else
	{	
	}
}

function arborescence(niv)
{	var niveauArborescence = "";
	var i = 0;
	for (i = 0 ; i < niv ; i++)
	{ niveauArborescence += "../";
	}
	return niveauArborescence;
}