var image1, image2, vignettes, apparition1, apparition2;

window.onload = init;

function init ()
{
	ajoutMenus (0);
	document.getElementById("menusites").style.display = "none";
	document.getElementById("menudev").style.display = "none";
	initMenus ();
	colorerItemMenu ("FScahier");
	ajoutBordBasDePage (2);
	ajoutEventImpression ();
	prechargerImages ("../images/puce-imprimer-on.png");

	var apparition1 = new ApparitionImage ('images/site-fd-arborescence.png', 0, "imageSite", ":: Arborescence d’un site", "legendeImageSite", -100, 10);
	var apparition2 = new ApparitionImage ('images/site-fd-page-contact.png', 0, "imageSite", ":: Fonctionnement d’une page comportant un formulaire", "legendeImageSite", -200, 10);

	// div contenant les vignettes d'images
	vignettes = document.createElement ('div');
	vignettes.style.cssText = 'margin-bottom:20px;';

	// un "insertAfter" h1
	document.getElementById ('contenu').insertBefore (vignettes, document.getElementsByTagName('h1')[0].nextSibling);

	image1 = document.createElement ('img');
	image2 = document.createElement ('img');

	image1.setAttribute ('src', 'images/site-fd-arborescence.png');
	image1.setAttribute ('height', '100');
	image1.setAttribute ('width', '150');	
	image1.style.cssText = 'border: 1px solid #bbb;margin-right:30px;';
	image1.onmousemove = function (e) {apparition1.afficher(e)};
	image1.onmouseout  = apparition1.masquer;

	image2.setAttribute ('src', 'images/site-fd-page-contact.png');
	image2.setAttribute ('height', '100');
	image2.setAttribute ('width', '150');	
	image2.style.cssText = 'border: 1px solid #bbb;';
	image2.onmousemove = function (e) {apparition2.afficher(e)};
	image2.onmouseout  = apparition2.masquer;

	vignettes.insertBefore(image1, null);
	vignettes.insertBefore(image2, null);
}

