<!--
var bgcolor;
function mOvr(src, bgcolor)
{
  if (!src.contains(event.fromElement))
  {
    src.style.cursor = 'hand';
    src.bgColor = bgcolor;
  }
}
function mOut(src, bgcolor)
{
  if (!src.contains(event.toElement))
  {
    src.style.cursor = 'default';
    src.bgColor = bgcolor;
  }
}

function mClk(src)
{
  if(event.srcElement.tagName=='TD')
  {
    src.children.tags('A')[0].click()
  }
}




//  ESTA FUNCION ES UTILIZADA PARA CAMBIAR DE COLOR LAS FILAS DE UNA TABLA (<TR>)
//  setPointer() fue extraída de phpMyAdmin
/**
 * This array is used to remember mark status of rows in browse mode
 */
var marked_row = new Array;

/**
 * Sets/unsets the pointer and marker in browse mode
 *
 * @param   object    the table row
 * @param   interger  the row number
 * @param   string    the action calling this script (over, out or click)
 * @param   string    the default background color
 * @param   string    the color to use for mouseover
 * @param   string    the color to use for marking a row
 *
 * @return  boolean  whether pointer is set or not
 */
function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor)
{
    var theCells = null;

    // 1. Pointer and mark feature are disabled or the browser can't get the
    //    row -> exits
    if ((thePointerColor == '' && theMarkColor == '')
        || typeof(theRow.style) == 'undefined') {
        return false;
    }

    // 2. Gets the current row and exits if the browser can't get it
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    // 3. Gets the current color...
    var rowCellsCnt  = theCells.length;
    var domDetect    = null;
    var currentColor = null;
    var newColor     = null;
    // 3.1 ... with DOM compatible browsers except Opera that does not return
    //         valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        domDetect    = true;
    }
    // 3.2 ... with other browsers
    else {
        currentColor = theCells[0].style.backgroundColor;
        domDetect    = false;
    } // end 3

    // 4. Defines the new color
    // 4.1 Current color is the default one
    if (currentColor == ''
        || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
        if (theAction == 'over' && thePointerColor != '') {
            newColor              = thePointerColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
            marked_row[theRowNum] = true;
        }
    }
    // 4.1.2 Current color is the pointer one
    else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()
             && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) {
        if (theAction == 'out') {
            newColor              = theDefaultColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
            marked_row[theRowNum] = true;
        }
    }
    // 4.1.3 Current color is the marker one
    else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {
        if (theAction == 'click') {
            newColor              = (thePointerColor != '')
                                  ? thePointerColor
                                  : theDefaultColor;
            marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])
                                  ? true
                                  : null;
        }
    } // end 4

    // 5. Sets the new color...
    if (newColor) {
        var c = null;
        // 5.1 ... with DOM compatible browsers except Opera
        if (domDetect) {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].setAttribute('bgcolor', newColor, 0);
            } // end for
        }
        // 5.2 ... with other browsers
        else {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].style.backgroundColor = newColor;
            }
        }
    } // end 5

    return true;
}
// end of the 'setPointer()' function


//  Cambia la Imagen de los iconos de las facilidades del Hotel segun corresponda.
//  check:        checkbox (document.formName.CheckBoxName)
//  fImage:       nombre de la imagen (document.images['imageName'])
//  srcImageOn:   url de la imagen que se mostrará cuando el checkbox este 'checked'
//  srcImageOff:  url de la imagen que se mostrará cuando el checkbox este 'unchecked'
function changeCheckboxImage(check, fImage, srcImageOn, srcImageOff)
{
  if (check.checked)
    fImage.src = srcImageOn;
  else
    fImage.src = srcImageOff;
}

function changeImage(imName, srcImage)
{
  imName.src = srcImage;
}

function checkUncheck(check)
{
  if(check.checked)
    check.checked=false;
  else
    check.checked=true;
}

