function popupVideo(url) {
  var w = 425;
  var h = 344;
  url += "&border=1&color1=0x000000&color2=0xeb9b00";
  url = url.replace("watch?v=", "v/");
  var content;
  content = '<div id="videoContent"><a onClick="popdownVideo()" >X</a><div id="video">';

  content += "\n" + '<center><object width="' + w + '" height="' + h +'">'+
         "\n\t" + '<param name="movie" value="' + url + '"></param>'+
         "\n\t" + '<param name="allowFullScreen" value="true"></param>'+
         "\n\t" + '<param name="allowscriptaccess" value="always"></param>'+
         "\n\t" + '<embed src="' + url + '" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="' + w + '" height="' + h +'"></embed>'+
         "\n"   + '</object></center>';

  content += "</div></div>";

  document.getElementById('videoContainer').innerHTML = content;

  if (document.getElementById) {
    // this is the way the standards work
    document.getElementById('videoContainer').style.visibility = "visible";
  } else if (document.all) {
    // this is the way old msie versions work
    document.all['videoContainer'].style.visibility = "visible";
  } else if (document.layers) {
    // this is the way nn4 works
    document.layers['videoContainer'].visibility = "visible";
  }

}
 
function popdownVideo() {
  document.getElementById('videoContainer').innerHTML = "";
  if (document.getElementById) {
    // this is the way the standards work
    document.getElementById('videoContainer').style.visibility = "hidden";
  } else if (document.all) {
    // this is the way old msie versions work
    document.all['videoContainer'].style.visibility = "hidden";
  } else if (document.layers) {
    // this is the way nn4 works
    document.layers['videoContainer'].visibility = "hidden";
  }
}
