/*
Simplemente abre una ventana popup centrada en la pantalla indistintamente de la resolucion, he aņadido solo los parametros mas habituales de ventanas popup:
scrolls: 'yes', 'no'
status: 'yes', 'no'
resizable: 'yes','no'
Todos los demas parametros estan como 'no'
*/
function popup(ruta,nombre,ancho,alto){	
	pos_x=(screen.availWidth / 2)-(ancho/2);
	pos_y=(screen.availHeight / 2)-(alto/2);				

	especificaciones = 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+ancho+',height='+alto+',left='+pos_x+',top='+pos_y;	
	open(ruta,nombre,especificaciones);
}

function popup2(ruta,nombre,scrolls,status,resizable,ancho,alto,pos_x,pos_y, centrado){	
if(centrado=='C'){
	pos_x=(screen.availWidth / 2)-(ancho/2);
	pos_y=(screen.availHeight / 2)-(alto/2);				
}

if(centrado=='I'){
	if( typeof( window.innerHeight ) == 'number' ) {
		pos_y=(screen.availHeight) - (window.innerHeight);		
	} else if( document.body && document.body.clientHeight ) {
		pos_y=(screen.availHeight) - (document.body.clientHeight);		
	}

	pos_y = pos_y - 25;
	pos_x = ((screen.availWidth/2) - 385) ;

}


	especificaciones = 'toolbar=no,location=no,directories=no,status='+status+',menubar=no,scrollbars='+scrolls+',resizable='+resizable+',copyhistory=yes,width='+ancho+',height='+alto+',left='+pos_x+',top='+pos_y;	
	open(ruta,nombre,especificaciones+',width='+ancho+',height='+alto+',left='+pos_x+',top='+pos_y);
}