var debug=0;
var framebreak_active=0;
var NoJavaMenue=0;
var MenueBgColor;
var MouseSelectBgColor;
var MenueTextColor;
var MouseSelectTextColor;
var JavaActive=(navigator.javaEnabled()==true);

function checkFrameset()
{
  if (framebreak_active==1)
    if(!parent.Inhalt)
      location.href="http://gl/index.htm?" + location.pathname;
}

function checkFramecall()
{
  if (framebreak_active==1)
    if(location.search) frames.Inhalt.location.href=location.search.substring(1,location.search.length);
}

function WriteLastChangeDate(Text)
{
 document.write("<p class='Small'>(Letztes Änderung" +Text+": " +document.lastModified +")</p>");
}
function WriteLastChangeDateCenter(Text)
{
 document.write("<p class='SmallCenter'>(Letztes Änderung" +Text+": " +document.lastModified +")</p>");
}
function WhichBrowser()
{
  switch(navigator.appName)
  {
    case "Netscape": Br="NS";
    break;
    case "Microsoft Internet Explorer": Br="IE";
    break;
  }
  return Br;
}

function GetAppHeigh(Size)
{
  if (debug==1)
  {
    hoehe=768;
  }
  else
  {
    if (Size==0)
    {
      if(screen.height<=768) hoehe=screen.height;
      else hoehe=screen.height*0.97;
    }
    else
    {
      if(screen.height<=Size) hoehe=screen.height;
      else hoehe=Size;
    }
  }
  return hoehe;
}

function InitAppSize(hoehe)
{
  if(screen.width>1024)
  {
    Breite=1024;
    xpos=(screen.width-1024)/2;
  }
  else
  {
    Breite=screen.width;
    xpos=0;
  }
  window.moveTo(xpos, 0);
  switch(WhichBrowser())
  {
    case "NS":
    {
      window.outerWidth = Breite;
      window.outerHeight = hoehe;
    }
    break;
    case "IE":
    {
      window.resizeTo(Breite,hoehe);
    }
    break;
  }
}

function EinFrame(URL1,F1)
{
  Frame1=eval("parent."+F1);
  if(Frame1.location.href.indexOf(URL1)==-1) Frame1.location.href = URL1;
}

function ZweiFrames(URL1,F1,URL2,F2)
{
  EinFrame(URL1,F1);
  EinFrame(URL2,F2);
}


  var useragent = navigator.userAgent;
  var bName
  var bVer;
  var bVerNb;
  var pos;
  var bf;

  if (useragent.indexOf('Opera') > -1)
  {
    bName = 'Opera';
    bVer = useragent.substring(useragent.indexOf('Opera') + 6);
    bVer = bVer.substring(0, bVer.indexOf(' '));
  }
  else
  {
    if (useragent.indexOf('Gecko') > -1)
    {
      if (useragent.indexOf('Phoenix') > -1)
      {
        bName = 'Phoenix';
        bVer = useragent.substring(useragent.indexOf('Phoenix'), useragent.length);
        bVer = bVer.substring(bVer.indexOf('/')+1, bVer.length);
      }
      else
      {
        if (useragent.indexOf('Netscape') > -1)
        {
          bName = 'Netscape';
          bVer = useragent.substring(useragent.indexOf('Netscape'), useragent.length);
          bVer = bVer.substring(bVer.indexOf('/')+1, bVer.length);
        }
        else
        {
          bName = 'Mozilla';
          bVer = useragent.substring(useragent.indexOf('rv:'), useragent.indexOf(')'));
          bVer = bVer.substring(3, bVer.length);
        }
      }
    }
    else
    {
      if (useragent.indexOf('MSIE') > -1)
      {
        bName = navigator.appName;
        bVer = useragent.substring(useragent.indexOf('MSIE') + 5);
        bVer = bVer.substring(0,bVer.indexOf(';'));
      }
      else
      {
        bName = navigator.appName;
        if (bName == "Netscape")
        {
          bVer = useragent.substring(8);
          bVer = bVer.substring(0, bVer.indexOf(' '));
        }
      }
    }
  bVerNb = parseInt(bVer.substring(0,bVer.indexOf('.')))*100+parseInt(bVer.substring(bVer.indexOf('.')+1,bVer.length));
  }

function open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}
