Código HTML:
 <script language="javascript"> //script por Tunait var ventana var cont=0 var titulopordefecto = "Perico de los palotes" //texto por defecto a mostrar en la barra de título en caso de omitir el argumento titulo function afoto(cual,titulo) { if(cont==1){ventana.close();ventana=null} if(titulo==null){titulo=titulopordefecto} ventana=window.open('','ventana','resizable=no,sc rollbars=no') ventana.document.write('<html><head><title>' + titulo + '</title></head><body style="overflow:hidden" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no" onUnload="opener.cont=0"><img src="' + cual + '" onLoad="opener.redimensionar(this.width, this.height)">') ventana.document.close() cont++ } function redimensionar(ancho,alto) { ventana.resizeTo(ancho+12,alto+28) ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2) //centra la ventana. Eliminar si no se quiere centrar el popup } </script>
Código PHP:
   <?
$id = $_GET['id'];
// Realizamos la Conexión a la Base de Datos
     require("includes/conexion.php");
     $conexion = mysql_connect("$sql_host", "$sql_user", "$sql_pass") or die(header ("Location:  new_art.php?error_login=0"));
                    mysql_select_db("$sql_db");
// Leyendo y Sumando los Datos 
     $result = mysql_query("SELECT sight from gallery_images where id='".$_GET['id']."' limit 1", $conexion); 
     while($row=mysql_fetch_array($result)){ 
     $sight=$row["sight"]+1;//Y ya ta sumado 
     } 
// Realizamos el Registro de Visita            
     $visita = mysql_query("UPDATE gallery_images SET sight='$sight' WHERE id='".$_GET['id']."'", $conexion);
?>    
 
 
 
  igual tú ponle ese 5 y la ventana se abrirá al mínimo tamaño permitido  
 
