function ventana_centrada_stl(width,height,url,stl) {

		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;
        }

		stl = ((stl==null) || (stl=='') || (! stl)) ? '' :  ',' + stl;
		
		vn=window.open(url,'intro','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+stl);
		vn.focus();
}

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;
        }
		vn=window.open(url,'intro','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',resizable=no');
		vn.focus();
}

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

  vn=window.open ("showfoto640.html?"+imgurl,"zoom","width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px")
  vn.focus();
/*
  vn = window.open("","zoom","width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px")
  vn.document.write ('<html><link href="file:///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

  vn=window.open ("showfoto640.html?"+imgurl,"zoom","width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px")
  vn.focus();
/*
  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 WindowOpenH2 (imgurl) {
  var width = 739
  var height = 443
  var x=(739 - width)/2
  var y=(443-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

  vn=window.open ("showfoto640.html?"+imgurl,"zoom","width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px");
  vn.focus();
/*
  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 WindowOpenH3 (imgurl) {
  var width = 730
  var height = 401
  var x=(730 - width)/2
  var y=(401-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

  vn=window.open("showfoto640.html?"+imgurl,"zoom","width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px")
  vn.focus();
/*
  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 WindowOpenH640 (imgurl,prn) {
  var width = 640
  var height = 480
  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

  if (prn != 'no')
  	htmlprint = '<div id="Impresion" style="position:absolute; left:0px; top:0px; width:49px; height:46px; z-index:3"> <div align="center"><a href="javascript:self.print()"><img src="../../../imagenes/impresion.gif" width="35" height="35" border="0" alt="Imprimir"></a></div></div>';
  else
  	htmlprint = '';
  
  vn=window.open ("showfoto640.html?"+imgurl,"zoom", "width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px");
  vn.focus();
 
/*  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>' + htmlprint + '</body></html>')
  vn.document.title="Imagen Ampliada"*/
}

function WindowOpenH800 (imgurl,prn,alturamax) {
  var width = 800
  var height = (alturamax) ? alturamax : 600
  var x=(800 - width)/2
  var y=(600-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

  if (prn != 'no')
  	htmlprint = '<div id="Impresion" style="position:absolute; left:0px; top:0px; width:49px; height:46px; z-index:3"> <div align="center"><a href="javascript:self.print()"><img src="../../../imagenes/impresion.gif" width="35" height="35" border="0" alt="Imprimir"></a></div></div>';
  else
  	htmlprint = '';
  
 vn=window.open ("showfoto640.html?"+imgurl,"zoom"+height, "width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px");
 vn.focus();
 
/*  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>' + htmlprint + '</body></html>')
  vn.document.title="Imagen Ampliada"*/
}

function WindowOpenH4(imgurl) {
  var width = 780
  var height = 585
  var x=(780 - width)/2
  var y=(585-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

  vn=window.open ("showfoto640.html?"+imgurl,"zoom","width=" + width + "px,height=" + height + "px,resizable=1,top=" + y + "px,left=" + x + "px");
  vn.focus();
/*
  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 ventana_alquileres(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;
        }
		vn=window.open(url,'alquileres','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',resizable=1,scrollbars=1');
		vn.focus();
}

//cambia foto entorno
function cambia_foto(foto){
	contentfoto=document.getElementById("fentorno");
	contentfoto.src=foto;	
}
