<!------- hide the script from old browsers
//var bgcolor = "#336699"; // orig
var bgcolor = "#666666";
//var fc = "#336699";
var fc = "#FFFFFF";

function youtube_mov(issue,mov_mstr,h,w,title,time,blur_flag) {
  // issue - VxxNx
  // mov_mstr - name of utube clip
  // h - heigth desired (e.g., 240, 180, . . .) 
  // w - widtth desired (e.g., 320, 240, . . .)
  // title - name of the movie (use qq as delim for 2nd line - time goes on 1st line)
  // time - length in mm:ss
  // blur_flag - y if close window on blur (default is y, turn off with n)
  var winopt, html, pdf;
  // orig
  //var height = (h * 1) + 16;  // add space for qt control bar
  //var width = w * 1;  
  // now by percent
  var height = (h * 1) * 1.3;
  var width = (w * 1) * 1.3; 
  var volume = issue.substring(1,3) * 1;
  var number = issue.substring(4,5);
  var yy = 2003 + volume - 2; // year of issue (vol 2 for 2003)
  if (volume < 10) { pdf = "CQ0"; }
  else { pdf = "CQ"; }
  pdf += volume + "_" + number + ".pdf";  
  var css_url = "/CQ/";
  var url = "/includes/videos/CQ/";

  // special coded single quote to get around wyswyg  
  var c = title.replace(/%27/gi,"'");
  title = c;
 
  // special coded < and > to get around wyswyg  
  var c = title.replace(/ylty/gi,"<");
  title = c;
  var c = title.replace(/ygty/gi,">");
  title = c; 
  
  // split title into title and credits
  var str = new Array();
  str = title.split("qq");
  title = str[0];
  var credits;
  
  // option - close window when user moves off it (default is to do this)
  var blur_it = " onblur=window.close()"
  if (blur_flag == "n") { blur_it = ""; }

  html = "<!DOCTYPE HTML PUBLIC\ \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n   ";
  html += "  \"http://www.w3.org/TR/html4/loose.dtd\">\n";
  html += "<HTML LANG=\"EN-US\">\n";
  html += "<HEAD>\n";
  html += "<TITLE>Chesapeake Quarterly: " + title + " Video</TITLE>\n";
  html += "<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" ";
  //html += "HREF=\"" + url + "cq.css\">\n";
  html += "HREF=\"" + css_url + "cq_ezine.css\">\n";
  html += "</HEAD>\n";
  html += "<BODY  STYLE=\"margin-top:0px;\" ";
  html += "BGCOLOR=\"" + bgcolor + "\"" + blur_it + ">\n";
  html += "<DIV ALIGN=\"CENTER\">\n";

  html += "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"4\" ";
  html += "WIDTH=\"100%\">\n";
  html += "<TR>\n<TD COLSPAN=\"2\" ALIGN=\"LEFT\" VALIGN=\"TOP\">\n";
  html += "<H4 STYLE=\"margin0px;color:" + fc + ";\">\n";
  html += "Chesapeake Quarterly\n</H4>\n</TD>\n"; 
  html += "<TD ALIGN=\"RIGHT\" VALIGN=\"TOP\">\n";
  html += "<H4 STYLE=\"margin:0px;color:" + fc + ";\">\nVolume " + volume;
  html += " Number " + number + "\n</H4>\n";
  html += "</TD>\n</TR>\n";

  html += "<TR>\n<TD COLSPAN=\"3\" ALIGN=\"CENTER\" VALIGN=\"TOP\">\n";

  html += "<H3 STYLE=\"margin-top:0px;color:" + fc + ";\">\n";
  html += "<SPAN STYLE=\"font-style:italic;\">";
  html += title + "</SPAN> [" + time + "]\n";
    if (str[1]) { // credits
    html += "<BR>\n" + str[1] + "\n";
  }
  html += "</H3>\n";

  html += "<object width=\"" + width + "\" height=\"" + height + "\">";
  html += "<param name=\"movie\" value=\"" + mov_mstr + "\"></param>";
  html += "<param name=\"wmode\" value=\"transparent\"></param>";
  html += "<embed src=\"" + mov_mstr + "\" type=\"application/x-shockwave-flash\" ";
  html += "wmode=\"transparent\" width=\"" + width + "\" height=\"" + height + "\"></embed>";
  html += "</object>\n";
  
  html += "</TD>\n</TR>\n</TABLE>\n<BR>\n"; 

  html += "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"8\" ";
  html += "WIDTH=\"100%\">\n";
  html += "<TR>\n"; 
  html += "<TD NOWRAP ALIGN=\"LEFT\" VALIGN=\"MIDDLE\" WIDTH=\"15%\">\n";
  html += "<A STYLE=\"color:" + fc + ";\" ";
  html += "HREF=\"/CQ/video_help\" TARGET=\"_blank\">";
  html += "help guide</A>\n";
  html += "</TD>\n";
  html += "<TD ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" WIDTH=\"70%\">\n";
  html += "<FORM>\n";
  html += "<INPUT TYPE=\"Button\" value=\"Close Window\" ";
  html += "onClick=\"window.close();\"><BR>\n";
  html += "</FORM>\n"; 
  html += "</TD>\n"; 
  html += "<TD NOWRAP ALIGN=\"RIGHT\" VALIGN=\"MIDDLE\" WIDTH=\"15%\">\n";
  html += "</TD>\n</TR>\n</TABLE>\n"; 

  html += "</DIV>\n";
  html += "</BODY>\n";
  html += "</HTML>\n";
  // adjust height & width so window does not have scrollbars
  height = height + 190;
  if (height == 180) { height += 60; } // 16x9
  if (height == 135) { height += 55; }
  width = width + 160;
  // note: toolbar = yes to allow printing of pop-up window
  winopt = "toolbar=yes,location=yes,directories=yes,menubar=yes,resizable=no,";
  winopt = "toolbar=no,location=no,directories=no,menubar=no,resizable=no,";
  winopt += "scrollbars=yes,width=" + width + ",height=" + height;
  newWin=window.open("","dummy",winopt);
  newWin.document.write(html);
  newWin.document.close();
  return
}
 
