function controleur() 
{
	this.m_eStatus = 'Accueil';
	this.m_bModeDiaporama = false;
	this.m_szTypeDiaporama = "";

	controleur.prototype.getStatus = function(){ return this.m_eStatus; }
	controleur.prototype.isModeDiaporama = function(){ return this.m_bModeDiaporama; }
	controleur.prototype.getTypeDiaporama = function(){ return this.m_szTypeDiaporama; }
};

controleur.prototype.displayAccueil = function()
{
	if( this.m_eStatus !== "Accueil" )
	{
		this.closeCurrentDisplay( "Accueil" );
		
		/*if( this.m_eStatus !== "Diaporama" )
		{
			unmoveLogo( false );
			//showItemsDiaporamas();
		}
		else*/
		unmoveLogo( true );
		
		this.m_eStatus = "Accueil";
	}
}	

controleur.prototype.displayPresentation = function()
{
	if( this.m_eStatus !== "Presentation" )
	{
		this.closeCurrentDisplay( "Presentation" );
		if( this.m_eStatus === "Accueil" )
			moveLogo( false );
		else
			showOndes();
			
		this.m_eStatus = "Presentation";
	}
}

controleur.prototype.displayProjet = function()
{
	if( this.m_eStatus !== "Projet" )
	{
		this.closeCurrentDisplay( "Projet" );
		if( this.m_eStatus === "Accueil" )
			moveLogo( false );
		else
			showOndes();
				
		this.m_eStatus = "Projet";
	}
}

controleur.prototype.displayContact = function()
{
	if( this.m_eStatus !== 'Contact' )
	{
		this.closeCurrentDisplay( "Contact" );
		if( this.m_eStatus == "Accueil" )
			moveLogo( true );
/*		else
			showOndes();
	*/		
		showContact();
			
		this.m_eStatus = 'Contact';
	}
}	

controleur.prototype.displayDiaporama = function( typeDiaporama )
{
	if( this.m_eStatus !== "Diaporama" )
	{
		this.closeCurrentDisplay( "Diaporama" );
		if( this.m_eStatus === "Accueil" )
			moveLogo( true );
		/*else
			hideOndes();*/

		this.m_eStatus = "Diaporama";	
	}
	
	showDiaporama( typeDiaporama );
	
	this.m_bModeDiaporama = true;
	this.m_szTypeDiaporama = typeDiaporama;
}

controleur.prototype.closeCurrentDisplay = function( eNewStatus )
{
//	alert( "closeCurrentDisplay : current_status = " + this.m_eStatus + ", new_status = " + eNewStatus );
	switch( this.m_eStatus )
	{
		case "Accueil" :
			break;
		case "Presentation" :
			hidePresentation();
			break;
		case "Projet" :
			hideProjet();
			break;
		case "Contact" :
			hideContact();
			break;
		case "Diaporama" :
			{
				switch( this.m_szTypeDiaporama )
				{
					case 'identite' : mySlider_Identite.slideOut(); break;
					case 'edition' : mySlider_Edition.slideOut(); break;
					case 'signaletique' : mySlider_Signaletique.slideOut(); break;
					case 'objets' : mySlider_Objets.slideOut(); break;
					case 'siteweb' : mySlider_SiteWeb.slideOut(); break;
					default :;
				}
				
				stopDiaporama();
				var arrayEltsDiaporama = [ $('div_Diaporama') ];
				var eltsEffects = new Fx.Elements( arrayEltsDiaporama, {
												  duration : 250,
												  onComplete : function ()
												  {
													  var oDivParent = document.getElementById( "div_Content" );
														var oDivDiaporama = document.getElementById( "div_Diaporama" );
														oDivParent.removeChild( oDivDiaporama );
													}
								} );
				eltsEffects.start(
					{
						'0': { /*	let's change the first element's opacity and width	*/
							'opacity': [ 1.0, 0.0 ]
						}
					}
				);

				this.m_szTypeDiaporama = "";
				this.m_bModeDiaporama = false;
			}
			break;
		default :;
	}
}
