﻿if (!window.bannerEstadio)
	window.bannerEstadio = {};

bannerEstadio.Page = function() 
{
}
var root;
var animation1;
var animation2;
bannerEstadio.Page.prototype =
{
	handleLoad: function(control, userContext, rootElement) 
	{
		this.control = control;
		root = rootElement;
		// Sample event hookup:	
		
		rootElement.addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, Navigate));		
		
        animation1 = root.findName('Animacion1');
        animation2 = root.findName('Animacion2');
		AnimateBanner();
	},
	
	// 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 Animate1()
{
    animation1.Begin();
}

function Animate2()
{
    animation2.Begin();
}

function AnimateBanner()
{
    animation1.Stop();
    animation2.Stop();
    Animate1();
}

function Navigate(sender)
{    
    var url = "http://www.microsoft.com/conosur/estamosconlosheroes/futbol/";
    location.href = url;
}