// JScript source code
function ShowDetails(sID, sPath)
{
  parent.location = sPath + "/afgorelse?vurdnr=" + sID
}

function bodyLoad()
{
  if (document.all("focusControl") != null)
    document.all("focusControl").focus();
}

function doSubmitForm()
{
  var filters = document.all("filters");
  try
  {
    if (filters == null)
      return true;
      
    for (var i = 0; i < filters.length; i++)
    {
      if (filters[i].checked)
        return true;
    }
    
    alert("Du har ikke valgt hvilke medietyper du ønsker at søge i. Vælg mindst en medietype før der fortsættes.");
    return false;
  }
  catch(e)
  {
    return true; //Unsupported
  }
}

function ShowAdditionalOptions()
{
  var bShow = (document.all("searchjoin").selectedIndex > 0);
  document.all("AdditionalOptions").style.display = (bShow ? "" : "none");
  document.all("AdditionalOptions").style.visibility = (bShow ? "" : "hidden");
  document.all("soegknap1").style.display = (bShow ? "none" : "");
  document.all("soegknap1").style.visibility = (bShow ? "hidden" : "");
  if (!bShow)
    document.all("search")(1).value = "";
}

function PrintPage()
{
  if (document.URL.indexOf("?") < 0)
    window.open(document.URL + "?print=1");
  else
    window.open(document.URL + "&print=1");
}
