// WinMedia player - width plus 6 and height plus 58 
function wmpplayntv() {
var str='';
str+='<object width="246" height="228" classid="clsid:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http:\/\/activex.microsoft.com\/activex\/controls\/mplayer\/en\/nsmp2inf.cab#Version=6,4,7,1112">';
str+='<param name="filename" value="http:\/\/www.centralnavyband.ru\/inc\/news2.wmv" \/>';
str+='<param name="showcontrols" value="true" \/>';
str+='<param name="showstatusbar" value="false" \/>';
str+='<param name="showdisplay" value="false" \/>';
str+='<param name="autostart" value="false" \/>';
str+='<param name="videoborderwidth" value="3" \/>';
str+='<param name="videobordercolor" value="6666ee" \/>';
str+='<embed name="news2" width="246" height="228" type="application\/x-mplayer2" src="http:\/\/www.centralnavyband.ru\/inc\/news2.wmv" showcontrols="1" showstatusbar="0" showdisplay="0" autostart="0" videoborderwidth="3" videobordercolor="6666ee" \><\/embed>';
str+='<\/object>';
document.write(str); 
}
var wmpntv ='<object width=\"246\" height=\"228\" classid=\"clsid:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" codebase=\"http:\/\/activex.microsoft.com\/activex\/controls\/mplayer\/en\/nsmp2inf.cab#Version=6,4,7,1112\"><param name=\"filename\" value=\"http:\/\/www.centralnavyband.ru\/inc\/news2.wmv\" \/><param name=\"showcontrols\" value=\"true\" \/><param name=\"showstatusbar\" value=\"false\" \/><param name=\"showdisplay\" value=\"false\" \/><param name=\"autostart\" value=\"true\" \/><param name=\"videoborderwidth\" value=\"3\" \/><param name=\"videobordercolor\" value="6666ee" \/><embed name=\"news2\" width=\"246\" height=\"228\" type=\"application\/x-mplayer2\" src=\"http:\/\/www.centralnavyband.ru\/inc\/news2.wmv\" showcontrols=\"1\" showstatusbar=\"0\" showdisplay=\"0\" autostart=\"1\" videoborderwidth=\"3\" videobordercolor=\"6666ee\" \><\/embed><\/object>';

// QuickTime player - width plus 6 and height plus 28
function qtplayntv() {
var str='';
str+='<object width="246" height="198" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http:\/\/www.apple.com\/qtactivex\/qtplugin.cab">';
str+='<param name="src" value="http:\/\/www.centralnavyband.ru\/inc\/news2.mov" \/>';
str+='<param name="type" value="video\/quicktime" \/>';
str+='<param name="autoplay" value="false" \/>';
str+='<param name="kioskmode" value="true" \/>';
str+='<param name="bgcolor" value="#6666ee" \/>';
str+='<embed pluginspage="http:\/\/www.apple.com\/quicktime\/download\/" src="http:\/\/www.centralnavyband.ru\/inc\/news2.mov"  width="246" height="198" type="video\/quicktime" autoplay="false" kioskmode="true" bgcolor="#6666ee"><\/embed>';
str+='<\/object>';
document.write(str); 
}
var qtntv = '<object width=\"246\" height=\"198\" classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" codebase=\"http:\/\/www.apple.com\/qtactivex\/qtplugin.cab\"><param name=\"src\" value=\"http:\/\/www.centralnavyband.ru\/inc\/news2.mov\" \/><param name=\"type\" value=\"video\/quicktime\" \/><param name=\"autoplay\" value=\"true\" \/><param name=\"kioskmode\" value=\"true\" \/><param name=\"bgcolor\" value=\"#6666ee\" \/><embed pluginspage=\"http:\/\/www.apple.com\/quicktime\/download\/\" src=\"http:\/\/www.centralnavyband.ru\/inc\/news2.mov\"  width=\"246\" height=\"198\" type=\"video\/quicktime\" autoplay=\"true\" kioskmode=\"true\" bgcolor=\"#6666ee\"><\/embed><\/object>';

// No player found
function showplugins() {
document.getElementById('plugins').style.visibility = 'visible';
}
function hideplugins() {
document.getElementById('plugins').style.visibility = 'hidden';
}

