function Show_Vid(type, Yvid, Width, Height) {
xScroll = document.body.offsetWidth;
Centering = Math.round(xScroll/2)-Math.round(Width/2);
if(type == 'youtube') {
YoutubeVidDiv = document.getElementById('YoutubeVid');
if(YoutubeVidDiv) { if(YoutubeVidDiv.style.display == 'block') { YoutubeVidDiv.style.display = 'none'; } }
Body = document.getElementsByTagName('body').item(0);
var ObjYoutubeVid = document.createElement('div');
ObjYoutubeVid.setAttribute('id', 'YoutubeVid');
ObjYoutubeVid.style.position = 'absolute';
ObjYoutubeVid.style.display = 'block';
ObjYoutubeVid.style.backgroundColor = '#ffffff';
ObjYoutubeVid.style.left = Centering+'px';
ObjYoutubeVid.style.top = '20%';
ObjYoutubeVid.style.width = Width;
ObjYoutubeVid.style.height = Height;
ObjYoutubeVid.innerHTML = '<object width="'+Width+'" height="'+Height+'"><param name="movie" value="http://www.youtube.com/v/'+Yvid+'&autoplay=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'+Yvid+'&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="'+Width+'" height="'+Height+'"><\/embed><\/object>';
Body.insertBefore(ObjYoutubeVid, Body.firstChild);
}
}In FF doet dit het wel gewoon en in IE niet... Ziet iemand mischien de fout/bug waardoor die het in IE niet doet? Firebug geeft iig geen fouten aan.
Verder als ik gewoon "bla" inplaats van dit er neer zet:
<object width="'+Width+'" height="'+Height+'"><param name="movie" value="http://www.youtube.com/v/'+Yvid+'&autoplay=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'+Yvid+'&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="'+Width+'" height="'+Height+'"><\/embed><\/object>Zie ik wel gewoon bla staan...
[edit]Splaakgeblek[/edit]
[edit]Het flash object laad ook niet in IE.[/edit]