var explorador = (window.navigator.appName=="Netscape")? false:true;
var directorio;
var ventanaPadre;

  function asignaDirectorio(varDirectorio)
  {
    if ( explorador )
    {
        directorio="";
    }
    else
    {
        directorio=varDirectorio;
    }
  }

  function asignaDirectorio2(varDirectorioN,varDirectorioE)
  {
    if ( explorador )
    {
        directorio=varDirectorioE;
    }
    else
    {
        directorio=varDirectorioN;
    }
  }



  function abrirNuevaVentana(destUrl,ancho,alto){
	var esUsuarioWindows=navigator.userAgent.indexOf('Win')!=-1
        if (explorador)
        {
		  var ancho2=Number(ancho)+5;
		  var alto2=Number(alto)+5;
	        nuevaVentana=window.open(destUrl,"Imagen","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizabel=no,width="+ancho2+",height="+alto2)
        }
        else
        {
	        nuevaVentana=window.open(destUrl,"Imagen","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizabel=no,width="+ancho+",height="+alto)
        }
        if (!esUsuarioWindows){
	        nuevaVentana=window.open(destUrl)
	}
  }

  function abrirNuevaVentana2(destUrl,ancho,alto,ventPadre){
    ventanaPadre=ventPadre;
	var esUsuarioWindows=navigator.userAgent.indexOf('Win')!=-1
        if (explorador)
        {
		  var ancho2=Number(ancho)+5;
		  var alto2=Number(alto)+5;
	        nuevaVentana=window.open(destUrl,"Imagen","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizabel=no,width="+ancho2+",height="+alto2)
        }
        else
        {
	        nuevaVentana=window.open(destUrl,"Imagen","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizabel=no,width="+ancho+",height="+alto)
        }
        if (!esUsuarioWindows){
	        nuevaVentana=window.open(destUrl)
	}
  }



  function creaVentanaImagen(destUrl,ancho,alto,titulo,texto){
	var esUsuarioWindows=navigator.userAgent.indexOf('Win')!=-1
	var nuevaVentana;
        if (explorador)
        {
		  var ancho2=Number(ancho)+30;
		  var alto2=Number(alto)+95;
	      nuevaVentana=window.open(destUrl,titulo,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizabel=no,width="+ancho2+",height="+alto2)
        }
        else
        {
		  var ancho2=Number(ancho)+30;
		  var alto2=Number(alto)+90;
	        nuevaVentana=window.open("",titulo,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizabel=no,width="+ancho2+",height="+alto2)
        }
        if (!esUsuarioWindows){
	        nuevaVentana=window.open(destUrl)
	    }
	    nuevaVentana.document.write('<html><head></head><body bgcolor="#eef1da">');
	    nuevaVentana.document.write('<table border=1>');
	    nuevaVentana.document.write('<tr><td>');
	    nuevaVentana.document.write('<img src='+destUrl+' width='+ancho+' height='+alto+'>');
	    nuevaVentana.document.write('</td></tr>');
	    nuevaVentana.document.write('</table>');
	    nuevaVentana.document.write('&nbsp;<br><center>');
	    nuevaVentana.document.write('<font face="Arial" size="2" color=black>');
	    nuevaVentana.document.write(texto);
	    nuevaVentana.document.write('<br><a href=# onClick="window.close();return false;">Cerrar</a>');
	    nuevaVentana.document.write('</font>');
	    nuevaVentana.document.write('</body></html>');
	    nuevaVentana.document.close();
  }



function ponDocumentoMarco(marco,documento)
{
    window.opener.location=documento;
}

