if (!window.ElementosSilverlight)
	window.ElementosSilverlight = {};

ElementosSilverlight.Page = function() 
{
}

ElementosSilverlight.Page.prototype =
{
	handleLoad: function(control, userContext, rootElement) 
	{
		this.control = control;
		
		// Sample event hookup:	
		rootElement.addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleMouseDown));
	},
	
	// 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("Timeline1").Begin();
	}
}
function ButtonMouseEnter(sender, eventArgs)
{  
    if(sender.name == "redButtonNew")
    {
      // Reference opacity txtYellow.
      var playtxtYellow = sender.findName("txtYellow");
      playtxtYellow.opacity = 1;

      // Run the animation for when the redButtonNew is clicked.
      sender.findName("redButtonNewStoryboard").begin();
    }
	}
function ButtonMouseLeave(sender, eventArgs)
{  
    if(sender.name == "redButtonNew")
    {
      // Reference opacity txtYellow.
      var playtxtYellow = sender.findName("txtYellow");
      playtxtYellow.opacity = 0;
    }
	}
function ButtonMouseClick(sender, eventArgs)
{
    if(sender.name == "redButtonNew")
    {
      // Run the animation for when the redButtonNew button is clicked.
      sender.findName("redButtonNewStoryboard").begin();
	  
	  window.location = "http://www.viewpoint.cl";	  
    }
}
