function winPop(url, name, w, h) {
	var l = screen.width / 2 - w / 2;
	var t = screen.height / 2 - h / 2;
	var Win = window.open(url, name, 'width=' + w + ', height=' + h + ',scrollbars=no, left=' + l + ', top=' + t);
	Win.resizeTo(w+15, h+15);
	Win.moveTo(l, t);
}


function winPop2(img)
{
  foto1= new Image();
  foto1.src=(img);
  check(img);
}

function check(img)
{
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    func="check('"+img+"')";
    interval=setTimeout(func,20);
  }
}

function viewFoto(img)
{
  w = foto1.width + 7; //- mozi
  h = foto1.height + 7;
  var l = screen.width / 2 - w / 2;
  var t = screen.height / 2 - h / 2;

	
	
  string="width="+w+",height="+h+",left="+l+",top="+t;
  


  string="width="+w+",height="+h;+",toolbar=no,menubar=no, location=no, personalbar=no, status=no, resizable=no, scrollbars=no, copyhistory=no, left=" + l + ", top=" + t;
  handle=window.open(img,"",string);
  handle.document.write('<html><head><title></title><script src="./js/AC_RunActiveContent.js" type="text/javascript"></script><style>html,body{height:100%} body{margin:0px;padding:0;border:0;background-color:#FFFFFF;}</style></head>');
  handle.document.write('<body></body></html>');
  handle.moveTo(l, t);

}
