function resizePopUp(monImage, monTitre)
    {
	w = window.open('','chargement','width=10,height=10');
	w.document.write( "<html><head><title>"+monTitre+"</title>\n" );
	w.document.write( "<script language='JavaScript'>\n");
	w.document.write( "IE5=NN4=NN6=false;\n");
	w.document.write( "if(document.all)IE5=true;\n");
	w.document.write( "else if(document.getElementById)NN6=true;\n");
	w.document.write( "else if(document.layers)NN4=true;\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31);\n");
	w.document.write( "else if(NN6) self.sizeToContent();\n");
	w.document.write( "else window.resizeTo(document.images[0].width,document.images[0].height+20);\n");
	w.document.write( "self.focus();\n");
	w.document.write( "}\n</scri");
	w.document.write( "pt>\n");
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad='javascript:autoSize();'>" );
	w.document.write( "<a href='javascript:window.close();'><img src='"+monImage+"' border=0 alt='"+monTitre+"'></a>" );
	w.document.write( "</body></html>" );
	w.document.close();
}

function mask(nom,dom,dlt){
	adr = nom+'@'+dom+'.'+dlt;
	sortie = '<a href="mailto:'+adr+'">'+adr+'</a>'
	return sortie;
}



$(document).ready(function(){


	$("#menu a img").bind('mouseover',function(){
		if($(this).attr('class') != 'actif'){
			source = $(this).attr('src');
			source2 = source.split('.');
			$(this).attr('src',source2[0]+'2.jpg');
			$(this).mouseout(function(){
				$(this).attr('src',source);	
			});
		}
		
		
			$("#menu ul:visible").hide(100);
			
		if($(this).parent('a').attr('href') == '#'){	
			//alert(this);
			$(this).parent('a').parent('li').children('ul').show(400);
			$("#infos2 iframe").hide();//video qui passe au dessus
		}
		
		setTimeout(function(){//faire disparaitre les smenus même sui on ne fait rien
			$("#corps").click();
		},5000);
		
	});
	
	$(".smenu li, #corps").click(function(){
		$(".smenu li").parent('ul').hide(300);
		$("#infos2 iframe").show();//video qui passe au dessus
	});

/*prog*/

$(".gd_marg .textes").toggle(function(){
		$(this).css({ height: 'auto'});
		$(this).children('.etendre').hide();
		
	},function(){
		$(this).animate({ height: '320px'},500);
		$(this).children('.etendre').show();
	});

$("p.videos").toggle(function(){
		$(this).children('span').show(800);
	},function(){
		$(this).children('span').hide(800);
});




/*photos des groupes*/
	$(".photos a").toggle(function(){
			$(this).children('img').attr('src',$(this).attr('href')).addClass('grand');
			$("p.videos span").hide();		
		}, function(){
			$(this).children('img').attr('src',$(this).attr('rel')).removeClass('grand');
			$("p.videos span").show();
			return false;		
	});
	
	
/*ml*/

$(".ml").each(function(){
		$(this).html(mask($(this).attr('rel'),'ecaussysteme','com'));
	});
$(".mlvm").each(function(){
		$(this).html(mask($(this).attr('rel'),'vincent-marcel','com'));
	});	
		

});





