﻿function enLarges(pic, wdth, hght) 
{
  var divwdth = wdth + 5;
  var divhght = hght + 5;
  //var winL = Math.floor((screen.availWidth - divwdth) / 2);
  //var winT = Math.floor((screen.availHeight - divhght) / 2);
  var winL = (screen.width - 600) / 2;
  var winT = (screen.height - 400) / 2;
  //alert("Left=" + winL + "-  Top=" + winT);
  content = '<div id="showLrg" style="position:relative;cursor:pointer;left:' + winL + 'px;top:' + winT + ';width:' + divwdth + 'px;height:' + divhght + ';border-top: solid 2px #BBBBBB; border-left: solid 2px #BBBBBB; border-bottom: solid 2px #000000; border-right: solid 2px #000000; background: #666666; padding: 5px 5px 5px 5px;z-index:4;" ondbclick="hide();" onclick="hide();"><img src="' + pic + '" style="height:' + hght + 'px;width:' + wdth + 'px;border-top: solid 2px #000000;border-left: solid 2px #000000;border-right: solid 2px #BBBBBB;border-bottom: solid 2px #BBBBBB;"></div>';
  //content = '<div id="showLrg" style="position:relative;left:' + winL + 'px;top:' + winT + ';width:' + divwdth + 'px;height:' + divhght + ';border-top: solid 2px #BBBBBB; border-left: solid 2px #BBBBBB; border-bottom: solid 2px #000000; border-right: solid 2px #000000; background: #666666; padding: 5px 5px 5px 5px;z-index:4;" onmouseout="hide();" onmouseup="hide();" onmousemove="hide();"><img src="' + pic + '" style="height:' + hght + 'px;width:' + wdth + 'px;border-top: solid 2px #000000;border-left: solid 2px #000000;border-right: solid 2px #BBBBBB;border-bottom: solid 2px #BBBBBB;"></div>';
  document.getElementById('hiddenDiv').innerHTML = content;
  if (event.mousemove) 
  {
    hide();
  }
}
function hide() 
{
  if (document.getElementById('showLrg')) 
  {
    document.getElementById('showLrg').style.display = 'none';
  }
  else 
  {
    return false;
  }
}
function showMedia(file) 
{
  var width = 800;
  var height = 600;
  var left = (screen.width - width) / 2;
  var top = (screen.height - height) / 2;
  var params = 'width=' + width + ', height=' + height;
  params += ', top=' + top + ', left=' + left;
  params += ', directories=no';
  params += ', location=no';
  params += ', menubar=no';
  params += ', resizable=no';
  params += ', scrollbars=no';
  params += ', status=no';
  params += ', toolbar=no';
  newwin = window.open(file, 'media01', params);
  if (window.focus) 
  {
      newwin.focus();
  }
  return false;
}
function enLarge(AImgUrl, AWidth, AHeight) 
{
  var width = AWidth;
  var height = AHeight;
  var left = (screen.width - width) / 2;
  var top = (screen.height - height) / 2;
  var params = 'width=' + width + ', height=' + height;
  params += ', top=' + top + ', left=' + left;
  params += ', directories=no';
  params += ', location=no';
  params += ', menubar=no';
  params += ', resizable=no';
  params += ', scrollbars=no';
  params += ', status=no';
  params += ', toolbar=no';
  newwin = window.open(AImgUrl, 'media01', params);
  if (window.focus) 
  {
    newwin.focus();
  }  
  return false;
}