function define_mov(issue,mov_mstr,h,w,title,time,blur_flag) {
  // issue - VxxNx
  // mov_mstr - name of the MSTR version of the QT movie
  // h - heigth desired (e.g., 240, 180, . . .) 
  // w - widtth desired (e.g., 320, 240, . . .)
  // title - name of the movie (use qq as delim for 2nd line - time goes on 1st line)
  // time - length in mm:ss
  // blur_flag - y if close window on blur (default is y, turn off with n)
  var winopt, html, pdf;
  // orig
  //var height = (h * 1) + 16;  // add space for qt control bar
  //var width = w * 1;  
  // now by percent
  var height = (h * 1) * 1.3;
  var width = (w * 1) * 1.3; 
  var volume = issue.substring(1,3) * 1;
  var number = issue.substring(4,5);
  var yy = 2003 + volume - 2; // year of issue (vol 2 for 2003)
  if (volume < 10) { pdf = "CQ0"; }
  else { pdf = "CQ"; }
  pdf += volume + "_" + number + ".pdf";  
  //var css_url = "/images/uploads/siteimages/imported/files/"; 
  var css_url = "http://www.mdsg.umd.edu/CQ/";
  var url = "/includes/videos/CQ/";
  var rtsp = "rtsp://sgnw.umd.edu/CQ/";

  // special coded single quote to get around wyswyg  
  var c = title.replace(/%27/gi,"'");
  title = c;
 
  // special coded < and > to get around wyswyg  
  var c = title.replace(/ylty/gi,"<");
  title = c;
  var c = title.replace(/ygty/gi,">");
  title = c; 

  // split title into title and credits
  var str = new Array();
  str = title.split("qq");
  title = str[0];
  var credits;
  
  // option - close window when user moves off it (default is to do this)
  var blur_it = " onblur=window.close()"
  if (blur_flag == "n") { blur_it = ""; }

  html = "<!DOCTYPE HTML PUBLIC\ \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n   ";
  html += "  \"http://www.w3.org/TR/html4/loose.dtd\">\n";
  html += "<HTML LANG=\"EN-US\">\n";
  html += "<HEAD>\n";
  html += "<TITLE>Chesapeake Quarterly: " + title + " Video</TITLE>\n";
  html += "<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" ";
  //html += "HREF=\"" + url + "cq.css\">\n";
  html += "HREF=\"" + css_url + "cq_ezine.css\">\n";
  html += "</HEAD>\n";
  html += "<BODY  STYLE=\"margin-top:0px;\" ";
  html += "BGCOLOR=\"" + bgcolor + "\"" + blur_it + ">\n";
  html += "<DIV ALIGN=\"CENTER\">\n";

  html += "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"8\" ";
  html += "WIDTH=\"100%\">\n";
  html += "<TR>\n<TD COLSPAN=\"2\" ALIGN=\"LEFT\" VALIGN=\"TOP\">\n";
  html += "<H4 STYLE=\"margin-top:0px;color:" + fc + ";\">\n";
  html += "Chesapeake Quarterly\n</H4>\n</TD>\n"; 
  html += "<TD ALIGN=\"RIGHT\" VALIGN=\"TOP\">\n";
  html += "<H4 STYLE=\"margin-top:0px;color:" + fc + ";\">\nVolume " + volume;
  html += " Number " + number + "\n</H4>\n";
  html += "</TD>\n</TR>\n";

  html += "<TR>\n<TD COLSPAN=\"3\" ALIGN=\"CENTER\" VALIGN=\"TOP\">\n";

  html += "<H3 STYLE=\"margin-top:0px;color:" + fc + ";\">\n";
  html += "<SPAN STYLE=\"font-style:italic;\">";
  html += title + "</SPAN> [" + time + "]\n";
    if (str[1]) { // credits
    html += "<BR>\n" + str[1] + "\n";
  }
  html += "</H3>\n";

  html += "<OBJECT CLASSID=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\"\n";
  html += "WIDTH=\"" + width + "\" HEIGHT=\"" + height + "\" SCALE=\"TOFIT\"\n"; 
  html += "CODEBASE=\"http://www.apple.com/qtactivex/qtplugin.cab\">\n"; 
  html += 
    "<PARAM NAME=\"SRC\" VALUE=\"" + url + issue + "/" + mov_mstr + "\">\n"; 
  html += 
    "<PARAM NAME=\"QTSRC\" VALUE=\"" + url + issue + "/" + mov_mstr + "\">\n"; 
  html += 
    "<PARAM NAME=\"HREF\" VALUE=\"" + url + issue + "/" + mov_mstr + "\">\n"; 
  html += "<PARAM NAME=\"AUTOPLAY\" VALUE=\"TRUE\">\n";
  html += "<PARAM NAME=\"CONTROLLER\" VALUE=\"TRUE\">\n";
  html += "<PARAM NAME=\"TYPE\" VALUE=\"video/quicktime\">\n"; 
  html += "<PARAM NAME=\"TARGET\" VALUE=\"myself\">\n";
  html += "<PARAM NAME=\"KIOSKMODE\" VALUE=\"false\">\n";
  html += "<EMBED SRC=\"" + url + issue + "/" + mov_mstr + "\" ";
  html += "QTSRC=\"" + url + issue + "/" + mov_mstr + "\" ";
  html += "HREF=\"" + url + issue + "/" + mov_mstr + "\" ";
  html += "TARGET=\"myself\" CONTROLLER=\"TRUE\" ";
  html += "HEIGHT=\"" + height + "\" WIDTH=\"" + width + "\" SCALE=\"TOFIT\" "; 
  html += "LOOP=\"false\" AUTOPLAY=\"TRUE\" PLUGIN=\"quicktimeplugin\" ";
  html += "TYPE=\"video/quicktime\" CACHE=\"true\" KIOSKMODE=\"TRUE\" ";
  html += "PLUGINPAGE=\"http://www.apple.com/quicktime/download\">\n";
  html += "</embed>\n";
  html += "</OBJECT>\n";
  html += "</TD>\n</TR>\n</TABLE>\n<BR>\n"; 

  html += "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"8\" ";
  html += "WIDTH=\"100%\">\n";
  html += "<TR>\n"; 
  html += "<TD NOWRAP ALIGN=\"LEFT\" VALIGN=\"MIDDLE\" WIDTH=\"15%\">\n";
  html += "<A STYLE=\"color:" + fc + ";\" ";
  html += "HREF=\"/CQ/video_help\" TARGET=\"_blank\">";
  html += "help guide</A>\n";
  html += "</TD>\n";
  html += "<TD ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" WIDTH=\"70%\">\n";
  html += "<FORM>\n";
  html += "<INPUT TYPE=\"Button\" value=\"Close Window\" ";
  html += "onClick=\"window.close();\"><BR>\n";
  html += "</FORM>\n"; 
  html += "</TD>\n"; 
  html += "<TD NOWRAP ALIGN=\"RIGHT\" VALIGN=\"MIDDLE\" WIDTH=\"15%\">\n";
  html += "</TD>\n</TR>\n</TABLE>\n"; 

  html += "</DIV>\n";
  html += "</BODY>\n";
  html += "</HTML>\n";
  // adjust height & width so window does not have scrollbars
  if (width == 180) { width += 60; } // 16x9
  if (width == 135) { width += 55; }
  //height = height + 190;
  height = height + 210;
  width = width + 160;
  // note: toolbar = yes to allow printing of pop-up window
  winopt = "toolbar=yes,location=yes,directories=yes,menubar=yes,resizable=no,";
  winopt = "toolbar=no,location=no,directories=no,menubar=no,resizable=no,";
  winopt += "scrollbars=yes,width=" + width + ",height=" + height;
  newWin=window.open("","dummy",winopt);
  newWin.document.write(html);
  newWin.document.close();
  return
}

