// JavaScript Document
function abre_imprimir(file,titulo)
{
 if(titulo==""){titulo=titulopordefecto}
 kk_print=window.open('', 'kk_print', 'width=770,height=500, toolbar=no, status=no, scrollbars=no, menubar=no, location=no, resizable=yes'); 
// alert(kk.opener.name);
 kk_print.document.write("<html><head><title>"+ titulo +"</title></head><body marginheight=0 marginwidth=0 topmargin=0 leftmargin=0><iframe width=100% height=100% frameborder=0 marginheight=0 marginwidth=0 hspace=0 vspace=0 src='"+ file +"'></iframe></body></html>");
}

function abre_envio_amigo(file,titulo)
{
 if(titulo==""){titulo=titulopordefecto}
 kk_envio=window.open('', 'kk_envio', 'width=400,height=225, toolbar=no, scrollbars=no, menubar=no, location=no, resizable=yes'); 
 kk_envio.document.write("<html><head><title>"+ titulo +"</title></head><body marginheight=0 marginwidth=0 topmargin=0 leftmargin=0><iframe width=100% height=100% frameborder=0 marginheight=0 marginwidth=0 hspace=0 vspace=0 src='"+ file +"'></iframe></body></html>");
}

function abre_imprimir_foto(fecha, titulo, imagen, prof)
{
// Si descomentamos esta linea, la ventana se cierra y se abre cada vez (no es necesario si utilizamos el onLoad="opener.daFoco()" en el poput)
//if(cont==1){ventana.close();ventana=null} 
if(titulo==""){titulo=titulopordefecto}
var danch = (screen.availWidth / 2)-(400/2); 
var dalt = (screen.availHeight / 2)-(200/2); 
ventana=window.open('','ventana','resizable=yes,scrollbars=no,toolbar=no,directories=no,status=no,width=400,height=200,top='+ dalt +',left='+ danch)
ventana.document.write('<HTML><HEAD><TITLE>' + titulo + '</TITLE><link rel="stylesheet" href="'+ prof +'css/base.css" type="text/css"><link rel="stylesheet" href="'+ prof +'css/baseplant.css" type="text/css"></HEAD><body style="margin:0 "  scroll="no" onLoad="opener.DaFoco()" onUnload="opener.cont=0" onFocus="opener.redimensiona_ventana(fotillo.width+50, fotillo.height+100)"><table width="95%"  border="0" align="center" cellpadding="2" cellspacing="2" >  <tr><td colspan="2" class="plant-txtbold">Información ofrecida por <a href=http://www.e-ayuntamiento.com target=_blank>www.e-ayuntamiento.com</a></td></tr>  <tr><td height="2" colspan="2" class="plant-linea"></td></tr>  <tr>     <td class="plant-txt">' + fecha + '<span class="plant-txtbold">&nbsp;&nbsp;' + titulo + '</span></td>     <td align="right" class="plant-txtbold"><img style="cursor:hand" onClick="window.print()" src="'+ prof +'images/icons/impresora.gif" align="absmiddle"> <a onClick="window.print()" href="#" class="plant-txtbold" style="text-decoration:none">imprimir</a></td></tr>  <tr><td colspan="2" height="1" class="plant-linea"></td></tr>    <tr>  	 <td colspan="2"><table width="100%" align="center" cellpadding="0" cellspacing="0"> <tr><td height="5" colspan="3"></td></tr><tr>		    <td>  <table border="0" cellspacing="0" cellpadding="0" align="center">                     <tr><td height="3"><div align="left"></div></td></tr><tr></tr>    <tr> <td width="10" valign="top"><img name="fotillo" src="'+ prof +'images/visita_virtual/'+ imagen +'" onLoad="opener.redimensiona_ventana(this.width+50, this.height+100)"></td>    </tr> <tr><td height="3"> <div align="left"></div></td></tr></table></td> </tr> </table></td>  </tr><tr><td colspan="2" height="1" class="plant-linea"></td></tr>  </table>  </body></html>');
ventana.document.close();
cont++;
}

