﻿function show_foto(foto_src, foto_desc) 
  {
  document.getElementById('foto').src = foto_src;
  document.getElementById('desc').innerText = foto_desc;
  }

function album_entry(foto_src, foto_desc)
  {
  return '<img onclick="show_foto(\'../../_media/foto/' + foto_src + '\',\'' + foto_desc + '\'); return true;" src="../../_media/foto/postzegel/' + foto_src + '" alt="' + foto_desc + '" height="90" style="cursor:pointer" />\n';
  }

function show_nieuws(nieuws_src, nieuws_title) 
  {
  document.getElementById('nieuws').src = nieuws_src;
  document.getElementById('nieuws').title = nieuws_title;
  document.getElementById('desc').innerText = nieuws_title;
  }

function play_media(id, desc, url, width, height, show_open_in_player)
  {//http://support.microsoft.com/kb/279022/nl
  var wmp7;
  var class_id = "";
  var code_base = "";
  
  try
    {
    if (window.ActiveXObject)
      {
      wmp7 = new ActiveXObject("WMPlayer.OCX.7");
      }
    else if (window.GeckoActiveXObject)
      {
      wmp7 = new GeckoActiveXObject("WMPlayer.OCX.7");
      }
    }
  catch (e)
    {
    }

  if (wmp7)
    {
    class_id = "6BF52A52-394A-11D3-B153-00C04F79FAA6";
    height += 65;
    }
  else
    {
    class_id = "22d6f312-b0f6-11d0-94ab-0080c74c7e95";
    codebase = "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715";
    }

  document.open();

  document.write('<div class="center">');

  document.write('<object id=' + id + ' name=' + id);
  document.write(' classid=CLSID:' + class_id);
  if (code_base)
    {
    document.write(' codebase=' + code_base);
    }
  document.write(' standby="' + desc + '"');
  document.write(' type="application/x-oleobject" width="' + width + '" height="' + height + '">');
  document.write('<param name="FileName" value="' + url + '">');
  document.write('<param name="url" value="' + url + '">');
  document.write('<param name="AutoStart" value="true">');
  document.write('<param name="ShowControls" value="1">');
  document.write('<param name="uiMode" value="mini">');

  document.write('<embed id=' + id + ' name=' + id);
  document.write(' pluginspage="http://www.microsoft.com/windows/windowsmedia/"');
  document.write(' type="application/x-mplayer2" width="' + width + '" height="' + height + '"');
  document.write(' filename="' + url + '"');
  document.write(' src="' + url + '"');
  document.write(' AutoStart="true"');
  document.write(' ShowControls=1');
  document.write(' ShowDisplay=1');
  document.write(' ShowStatusBar=1');
  document.write(' >');
  document.write(' </embed>');

  document.write('</object>');

  if (show_open_in_player) 
    {
    document.write('<br />');
    document.write('<a href="' + url + '" style="color: red;font-size: 85%;" target="_blank">openen in externe speler</a>');
    }

  document.write('</div>');

  document.close();
  }
