﻿if (!window.Silverlight)
	Silverlight = {};

Silverlight.topbannerHP = function() 
{
}

var main;

Silverlight.topbannerHP.prototype =
{
	handleLoad: function(control, userContext, rootElement) 
	{
		this.control = control;
		main = this.control.content;
		// Sample event hookup:	
		rootElement.addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleMouseDown));
		this.AnimStart1 = this.control.content.findName('animacion1');
		this.AnimStart1.addEventListener("completed",AnimateCompleted);
		this.AnimStart1.Begin();
	},
	
	// 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();
	}
}

function AnimateCompleted(sender)
{
    main.findName('rec').Visibility = "Visible";
    main.findName('animacion2').begin();
}

function bot1over(sender)
{
    	var AnimOver1 = main.findName('rollOver');
    	main.findName('animacion2').stop();
		AnimOver1.Begin();
}
function bot1out(sender)
{
    	var AnimOver1 = main.findName('rollOut');
		AnimOver1.Begin();
        main.findName('animacion2').begin();
}

function botClick(sender)
{
    location.href = "/latam/dynamics/descubra/ceo.aspx";
}
