if (!window.WEB_NUEVO_HSI)
	window.WEB_NUEVO_HSI = {};

WEB_NUEVO_HSI.Page = function() 
{
}

WEB_NUEVO_HSI.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 == "B_HSI")
    {
      // Get a reference to the quienesFFFD6B36.
      var playquienesFFFD6B36 = sender.findName("quienesFFFD6B36");
      playquienesFFFD6B36.opacity = 1;

      // Run the animation for when the play button is clicked.
      sender.findName("B_HSIStoryboard").begin();
    }
	if(sender.name == "B_Products")
    {
      // Get a reference to the TextProdFFFD6836.
      var playTextProdFFFD6836 = sender.findName("TextProdFFFD6836");
      playTextProdFFFD6836.opacity = 1;

      // Run the animation for when the play button is clicked.
      sender.findName("B_ProductsStoryboard").begin();
    }
	if(sender.name == "B_Support")
    {
      // Get a reference to the TxToolFFFD6836.
      var playTxToolFFFD6836 = sender.findName("TxToolFFFD6836");
      playTxToolFFFD6836.opacity = 1;

      // Run the animation for when the play button is clicked.
      sender.findName("B_SupportStoryboard").begin();
    }
	if(sender.name == "B_DondeComp")
    {
      // Get a reference to the txDondeCFFFD6836.
      var playtxDondeCFFFD6836 = sender.findName("txDondeCFFFD6836");
      playtxDondeCFFFD6836.opacity = 1;

      // Run the animation for when the DondeComp button is clicked.
      sender.findName("B_DondeCompStoryboard").begin();
    }
	if(sender.name == "playBUTTON")
    {
      // Get a reference to the glass rectangle.
      var playTriang = sender.findName("Triang");
      playTriang.opacity = 1;
    }
		if(sender.name == "stopBUTTON")
    {
      // Get a reference to bright Triang1.
      var playTriang1 = sender.findName("Triang1");
      playTriang1.opacity = 1;
    }
		if(sender.name == "fullScreenButton")
    {
      // Get a reference to the glass rectangle.
      var playTriang2 = sender.findName("Triang2");
      playTriang2.opacity = 1;
    }
}
function ButtonMouseLeave(sender, eventArgs)
{  
    if(sender.name == "B_HSI")
    {
      // Reference to the QuienesFFFD6B36.
      var playquienesFFFD6B36 = sender.findName("quienesFFFD6B36");
      playquienesFFFD6B36.opacity = 0;
    }
	if(sender.name == "B_Products")
    {
      // Reference to the Products TextProdFFFD6836.
      var playTextProdFFFD6836 = sender.findName("TextProdFFFD6836");
      playTextProdFFFD6836.opacity = 0;
    }
	if(sender.name == "B_Support")
    {
      // Reference to the Support TxToolFFFD6836.
      var playTxToolFFFD6836 = sender.findName("TxToolFFFD6836");
      playTxToolFFFD6836.opacity = 0;
    }
	if(sender.name == "B_DondeComp")
    {
      // Reference to the DondeComprar .
      var playtxDondeCFFFD6836 = sender.findName("txDondeCFFFD6836");
      playtxDondeCFFFD6836.opacity = 0;
    }
	if(sender.name == "playBUTTON")
    {
      // Reference to the Triang.
      var playTriang = sender.findName("Triang");
      playTriang.opacity = 0;
    }
		if(sender.name == "stopBUTTON")
    {
      // Reference to the Triang.
      var playTriang1 = sender.findName("Triang1");
      playTriang1.opacity = 0;
    }
		if(sender.name == "fullScreenButton")
    {
      // Reference to the Triang.
      var playTriang2 = sender.findName("Triang2");
      playTriang2.opacity = 0;
    }


}
function ButtonMouseClick(sender, eventArgs)
{
    if(sender.name == "B_HSI")
    {
		window.location = "quienes/Default.html";		
      // Run the animation for when the B_HSI button is clicked.
      sender.findName("B_HSIStoryboard").begin();
    }
	if(sender.name == "B_Products")
    {
      window.location = "productos/Default.html";	  
	  // Run the animation for when the B_Products button is clicked.
      sender.findName("B_ProductsStoryboard").begin();
    }
	if(sender.name == "B_Support")
    {
      window.location = "soporte/Default.html";
	  // Run the animation for when the B_Support button is clicked.
      sender.findName("B_SupportStoryboard").begin();
    }
		if(sender.name == "B_DondeComp")
    {
      window.location = "comprar/Default.html";
	  // Run the animation for when the B_DondeComp button is clicked.
      sender.findName("B_DondeCompStoryboard").begin();
    }
	if(sender.name == "playBUTTON")
    {
      // Play and pause graphics.
      var TriangPlay = sender.findName("TriangPlay");
      var leftPauseLine = sender.findName("leftPauseLine");
      var rightPauseLine = sender.findName("rightPauseLine");

      // Swap Pause and Play graphics.
      if(TriangPlay.opacity == 1)
      {
        TriangPlay.opacity = 0;
        leftPauseLine.opacity = 1;
        rightPauseLine.opacity = 1;
		
		// alpha video 100
		var videoHsiFinal_wmv = sender.findName("videoHsiFinal_wmv");
		videoHsiFinal_wmv.opacity = 1;
		
		// alpha menu 0
		var buttonContainer = sender.findName("buttonContainer");
		buttonContainer.opacity = 0;
		
		// alpha clickVerVideo 0
		var clickVerVideo = sender.findName("clickVerVideo");
		clickVerVideo.opacity = 0;
		
		// alpha clickVerVideo 1
		var clickVerMenu = sender.findName("clickVerMenu");
		clickVerMenu.opacity = 1;
		
		// Play the video
		sender.findName("videoHsiFinal_wmv").play();
      }
      else
      {
        TriangPlay.opacity = 1;
        leftPauseLine.opacity = 0;
        rightPauseLine.opacity = 0;
		
		// Pause the video
        sender.findName("videoHsiFinal_wmv").pause();

      }
    }
    else if(sender.name == "stopBUTTON")
    {
      // Stop the video
      sender.findName("videoHsiFinal_wmv").stop();
	  
	  	// alpha video 0
		var videoHsiFinal_wmv = sender.findName("videoHsiFinal_wmv");
		videoHsiFinal_wmv.opacity = 0;
		
		// alpha menu 1
		var buttonContainer = sender.findName("buttonContainer");
		buttonContainer.opacity = 1;
		
		// alpha clickVerVideo 1
		var clickVerVideo = sender.findName("clickVerVideo");
		clickVerVideo.opacity = 1;
		
		// alpha clickVerVideo 0
		var clickVerMenu = sender.findName("clickVerMenu");
		clickVerMenu.opacity = 0;

      // Because the user has stopped the video
      // then set the play/pause button back to the "play" state.
      var TriangPlay = sender.findName("TriangPlay");
      TriangPlay.opacity = 1;
      var leftPauseLine = sender.findName("leftPauseLine");
      var rightPauseLine = sender.findName("rightPauseLine");
      leftPauseLine.opacity = 0;
      rightPauseLine.opacity = 0;
    }
    else if(sender.name == "fullScreenButton")
    {
      // Run the animation for when the full screen button is clicked.
      sender.findName("fullScreenButtonStoryboard").begin();
    }
}