var wName = "WMP";
function showWMP1m(pv_c){
  var wBand_c = 2;
  var wScrWidth  = window.screen.availWidth;
  var wHeight = window.screen.availHeight;
  var wWidth = Math.round(wHeight * 4 / 3);
  if (wWidth > wScrWidth) {
    wWidth = wScrWidth;
    wHeight = Math.round(wWidth * 3 / 4);
  }
  var wTop = 0;
  var wLeft = (wScrWidth - wWidth) /2;
  openWin1m(wName,pv_c,wBand_c,window.screen.width,window.screen.height,wTop,wLeft);
}

function showWMP500k(pv_c){
  var wBand_c = 1;
  var wScrWidth  = window.screen.availWidth;
  var wHeight = window.screen.availHeight;
  var wWidth = Math.round(wHeight * 4 / 3);
  if (wWidth > wScrWidth) {
    wWidth = wScrWidth;
    wHeight = Math.round(wWidth * 3 / 4);
  }
  var wTop = 0;
  var wLeft = (wScrWidth - wWidth) /2;
  openWin500k(wName,pv_c,wBand_c,window.screen.width,window.screen.height,wTop,wLeft);
}

function openWin1m(name,pv_c,band_c,width,height,top,left) {
  var wUrl  = "http://www2.b-ch.com/cgi-bin/cmn/pv/pv_view_1000.cgi";
      wUrl += "?pv_c=" + pv_c;
  var wStyle = "scrollbars=yes,width=" + width + ",height=" + height + ",top="+ top +",left=" + left;
  newWin = window.open(wUrl,name,wStyle);
  newWin.focus();
}

function openWin500k(name,pv_c,band_c,width,height,top,left) {
  var wUrl  = "http://www2.b-ch.com/cgi-bin/cmn/pv/pv_view_500.cgi";
      wUrl += "?pv_c=" + pv_c;
  var wStyle = "scrollbars=yes,width=" + width + ",height=" + height + ",top="+ top +",left=" + left;
  newWin = window.open(wUrl,name,wStyle);
  newWin.focus();
}
