function playVideo(link) { var dialog = new dijit.Dialog({ title: "Media Player", style: "text-align: center;" }); dojo.connect(dialog, "show", dialog, function() { var videoDiv = document.createElement("div"); videoDiv.innerHTML = " ";; dialog.setContent(videoDiv); flowplayer("player", "/Registry/javascript/flowplayer/flowplayer-3.2.7.swf"); }); dojo.connect(dialog, "hide", dialog, function() { dialog.setContent(""); }); dialog.show(); }