window.onload = newWinLinks;

function newWinLinks() {
    for (var i=0; i<document.links.length; i++) {
        if (document.links[i].className == "newWin") {
            document.links[i].onclick = newWindow;
        }
    }
}

function newWindow() {
    var leftpos = screen.availWidth/2 - 208;
    var toppos = screen.availHeight/2 - 300;
    var videoWindow = window.open(this.href,"videoWin","width=415,height=390,location=no,scrollbars=no,toolbar=nomenubar=no,status=no,resizeable=no,left="+leftpos+",top="+toppos);
    videoWindow.focus();
    return false;
}


/*
    document.write ('<OBJECT ID=MediaPlayer ');
    document.write ('CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 ');
    document.write ('CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 ');
    document.write ('standby="Loading Microsoft Windows Media Player components..." ');
    document.write ('TYPE="application/x-oleobject" width="400" height="372">');
    document.write ('<PARAM NAME="FileName" VALUE="../uploaded_media/Web_01_Welcome.wmv">');
    document.write ('<PARAM NAME="AutoStart" VALUE="true">');
    document.write ('<PARAM NAME="ShowControls" VALUE="1">');
    document.write ('<PARAM NAME="ShowStatusBar" VALUE="1">');
    document.write ('<PARAM NAME="ShowDisplay" VALUE="0">');
    document.write ('    <Embed type="application/x-mplayer2"');
    document.write ('        pluginspage="http://www.microsoft.com/windows/windowsmedia/"');
    document.write ('        filename="../uploaded_media/Web_01_Welcome.wmv"');
    document.write ('        src="../uploaded_media/Web_01_Welcome.wmv"');
    document.write ('        Name=MediaPlayer');
    document.write ('        autostart=1');
    document.write ('        ShowControls=1');
    document.write ('        ShowStatusBar=1');
    document.write ('        ShowDisplay=0');
    document.write ('        width=400');
    document.write ('        height=372>');
    document.write ('    </embed>');  
    document.write ('</OBJECT>');
*/