

function Silverlight2Controller()
{
	this.Format = Format.MP3;
	this.internalController = null;
}

Silverlight2Controller.GetInstance = function()
{
	if( ! Silverlight2Controller.__instance )
	{
		Silverlight2Controller.__instance = new Silverlight2Controller();
	}
	
	return Silverlight2Controller.__instance;
}

Silverlight2Controller.prototype.Destroy = function()
{
   this.internalController = null;
}


Silverlight2Controller.prototype.Play = function( pVideo )
{
        var showErrors = false;

        var bg = "";
        var w = 416;
        var h = 312;

		var tag = '<object data="data:application/x-silverlight-2," type="application/x-silverlight-2"' + ' width="' + w + '" height="' + h + '" id="slp" >';
		tag += '\n<param name="source" value="Silverlight2Player/"/>';
		tag += '\n<param name="minRuntimeVersion" value="2.0.30923.0" />';
	
		if (showErrors == true) 
		{
		    tag += '\n<param name="onerror" value="onSilverlightError" />';
		}
		
		if (bg.length > 0) 
		{
		    tag += '\n<param name="background" value="' + bg + '" />';
		}
		
		tag += '<param name="MaxFrameRate" value="30" />';
		tag += '\n<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">';
		tag += '<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/></a>';
		tag += '<param name="initparams" value="showstatistics=false, autoplay=true, muted=false, playlistoverlay=false, stretchmode=Fit, stretchmodefullscreen=Fit, mediasource=    ">';

		tag += '\n</object>';


        alert("Attempting to Play: " + pVideo.Url);
        alert("here is the embed code: " + tag);
}


Silverlight2Controller.prototype.LoadHtml = function()
{
    alert("Attempting to LoadHtml: " + pVideo.Url);
}
