// JavaScript Document

if(!document.getElementById){
  if(document.all)
  document.getElementById=function(){
	if(typeof document.all[arguments[0]]!="undefined")
	return document.all[arguments[0]]
	else
	return null
  }
  else if(document.layers)
  document.getElementById=function(){
	if(typeof document[arguments[0]]!="undefined")
	return document[arguments[0]]
	else
	return null
  }
}

function Popup(UrlPage, LargeurPopup, HauteurPopup) {
	LargeurEcran = window.screen.availWidth;
	HauteurEcran = window.screen.availHeight;
	
	PositionX = parseInt(LargeurEcran / 2) - parseInt(LargeurPopup / 2);
	PositionY = parseInt(HauteurEcran / 2) - parseInt(HauteurPopup / 2);
	
	window.open(UrlPage, "lePopup", "scrollbars=yes,resizable=yes,width="+LargeurPopup+",height="+HauteurPopup+",top="+PositionY+",left="+PositionX);
}

function PopupDiapo(UrlPage, LargeurPopup, HauteurPopup) {
	LargeurEcran = window.screen.availWidth;
	HauteurEcran = window.screen.availHeight;
	
	PositionX = parseInt(LargeurEcran / 2) - parseInt(LargeurPopup / 2);
	PositionY = parseInt(HauteurEcran / 2) - parseInt(HauteurPopup / 2);
	
	window.open(UrlPage, "lePopup", "scrollbars=no,resizable=no,width="+LargeurPopup+",height="+HauteurPopup+",top="+PositionY+",left="+PositionX);
}

function toggleAnimContagious() {
	if ( $("animContagiousStuff").style.display == "none" ) {
		new Effect.BlindDown( "animContagiousStuff", { duration: 0.4, afterFinish: function () { $('contagiousStuffFlash').show(); $('lienContagious').addClassName('Up'); } } );
	}
	else {
		$('contagiousStuffFlash').hide();
		new Effect.BlindUp( "animContagiousStuff", { duration: 0.4, afterFinish: function () { $('lienContagious').removeClassName('Up'); } } );
	}
}