dialog.set_title(editor.GetLangText("insertyoutube"));
setTimeout(function(){self.focus();},300);
setTimeout(function(){instance.ParseUrl()},100);
instance._dimunlocked=!instance._dimunlocked;
self.set_src(instance._dimunlocked?"{folder}images/unlocked.gif":"{folder}images/locked.gif");
instance.onwidthchange();
instance.onheightchange();
";
]]>
var html=self.GenerateHTML();
if(!html)return;
var newoption={};
newoption.width=self.lastwidth;
newoption.height=self.lastheight;
newoption.htmlcode=html;
editor.ShowXmlDialog(editor.BuildDialogUrl("htmlpreview.xml"),newoption);