// Check Frameset
window.onload=CheckFrameset;
function CheckFrameset()
{
  if(top.frames.length > 0)
  {
    top.location.href=self.location;
  }
}

// Statuszeile
function message(txt)
{
  window.status = txt;
}

// Fullscreen
function fullscreen(pfad, width, height)
{
  if(!width || !height)
  {
    width = 900;
    height = 700;
  }
  fullscreenwin = top.window.open(pfad, "Window", "width=" + width + ", height=" + height + ", location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes");
  fullscreenwin.focus();
}

// Bild laden
function preload(img)
{
  var imgobj = new Image();
  imgobj.src = img;
}

// Nachricht anzeigen
function showmessage(text)
{
  var ebene = 0;
  var layername = "textbox";

  if(document.all)
  {
    document.all[layername+ebene].innerHTML = "<layer width=505 height=205>"+text+"</layer>";
  }
  else if(document.layers)
  {
    document.layers[ebene].document.open();
    document.layers[ebene].document.write(text);
    document.layers[ebene].document.close();
  }
}

// PIN aendern
function changePin()
{
  var form = document.glider;
  var pin = form.pin.value;
  var showFields = (pin != "");
  form.color.disabled = showFields;
  form.construction_day.disabled = showFields;
  form.construction_month.disabled = showFields;
  form.construction_year.disabled = showFields;
}


