// -------------------------------------------
// Funciones para mostrar efectos graficos
// -------------------------------------------

function solapa(texto, largo)
{
    titular(texto, largo, 'N');
}

function carpeta(nombre)
{
    document.write("<img src=images/folder.gif hspace=10 style='vertical-align: middle;'>");
    document.write("<strong>" + nombre + "</strong><p>");
}

function portada(dir)
{
    if (dir == null) dir="";
    page = "en_principal.htm";
    
    if (parent.location == document.location.href && document.location.href.indexOf("file")<0) 
    {
       page="http://www.billetesargentinos.com.ar";
       dir="";
    }
           
    document.write("<center><a href=" + dir + page + "><font face=verdana size=2>");
    document.write("<img src=images/homepage.gif border=0 hspace=4 style='vertical-align: middle;'>Home</a></center>");
}

function volver(link, texto, imagen)
{
    if (imagen == null) imagen = "images/homepage.gif";
    
    document.write("<center><a href=" + link + "><font face=verdana size=2>");
    document.write("<img src=" + imagen + " border=0 hspace=4 style='vertical-align: middle;'>" + texto + "</a></center>");
}

function articulos()
{   
    document.write("<center><a href=articulos.htm><font face=verdana size=2>");
    document.write("<img src=images/homepage.gif border=0 hspace=4 style='vertical-align: middle;'>Artículos</a></center>");
}

function arriba(texto)
{
    document.write("<center><a href=#top><font face=verdana size=2>");
    document.write("<img src=images/homepage.gif border=0 hspace=4 style='vertical-align: middle;'>" + texto + "</a></center>");
}

function pieDePagina()
{   
    document.write("<br>");
    document.write("<table width=100% cellpadding=0 cellspacing=0 border=0>");
    document.write("<tr><td class=redondear>");
    document.write("<div id='xsnazzy'>");
    document.write("<b class='xtop'><b class='xb1'></b><b class='xb2'></b><b class='xb3'></b><b class='xb4'></b></b>");
    document.write("<div class='xboxcontent'><font color=#000000>");

    document.write("<font class=mini><b>Banknotes</b></font>");
    document.write("<br>");    
    document.write("<a href=/billetes/en_primeros_billetes.htm><font class=mini>First Banknotes</a> | </font>");
    document.write("<a href=/billetes/en_serie_progreso.htm><font class=mini>Serie Progreso</a> | </font>");
    document.write("<a href=/billetes/en_moneda_nacional.htm><font class=mini>Moneda Nacional</a> | </font>");
    document.write("<a href=/billetes/en_peso_ley.htm><font class=mini>Peso Ley 18.188</a> | </font>");
    document.write("<a href=/billetes/en_peso_argentino.htm><font class=mini>Peso Argentino</a> | </font>");
    document.write("<a href=/billetes/en_austral.htm><font class=mini>Austral</a> | </font>");
    document.write("<a href=/billetes/en_peso_convertible.htm><font class=mini>Peso Convertible</a> | </font>");
    document.write("<a href=/billetes/en_peso_convertible2.htm><font class=mini>Peso (New Design)</font></a>");
    document.write("<br>");
    document.write("<a href=/billetes/en_peso_fuerte.htm><font class=mini>Peso Fuerte</a> | </font>");
    document.write("<a href=/billetes/en_moneda_corriente.htm><font class=mini>Peso Moneda Corriente</a> | </font>");
    document.write("<a href=/billetes/en_caja_conversion.htm><font class=mini>Caja de Conversión</font></a>");
    document.write("<br>");
    document.write("<font class=mini><b>Coins</b></font>");
    document.write("<br>");    
    document.write("<a href=/monedas/en_primeras_monedas.htm><font class=mini>First Coins</a> | </font>");
    document.write("<a href=/monedas/en_moneda_nacional.htm><font class=mini>Monedas Nacional</a> | </font>");
    document.write("<a href=/monedas/en_peso_ley.htm><font class=mini>Peso Ley 18.188</a> | </font>");
    document.write("<a href=/monedas/en_peso_argentino.htm><font class=mini>Peso Argentino</a> | </font>");
    document.write("<a href=/monedas/en_austral.htm><font class=mini>Austral</a> | </font>");
    document.write("<a href=/monedas/en_peso_convertible.htm><font class=mini>Peso Convertible</a> | </font>");
    document.write("<a href=/monedas/en_serie_iberoamericana.htm><font class=mini>Ibero-American Series</a> | </font>");
    document.write("<a href=/monedas/en_oro_plata.htm><font class=mini>Gold and Silver Coins</a></font>");
    document.write("<br>");
    document.write("<font class=mini><b>Bonds</b></font>");
    document.write("<br>");    
    document.write("<a href=/billetes/en_bonos_federales.htm><font class=mini>Lecop</a> | </font>");
    document.write("<a href=/billetes/en_bonos_buenos_aires.htm><font class=mini>Patacón</a></font>");
    document.write("<br>");

    document.write("</div>");
    document.write("<b class='xbottom'><b class='xb4'></b><b class='xb3'></b><b class='xb2'></b><b class='xb1'></b></b>");
    document.write("</div>");
    document.write("</td></tr></table>");   

    var url = "http://www.billetesargentinos.com.ar";     
    document.write("<br><hr class=linea noshade size=1>");
    document.write("<div align=right><font class=pie><b>Marcelo Calniquer Cayani</b>");
    document.write("<br><a href='" + url + "' target=_top><font class=pie><font color=#362a81>" + url + "</font></font></a>");    
    document.write("</font><br>");
}

