function mel(prefixe,domaine) {
	var adresse;
	adresse = prefixe + "@" + domaine;
  	document.write(adresse);
}

function mail(prefixe,domaine) {
	adresse = prefixe+"@"+domaine;
  	document.write('<a href="mailto:'+adresse+'">'+adresse+'</a>')
}
function mailnoprint(prefixe,domaine){
	adresse = prefixe+"@"+domaine;
  	document.write('<a href="mailto:'+adresse+'"></a>')
}
var timeout    = 500;
var actu = 0;
var closetimer = 0;

$(document).ready(function (){

	$("#aitvC, #aitvR, #aitvA").fancybox({
		'width'			: 550,
		'height'			: 309,
		'autoScale'			: false,
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});

	$("#aitvCB").fancybox({
		'width'			: 550,
		'height'			: 449,
		'autoScale'			: false,
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});

	$('#liste-actu').hide();
	$('#liste-espace').hide();
	$('#liste-espace').attr('rel','');
	$('#liste-actu').attr('rel','');


	$('#espacepro').mouseenter(function(event){
		$('#liste-espace').stop(false,true).show(400);

		$('#espacepro').mouseleave(function(event){
			$('#liste-espace').stop(false,true).hide(400);
		});
	});
	$('#actualite').mouseenter(function(event){
		$('#liste-actu').stop(false,true).show(400);
		$('#actualite').mouseleave(function(event){
			$('#liste-actu').stop(false,true).hide(400);
		});
	});
	var top = $('#top').height();
	var footer = $('#footer').height();
	fh = parseInt($('html').height())- top - footer -40;
		if (fh > 320) {
			$('#content').css({height : fh+'px'});
		}

	$(window).resize(function() {
		fh = parseInt($('html').height())- top - footer -40;
		if (fh > 320) {
			$('#content').css({height : fh+'px'});
		}
	});



	fleXenv.fleXcrollMain("content");

	var nblogo = $('#marques .inside div').size();
	var iwidth = 90 * nblogo;
	var leftlogo = 130;
	var pas = 80;
	$('#marques .inside').css({width: iwidth+'px'});

	var logowidth = function(){
		$('#marques .inside div').first().animate({width:'0px'},1500,'linear',passealafin);

	}
	var passealafin = function(){
		$('#marques .inside').append('<div>'+$('#marques .inside div').first().html()+'</div>');
		$('#marques .inside div').first().remove();
		logowidth();
	}
	logowidth();
	//$('#marques .inside').everyTime(1600,);

});
