Executing jscript from c#

I have an embedded video file that I want to execute when a different link is clicked, but I am not sure how to do that.

Here is my html:

<asp: panel id=“Panel1” style=“display:none” runat=“server”>
<script type=“text/javascript” src=“http://video.foxnews.com/v/embed.js?id=3985902&w=400&h=249”></script><noscript>Watch the latest news video at <a href=“http://video.foxnews.com/”>video.foxnews.com</a></noscript>
</asp:panel>
<asp: panel id=“Panel2” style=“display:inherit” runat=“server”>
<a onclick=“nVidSwitch”><img src=“/Images/mAmerNew0126.jpg”></a></asp: panel>

my code behind in c#

protected void nVidSwitch()
{
    Panel2.Style.Add(HtmlTextWriterStyle.Display, "none");
    Panel1.Style.Add(HtmlTextWriterStyle.Display, "inherit");
}

So when panel2 is clicked i want to hide it, display panel1, and have the video start playing. I know how to hide/display the panels, but I dont know how to program a “click”.

I made some small changes to my code above (because it doesnt work as listed).

And I am also wondering if this can be accomplished without doing a call back to the server

yes, it can be gone purely in JS. If you use jQuery it will be even easier. Put it in divs with display none that are not runat server and have ids.

then on click document.getElementById(“divID”).style.display = “none”;

I am not 100% sure if that syntax is how its done as I have not used plain js in a very long time. Always via jQuery. But use the IDE intellisense and you should find what you are looking for.