function lanzaDireccion(direccion,w,h,param){
  // Tenemos que centrarla en la pantalla
  var left = screen.width/2 - w/2;
  var top = screen.height/2 - h/2;  
  var pars = "height="+h+",width="+w+",top="+top+",left="+left;
  if(param) pars+=","+param;
  var v = window.open(direccion,"",pars);
  // Esto arregla problemas con firefox
  v.innerHeight=h;
  v.innerWidth = w;
}
function lanzaVentanaConRatio(web,f,r,titulo){
	// f : Porcentaje de pantalla a lo ancho
	// r : Realcion de aspecto ancho/alto
	var w,h,hs;
	w = screen.width*f;
	r=(r==null)?(screen.height*f):r;	
	h = w*(1/r);
	lanzaDireccion(web,w,h);
	
}
