function popup(page, width, height, scrollbar)
{
  props=window.open(page, 'matches', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width='+width+', height='+height+' left = 100, top = 100');
}

function show(what)
{
  document.getElementById(what).style.visibility = "visible";
  document.getElementById("sort_"+what).style.visibility = "visible";
  if(what!="klan"){
    document.getElementById("klan").style.visibility = "hidden";
    document.getElementById("sort_klan").style.visibility = "hidden";
  }
  if(what!="user"){
    document.getElementById("user").style.visibility = "hidden";
    document.getElementById("sort_user").style.visibility = "hidden";

  }
}

function checklogin (what)
{
  if(what=="name"){
    document.login.username.value = "";
    if(document.login.password.value == "")
    {
      document.login.password.value = "lösenord"
    }
  }
  if(what=="pass"){
    document.login.password.value = "";
    if(document.login.username.value == "")
    {
      document.login.username.value = "Användare"
    }
  }
}

function checkresult (what)
{
  if(what=="lag1"){
    document.editera_match.score2.value = 16 - document.editera_match.score1.value;
    if(document.editera_match.score2.value<0)
    {
      document.editera_match.score2.value = 0
    }
  }
  if(what=="lag2"){
    document.editera_match.score1.value = 16 - document.editera_match.score2.value;
    if(document.editera_match.score1.value<0)
    {
      document.editera_match.score1.value = 0
    }
  }
}
