function popupYoutube(youtubeURL, width, height) {
  var frame = document.open('', '', 'width='+width+',height='+height+',scrollbars=0,location=0,menubar=0,resizable=0');
  frame.document.write(
    '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '
    +'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n'
    +'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n'
    +'  <head>\n'
    +'    <title>YouTube Videos: '+youtubeURL+'</title>'
    +'    <style type="text/css">body {margin: 0px}</style>\n'
    +'    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\n'
    +'  </head>\n'
    +'  <body>\n'
    +'    <div style="margin: 0px;">\n'
    +'      <object width="'+width+'" height="'+height+'">\n'
    +'        <param name="movie" value="'+youtubeURL+'"></param>\n'
    +'        <param name="allowFullScreen" value="true"></param>\n'
    +'        <param name="allowscriptaccess" value="always"></param>\n'
    +'        <embed src="'+youtubeURL+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'+width+'" height="'+height+'">\n'
    +'        </embed>\n'
    +'      </object>\n'
    +'    </div>\n'
    +'  </body>\n'
    +'</html>'
  );
  frame.document.close();
  return true;
}

function popupLocal(videoURL, width, height) {
  var frame = document.open('', '', 'width='+width+',height='+height+',scrollbars=0,location=0,menubar=0,resizable=0');
  frame.document.write(
    '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '
    +'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n'
    +'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n'
    +'  <head>\n'
    +'    <title>Video Player</title>\n'
    +'    <style type="text/css">body {margin: 0px}</style>\n'
    +'    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\n'
    +'    <script type="text/javascript" language="javascript" src="/includes/flowplayer.js"></script>\n'
    +'  </head>\n'
    +'  <body>\n'
    +'    <div style="margin: 0px;">\n'
    +'      <a href="'+videoURL+'" style="display:block;width:'+width+'px;height:'+height+'px" id="player"></a>\n'
    +'    </div>\n'
    +'    <script language="javascript">flowplayer("player", "/includes/flowplayer.swf");</script>\n'
    +'  </body>\n'
    +'</html>\n'
  );
  frame.document.close();
  return true;
}

