if (!window.SA)
	SA = {};

SA.Page = function() 
{
}

SA.Page.prototype =
{
	handleLoad: function(control, userContext, rootElement) 
	{
		this.control = control;
		
		// Sample event hookup:	
		rootElement.addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleMouseDown));
		this.control.content.findName("Storyboard2").addEventListener("Completed", Silverlight.createDelegate(this,this.handleEnd));
		this.control.content.findName("Planification").addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleHyperlink));
		this.control.content.findName("Deploiement").addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleHyperlink));
		this.control.content.findName("Utilisation").addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleHyperlink));
		this.control.content.findName("Maintenance").addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleHyperlink));
		this.control.content.findName("Transition").addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleHyperlink));
	},
	
	// Sample event handler
	handleMouseDown: function(sender, eventArgs) 
	{
		// The following line of code shows how to find an element by name and call a method on it.
		// this.control.content.findName("Storyboard1").Begin();
		
	},
	
	handleHyperlink: function(sender, eventArgs)
	{
	  if (document.getElementById(sender.name.toLowerCase()).style.display == "none")
		  document.getElementById(sender.name.toLowerCase()).style.display = "block";
		else document.getElementById(sender.name.toLowerCase()).style.display = "none";
	},
	
	handleEnd: function(sender, eventArgs)
	{
	 document.getElementById("planification").style.display = "block";
	 document.getElementById("deploiement").style.display = "block";
	 document.getElementById("transition").style.display = "block";
	 document.getElementById("utilisation").style.display = "block";
	 document.getElementById("maintenance").style.display = "block";
  }
}