var int_ScrollDestacadosDirection = 1;
var int_ScrollDestacadosTimer;
var bln_ScrollDestacadosIniciado = false;
var arr_ScrollDestacadosNoticias = new Array();

function fnAddScrollNews(str_Tit, str_Date, str_Body, str_Href) {
  int_pos = arr_ScrollDestacadosNoticias.length
  arr_ScrollDestacadosNoticias[int_pos] = new Array();
  arr_ScrollDestacadosNoticias[int_pos][0] = str_Tit;
  arr_ScrollDestacadosNoticias[int_pos][1] = str_Date;
  arr_ScrollDestacadosNoticias[int_pos][2] = str_Body;
  arr_ScrollDestacadosNoticias[int_pos][3] = str_Href;
  }

function fnInitScrollDestacados() {
  if (document.layers) {
    objDestacados = document.layers['DestacadosDiv'];
    objDestacados.css = objDestacados;
  }else if (document.all) {
    objDestacados = document.all['DestacadosDiv'];
    objDestacados.css = objDestacados.style;
  }else if (document.getElementById) {
    objDestacados = document.getElementById('DestacadosDiv');
    objDestacados.css = objDestacados.style;
    }
  
  int_visible = objDestacados.offsetHeight;
  
  if (!bln_ScrollDestacadosIniciado) {
    str_ExitHTML = '<table height="' + int_visible + '" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td>&nbsp;</td></tr></table>';
    for (i=0; i<arr_ScrollDestacadosNoticias.length; i++) {
      str_ExitHTML += '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
      str_ExitHTML += '  <tr><td><a href="' + arr_ScrollDestacadosNoticias[i][3] + '" class="linkgranate"><b>' + arr_ScrollDestacadosNoticias[i][0] + '</b></a></td></tr>';
      str_ExitHTML += '  <tr><td class="pienaranja">' + arr_ScrollDestacadosNoticias[i][1] + '</td></tr>';
      str_ExitHTML += '  <tr><td class="cuerpo">' + arr_ScrollDestacadosNoticias[i][2] + '</td></tr>';
      str_ExitHTML += '  <tr><td align="center"><img src="images/gen_img_separador.gif" border="0" vspace="6"></td></tr>';
      str_ExitHTML += '</table>';
      }
    str_ExitHTML += '<table height="' + int_visible + '" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td>&nbsp;</td></tr></table>';
    objDestacados.innerHTML = str_ExitHTML;
    }
  bln_ScrollDestacadosIniciado = true;
  
  int_actual = objDestacados.scrollTop;
  int_tope = objDestacados.scrollHeight;
  
  int_chequear = int_visible + int_actual;
  
  if ((int_chequear >= int_tope)) objDestacados.scrollTop = 0;
  objDestacados.scrollTop = objDestacados.scrollTop + (int_ScrollDestacadosDirection);
  
  int_ScrollDestacadosTimer = setTimeout('fnInitScrollDestacados();', 50);
  }

function fnStopScrollDestacados() {
  if (int_ScrollDestacadosTimer) clearTimeout(int_ScrollDestacadosTimer);
  }
