function DoSearch(el)
{
  if (el.options[el.selectedIndex].value != 'x')
    document.frmForm.submit();
}

function DoSearch_Sort(el)
{
  document.frmForm.sort.value = el.options[el.selectedIndex].value;
  document.frmForm.submit();
}

function ShowRow2(id) {
  var el = document.getElementById(id);
	if (el) { el.style.display = 'block'; }
}

function HideRow2(id) {
  var el = document.getElementById(id);
	if (el) { el.style.display = 'none'; }
}

function ShowForm(pSpecial)
{
  if (pSpecial)
  {
    document.frmForm.mode.value='search_sp';

    ShowRow2('special');
    
    HideRow2('tab01');
    ShowRow2('tab02');
  }
  else
  {
    document.frmForm.mode.value='search';

    HideRow2('special');
    document.frmForm.sSP1.selectedIndex = 0;

    ShowRow2('tab01');
    HideRow2('tab02');
  }
}

function ClearForm()
{
  var fm = document.frmForm;

  fm.sAR1.selectedIndex = 0;
  fm.sAR2.selectedIndex = 0;
  fm.sPRS.selectedIndex = 0;
  fm.sDT.selectedIndex = 0;
  fm.sDAY.selectedIndex = 0;
  fm.sMAX.selectedIndex = 0;
  fm.sBER.selectedIndex = 0;
  fm.sBAR.selectedIndex = 0;
  fm.sSWP.selectedIndex = 0;
  fm.sPET.selectedIndex = 0;
  fm.sSEA.selectedIndex = 0;
  fm.sGLF.selectedIndex = 0;
  if (fm.sSP) { fm.sSP.selectedIndex = 0; }
  
  fm.submit();
}