function ConfirmaBorrar(Link, idc)
   {
    var is_confirmed = confirm(idc);
    if (is_confirmed)
       {
       Link.href += '&is_js_confirmed=1';
       }
       return is_confirmed;
   }

//********************************************************************************
var win = null;
function NewWindow(mypage,myname,w,h,scroll)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}


//********************************************************************************
function isBlanco(texto)
   {
   largo = texto.length
   for (i=0; i < largo ; i++ )
       if ( texto.charAt(i) !=" ")
          return false;
   return true
   }


//********************************************************************************
function isValidEmail(texto)
   {
   var addressIsValid = false;
   var invalidPatterns = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;
   var validPatterns = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;
   if (window.RegExp)
      {
      if (!invalidPatterns.test(texto) && validPatterns.test(texto))
         {
         addressIsValid = true;
         }
      else
         {
         addressIsValid = false;
         }
      }
   else
      {
      if(texto.indexOf("@") >= 0)
      addressIsValid = true;
      }
   return addressIsValid;
   }


//**************************************************************
function isNumber(texto)
  {
   largo = texto.length
   if (largo == 0)
   return false;
   for (i=0; i < largo ; i++ )
       if (!isDigit(texto.charAt(i)))
       return false;
   return true
  }


//**************************************************************
function isDigit(caracter)
  {
  if ((caracter.charAt(0) >= "0") && (caracter.charAt(0) <= "9"))
     return  true
  return false
  }


//**************************************************************
function mOvr(src,clrOver)
  {
  if (!src.contains(event.fromElement))
     {
     src.style.cursor = 'hand';
     src.bgColor = clrOver;
     }
  }

function mOut(src,clrIn)
  {
  if (!src.contains(event.toElement))
     {
     src.style.cursor = 'default';
     src.bgColor = clrIn;
     }
  }

function mClk(src)
  {
  if (event.srcElement.tagName=='TD')
     {
     src.children.tags('A')[0].click();
     }
  }



//**************************************************************
function setPointer(theRow, thePointerColor)
{
    if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
        return false;
    }

    var row_cells_cnt           = theRow.cells.length;
    for (var c = 0; c < row_cells_cnt; c++) {
        theRow.cells[c].bgColor = thePointerColor;
    }

    return true;
}

//**************************************************************

function ir(direccion)
  {
  if (direccion != -1) location=direccion
  }


//**************************************************************


//**************************************************************
function Abrir_Ventana()
{
NewWindow("temas.html",'name','640','420','no');
}

function pop()
{
NewWindow("archivo/archivo.html",'name','640','420','no');
//  ventana=window.open("archivo/archivo.html","O","width=640,height=420,scrollbars=no,menu=no,toolbars=no")
}

// This is only needed for Netscape browsers.
    function flashGetHref() { return location.href; }
    function flashPutHref(href) { location.href = href; }
    function flashGetTitle() { return document.title; }
    function flashPutTitle(title) { document.title = title; }