// JavaScript Document
function launchAnim(){
	if($('animSwf').visible()){
		var fx = new Effect.Fade('animSwf', {duration:1.0});
		$('animSwf').remove();
	}
	if(!$('fdBlanc').visible()){
		var fx2 = new Effect.Appear('fdBlanc', {duration:5.0})
	}
}
function redirect(path){
	window.location.replace(path);
}
function init(){
	var cookie = getCookie('lucensPromoNewSite');
	if(!cookie){
		$('goToHome').writeAttribute('href', '#');
		setCookie('lucensPromoNewSite');
		$('goToHome').observe('click', function(){launchAnim();});
		$('fdBlanc').observe('click', function(){redirect('hotel.html');});
		setTimeout('launchAnim()', 23000);
	}
}
function getCookie(nom){
	var cookie = document.cookie.indexOf(nom);
	if(cookie >= 0){
		return true;
	}
	return false;
}
function setCookie(nom){
	var expires = new Date();
	expires.setTime(expires.getTime()+(7*24*3600*1000));
	document.cookie = nom+'=1; expires='+expires.toGMTString();
}