function define_transcript(url) {
 
  var winopt;
  var height = 450; 
  var width = 350; 
 
  winopt = "toolbar=yes,location=yes,directories=yes,menubar=yes,resizable=no,";
  winopt = "toolbar=no,location=no,directories=no,menubar=no,resizable=no,";
  winopt += "scrollbars=yes,width=" + width + ",height=" + height;
  newWin=window.open(url,"dummy",winopt);
  return
}

function define_head(volume,number) {
  document.write("<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" ");
  //document.write("HREF=\"http://www.mdsg.umd.edu/CQ/cq.css\">\n");
  document.write("HREF=\"http://www.mdsg.umd.edu/CQ/cq_ezine.css\">\n");
  document.write("</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\">\n<A NAME=\"TOP\"></A>\n");
  document.write("<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=4 WIDTH=\"98%\">\n");
  document.write("<TR>\n<TD NOWRAP ALIGN=\"LEFT\" VALIGN=\"TOP\">\n");
  document.write("<H4>\nChesapeake Quarterly\n</H4>\n</TD>\n");
  document.write("<TD NOWRAP ALIGN=\"RIGHT\" VALIGN=\"TOP\">\n<H4>\nVolume ");
  document.write(volume + ", Number " + number + "\n</H4>\n");
  document.write("</TD>\n</TR>\n</TABLE>\n");
  return
}

function define_foot() {
  document.write("<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"4\" WIDTH=\"98%\">\n");
  document.write("<TR>\n<TD NOWRAP ALIGN=\"RIGHT\" VALIGN=\"TOP\">\n");
  document.write("<p class=\"FOOTER\">\n");
  document.write("<A HREF=\"#\" onClick=\"window.close();return false\">");
  document.write("close window</A>\n</p>\n</TD>\n</TR>\n</TABLE>\n");
}

function define_flash(myurl, w, h) {
  var height = (h * 1);
  var width = (w * 1); 
  if (width == 180) { width += 60; } // 16x9
  if (width == 135) 	{ width += 55; }
  //height = height + 190;
  height = height + 210;
  width = width + 160; 
  // note: toolbar = yes to allow printing of pop-up window
  winopt = "toolbar=yes,location=yes,directories=yes,menubar=yes,resizable=no,";
  winopt = "toolbar=no,location=no,directories=no,menubar=no,resizable=no,";
  winopt += "scrollbars=yes,width=" + width + ",height=" + height;
  newWin=window.open("http://www.mdsg.umd.edu" + myurl,"dummy",winopt);
  //newWin.document.write(html);
  //newWin.document.close();
  return
}

//close off comment to hide this script from old browsers----------->
