var blankImage = new Image();
blankImage.src = 'templates/images/1x1.gif';

function Browser() {

  this.IE    = false;
  this.NS    = false;
  this.OP    = false;

  var userAgent;
  userAgent = navigator.userAgent;
  if ((userAgent.indexOf("Opera")) >= 0) {
    this.OP = true;
    return;
  }

  if ((userAgent.indexOf("MSIE")) >= 0) {
    this.IE = true;
    return;
  }

  if ((userAgent.indexOf("Netscape6/")) >= 0) {
    this.NS = true;
    return;
  }
}

var browser = new Browser();

function showFullImage(PimgSrc)
{
    var w = 50;
    var h = 100;
    var leftPos = (screen.availWidth-w) / 2;
    var topPos = (screen.availHeight-h) / 2;
    //window.open('/ShowFullImage/'+PimgSrc,'','dependent=1,width='+w+',height='+h+',resizable=yes,status=no,titlebar=0,top='+topPos+',left='+leftPos);
    window.open('/ShowFullImage/'+PimgSrc,'','width='+w+',height='+h);
}

function fitwindow(width,height)
{
    w = width+200;
    h = height+100;
    if(w>(screen.availWidth-150)) {
      w = screen.availWidth-150;
    }
    if(h>(screen.availHeight-150)) {
      h = screen.availHeight-150;
    }
    if(width > 1 && height > 1)
    {
        window.resizeTo(w, h);
    }
    window.moveTo((screen.availWidth-w)/2,(screen.availHeight-h)/2);
}

