-
+ 5D196D1DDC8DCD0892D4831ED7015755082656F4F78D24618AB9E756C7779FB35F9C777CA5389BF31B394B6D492C97744694E6510FBA82194C523C3137974A03
mp-wp/wp-includes/js/tinymce/plugins/media/js/media.js
(0 . 0)(1 . 630)
120739 tinyMCEPopup.requireLangPack();
120740
120741 var oldWidth, oldHeight, ed, url;
120742
120743 if (url = tinyMCEPopup.getParam("media_external_list_url"))
120744 document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
120745
120746 function init() {
120747 var pl = "", f, val;
120748 var type = "flash", fe, i;
120749
120750 ed = tinyMCEPopup.editor;
120751
120752 tinyMCEPopup.resizeToInnerSize();
120753 f = document.forms[0]
120754
120755 fe = ed.selection.getNode();
120756 if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
120757 pl = fe.title;
120758
120759 switch (ed.dom.getAttrib(fe, 'class')) {
120760 case 'mceItemFlash':
120761 type = 'flash';
120762 break;
120763
120764 case 'mceItemFlashVideo':
120765 type = 'flv';
120766 break;
120767
120768 case 'mceItemShockWave':
120769 type = 'shockwave';
120770 break;
120771
120772 case 'mceItemWindowsMedia':
120773 type = 'wmp';
120774 break;
120775
120776 case 'mceItemQuickTime':
120777 type = 'qt';
120778 break;
120779
120780 case 'mceItemRealMedia':
120781 type = 'rmp';
120782 break;
120783 }
120784
120785 document.forms[0].insert.value = ed.getLang('update', 'Insert', true);
120786 }
120787
120788 document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
120789 document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media');
120790 document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
120791
120792 var html = getMediaListHTML('medialist','src','media','media');
120793 if (html == "")
120794 document.getElementById("linklistrow").style.display = 'none';
120795 else
120796 document.getElementById("linklistcontainer").innerHTML = html;
120797
120798 // Resize some elements
120799 if (isVisible('filebrowser'))
120800 document.getElementById('src').style.width = '230px';
120801
120802 // Setup form
120803 if (pl != "") {
120804 pl = tinyMCEPopup.editor.plugins.media._parse(pl);
120805
120806 switch (type) {
120807 case "flash":
120808 setBool(pl, 'flash', 'play');
120809 setBool(pl, 'flash', 'loop');
120810 setBool(pl, 'flash', 'menu');
120811 setBool(pl, 'flash', 'swliveconnect');
120812 setStr(pl, 'flash', 'quality');
120813 setStr(pl, 'flash', 'scale');
120814 setStr(pl, 'flash', 'salign');
120815 setStr(pl, 'flash', 'wmode');
120816 setStr(pl, 'flash', 'base');
120817 setStr(pl, 'flash', 'flashvars');
120818 break;
120819
120820 case "qt":
120821 setBool(pl, 'qt', 'loop');
120822 setBool(pl, 'qt', 'autoplay');
120823 setBool(pl, 'qt', 'cache');
120824 setBool(pl, 'qt', 'controller');
120825 setBool(pl, 'qt', 'correction');
120826 setBool(pl, 'qt', 'enablejavascript');
120827 setBool(pl, 'qt', 'kioskmode');
120828 setBool(pl, 'qt', 'autohref');
120829 setBool(pl, 'qt', 'playeveryframe');
120830 setBool(pl, 'qt', 'tarsetcache');
120831 setStr(pl, 'qt', 'scale');
120832 setStr(pl, 'qt', 'starttime');
120833 setStr(pl, 'qt', 'endtime');
120834 setStr(pl, 'qt', 'tarset');
120835 setStr(pl, 'qt', 'qtsrcchokespeed');
120836 setStr(pl, 'qt', 'volume');
120837 setStr(pl, 'qt', 'qtsrc');
120838 break;
120839
120840 case "shockwave":
120841 setBool(pl, 'shockwave', 'sound');
120842 setBool(pl, 'shockwave', 'progress');
120843 setBool(pl, 'shockwave', 'autostart');
120844 setBool(pl, 'shockwave', 'swliveconnect');
120845 setStr(pl, 'shockwave', 'swvolume');
120846 setStr(pl, 'shockwave', 'swstretchstyle');
120847 setStr(pl, 'shockwave', 'swstretchhalign');
120848 setStr(pl, 'shockwave', 'swstretchvalign');
120849 break;
120850
120851 case "wmp":
120852 setBool(pl, 'wmp', 'autostart');
120853 setBool(pl, 'wmp', 'enabled');
120854 setBool(pl, 'wmp', 'enablecontextmenu');
120855 setBool(pl, 'wmp', 'fullscreen');
120856 setBool(pl, 'wmp', 'invokeurls');
120857 setBool(pl, 'wmp', 'mute');
120858 setBool(pl, 'wmp', 'stretchtofit');
120859 setBool(pl, 'wmp', 'windowlessvideo');
120860 setStr(pl, 'wmp', 'balance');
120861 setStr(pl, 'wmp', 'baseurl');
120862 setStr(pl, 'wmp', 'captioningid');
120863 setStr(pl, 'wmp', 'currentmarker');
120864 setStr(pl, 'wmp', 'currentposition');
120865 setStr(pl, 'wmp', 'defaultframe');
120866 setStr(pl, 'wmp', 'playcount');
120867 setStr(pl, 'wmp', 'rate');
120868 setStr(pl, 'wmp', 'uimode');
120869 setStr(pl, 'wmp', 'volume');
120870 break;
120871
120872 case "rmp":
120873 setBool(pl, 'rmp', 'autostart');
120874 setBool(pl, 'rmp', 'loop');
120875 setBool(pl, 'rmp', 'autogotourl');
120876 setBool(pl, 'rmp', 'center');
120877 setBool(pl, 'rmp', 'imagestatus');
120878 setBool(pl, 'rmp', 'maintainaspect');
120879 setBool(pl, 'rmp', 'nojava');
120880 setBool(pl, 'rmp', 'prefetch');
120881 setBool(pl, 'rmp', 'shuffle');
120882 setStr(pl, 'rmp', 'console');
120883 setStr(pl, 'rmp', 'controls');
120884 setStr(pl, 'rmp', 'numloop');
120885 setStr(pl, 'rmp', 'scriptcallbacks');
120886 break;
120887 }
120888
120889 setStr(pl, null, 'src');
120890 setStr(pl, null, 'id');
120891 setStr(pl, null, 'name');
120892 setStr(pl, null, 'vspace');
120893 setStr(pl, null, 'hspace');
120894 setStr(pl, null, 'bgcolor');
120895 setStr(pl, null, 'align');
120896 setStr(pl, null, 'width');
120897 setStr(pl, null, 'height');
120898
120899 if ((val = ed.dom.getAttrib(fe, "width")) != "")
120900 pl.width = f.width.value = val;
120901
120902 if ((val = ed.dom.getAttrib(fe, "height")) != "")
120903 pl.height = f.height.value = val;
120904
120905 oldWidth = pl.width ? parseInt(pl.width) : 0;
120906 oldHeight = pl.height ? parseInt(pl.height) : 0;
120907 } else
120908 oldWidth = oldHeight = 0;
120909
120910 selectByValue(f, 'media_type', type);
120911 changedType(type);
120912 updateColor('bgcolor_pick', 'bgcolor');
120913
120914 TinyMCE_EditableSelects.init();
120915 generatePreview();
120916 }
120917
120918 function insertMedia() {
120919 var fe, f = document.forms[0], h;
120920
120921 tinyMCEPopup.restoreSelection();
120922
120923 if (!AutoValidator.validate(f)) {
120924 tinyMCEPopup.alert(ed.getLang('invalid_data'));
120925 return false;
120926 }
120927
120928 f.width.value = f.width.value == "" ? 100 : f.width.value;
120929 f.height.value = f.height.value == "" ? 100 : f.height.value;
120930
120931 fe = ed.selection.getNode();
120932 if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
120933 switch (f.media_type.options[f.media_type.selectedIndex].value) {
120934 case "flash":
120935 fe.className = "mceItemFlash";
120936 break;
120937
120938 case "flv":
120939 fe.className = "mceItemFlashVideo";
120940 break;
120941
120942 case "shockwave":
120943 fe.className = "mceItemShockWave";
120944 break;
120945
120946 case "qt":
120947 fe.className = "mceItemQuickTime";
120948 break;
120949
120950 case "wmp":
120951 fe.className = "mceItemWindowsMedia";
120952 break;
120953
120954 case "rmp":
120955 fe.className = "mceItemRealMedia";
120956 break;
120957 }
120958
120959 if (fe.width != f.width.value || fe.height != f.height.height)
120960 ed.execCommand('mceRepaint');
120961
120962 fe.title = serializeParameters();
120963 fe.width = f.width.value;
120964 fe.height = f.height.value;
120965 fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : '');
120966 fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : '');
120967 fe.align = f.align.options[f.align.selectedIndex].value;
120968 } else {
120969 h = '<img src="' + tinyMCEPopup.getWindowArg("plugin_url") + '/img/trans.gif"' ;
120970
120971 switch (f.media_type.options[f.media_type.selectedIndex].value) {
120972 case "flash":
120973 h += ' class="mceItemFlash"';
120974 break;
120975
120976 case "flv":
120977 h += ' class="mceItemFlashVideo"';
120978 break;
120979
120980 case "shockwave":
120981 h += ' class="mceItemShockWave"';
120982 break;
120983
120984 case "qt":
120985 h += ' class="mceItemQuickTime"';
120986 break;
120987
120988 case "wmp":
120989 h += ' class="mceItemWindowsMedia"';
120990 break;
120991
120992 case "rmp":
120993 h += ' class="mceItemRealMedia"';
120994 break;
120995 }
120996
120997 h += ' title="' + serializeParameters() + '"';
120998 h += ' width="' + f.width.value + '"';
120999 h += ' height="' + f.height.value + '"';
121000 h += ' align="' + f.align.options[f.align.selectedIndex].value + '"';
121001
121002 h += ' />';
121003
121004 ed.execCommand('mceInsertContent', false, h);
121005 }
121006
121007 tinyMCEPopup.close();
121008 }
121009
121010 function updatePreview() {
121011 var f = document.forms[0], type;
121012
121013 f.width.value = f.width.value || '320';
121014 f.height.value = f.height.value || '240';
121015
121016 type = getType(f.src.value);
121017 selectByValue(f, 'media_type', type);
121018 changedType(type);
121019 generatePreview();
121020 }
121021
121022 function getMediaListHTML() {
121023 if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
121024 var html = "";
121025
121026 html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;updatePreview();">';
121027 html += '<option value="">---</option>';
121028
121029 for (var i=0; i<tinyMCEMediaList.length; i++)
121030 html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
121031
121032 html += '</select>';
121033
121034 return html;
121035 }
121036
121037 return "";
121038 }
121039
121040 function getType(v) {
121041 var fo, i, c, el, x, f = document.forms[0];
121042
121043 fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';');
121044
121045 // YouTube
121046 if (v.match(/watch\?v=(.+)(.*)/)) {
121047 f.width.value = '425';
121048 f.height.value = '350';
121049 f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1];
121050 return 'flash';
121051 }
121052
121053 // Google video
121054 if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) {
121055 f.width.value = '425';
121056 f.height.value = '326';
121057 f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en';
121058 return 'flash';
121059 }
121060
121061 for (i=0; i<fo.length; i++) {
121062 c = fo[i].split('=');
121063
121064 el = c[1].split(',');
121065 for (x=0; x<el.length; x++)
121066 if (v.indexOf('.' + el[x]) != -1)
121067 return c[0];
121068 }
121069
121070 return null;
121071 }
121072
121073 function switchType(v) {
121074 var t = getType(v), d = document, f = d.forms[0];
121075
121076 if (!t)
121077 return;
121078
121079 selectByValue(d.forms[0], 'media_type', t);
121080 changedType(t);
121081
121082 // Update qtsrc also
121083 if (t == 'qt' && f.src.value.toLowerCase().indexOf('rtsp://') != -1) {
121084 alert(ed.getLang("media_qt_stream_warn"));
121085
121086 if (f.qt_qtsrc.value == '')
121087 f.qt_qtsrc.value = f.src.value;
121088 }
121089 }
121090
121091 function changedType(t) {
121092 var d = document;
121093
121094 d.getElementById('flash_options').style.display = 'none';
121095 d.getElementById('flv_options').style.display = 'none';
121096 d.getElementById('qt_options').style.display = 'none';
121097 d.getElementById('shockwave_options').style.display = 'none';
121098 d.getElementById('wmp_options').style.display = 'none';
121099 d.getElementById('rmp_options').style.display = 'none';
121100
121101 if (t)
121102 d.getElementById(t + '_options').style.display = 'block';
121103 }
121104
121105 function serializeParameters() {
121106 var d = document, f = d.forms[0], s = '';
121107
121108 switch (f.media_type.options[f.media_type.selectedIndex].value) {
121109 case "flash":
121110 s += getBool('flash', 'play', true);
121111 s += getBool('flash', 'loop', true);
121112 s += getBool('flash', 'menu', true);
121113 s += getBool('flash', 'swliveconnect', false);
121114 s += getStr('flash', 'quality');
121115 s += getStr('flash', 'scale');
121116 s += getStr('flash', 'salign');
121117 s += getStr('flash', 'wmode');
121118 s += getStr('flash', 'base');
121119 s += getStr('flash', 'flashvars');
121120 break;
121121
121122 case "qt":
121123 s += getBool('qt', 'loop', false);
121124 s += getBool('qt', 'autoplay', true);
121125 s += getBool('qt', 'cache', false);
121126 s += getBool('qt', 'controller', true);
121127 s += getBool('qt', 'correction', false, 'none', 'full');
121128 s += getBool('qt', 'enablejavascript', false);
121129 s += getBool('qt', 'kioskmode', false);
121130 s += getBool('qt', 'autohref', false);
121131 s += getBool('qt', 'playeveryframe', false);
121132 s += getBool('qt', 'targetcache', false);
121133 s += getStr('qt', 'scale');
121134 s += getStr('qt', 'starttime');
121135 s += getStr('qt', 'endtime');
121136 s += getStr('qt', 'target');
121137 s += getStr('qt', 'qtsrcchokespeed');
121138 s += getStr('qt', 'volume');
121139 s += getStr('qt', 'qtsrc');
121140 break;
121141
121142 case "shockwave":
121143 s += getBool('shockwave', 'sound');
121144 s += getBool('shockwave', 'progress');
121145 s += getBool('shockwave', 'autostart');
121146 s += getBool('shockwave', 'swliveconnect');
121147 s += getStr('shockwave', 'swvolume');
121148 s += getStr('shockwave', 'swstretchstyle');
121149 s += getStr('shockwave', 'swstretchhalign');
121150 s += getStr('shockwave', 'swstretchvalign');
121151 break;
121152
121153 case "wmp":
121154 s += getBool('wmp', 'autostart', true);
121155 s += getBool('wmp', 'enabled', false);
121156 s += getBool('wmp', 'enablecontextmenu', true);
121157 s += getBool('wmp', 'fullscreen', false);
121158 s += getBool('wmp', 'invokeurls', true);
121159 s += getBool('wmp', 'mute', false);
121160 s += getBool('wmp', 'stretchtofit', false);
121161 s += getBool('wmp', 'windowlessvideo', false);
121162 s += getStr('wmp', 'balance');
121163 s += getStr('wmp', 'baseurl');
121164 s += getStr('wmp', 'captioningid');
121165 s += getStr('wmp', 'currentmarker');
121166 s += getStr('wmp', 'currentposition');
121167 s += getStr('wmp', 'defaultframe');
121168 s += getStr('wmp', 'playcount');
121169 s += getStr('wmp', 'rate');
121170 s += getStr('wmp', 'uimode');
121171 s += getStr('wmp', 'volume');
121172 break;
121173
121174 case "rmp":
121175 s += getBool('rmp', 'autostart', false);
121176 s += getBool('rmp', 'loop', false);
121177 s += getBool('rmp', 'autogotourl', true);
121178 s += getBool('rmp', 'center', false);
121179 s += getBool('rmp', 'imagestatus', true);
121180 s += getBool('rmp', 'maintainaspect', false);
121181 s += getBool('rmp', 'nojava', false);
121182 s += getBool('rmp', 'prefetch', false);
121183 s += getBool('rmp', 'shuffle', false);
121184 s += getStr('rmp', 'console');
121185 s += getStr('rmp', 'controls');
121186 s += getStr('rmp', 'numloop');
121187 s += getStr('rmp', 'scriptcallbacks');
121188 break;
121189 }
121190
121191 s += getStr(null, 'id');
121192 s += getStr(null, 'name');
121193 s += getStr(null, 'src');
121194 s += getStr(null, 'align');
121195 s += getStr(null, 'bgcolor');
121196 s += getInt(null, 'vspace');
121197 s += getInt(null, 'hspace');
121198 s += getStr(null, 'width');
121199 s += getStr(null, 'height');
121200
121201 s = s.length > 0 ? s.substring(0, s.length - 1) : s;
121202
121203 return s;
121204 }
121205
121206 function setBool(pl, p, n) {
121207 if (typeof(pl[n]) == "undefined")
121208 return;
121209
121210 document.forms[0].elements[p + "_" + n].checked = pl[n];
121211 }
121212
121213 function setStr(pl, p, n) {
121214 var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n];
121215
121216 if (typeof(pl[n]) == "undefined")
121217 return;
121218
121219 if (e.type == "text")
121220 e.value = pl[n];
121221 else
121222 selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]);
121223 }
121224
121225 function getBool(p, n, d, tv, fv) {
121226 var v = document.forms[0].elements[p + "_" + n].checked;
121227
121228 tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'";
121229 fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'";
121230
121231 return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ',');
121232 }
121233
121234 function getStr(p, n, d) {
121235 var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
121236 var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
121237
121238 if (n == 'src')
121239 v = tinyMCEPopup.editor.convertURL(v, 'src', null);
121240
121241 return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',");
121242 }
121243
121244 function getInt(p, n, d) {
121245 var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
121246 var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
121247
121248 return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ",");
121249 }
121250
121251 function jsEncode(s) {
121252 s = s.replace(new RegExp('\\\\', 'g'), '\\\\');
121253 s = s.replace(new RegExp('"', 'g'), '\\"');
121254 s = s.replace(new RegExp("'", 'g'), "\\'");
121255
121256 return s;
121257 }
121258
121259 function generatePreview(c) {
121260 var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh;
121261
121262 p.innerHTML = '<!-- x --->';
121263
121264 nw = parseInt(f.width.value);
121265 nh = parseInt(f.height.value);
121266
121267 if (f.width.value != "" && f.height.value != "") {
121268 if (f.constrain.checked) {
121269 if (c == 'width' && oldWidth != 0) {
121270 wp = nw / oldWidth;
121271 nh = Math.round(wp * nh);
121272 f.height.value = nh;
121273 } else if (c == 'height' && oldHeight != 0) {
121274 hp = nh / oldHeight;
121275 nw = Math.round(hp * nw);
121276 f.width.value = nw;
121277 }
121278 }
121279 }
121280
121281 if (f.width.value != "")
121282 oldWidth = nw;
121283
121284 if (f.height.value != "")
121285 oldHeight = nh;
121286
121287 // After constrain
121288 pl = serializeParameters();
121289
121290 switch (f.media_type.options[f.media_type.selectedIndex].value) {
121291 case "flash":
121292 cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
121293 codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
121294 type = 'application/x-shockwave-flash';
121295 break;
121296
121297 case "shockwave":
121298 cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000';
121299 codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
121300 type = 'application/x-director';
121301 break;
121302
121303 case "qt":
121304 cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
121305 codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
121306 type = 'video/quicktime';
121307 break;
121308
121309 case "wmp":
121310 cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6';
121311 codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
121312 type = 'application/x-mplayer2';
121313 break;
121314
121315 case "rmp":
121316 cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';
121317 codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
121318 type = 'audio/x-pn-realaudio-plugin';
121319 break;
121320 }
121321
121322 if (pl == '') {
121323 p.innerHTML = '';
121324 return;
121325 }
121326
121327 pl = tinyMCEPopup.editor.plugins.media._parse(pl);
121328
121329 if (!pl.src) {
121330 p.innerHTML = '';
121331 return;
121332 }
121333
121334 pl.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(pl.src);
121335 pl.width = !pl.width ? 100 : pl.width;
121336 pl.height = !pl.height ? 100 : pl.height;
121337 pl.id = !pl.id ? 'obj' : pl.id;
121338 pl.name = !pl.name ? 'eobj' : pl.name;
121339 pl.align = !pl.align ? '' : pl.align;
121340
121341 // Avoid annoying warning about insecure items
121342 if (!tinymce.isIE || document.location.protocol != 'https:') {
121343 h += '<object classid="' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';
121344
121345 for (n in pl) {
121346 h += '<param name="' + n + '" value="' + pl[n] + '">';
121347
121348 // Add extra url parameter if it's an absolute URL
121349 if (n == 'src' && pl[n].indexOf('://') != -1)
121350 h += '<param name="url" value="' + pl[n] + '" />';
121351 }
121352 }
121353
121354 h += '<embed type="' + type + '" ';
121355
121356 for (n in pl)
121357 h += n + '="' + pl[n] + '" ';
121358
121359 h += '></embed>';
121360
121361 // Avoid annoying warning about insecure items
121362 if (!tinymce.isIE || document.location.protocol != 'https:')
121363 h += '</object>';
121364
121365 p.innerHTML = "<!-- x --->" + h;
121366 }
121367
121368 tinyMCEPopup.onInit.add(init);