function wHideDisplay(id)
{
   el  = xGetElementById(id);
   if(el.style.display == "none")
     el.style.display = ""
   else
     el.style.display = "none";
}
//------------------------------------------------------------------------------
//                          WCOMBO
//------------------------------------------------------------------------------
function onWComboClick(aHidden,aEdit,aDiv,aUrl)
{
  e = xGetElementById(aDiv);
  e.style.position = 'absolute';
  xMoveTo(aDiv,xPageX(aEdit) - xPageX(xParent(aDiv)),
               xPageY(aEdit) - xPageY(xParent(aDiv))+ xHeight(aEdit));

  if (e.first != true)
  {
    e.first = true;

    RefreshContent(aDiv,aUrl,'');
  }
  xZIndex(aDiv,100);
  xShow(aDiv);
}
function onWComboSelect(aHidden,aEdit,aDiv,aHiddenValue,aEditValue)
{
  e = xGetElementById(aEdit);
  e.value = aEditValue;
  e = xGetElementById(aHidden);
  e.value = aHiddenValue;
  xHide(aDiv);
}
function onWComboEditClick(aDiv)
{
  xHide(aDiv);
}
function onWComboEditChange(aHidden,aEdit)
{
  e = xGetElementById(aEdit);
  if ((xDef(e)) && (e.value == ''))
  {
    e = xGetElementById(aHidden);
    if (xDef(e)) e.value = 0;
  }
}

//------------------------------------------------------------------------------
//                          WCALENDAR
//------------------------------------------------------------------------------
function onWCalendarClick(aFirst,aLast,aValue)
{
  first = xGetElementById(aFirst);
  if ((first.value != '') && (aLast != ''))
  {
    last = xGetElementById(aLast);
    last.value = aValue;
  }
  else
    first.value = aValue;
}

