﻿if (!window.IntroTortatoIt)
	IntroTortatoIt = {};

IntroTortatoIt.Page = function() 
{
}

IntroTortatoIt.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("RetOpcao3").addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleMouseDown_Open03));
		this.control.content.findName("RetOpcao2").addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleMouseDown_Open02));
		this.control.content.findName("RetOpcao1").addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleMouseDown_Open01));
		
		
		//this.control.content.findName("Default").Begin();
		
		this.control.content.findName("RetOpcao3").addEventListener("MouseEnter", Silverlight.createDelegate(this, this.handleMouseDown_Active03));
		this.control.content.findName("RetOpcao2").addEventListener("MouseEnter", Silverlight.createDelegate(this, this.handleMouseDown_Active02));
		this.control.content.findName("RetOpcao1").addEventListener("MouseEnter", Silverlight.createDelegate(this, this.handleMouseDown_Active01));
		
	
		//this.control.content.findName("TextOpcao03").addEventListener("MouseLeave", Silverlight.createDelegate(this, this.handleMouseDown_Default));
		//this.control.content.findName("TextOpcao02").addEventListener("MouseLeave", Silverlight.createDelegate(this, this.handleMouseDown_Default));
		//this.control.content.findName("TextOpcao01").addEventListener("MouseLeave", Silverlight.createDelegate(this, this.handleMouseDown_Default));
		
		//this.control.content.findName("RetOpcao03").addEventListener("MouseLeave", Silverlight.createDelegate(this, this.handleMouseDown_Default));
		//this.control.content.findName("RetOpcao02").addEventListener("MouseLeave", Silverlight.createDelegate(this, this.handleMouseDown_Default));
		//this.control.content.findName("RetOpcao01").addEventListener("MouseLeave", Silverlight.createDelegate(this, this.handleMouseDown_Default));

	},
	
	// Sample event handler
	handleMouseDown_Active02: 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("DefaultAnimation").Pause();
		this.control.content.findName("Default").Pause();
		this.control.content.findName("Active01").Stop();
		this.control.content.findName("Active03").Stop();
		
		this.control.content.findName("Active02").Begin();
	},
	
	// Sample event handler
	handleMouseDown_Active01: 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("DefaultAnimation").Pause();
		this.control.content.findName("Default").Pause();
		this.control.content.findName("Active02").Stop();
		this.control.content.findName("Active03").Stop();
		
		this.control.content.findName("Active01").Begin();
	}
	,
	
	// Sample event handler
	handleMouseDown_Active03: 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("DefaultAnimation").Pause();
		this.control.content.findName("Default").Pause();
		this.control.content.findName("Active02").Stop();
		this.control.content.findName("Active01").Stop();
		
		this.control.content.findName("Active03").Begin();
	}
	,
	
	// Sample event handler
	handleMouseDown_Default: 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("DefaultAnimation").Pause();
		this.control.content.findName("Active03").Stop();
		this.control.content.findName("Active02").Stop();
		this.control.content.findName("Active01").Stop();
		
		this.control.content.findName("Default").Resume();
	}
	
	,
	
	// Sample event handler
	handleMouseDown_Open01: 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("DefaultAnimation").Pause();
		window.location = "Software.aspx";
	}
	,
	
	// Sample event handler
	handleMouseDown_Open02: 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("DefaultAnimation").Pause();
		window.location = "Internet.aspx";
	}
	,
	
	// Sample event handler
	handleMouseDown_Open03: 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("DefaultAnimation").Pause();
		window.location = "Solucoes.aspx";
	}
}