<!--
var newWindow;
var newContent;

function createContent(title, file) {
   var content = "<html><head><title>" + title + "</title></head>" + "\n";
   content += "<body ><div align=\"center\">" + "\n";
   content += "<OBJECT ID=\"MediaPlayer1\" width=160 height=162 classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" " + "\n";
   content += "codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902\" " + "\n";
   content += "standby=\"Loading Microsoft Windows Media Player components...\" type=\"application/x-oleobject\">" + "\n";
   content += "<PARAM NAME=\"FileName\" VALUE=\"http://www.zionindustries.com/videoclips/" + file + "\">" + "\n";
   content += "<PARAM NAME=\"animationatStart\" VALUE=\"true\">" + "\n";
   content += "<PARAM NAME=\"transparentatStart\" VALUE=\"true\">" + "\n";
   content += "<PARAM NAME=\"autoStart\" VALUE=\"true\">" + "\n";
   content += "<PARAM NAME=\"showControls\" VALUE=\"true\">" + "\n";
   content += "<embed type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" " + "\n";
   content += "SRC=\"http://www.zionindustries.com/videoclips/" + file + "\" name=\"MediaPlayer1\" " + "\n";
   content += "width=\"160\" height=\"162\" AutoStart=\"true\">" + "\n";
   content += "</OBJECT>" + "\n";
   content += "<p><font face=\"Arial\"><b>" + title + "</b></font></p>" + "\n";
   content += "<p><font face=\"Arial\" size=\"2\"><a href=\"javascript: window.close();\">Close</a></font></p>" + "\n";
   content += "";
   content += "</div></body></html>";
   return content;

}

function createWindow() {
   var popup = window.open("","","height=280,width=300,left=188,top=298,scrollbars=no,resizable=no,status=no");

   if (!popup.opener) {
      popup.opener = window;
   }
   return popup;
}

function openMovie(title, file) {
   if (!newWindow || newWindow.closed) {
      newWindow = createWindow();

      newContent = createContent(title, file); //"<html><body>HELLO!</body></html>"; //
      newWindow.document.write(newContent);
      newWindow.document.close();
      newWindow.focus();
   }
   else {
      newWindow.close();
      //newWindow = createWindow();
      //newContent = createContent(title, file);
      //newWindow.document.write(newContent);
      //newWindow.document.close();
      //newWindow.focus();
   }
}

// -->