//  New Window Center
//  mypage: url de la pagina
//  myname: nombre de la ventana
//  w:      ancho
//  h:      alto
//  scroll: yes || no
var win= null;
function NewWindow(mypage,myname,w,h,scroll){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=no,toolbar=no,menubar=no,status=no';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

// Show layers, NS4, NS6, MSIE4+
function show(divID)
{
  if (document.layers && document.layers[divID] != null)
  {
    document.layers[divID].visibility = 'visible';
    document.layers[divID].position = 'static';
    document.layers[divID].height = '15px';
  }
  else if (document.all)
  {
    document.all[divID].style.visibility = 'visible';
    document.all[divID].style.position = 'static';
    document.all[divID].style.height = '15px';
  }
  else if (document.getElementByID)
  {
    document.getElementById(''+divID+'').innerHTML=html
  }

  document.getElementById(''+divID+'').style.visibility = 'visible';
  document.getElementById(''+divID+'').style.position = 'static';
  document.getElementById(''+divID+'').style.height = '15px';
}

function hide(divID)
{
  if (document.layers && document.layers[divID] != null)
  {
    document.layers[divID].visibility = 'hidden';
    document.layers[divID].position = 'absolute';
    document.layers[divID].height = '0px';
  }
  else if (document.all)
  {
    document.all[divID].style.visibility = 'hidden';
    document.all[divID].style.position = 'absolute';
    document.all[divID].style.height = '0px';
  }
  else if (document.getElementById)
  {
    document.getElementById(''+divID+'').style.visibility = 'hidden';
    document.getElementById(''+divID+'').style.postition = 'absolute';
    document.getElementById(''+divID+'').style.height = '0px';
  }
  else
    return false;
}


var content;
function divShow(content)
{
  document.write('<div style="position: absolute; top: 0px; right: '+(screen.width-958)/2+'px; width: 80px;">');
  document.write(content);
  document.write('</div>');
}


//  setObjectPostion()
//    Esta funcion devuelve la posicion de una capa (etiqueta DIV)
//    objName:  id de la capa
//    x:  coordenada del eje x dentro del navegador (eje horizontal)
//    y:  coordenada del eje y dentro del navegador (eje vertical)
//    objAlign: aqui se puede definir una alineación para el objeto
//              middle: centro de la ventana del navegador setObjectPosition('divName', 0, 0, 'midle')
//              center-top: centro superior de la ventana del navegador
//              center: centro horizontal, es necesario definir un valor para x
//              left-top: esquina izquierda superior
//              left: sobre izquierda, es necesario definir un valor para x
//              right-top:  esquina deracha superior
//              right:  sobre derecha, es necesario definir x
//              right-y:  sobre derecha de y
function setObjectPosition(objName, x, y, objAlign)
{
  var objName;
  var x;
  var y;
  var objAlign;

  if(document.layers && document.layers[objName] != null)
    obj = document.layers[objName];
  else if(document.all)
    obj=document.all[objName].style;
  else if(document.getElementById)
    obj = document.getElementById(''+objName+'').style;

  //obtengo las dimensiones de la ventana del navegador
  if (parseInt(navigator.appVersion)>3)
  {
    if (navigator.appName=="Netscape")
    {
      winW = window.innerWidth;
      winH = window.innerHeight;

      if(window.innerHeight < window.document.height)
        winW = winW-20;
    }

    if (navigator.appName.indexOf("Microsoft")!=-1)
    {
      winW = document.body.offsetWidth-22;
      winH = document.body.offsetHeight-22;

      if(window.height < document.body.scrollHeight)
        winW = winW-16;
    }
  }

  w = obj.width;
  h = obj.height;

  if(objAlign)
  {
    if(objAlign == 'middle')
    {
      obj.style.left=(window.screen.width/2)-(w/2);
      obj.style.top=(window.screen.availHeight/2)-(h/2);
    }
    else if(objAlign == 'center-top')
    {
      obj.style.left=(window.screen.width/2)-(w/2);
      obj.style.top=0;
    }
    else if(objAlign == 'center')
    {
      obj.style.left=(window.screen.width/2)-(w/2);
      obj.style.top=x;
    }
    else if(objAlign == 'left-top')
    {
      obj.style.left=0;
      obj.style.top=0;
    }
    else if(objAlign == 'left')
    {
      obj.style.left=0;
      obj.style.top=x;
    }
    else if(objAlign == 'right-top')
    {
      obj.style.right=0;
      obj.style.top=0;
    }
    else if(objAlign == 'right')
    {
      obj.style.right=0;
      obj.style.top=x;
    }
    else if(objAlign == 'right-y')
      {
        rest = (winW-y)/2;
        obj.left= winW-rest;
        obj.top=x;
      }
  }
  else
  {
    if(y)
      obj.style.left= y;
    else
      obj.style.left=(window.screen.width/2)-(w/2);

    if(x)
      obj.style.top = x;
    else
      obj.style.top=(window.screen.availHeight/2)-(h/2);
  }
}

function hideFlagsDIV(resV, divID)
{
  if (navigator.appName=="Netscape")
    var resW = window.screen.width;
  else
    var resW = window.screen.availWidth;

  if(resW <= resV)
  {
    if(document.layers && document.layers[divID] != null)
      obj = document.layers[divID];
    else if(document.all)
      obj=document.all[divID].style;
    else if(document.getElementById)
      obj = document.getElementById(''+divID+'').style;

    obj.visibility = 'hidden';
    obj.position = 'absolute';
    obj.left= '0px';
    obj.height = '0px';
    obj.width = '0px';
  }
}
//-->