﻿function opennewvideowin(url, name, features) {
    window.open(url, name, features);
}


function opennewwin(url, name, width, height) {
    width = width + 16;
    width = "width=" + width;
    height = ",height=" + height;
    features = width + height + ", scrollbars = 1";
    window.open(url, name, features);
}

function embedQT(moviename, width, height) {
    height += 16;  // padding for controler

    document.write("<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' WIDTH='" + width + "' HEIGHT='" + height + "' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab'>");
    document.write("<param name='src' value='" + moviename + "' />");
    document.write("<param name='autoplay' value='false'>");
    document.write("<param name='controller' value='true'>");
    document.write("<param name='loop' value='false'>");
    document.write("<param name='width' value='" + width + "'>");
    document.write("<param name='height' value='" + height + "'>");
    document.write("<EMBED src='" + moviename + "' width='" + width + "' height='" + height + "' autoplay='false' controller='true' loop='false' pluginspage='http://www.apple.com/quicktime/download/'></EMBED>");
    document.write("</object>\n");

}


function embedMP3(filename) {
    document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"');
    document.write('codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="300" height="16">');

    document.write('<param name="src" value="' + filename + '" />');
    document.write('<param name="controller" value="true" />');
    document.write('<param name="autoplay" value="false" />');
    document.write('<param name="autostart" value="0" />');
    document.write('<param name="pluginspage" value="http://www.apple.com/quicktime/download/" />');

    document.write('<!--[if !IE]> <-->');

    document.write('<object type="audio/x-mpeg" data="' + filename + '" width="300" height="16">');
    document.write('<param name="src" value="' + filename + '" />');
    document.write('<param name="controller" value="true" />');
    document.write('<param name="autoplay" value="false" />');
    document.write('<param name="autostart" value="0" />');
    document.write('<param name="pluginurl" value="http://www.apple.com/quicktime/download/" />');

    document.write('</object>');

    document.write('<!--> <![endif]-->');

    document.write('</object>');
}


function embedWMV(moviename, width, height) {

    width = 1000;
    height = 1200;

    document.write("<OBJECT ID='MediaPlayer' WIDTH='" + width + "' HEIGHT='" + height + "' CLASSID='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' STANDBY='Loading Windows Media Player components...' TYPE='application/x-oleobject'>");
    document.write("<PARAM NAME='FileName' VALUE='" + moviename + ">");
    document.write("<PARAM name='autostart' VALUE='false'>");
    document.write("<PARAM name='ShowControls' VALUE='true'>");
    document.write("<param name='ShowStatusBar' value='true'>");
    document.write("<PARAM name='ShowDisplay' VALUE='true'>");
    document.write("<EMBED TYPE='application/x-mplayer2' SRC='" + moviename + "' NAME='MediaPlayer' WIDTH='" + width + "' HEIGHT='" + height + "' ShowControls='1' ShowStatusBar='1' ShowDisplay='1' autostart='1'> </EMBED>");
    document.write("</OBJECT>");
}