// on News page, 
function newstwovideo() {
var havewmp = false;
if (navigator.plugins) {
for (i=0; i < navigator.plugins.length; i++ ) {
if (navigator.plugins[i].name.indexOf("Windows Media") >= 0) { 
havewmp = true; }
}
}
var haveqt = false;
if (navigator.plugins) {
for (i=0; i < navigator.plugins.length; i++ ) {
if (navigator.plugins[i].name.indexOf("QuickTime") >= 0) { 
haveqt = true; }
}
}
var havemp = false;
if (navigator.plugins) {
for (i=0; i < navigator.plugins.length; i++ ) {
if (navigator.plugins[i].name.indexOf("MPlayer") >= 0) { 
havemp = true; }
}
}
if ((navigator.userAgent.indexOf('MSIE') != -1) || (navigator.userAgent.indexOf('Win') != -1) || (navigator.userAgent.indexOf('Opera') != -1)) {
  if (havewmp = true) { wmpplayntv(); }
  else if ((haveqt = true) || (havemp = true)) { qtplayntv(); }
  else { showplugins();} 
} else {
   if ((haveqt = true) || (havemp = true)) { qtplayntv(); }
   else if (havewmp = true) { wmpplayntv(); }
   else { showplugins(); } 
}
}

// on Videos page
// for performance video id="perfvid" with and id="perftxt"
// for news clip id="newsvid" with and id="newstxt"
function selectnewstwo() {
var havewmp = false;
if (navigator.plugins) {
for (i=0; i < navigator.plugins.length; i++ ) {
if (navigator.plugins[i].name.indexOf("Windows Media") >= 0) { 
havewmp = true; }
}
}
var haveqt = false;
if (navigator.plugins) {
for (i=0; i < navigator.plugins.length; i++ ) {
if (navigator.plugins[i].name.indexOf("QuickTime") >= 0) { 
haveqt = true; }
}
}
var havemp = false;
if (navigator.plugins) {
for (i=0; i < navigator.plugins.length; i++ ) {
if (navigator.plugins[i].name.indexOf("MPlayer") >= 0) { 
havemp = true; }
}
}
var inonentv = '';
if ((haveqt = false) && (havemp = false) && (havewmp = false)) {
showplugins();
} else {
if ((navigator.userAgent.indexOf('MSIE') != -1) || (navigator.userAgent.indexOf('Win') != -1) || (navigator.userAgent.indexOf('Opera') != -1)) {
  if (havewmp = true) { var inonentv = wmpntv;}
  else if ((haveqt = true) || (havemp = true)) { var inonentv = qtntv; }
} else {
   if ((haveqt = true) || (havemp = true)) { var inonentv = qtntv; }
   else if (havewmp = true) { var inonentv = wmpntv; }
}
var newstwovid = "<span style=\"margin:12px; padding:0; display:block;\">"+inonentv+"<\/span>";
var newstwotxt = "<span style=\"color:#667;\">[Announcer]<\/span>&nbsp;&nbsp;The Central Navy Band under the direction of Captain Alexei Karabanov gave a concert at the Grand Philharmonic Hall in Saint-Petersburg for seamen, ship-builders, and the cadets and students of the naval colleges. In honor of the 102nd anniversary of the Naval Fleet and the 50th anniversary of the first atomic submarine in Russia, the musicians played anthems, songs and classical music. Submariners consider themselves as elite and hope their professional holiday will receive the status of a national remembrance day.<br \/><br \/><span style=\"color:#667;\">[Captain Karabanov]<\/span>&nbsp;&nbsp;The Submarine Fleet is at the core of our Navy and the security of Russia. The Day of the Submariners is one of their most important holidays, and has every right to be marked by celebration.<br \/><br \/><span style=\"color:#667;\">[Announcer]<\/span>&nbsp;&nbsp;The Submarine Fleet is one of the most secret. But one of their secrets that the seamen like to share: their favorite songs are: \"God, Save the Tsar!\", \"The Evening of the Raid\" and \"There in the Mist\".  At the concert the musicians played the music that accompanied and honored the outward-bound seamen.<br \/>";
document.getElementById('newsvid').innerHTML = null;
document.getElementById('newsvid').innerHTML = newstwovid;
document.getElementById('newstxt').innerHTML = null;
document.getElementById('newstxt').innerHTML = newstwotxt;
}
}