109 lines
5.8 KiB
JavaScript
109 lines
5.8 KiB
JavaScript
|
|
function WriteFlash(w,h,path)
|
|
{
|
|
var txt;
|
|
if(path.indexOf('.swf')!=-1){
|
|
|
|
txt="<object classid='clsid:D27CDB6E-AE6D-11CF-96B8-444553540000' id='obj1' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'";
|
|
if(h==0){
|
|
txt+="border='0' width='" + w + "' VIEWASTEXT>";
|
|
}else{
|
|
txt+="border='0' width='" + w + "' height='" + h + "' VIEWASTEXT>";
|
|
}
|
|
|
|
txt+="<param name='movie' value='" + path + "'>";
|
|
txt+="<param name='quality' value='High'>";
|
|
txt += "<embed src='" + path + "' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' type='application/x-shockwave-flash' name='obj1' width='" + w + "'";
|
|
if(h==0){
|
|
txt+="></object>";
|
|
}else{
|
|
txt+=" height='" + h + "'></object>";
|
|
}
|
|
|
|
}else if(path.indexOf('.flv')!=-1){
|
|
txt+="<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=../swf/player.swf?vcastr_title=" + title;
|
|
txt+="&vcastr_file=" + path;
|
|
if(h==0){
|
|
txt+=" width=" + w + " ";
|
|
}else{
|
|
txt+=" width=" + w + " height=" + h;
|
|
}
|
|
txt+=" type=application/x-shockwave-flash quality=\"high\" wmode=\"transparent\" showMovieInfo=\"0\"></EMBED>";
|
|
}else if(path==""){
|
|
txt="";
|
|
}else{
|
|
if(h==0){
|
|
txt="<img src='" + path + "' width='" + w + "' border='0'>";
|
|
}else{
|
|
txt="<img src='" + path + "' width='" + w + "' height='" + h + "' border='0'>";
|
|
}
|
|
}
|
|
document.write(txt);
|
|
}
|
|
|
|
function WriteFlash2(w,h,path)
|
|
{
|
|
var txt;
|
|
if(path.indexOf('.swf')!=-1){
|
|
txt="<object classid='clsid:D27CDB6E-AE6D-11CF-96B8-444553540000' id='obj1' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'";
|
|
txt+="border='0' width='" + w + "' height='" + h + "' VIEWASTEXT>";
|
|
txt+="<param name='movie' value='" + path + "'>";
|
|
txt+="<param name='quality' value='High'>";
|
|
txt+="<PARAM NAME='wmode' VALUE='transparent'>";
|
|
txt+="<embed src='" + path + "' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' type='application/x-shockwave-flash' name='obj1' width='" + w + "' height='" + h + "'></object>";
|
|
}else if(path.indexOf('.flv')!=-1){
|
|
txt+="<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=../swf/player.swf?vcastr_title=" + title;
|
|
txt+="&vcastr_file=" + path;
|
|
if(h==0){
|
|
txt+=" width=" + w + " ";
|
|
}else{
|
|
txt+=" width=" + w + " height=" + h;
|
|
}
|
|
txt+=" type=application/x-shockwave-flash quality=\"high\" wmode=\"transparent\" showMovieInfo=\"0\"></EMBED>";
|
|
}else{
|
|
txt="<img src='" + path + "' width='" + w + "' height='" + h + "' border='0'>";
|
|
}
|
|
document.write(txt);
|
|
}
|
|
function WriteFlash3() {
|
|
var txt = '';
|
|
txt += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="Fobj1" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"';
|
|
txt += 'width="' + focus_width + '" height="' + swf_height + '">';
|
|
txt += '<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/swf/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF">';
|
|
txt += '<param name="menu" value="false"><param name=wmode value="opaque">';
|
|
txt += '<param name="FlashVars" value="bcastr_file=' + pics + '&bcastr_link=' + links + '&bcastr_title=' + texts + '&bcastr_config=0x000000|1|0xEEEFFF|60|0xffffff|0x096454|0x020507|8|3|1|_blank">';
|
|
txt += '<embed src="/swf/pixviewer.swf" wmode="opaque" FlashVars="bcastr_file=' + pics + '&bcastr_link=' + links + '&bcastr_title=' + texts + '&bcastr_config=0x000000|1|0xEEEFFF|60|0xffffff|0x096454|0x020507|8|3|1|_blank" menu="false" bgcolor="#FFFFFF" quality="high" width="' + focus_width + '" height="' + focus_height + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
|
|
txt += '</object>';
|
|
document.write(txt);
|
|
}
|
|
function WriteVideo(w,h,title,path)
|
|
{
|
|
var txt="";
|
|
if(path.indexOf('.swf')!=-1){
|
|
txt="<object classid='clsid:D27CDB6E-AE6D-11CF-96B8-444553540000' id='obj1' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'";
|
|
txt+="border='0' width='" + w + "' height='" + h + "' VIEWASTEXT>";
|
|
txt+="<param name='movie' value='" + path + "'>";
|
|
txt+="<param name='quality' value='High'>";
|
|
txt+="<PARAM NAME='wmode' VALUE='transparent'>";
|
|
txt+="<embed src='" + path + "' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' name='obj1' width='" + w + "' height='" + h + "'></object>";
|
|
}else if(path.indexOf('.flv')!=-1){
|
|
txt+="<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=../swf/player.swf?vcastr_title=" + title;
|
|
txt+="&vcastr_file=" + path;
|
|
txt+=" width=" + w + " height=" + h;
|
|
txt+=" type=application/x-shockwave-flash quality=\"high\" wmode=\"transparent\" showMovieInfo=\"0\"></EMBED>";
|
|
}else{
|
|
txt+="<OBJECT ID=\"MPlayer\" width=\"" + w + "\" height=\"" + h + "\" type=\"application/x-oleobject\"";
|
|
txt+="CODEBASR=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\"";
|
|
txt+="STANDBY=\"Loading Media Player components...\" align=\"middle\"";
|
|
txt+="CLASSID=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\">";
|
|
txt+="<PARAM NAME=\"FileName\" VALUE=\"" + path + "\">";
|
|
txt+="<PARAM NAME=\"AutoStart\" VALUE=\"true\">";
|
|
txt+="<PARAM NAME=\"AnimationAtStart\" VALUE=\"true\">";
|
|
txt+="<PARAM NAME=\"ShowControls\" VALUE=\"true\">";
|
|
txt+="<PARAM NAME=\"ClickToPlay\" VALUE=\"true\">";
|
|
txt+="<PARAM NAME=\"EnableContextMenu\" VALUE=\"true\">";
|
|
txt+="</OBJECT>";
|
|
}
|
|
document.write(txt);
|
|
}
|