﻿if (!window.PracticeFromBook)
	PracticeFromBook = {};

PracticeFromBook.Page = function() 
{
}

PracticeFromBook.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("Storyboard1").Begin();
	//}
}
function showName(sender, args)
{
    var theMessage = sender.findName("messageBox");
    if (sender.name=="Merlin")
    {
        theMessage["Canvas.Top"]="10"
		theMessage["Canvas.Left"]="6"
		theMessage.text= "Merlin";
         

    }
    else if (sender.name=="Jello")
    {
        theMessage.text="Jello";
        theMessage["Canvas.Top"]="206"
		theMessage["Canvas.Left"]="10"
       // theMessage.Canvas.Left="10" ;
        //theMessage.Top="206";
    }
    else if(sender.name=="Puddin")
    {
       theMessage["Canvas.Top"]="258"
		theMessage["Canvas.Left"]="237"
       //theMessage.Canvas.Left="237" ;
      // theMessage.Canvas.Top="258";
        theMessage.text="Puddin";
    }
    else if (sender.name=="Boz")
    {
    	theMessage["Canvas.Top"]="33"
		theMessage["Canvas.Left"]="259"
    	//theMessage.Canvas.Left="259" ;
        // theMessage.Canvas.Top="33";
    	theMessage.text="Boz";
    }
 }
 function leaveit(sender, args)
 {  
    var theMessage = sender.findName("messageBox");
    theMessage["Canvas.Top"]="30"
		theMessage["Canvas.Left"]="368"
   // theMessage.Canvas.Left="367.667" ;
    //theMessage.Canvas.Top="30";
    theMessage.text=" ";
    
 }
