<!--

// Funciones para el manejo de vistas de datos

var jsSelRow = null;
var jsSelRows = new Array();

function Enfocar(fila)
{
 if (fila.className != "SelectedRow") 
 {
  fila.className = "FocusedRow";
 };
}

function Desenfocar(fila)
{
 if (fila.className != "SelectedRow") 
 {
  fila.className = "MouseOutRow";
 };
}

function Deseleccionar(fila)
{
 fila.className = "MouseOutRow";
}

function Deseleccionar2(fila)
{
 for (i = 0; i < jsSelRows.length; i++)
 {
  if (jsSelRows[i] != null) Deseleccionar(jsSelRows[i]);
 }
}

function Seleccionar(fila)
{
 if (jsSelRow != null)
 {
  Deseleccionar(jsSelRow);
 };

 fila.className = "SelectedRow";
 jsSelRow		= fila;
}

function Seleccionar2(fila)
{

 if (jsSelRow != null)
 {
  Deseleccionar2(fila);
  jsSelRows = new Array();
 };

 fila.className = "SelectedRow";
 jsSelRow		= fila;
 jsSelRows[fila.rowIndex] = fila;
}

function SelMulti(fila)
{
 fila.className = "SelectedRow";
 jsSelRow       = fila;
 jsSelRows[fila.rowIndex] = fila;
}

function SeleccionarMulti(event, fila)
{
 if (event.ctrlKey)
 {
  if (fila.className == "SelectedRow")
  {
   Deseleccionar(fila);
  }
  else 
  {
   SelMulti(fila);
  }
 }
 else Seleccionar2(fila);
}

function SelKeys()
{
 var c = '';

 for (i = 0; i < jsSelRows.length; i++)
 {
  if ((jsSelRows[i] != null) && (jsSelRows[i].className == "SelectedRow"))
  c = c + jsSelRows[i].cells[0].firstChild.nodeValue + ',';
 }
 
 var fin = c.length;
 return c.substring(0, fin - 1);
}

function FilaSel()
{
 return jsSelRow;
}

function Enfocar_Fila(w, i)
{
 var jsRow = w.document.all.TablaVista.rows(i);
 if (i != 1) jsRow.scrollIntoView();
 return jsRow;
}

function Key_Index(a, o)
{
 for (i=0; i <= a.length; i++)
 {
  if (a[i] == o) return i;
 }
}

function ProcMsg(doc)
{
 doc.writeln('<html>');
 doc.writeln('<body bgcolor=Silver>');
 doc.writeln('<table width="100%" height="100%" border="0">');
 doc.writeln('<tr>');
 doc.writeln('<td align="center" height="100%" width="100%">');
 doc.writeln('<font size="2" face="Arial">Procesando...</font>');
 doc.writeln('</td>');
 doc.writeln('</tr>');
 doc.writeln('</table>');
 doc.writeln('</body>');
 doc.writeln('</html>');
 doc.close();
}
//-->