function noticia(epigrafe, titulo, texto, link, fecha, foto)
{
    document.write("<font size=-2 color=#666666>" + getMDY(fecha) + " / " + epigrafe.toUpperCase() + "</font>");        
    //document.write("<br><a href=" + link + "><font style='font-size=14pt'>" + titulo + "</font></a>");
    document.write("<br><a href=" + link + "><font size=4>" + titulo + "</font></a>");
    if (esNuevo(fecha) < 15) document.write("<img src=images/new.gif border=0 hspace=5>");
    if (foto != null) document.write("<br><br><img src=images/" + foto + ">");
    document.write("<br><font size=2>" + texto);
    document.write("<br><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td background=images/separador.gif height=10><font style='font-size: 1 pt'>&nbsp;</td></tr></table><br>");
}

function separador()
{
    document.write("<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td background=images/separador.gif height=10><font style='font-size: 1 pt'>&nbsp;</td></tr></table><br>");
}

function ventana(url, ancho, alto, scrollbar)
{
   if (scrollbar == null) scrollbar=yes;
   v = window.open(url,"_popup","height=" + alto + ",top=" + (screen.height - alto)/2 + ",width=" + ancho + ",left=" + (screen.width - ancho)/2 + ",scrollbars=" + scrollbar + ",resizable=no");
   setTimeout('v.focus();',250); 
}

function link(url, texto, imagen)
{
   document.write("<img src=images/links/" + imagen + " border=0 align=left hspace=10>");
   document.write("<a href=" + url + " target=_blank>" + url + "</a>");
   document.write("<br><font color=666666>" + texto + "</font>");
}

function header(texto)
{
   document.write("<table class=header width=100% cellpadding=0 cellspacing=0 border=0>");
   document.write("<tr height=27 style='vertical-align: top;'>");
   document.write("<td width=2><img src=images/tab_left.gif></td>");
   document.write("<td width=100% style='vertical-align: middle; horizontal-align: middle;'>" + texto + "</td>");  
   document.write("<td width=2 style='horizontal-align: right;'><img src=images/tab_right.gif></td>");
   document.write("</tr>");
   document.write("</table>");
}

function redondear(texto)
{
   document.write("<table width=100% cellpadding=0 cellspacing=0 border=0>");
   document.write("<tr><td class=redondear>");
   document.write("<div id='xsnazzy'>");
   document.write("<b class='xtop'><b class='xb1'></b><b class='xb2'></b><b class='xb3'></b><b class='xb4'></b></b>");
   document.write("<div class='xboxcontent'>" + texto + "</div>");
   document.write("<b class='xbottom'><b class='xb4'></b><b class='xb3'></b><b class='xb2'></b><b class='xb1'></b></b>");
   document.write("</div>");
   document.write("</td></tr></table>");   
}

function encabezado(texto)
{
   document.write("<table width=100% cellpadding=0 cellspacing=0 border=0>");
   document.write("<tr><td class=redondear>");
   document.write("<div id='ysnazzy'>");
   document.write("<b class='ytop'><b class='yb1'></b><b class='yb2'></b><b class='yb3'></b><b class='yb4'></b></b>");
   document.write("<div class='yboxcontent'>" + texto + "</div>");
   document.write("<b class='ybottom'><b class='yb4'></b><b class='yb3'></b><b class='yb2'></b><b class='yb1'></b></b>");
   document.write("</div>");
   document.write("</td></tr></table>");   
}

function titular(texto, largo, top)
{
   if (top==null)   top="S";
   if (largo==null) largo=texto.length*8+16;
   
   document.write("<table width=100% cellpadding=0 cellspacing=0 border=0 style='border-bottom: #08c 1px solid;'>");
   document.write("<tr><td width=" + largo + ">");
   document.write("<div id='ysnazzy'>");
   document.write("<b class='ytop'><b class='yb1'></b><b class='yb2'></b><b class='yb3'></b><b class='yb4'></b></b>");
   document.write("<div class='zboxcontent'>"+ texto + "</div>");
   document.write("</div></td>");
   document.write("<td align=right class=blanco>&nbsp;");    
   if (top != "N") document.write("<a href='#top'><img src='images/top.gif' border='0' alt='top'></a>");
   document.write("</td></tr>");
   document.write("</table>");   
}

function addBookmark(title,url) 
{
   if (window.sidebar) 
   { 
      window.sidebar.addPanel(title, url,""); 
   } 
   else if (window.opera && window.print) 
   {
      var elem = document.createElement('a');
      elem.setAttribute('href',url);
      elem.setAttribute('title',title);
      elem.setAttribute('rel','sidebar');
      elem.click();
   } 
   else if (document.all) 
   {
      window.external.AddFavorite(url, title);
   } 
   else 
   {
      alert("Sorry, I can't add to bookmark");
   }
}

function esNuevo(fecha)
{
    var array = fecha.split(" ");

    var fecha = array[2].toLowerCase()  + " " + array[1]  + ", " + array[3];
    var diff  = (Math.round(((new Date())-Date.parse(fecha))/(24*60*60*1000))*1);
    
    return diff;
}

function getMDY(fecha)
{
    var array = fecha.split(" ");

    var fecha = array[2] + " " + array[1]  + ", " + array[3];
    
    return fecha;
}