var image1, image2, image3, vignettes, apparition1, apparition2, apparition3, lien1;

window.onload = init;

function init ()
{
	ajoutMenus (0);
	document.getElementById("menufaire").style.display = "none";
	document.getElementById("menudev").style.display = "none";
	initMenus ();
	colorerItemMenu ("SRtnc");
	ajoutBordBasDePage (2);
	ajoutEventImpression ();
	prechargerImages ("../images/puce-imprimer-on.png");
	
	var apparition1 = new ApparitionImage ('images/billetterie-theatre-chaillot-1.png', 0, "imageSite", ":: Formulaire d’abonnement (vue partielle)", "legendeImageSite", -100, 10);
	var apparition2 = new ApparitionImage ('images/billetterie-theatre-chaillot-2.png', 0, "imageSite", ":: Page de confirmation avant paiement", "legendeImageSite", -150, 10);
	var apparition3 = new ApparitionImage ('images/billetterie-theatre-chaillot-3.png', 0, "imageSite", ":: Affichage d’une demande d’abonnement dans l’interface d’administration", "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');
	image3 = document.createElement ('img');

	image1.setAttribute ('src', 'images/billetterie-theatre-chaillot-1.png');
	image1.setAttribute ('height', '100');
	image1.setAttribute ('width', '150');	
	image1.style.cssText = 'margin-right: 30px';
	image1.onmousemove = function (e) {apparition1.afficher(e)};
	image1.onmouseout  = apparition1.masquer;

	image2.setAttribute ('src', 'images/billetterie-theatre-chaillot-2.png');
	image2.setAttribute ('height', '100');
	image2.setAttribute ('width', '150');	
	image2.style.cssText = 'margin-right: 30px';
	image2.onmousemove = function (e) {apparition2.afficher(e)};
	image2.onmouseout  = apparition2.masquer;

	image3.setAttribute ('src', 'images/billetterie-theatre-chaillot-3.png');
	image3.setAttribute ('height', '99');
	image3.setAttribute ('width', '150');	
	image3.style.cssText = 'border: 1px solid #bbb;border-top: none;';
	image3.onmousemove = function (e) {apparition3.afficher(e)};
	image3.onmouseout  = apparition3.masquer;

	lien1 = document.createElement ('a');
	lien1.setAttribute ('href', 'http://www.theatre-chaillot.fr/private/abo/testAbo.htm');
	lien1.setAttribute ('title', 'Vers le formulaire d’abonnement en ligne');
	lien1.setAttribute ('target', '_blank');
	lien1.onclick = apparition1.masquer;
	lien1.appendChild (image1);

	vignettes.insertBefore(lien1, null);
	vignettes.insertBefore(image2, null);
	vignettes.insertBefore(image3, null);
}

