var dd, delai;
function debuteTemps(delai1) {
	var hhmmss = "  ", min, sec;
	delai = delai1;

	adate = new Date()
	hhmmss += adate.getHours();
	if (hhmmss < 10) hhmmss = "0" + hhmmss.replace(/^\s*|\s*$/g,"");
	min = adate.getMinutes();
	if (min < 10) hhmmss += ":0" + min;
	else hhmmss += ":" + min;
	sec = adate.getSeconds();
	if (sec < 10) hhmmss += ":0" + sec;
	else hhmmss += ":" + sec;
	hhmmss = " " + hhmmss;
	document.getElementById("heure").innerHTML = hhmmss;
	//heure.innerHTML = hhmmss;

	dd = setTimeout("debuteTemps(delai)",delai1);
}

/** 
 * @brief:affiche une bulle d'information
 */
function ShowMessage(div_id, msg_type, message, orientation){
	if (orientation == 'Up'){
		Value_1 = 'UR';
		Value_2 = 'LL';
		if (msg_type == 'inform'){
			MsgTop = '<div style=\'background-image: url(images/bulles/bulle_top.png); width: 325px; height: 5px;\' class=\'text\'>&nbsp;</div><div style=\'background-image: url(images/bulles/bulle_center.png); text-align: left; padding-left: 12px; padding-right: 10px; padding-top: 2px; padding-bottom: 2px;\' class=\'text\'>';
			MsgBottom = '</div><div style=\'background-image: url(images/bulles/bulle_bottom_dl.png); width: 325px; height: 12px;\' class=\'text\'>&nbsp;</div>';
		} else {
			MsgTop = '<div style=\'background-image: url(images/bulles/bulle_top_rouge.png); width: 325px; height: 5px;\' class=\'text\'>&nbsp;</div><div style=\'background-image: url(images/bulles/bulle_center_rouge.png); text-align: left; padding-left: 12px; padding-right: 10px; padding-top: 2px; padding-bottom: 2px;\' class=\'text\'>';
			MsgBottom = '</div><div style=\'background-image: url(images/bulles/bulle_bottom_rouge_dl.png); width: 325px; height: 12px;\' class=\'text\'>&nbsp;</div>';
		}
	} else if (orientation == 'Down'){
		Value_1 = 'LR';
		Value_2 = 'UL';
		if (msg_type == 'inform'){
			MsgTop = '<div style=\'background-image: url(images/bulles/bulle_top_ul.png); width: 325px; height: 12px;\' class=\'text\'>&nbsp;</div><div style=\'background-image: url(images/bulles/bulle_center.png); text-align: left; padding-left: 12px; padding-right: 10px; padding-top: 2px; padding-bottom: 2px;\' class=\'text\'>';
			MsgBottom = '</div><div style=\'background-image: url(images/bulles/bulle_bottom.png); width: 325px; height: 5px;\' class=\'text\'>&nbsp;</div>';
		} else {
			MsgTop = '<div style=\'background-image: url(images/bulles/bulle_top_rouge_ul.png); width: 325px; height: 12px;\' class=\'text\'>&nbsp;</div><div style=\'background-image: url(images/bulles/bulle_center_rouge.png); text-align: left; padding-left: 12px; padding-right: 10px; padding-top: 2px; padding-bottom: 2px;\' class=\'text\'>';
			MsgBottom = '</div><div style=\'background-image: url(images/bulles/bulle_bottom_rouge.png); width: 325px; height: 5px;\' class=\'text\'>&nbsp;</div>';
		}
	} else if (orientation == 'UpLeft'){
		Value_1 = 'UL';
		Value_2 = 'LR';
		if (msg_type == 'inform'){
			MsgTop = '<div style=\'background-image: url(images/bulles/bulle_top.png); width: 325px; height: 5px;\' class=\'text\'>&nbsp;</div><div style=\'background-image: url(images/bulles/bulle_center.png); text-align: left; padding-left: 12px; padding-right: 10px; padding-top: 2px; padding-bottom: 2px;\' class=\'text\'>';
			MsgBottom = '</div><div style=\'background-image: url(images/bulles/bulle_bottom_dr.png); width: 325px; height: 12px;\' class=\'text\'>&nbsp;</div>';
		} else {
			MsgTop = '<div style=\'background-image: url(images/bulles/bulle_top_rouge.png); width: 325px; height: 5px;\' class=\'text\'>&nbsp;</div><div style=\'background-image: url(images/bulles/bulle_center_rouge.png); text-align: left; padding-left: 12px; padding-right: 10px; padding-top: 2px; padding-bottom: 2px;\' class=\'text\'>';
			MsgBottom = '</div><div style=\'background-image: url(images/bulles/bulle_bottom_rouge_dr.png); width: 325px; height: 12px;\' class=\'text\'>&nbsp;</div>';
		}
	} else {
		Value_1 = 'LL';
		Value_2 = 'UR';
		if (msg_type == 'inform'){
			MsgTop = '<div style=\'background-image: url(images/bulles/bulle_top_ur.png); width: 325px; height: 12px;\' class=\'text\'>&nbsp;</div><div style=\'background-image: url(images/bulles/bulle_center.png); text-align: left; padding-left: 12px; padding-right: 10px; padding-top: 2px; padding-bottom: 2px;\' class=\'text\'>';
			MsgBottom = '</div><div style=\'background-image: url(images/bulles/bulle_bottom.png); width: 325px; height: 5px;\' class=\'text\'>&nbsp;</div>';
		} else {
			MsgTop = '<div style=\'background-image: url(images/bulles/bulles/bulle_top_rouge_ur.png); width: 325px; height: 12px;\' class=\'text\'>&nbsp;</div><div style=\'background-image: url(images/bulles/bulle_center_rouge.png); text-align: left; padding-left: 12px; padding-right: 10px; padding-top: 2px; padding-bottom: 2px;\' class=\'text\'>';
			MsgBottom = '</div><div style=\'background-image: url(images/bulles/bulle_bottom_rouge.png); width: 325px; height: 5px;\' class=\'text\'>&nbsp;</div>';
		}
	}
	if (msg_type == 'inform'){
		overlib(MsgTop + message + MsgBottom, ANCHOR, div_id, ANCHORALIGN, Value_1, Value_2, WIDTH, 325, FGCOLOR,'', BGCOLOR,'');
	} else {
		overlib(MsgTop + message + MsgBottom, ANCHOR, div_id, ANCHORALIGN, Value_1, Value_2, WIDTH, 325, FGCOLOR,'', BGCOLOR,'');
	}
}

