/*
*	Auteur : Alexandre Koch 
*	mail : auteur@hazart.Com
*	date : février 2007
*
*	Tout modification de ce fichier ou réutilisation du code
*	doit faire l'objet d'une demande par mail à son auteur.
*
*/

var largFlash = 1000;
var hautFlash = 700;

// fonction de mise en place
function setCalques() {
	// login
	posCalque("login",765,27);
	tailleCalque("login",117,38);	
	// actu
	posCalque("actu",88,192);
	tailleCalque("actu",501,487);
	// club_login
	posCalque("club_login",419,187);
	tailleCalque("club_login",117,45);
	// club_form
	posCalque("club_form",288,332);
	tailleCalque("club_form",190,160);	
	// club_partage
	posCalque("club_partage",123,348);
	tailleCalque("club_partage",346,190);
	// club_concours
	posCalque("club_concours",123,348);
	tailleCalque("club_concours",346,190);	
}

// fonctions appelées par flash
function viewCalque(id,id2,id3) {
	setCalques();
	if ("html/"+document.getElementById(id).src!=id+".htm")	document.getElementById(id).src= "html/"+id+".htm";
	document.getElementById(id).style.display = "Block";
	if (id2!=undefined) {
		if ("html/"+document.getElementById(id2).src!=id2+".htm")	document.getElementById(id2).src= "html/"+id2+".htm";
		document.getElementById(id2).style.display = "Block";		
	}
	if (id3!=undefined) {
		if ("html/"+document.getElementById(id3).src!=id3+".htm")	document.getElementById(id3).src= "html/"+id3+".htm";
		document.getElementById(id3).style.display = "Block";		
	}
}
function hideAllCalques() {
	document.getElementById("actu").style.display = "none";
	document.getElementById("club_form").style.display = "none";
	document.getElementById("club_login").style.display = "none";
	document.getElementById("club_partage").style.display = "none";	
	document.getElementById("club_concours").style.display = "none";	
}
function hideLogin() {
	document.getElementById("login").style.display = "none";
}

// fonctions génériques
function posCalque(id,x,y) {
	document.getElementById(id).style.left = Math.floor((document.body.clientWidth - largFlash)/2) + x;
	document.getElementById(id).style.top = y;
}
function tailleCalque(id,w,h) {
	document.getElementById(id).style.width = w;
	document.getElementById(id).style.height = h;
}

// écouteurs
addEcouteur(window, "load", setCalques);
addEcouteur(window, "resize", setCalques);