  function abre_janela(url_,top_,left_,width_,height_) 
  {
    url=url_;
    nome="blank";
    parametros="resizable=yes,status=no,menubar=no,scrollbars=no,top=" +top_+ ",left=" + left_ + ",width=" + width_ + ",height=" + height_;
    window.open(url,nome,parametros);
  }

  function abre_janela_rolagem(url_,top_,left_,width_,height_) 
  {
    url=url_;
    nome="blank";
    parametros="resizable=yes,status=no,menubar=no,scrollbars=yes,top=" +top_+ ",left=" + left_ + ",width=" + width_ + ",height=" + height_;
    window.open(url,nome,parametros);
  }



  function abre_foto_auto(img,url)
  {
    fotu1= new Image();
    fotu1.src=(img);
    Controlla(img,url);
  }


  function Controlla(img,url)
  {
    if((fotu1.width!=0)&&(fotu1.height!=0))
    {
      abre_janela(url,(600-fotu1.height)/2,(800-fotu1.width)/2,fotu1.width,fotu1.height)
    }

    else
    {
      funzione="Controlla('"+img+"','"+url+"')";
      intervallo=setTimeout(funzione,20);
    }
  }




  function abre_foto_rolagem_auto(img,url)
  {
    fotu1= new Image();
    fotu1.src=(img);
    controlla_rolagem(img,url);
  }


  function controlla_rolagem(img,url)
  {
    if((fotu1.width!=0)&&(fotu1.height!=0))
    {
      abre_janela_rolagem(url,(600-fotu1.height)/2,(800-fotu1.width)/2,fotu1.width+16,fotu1.height+20)
    }

    else
    {
      funzione="controlla_rolagem('"+img+"','"+url+"')";
      intervallo=setTimeout(funzione,20);
    }
  }
