function fichacampo(URL){
   var ample=680;
   var alt=850;
   var izquierda = (screen.availWidth - ample) / 2;
   var arriba = (screen.availHeight - alt) / 2;
   window.open(URL,'','top='+arriba+',left='+izquierda +',scrollbars=yes,resizable=no,width='+ample+',height='+alt);
}

function abreoferta(URL) {
   var ample=500;
   var alt=450;
   var izquierda = (screen.availWidth - ample) / 2;
   var arriba = (screen.availHeight - alt) / 2;
   window.open(URL,'','top='+arriba+',left='+izquierda +',scrollbars=yes,resizable=no,width='+ample+',height='+alt);
}

function abresugerencias(URL) {
   var ample=500;
   var alt=300;
   var izquierda = (screen.availWidth - ample) / 2;
   var arriba = (screen.availHeight - alt) / 2;
   window.open(URL,'','top='+arriba+',left='+izquierda +',scrollbars=yes,resizable=no,width='+ample+',height='+alt);
}

function abrereservarest(URL) {
   var ample=500;
   var alt=340;
   var izquierda = (screen.availWidth - ample) / 2;
   var arriba = (screen.availHeight - alt) / 2;
   window.open(URL,'','top='+arriba+',left='+izquierda +',scrollbars=yes,resizable=no,width='+ample+',height='+alt);
}


function abremini(URL)
{
   var ample=220;
   var alt=100;
   var izquierda = (screen.availWidth - ample) / 2;
   var arriba = (screen.availHeight - alt) / 2;
   window.open(URL,'','top='+arriba+',left='+izquierda +',scrollbars=yes,resizable=no,width='+ample+',height='+alt);
}

function sobre (src, color_sobre ) {
/*if (!src.contains(event.fromElement))*/
src.style.cursor = "default";
src.bgColor = color_sobre ;
src.FontColor=" ff0000 ";

}

function fuera (src, color_fuera ) {
/*if (!src.contains(event.toElement)) {*/
src.style.cursor = "default";
src.bgColor = color_fuera ;

}


function selfecha($ctrl, $idioma, $path)
{
    $fecha = document.getElementById($ctrl).value;
    $pag= $path+'/fechas/selfecha.php?ct=' + $ctrl +'&id='+$idioma;
    if ($fecha!='') $pag = $pag + '&d='+$fecha;
    window.open($pag,'',
                'scrollbars=no,resizable=yes,width=215,height=175');
}


function iluminar(obj, color)
{
  fila = obj;

  for (i=0; ele = fila.getElementsByTagName('td')[i]; i++)
      ele.style.background = color;
}


function TamVentana() {
  var Tamanyo = [0, 0];
  if (typeof window.innerWidth != 'undefined')
  {
    Tamanyo = [
        window.innerWidth,
        window.innerHeight
    ];
  }
  else if (typeof document.documentElement != 'undefined'
      && typeof document.documentElement.clientWidth !=
      'undefined' && document.documentElement.clientWidth != 0)
  {
 Tamanyo = [
        document.documentElement.clientWidth,
        document.documentElement.clientHeight
    ];
  }
  else   {
    Tamanyo = [
        document.getElementsByTagName('body')[0].clientWidth,
        document.getElementsByTagName('body')[0].clientHeight
    ];
  }
  return Tamanyo;
}