function open_photos_window(type, id)
{
  var cWidth = 0, cHeight = 0;
  
  if (typeof(window.innerWidth) == 'number') 
  {
    cWidth = window.innerWidth;
    cHeight = window.innerHeight;
  } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
    cWidth = document.documentElement.clientWidth;
    cHeight = document.documentElement.clientHeight;
  } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
    cWidth = document.body.clientWidth;
    cHeight = document.body.clientHeight;
  }
  
  var w = 580 ;
  var h = 497 ;

  var left = parseInt((cWidth-w)/2);
  var top  = parseInt((screen.height-h)/2)+20;

  config = 'width='+w+',height='+h+',top='+top+',left='+left; 

  wname = Math.floor(10050* Math.random());

  pw = window.open('/photos/'+type+'/'+id+'/', wname, config, 'status=no', 'toolbar=no', 'menubar=no', 'resizable=no, fullscreen=1');
  
  if( pw.focus )
    pw.focus();
}
