var pop = null;

function popdown()
{
  if (pop && !pop.closed) pop.close();
}

function popup(obj,w,h,s)
{
  l=(screen.width)?(screen.width-w)/2:100;
  t=(screen.height)?(screen.height-h)/2:100;

  var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
  if (!url) return true;

  if (s>0)
  {
    var args = 'width='+w+',height='+h+',top='+t+',left='+l+',scrollbars=yes,resizable';
  }
  else
  {
    var args = 'width='+w+',height='+h+',top='+t+',left='+l+',resizable';
  }

  popdown();
  pop = window.open(url,'',args);
  return (pop) ? false : true;
}

//window.onunload = popdown;
//window.onfocus = popdown;

function Fill(Name,Text)
{
  self.document.Gamework.elements[Name].value=Text;
}

function Flip(Name,Bild)
{
  window.document.images[Name].src=Bild;
}

function Delete(Address)
{
  if (confirm("Möchtest du diesen Eintrag wirklich löschen?"))
  {
    location.href=Address;
  }
}

function Change(News,Text)
{
  var Element1=document.getElementById('News');
  var Element2=document.getElementById('Text');

  Element1.innerHTML=News;
  Element2.innerHTML=Text;
}

function News(NewsID)
{
  document.getElementById('Newspage').setAttribute('src','http://wiig.de/news.php?NewsID='+NewsID);
}

document.write('<style type="text/css">.tabber{display:none;}<\/style>');