function ShowArt(art) {
  var width = 695
  var height = 415
  var x=(300 - width)/2
  var y=(300-height)/2

  if(screen) {
	  y=(screen.availHeight - height)/2
	  x=(screen.availWidth - width)/2
  }

  if(screen.availWidht > 1800)
	  x=((screen.availWidth/2) - width)/2

  window.open('showarticles.php?art='+art,'articulo','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',resizable=no,scrollbars=yes');
}

function ventayac(width,height,url) {

        x=(640 - width)/2,y=(480-height)/2;

        if(screen) {
                y=(screen.availHeight - height -20)/2;
                x=(screen.availWidth - width)/2;
        }
        if(screen.availWidht > 1800) {
                x=((screen.availWidth/2) - width)/2;
        }
	window.open(url,'Yacimiento','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',resizable=no,scrollbars=yes');
}

function ventana_centrada(width,height,url) {

        x=(640 - width)/2,y=(480-height)/2;

        if(screen) {
                y=(screen.availHeight - height -20)/2;
                x=(screen.availWidth - width)/2;
        }
        if(screen.availWidht > 1800) {
                x=((screen.availWidth/2) - width)/2;
        }
window.open(url,'intro','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',resizable=no');
}

function WindowOpenH (imgurl) {
  var width = 400
  var height = 300
  var x=(400 - width)/2
  var y=(300-height)/2

  if(screen) {
	  y=(screen.availHeight - height)/2
	  x=(screen.availWidth - width)/2
  }

  if(screen.availWidht > 1800)
	  x=((screen.availWidth/2) - width)/2

  window.width=width
  window.height=height
  window.x=x
  window.y=y
	 
  window.open ("showfoto640.html?"+imgurl,"zoom","width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px")
/*
  vn = window.open("","zoom","width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px")
  vn.document.write ('<html><link href="../../../estilos.css" rel="stylesheet" type="text/css"><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><div align="center"><a href="javascript:window.close()"><img src="' + imgurl + '" alt="Pulse para cerrar" border=0></a></div></body></html>')
  vn.document.title="Imagen Ampliada"
*/
}

function WindowOpenV (imgurl) {
  var width = 300
  var height = 300
  var x=(300 - width)/2
  var y=(300-height)/2

  if(screen) {
	  y=(screen.availHeight - height)/2
	  x=(screen.availWidth - width)/2
  }

  if(screen.availWidht > 1800)
	  x=((screen.availWidth/2) - width)/2

  window.width=width
  window.height=height
  window.x=x
  window.y=y

  window.open ("showfoto640.html?"+imgurl,"zoom","width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px")
/*
  vn = window.open("","zoom","width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px")
  vn.document.write ('<html><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><div align="center"><a href="javascript:window.close()"><img src="' + imgurl + '" alt="Pulse para cerrar" border=0></a></div></body></html>')
  vn.document.title="Imagen Ampliada"
*/
}

function ShowFootImage (url, foot) {
  var width = 400
  var height = 300 + 30
  var x=(300 - width)/2
  var y=(300-height)/2

  if(screen) {
	  y=(screen.availHeight - height)/2
	  x=(screen.availWidth - width)/2
  }

  if(screen.availWidht > 1800)
	  x=((screen.availWidth/2) - width)/2

  var idventana = String(Math.round(Math.random()*20));
  
  vn = window.open("","pieimagen_"+String(idventana),"width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px")
  vn.document.write ('<html><head>')
  vn.document.write ('<body bgcolor="#F7DFBD" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">')
  vn.document.write ('<style type="text/css"><!--.piefoto {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #452200;}--></style></head>');
  vn.document.write ('<table border=0 cellspacing=0 cellpadding=0 width=400><tr><td>')
  vn.document.write ('<div align="center">')
  vn.document.write ('<a href="javascript:window.close()"><img src="' + url + '" alt="Pulse para cerrar" border=0></a>')
  vn.document.write ('</div></td></tr>')
  vn.document.write ('<tr><td align="center"><span class="piefoto">' + foot + '</span></td></tr></table>');
  vn.document.write ('</body></html>')
  vn.document.title="Imagen Ampliada"
}

//abrir ventana centrada, con foto
//mostrar foto ampliada, partiendo de una url,nombre de la ventana a abrir y pie, si lo tiene
function ShowPhotoDinamica (url,name,foot) {
  var width = 150;
  var height = 150;
  var x=(640 - width)/2
  var y=(480-height)/2

  if(screen) {
	  y=(screen.availHeight - height)/2
	  x=(screen.availWidth - width)/2
  }

  if(screen.availWidht > 1800)
	  x=((screen.availWidth/2) - width)/2

  window.width=width
  window.height=height
  window.x=x
  window.y=y

  estilo="toolbar=0, status=0, location=0, directories=0, menubar=0, scrollbars=0, resize=0,resizable=0";
  url = foot ? url+'&foot='+escape(foot) : url ;
  name = name ? name : 'newwin';

  vn = window.open(url, name, estilo + ",width=" + width + "px,height=" + height + "px,top=" + y + "px,left=" + x + "px");
  vn.focus();
}