var x,y,a,b;

var name = navigator.userAgent.toLowerCase();
// INTERNET EXPLORER
var ie = (name.indexOf("msie") != -1);
// Netscape
var ns = (name.indexOf("mozilla")!=-1 && name.indexOf("compatible")==-1 && name.indexOf("opera")==-1);

var version = navigator.appVersion;
var nummer  = version.substr(0, version.indexOf("."));
var nsold   = 0;
var nsnew   = 0;


function setupDescriptions()
{
  var x = navigator.appVersion;
  y = x.substring(0,4);
  if (y>=4) setVariables();
}


function setVariables()
{
  if (navigator.appName == "Netscape")
  {
    if (nummer<5)
    {
      nsold = 1;
      nsnew = 0;
      h     = ".left=";
      v     = ".top=";
      dS    = "document.";
      sD    = "";
    }
    else
    {
      nsold = 0;
      nsnew = 1;
      h     = ".left=";
      v     = ".top=";
      dS    = "";
      sD    = ".style";
    }
  }
  else
  {
    nsold = 0;
    nsnew = 0;
    h     = ".pixelLeft=";
    v     = ".pixelTop=";
    dS    = "";
    sD    = ".style";
  }
}


function popLayer(a)
{
  desc = "<table cellpadding=3 border=0><td class='popup'>";
  if (a==1) desc += "click here to see english version";
  if (a==2) desc += "Hier kommen Sie zur deutschen Version.";
  desc += "</td></table>";
  if(nsold)
  {
    document.desLayer.document.write(desc);
    document.desLayer.document.close();
    document.desLayer.left=x+20;
    document.desLayer.top=y;
  }
  else if(nsnew)
  {
    document.getElementById("desLayer").innerHTML=desc;
    document.getElementById("desLayer").style.left=x+20;
    document.getElementById("desLayer").style.top=y;
  }
  else
  {
    desLayer.innerHTML=desc;
    eval(dS+"desLayer"+sD+h+(x+25));
    eval(dS+"desLayer"+sD+v+y);
  }
}


function nextDescrInternal(descr,yoff)
{
  desc = "<table cellpadding=3 border=0><td class='popup'>";
  desc += descr;
  desc += "</td></table>";
  if(nsold)
  {
    document.desLayer.document.write(desc);
    document.desLayer.document.close();
    document.desLayer.left=x+20;
    document.desLayer.top=y+yoff;
  }
  else if(nsnew)
  {
    document.getElementById("desLayer").innerHTML=desc;
    document.getElementById("desLayer").style.left=x+20;
    document.getElementById("desLayer").style.top=y+yoff;
  }
  else
  {
    desLayer.innerHTML=desc;
    xpos = x + 25;
    eval(dS+"desLayer"+sD+h+xpos);
    ypos = y + yoff;
    eval(dS+"desLayer"+sD+v+ypos);
  }
}

function nextDescr(descr)
{
  nextDescrInternal(descr,0);
}

function nextPopupDescr(descr)
{
  nextDescrInternal(descr,-20);
}


function hideLayer(a)
{
  if(nsold)
  {
    document.desLayer.document.write("");
    document.desLayer.document.close();
    document.desLayer.top=a;
  }
  else if (nsnew)
  {
    document.getElementById("desLayer").innerHTML="";
    document.getElementById("desLayer").style.top=a;
  }
  else
  {
    desLayer.innerHTML="";
    eval(dS+"desLayer"+sD+v+a);
  }
}


function handlerMM(e)
{
  x = (ns) ? e.pageX : event.clientX;
  y = (ns) ? e.pageY : event.clientY;
}


if (nsold)
{
  document.captureEvents(Event.MOUSEMOVE);
}

document.onmousemove = handlerMM;

function popUp(popupwidth,popupheight)
{
  popupwidth   = (popupwidth>500)  ? popupwidth  : 500;
  popupheight  = (popupheight>380) ? popupheight : 380;
  var popUpWnd = window.open('', 'popUp','menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=no,width='+popupwidth+',height='+popupheight);
  popUpWnd.focus();
}

function jobNews()
{
  var jobNewsWnd = window.open('', 'jobNews','resizable=yes,menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,width=460,height=520');
  jobNewsWnd.focus();
}

function screenShot()
{
  var screenShotWnd = window.open('', 'screenShot','menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,resizable=yes,width=990,height=540');
  screenShotWnd.focus();
}

function imPrint(popupwidth,popupheight)
{
  popupwidth   = (popupwidth>500)  ? popupwidth  : 500;
  popupheight  = (popupheight>400) ? popupheight : 400;
  var imPrintWnd = window.open('', 'imPrint','menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=no,width='+popupwidth+',height='+popupheight);
  imPrintWnd.focus();
}

function siteMap()
{
  var imSitemapWnd = window.open('', 'siteMap','menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,width=600,height=500');
  imSitemapWnd.focus();
}

function contact(popupwidth,popupheight)
{
  popupwidth  = (popupwidth>500)  ? popupwidth  : 500;
  popupheight = (popupheight>420) ? popupheight : 420;
//  var contact = window.open('', 'contact','menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=no,width='+popupwidth+',height='+popupheight);
  var contact = window.open('', 'contact','resizable=yes,menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=no,width='+popupwidth+',height='+popupheight);
  contact.focus();
}

