function getimg(img_id){
  var t=window.open('img_id', 
  '_blank',
  'toolbar=no,width=10,height=10,left=0,top=0, status=no,scrollbars=yes,resize=no');
  var s='<body onload="ol()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><script>function ol(){ '+
  ' var corrx=0; var corry=0; if (window.screen.height-50<=document.images[0].height+30){corry=document.images[0].height+30-window.screen.height+50;} if (window.screen.width<=document.images[0].width+28) {corrx=document.images[0].width+28-window.screen.width;}'+
  'window.resizeTo(document.images[0].width+28-corrx,'+
  'document.images[0].height+30-corry);} '+
  '<'+'/script><img src="'+img_id+'" onload="ol()" onclick="window.close();" ></body>';
  t.document.writeln(s);
}

function getimg2(pid, mode, f){
  var t=window.open(  '/preview.php?id='+pid, 
  '_blank',
  'toolbar=no,width=600,height=400,left=0,top=0, status=no,scrollbars=yes,resize=no');
}

function getimg3(pid, mode, f){
	  var t=window.open(  '/preview.php?id='+pid, 
	  'photview',
	  'toolbar=no,width=800,height=1000,left=0,top=0, status=no,scrollbars=yes,resize=no');
}
function getimg4(pid, mode, f){

  if(window.showModalDialog('/preview.php?id='+pid, 
  'photview',
	  "dialogHeight: 900px; dialogWidth: 800px; resizable:yes; edge:sunken")){return 1;
  }else{
	  var t=window.open(  '/preview.php?id='+pid, 
	  'photview',
	  'toolbar=no,width=600,height=400,left=0,top=0, status=no,scrollbars=yes,resize=no');
  }
}
function compimg(pid1, pid2){
//alert("Test");
  var t=window.open(  '/twins_rating.php?photo1='+pid1+'&photo2='+pid2, 
  'comp_view',
  'toolbar=no,width=900,height=900,left=0,top=0, status=no,scrollbars=yes,resize=no');
}
function prepare(photo){
//alert("Test");
  var t=window.open('/faces.php?photo='+photo, 
  'comp_view',
  'toolbar=no,width=1000, height=770,left=0,top=0, status=no,scrollbars=yes,resize=no');
}

