Reload <asp:Silverlight> control from Javascript?

I want to pass the value to initparameters dynamically from Javascript file, so i have written the function like this

<asp:Silverlight ID=“sl1” runat=“server” Width=“770” Height=“290”
Source="~/ClientBin/MyProj.xap">
</asp:Silverlight>
function A()
{
CallSLImageComp(1, 1, 0, ‘slCheck’);
var silverlightApp = document.getElementById(“trSL2”);
var parent = silverlightApp.parentNode;
parent.removeChild(silverlightApp);
parent.appendChild(silverlightApp);
}
function CallSLImage(data1, data2, data3,ControlName) {
var strParam = “data1=” + data1 + “,data2=” + data2 + “,data3=” + data3;
Sys.UI.Silverlight.Control.createObject(ControlName + ‘_parent’, ‘<object type=“application/x-silverlight” id=’+ControlName + ’ style=“height:290;width:770;”> <param name=“InitParams” value="’ + strParam + ‘"></param> <a href="[COLOR=#0000ff]http://go2.microsoft.com/fwlink/?LinkID=114576&v=1.0[/COLOR]"> <img src="[URL=“http://go2.microsoft.com/fwlink/?LinkID=108181”][COLOR=#0000ff]http://go2.microsoft.com/fwlink/?LinkID=108181[/COLOR]" alt=“Get Microsoft Silverlight” style=“border-width:0;” /></a></object>’);
}
at the first time, its working fine, but if i call the same function again then Silverlight control is not initializing, so that Silverlight control not have any output,
Experts please tell me what is the wrong the code?
'); } at the first time, its working fine, but if i call the same function again then Silverlight control is not initializing, so that Silverlight control not have any output, Experts please tell me what is the wrong the code?