function linc(enllac,linc)
{
	if(enllac!='')
	{
		window.open(enllac);
	}
	else
	{
		document.location=linc;
	}
}
function linca(URL)
{
	win=window.open(URL,'ATA');
}
function on(obj){
obj.className='clson';
}
function off(obj){
obj.className='cloff';
}

var titulopordefecto = "APARTAMENTOS-ATA"; //Si no se especifica un título al llamar a la función colocará el que se especifique aquí
var ventana;
var cont=0;

function PopUpFoto(cual,titulo){
	w = 200;
	h = 200;	
	l = (screen.width-w)/2;
	t = (screen.height-h)/2;
	
	if(cont==1){ventana.close();ventana=null}
	if(titulo==null){titulo=titulopordefecto}
	ventana=window.open('','ventana','resizable=no,scrollbars=no,top='+t+',left='+l+',width='+w+',height='+h)
	ventana.document.write('<html><head><title>' + titulo + '</title></head><body style="overflow:hidden; background:#FFFFFF;" 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
}