function StartPage(){
	//Mise à l'échelle des éléments
	var Hauteur_Colonne_Droite_Conteneur = document.getElementById('colonne_droite_conteneur').offsetHeight;
	var Hauteur_Colonne_Droite_Footer = document.getElementById('footer').offsetHeight;
	var Hauteur_Totale = Hauteur_Colonne_Droite_Conteneur + Hauteur_Colonne_Droite_Footer + 10;
	document.getElementById('body_container').style.height = Hauteur_Totale + 'px';
	document.getElementById('colonne_droite').style.height = Hauteur_Totale + 'px';
	document.getElementById('colonne_gauche').style.height = Hauteur_Totale + 'px';
	if (document.getElementById('contenu_1')){
		document.getElementById('contenu_1').style.height = document.getElementById('contenu_texte_1').offsetHeight + 'px';
	}
	if (document.getElementById('contenu_2')){
		document.getElementById('contenu_2').style.height = document.getElementById('contenu_texte_2').offsetHeight + 'px';
	}
	if (document.getElementById('contenu_3')){
		document.getElementById('contenu_3').style.height = document.getElementById('contenu_texte_3').offsetHeight + 'px';
	}
	//Lancement des zones défilantes
	if (document.getElementById('quick_news_container')){
		startscroll();
	}
	if (document.getElementById('quick_temoignages_container')){
		startscrollTem();
	}
	//Chrono JS
	debuteTemps(1000);
}