// Schalter für News-Verwendung
var mitnews = true;
// logo 600 x 349
var logo_x     	= 600;
var logo_y     	= 349;
var w1024   		= screen.width >= 1024;
var breite1024 	= 990;
var hoehe1024  	= 667;
var breite800  	= 756;
var hoehe800   	= 532;
var arb_breite 	= 0;
var arb_hoehe		= 0;
var deutsch    	= 1;
var englisch   	= 2;
var sprache    	= 2;
var menueH     	= 0;
var hm_farbe   	= '#00BBFF'
var hmenarray  	= new Array ( 10 );
var akthmid    	= null;
var aktumid    = null;
var akthmumid  	= null;
var divum      	= null;
var divinh     	= null;
var divinhu    	= null;
var bildg      	= null;
var startbs    	= null;
var startbild  	= null;
var divarb     	= null;
var divpdf     	= null;
var divsuch    	= null;
var allgroup   	= null;
var proghref   	= '';
var prgprogram 	= '';
var prgtabelle 	= '';
var globFontS  	= 0;
var refArr     	= new Array ( );
		posArr     	= 0;
var druckid    	= '';
var inpmmouse  	= false;   // für Netscape
var isNS       	= navigator.appName == 'Netscape';
var akthpmz    	= null;
var aktupmz    	= null;
var winpdf     	= null;
var bildGrosz  	= 0;
var bildo      	= null;
var bildg      	= null;

if ( parent.frames.length > 0 ) {
	top.location.href = self.document.location.href;
}
for ( i = 0; i < 10; i++ ) {
  hmenarray [ i ] = 0;
}

if ( location.host == 'localhost' ) {
  prgprogram  = 'ft_server';
  prgbereich  = 'ft_server';
  prgtabelle  = 'ft_server';
  proghref 		= 'http://localhost/cgi-bin/';
}
else {
  prgprogram  = 'ft_server';
  prgbereich  = 'ft_server';
  prgtabelle  = 'ft_server';
  proghref = 'http://' + location.host + '/cgi-bin/';
}
function openpdf ( pdfname ) {
  if ( winpdf != null ) winpdf.close ( );
  winpdf = window.open ( pdfname, 'w_pdf', '' );
  return winpdf;
}
function spracheover ( d ) {
  with ( d.style ) {
    cursor = "pointer";
  }
}
function spracheout ( d ) {
  with ( d.style ) {
    cursor = "normal";
  }
}
function deutsch_click ( wobj ) {
	starte_katalog ( deutsch );
}
function englisch_click ( wobj ) {
	starte_katalog ( englisch );
}
function getZahl ( s ) {
  hs = '';
  if ( s.length > 0 ) {
    for ( i = 0; i < s.length - 1; i++ ) {
      if ( s.substr ( i, 1 ) <= '9' ) {
        if ( s.substr ( i, 1 ) >= '0' ) { hs = hs + s.substr ( i, 1 ); }
      }
    }
  }
  if ( hs == '' ) { return 0; }
  else {
    if ( hs.substr ( 0, 1 ) == '0' ) {
      if ( hs.length > 1 ) {
        hs = hs.substr ( 1, hs.length - 1 );
      }
    }
    return parseInt ( hs );
  }
}
function ummouseover ( e ) {
  if ( akthmumid == e ) return;
  with ( e.style ) {
    backgroundColor = '#000088';
    color = 'white';
    cursor="pointer";
  }
}
function ummouseout ( e ) {
  if ( akthmumid == e ) return;
  with ( e.style ) {
    backgroundColor = hm_farbe;
    color = 'blue';
    cursor="normal";
  }
}
function setze_umitem ( d ) {
  altakthmumid = akthmumid;
  akthmumid = d;
  if ( altakthmumid != null ) { hmmouseout ( altakthmumid ); }
  d.style.backgroundColor = "#CC0000"
  d.style.cursor="normal";
}
function ummouseclick ( e ) {
  if ( akthmumid == e ) return;
  setze_hmitem ( document.getElementById ( 'hm' + hminummer ( e ) ) );
  untermenueaus ( hminummer ( e ), hmenarray [ hminummer ( e ) ] );
  setze_umitem ( e );
  switch ( e.id ) {
    case 'um51' : eineSeite ( 'firma' );
                  break;
    case 'um52' : eineSeite ( 'kontakt' );
                  break;
    case 'um53' : eineSeite ( 'impressum' );
                  break;
  }
}
function addSubMenueEintrag ( hid, uid, b, t, h, es ) {
  uhse = '<span id="um' + hid + uid + '" ' +
               'onclick="ummouseclick(this)" ' +
               'onmouseover="ummouseover(this)" ' +
               'onmouseout="ummouseout(this)" ' +
               'style="position:absolute;' +
                      'left:0px;top:' + t + 'px;width:' + b + 'px;height:' + h + 'px;' +
                      'background-color:' + hm_farbe + ';color:blue;' +
                      'border-style:solid;border-width:1px;border-color:blue;' +
                      'visibility:hidden;z-index:21">' +
         es +
         '</span>';
  return uhse;
}
function hmmouseover ( d ) {
	if ( d != akthmid ) {
		with ( d.style ) {
      backgroundColor = "blue";
      color = "white";
      cursor="pointer";
    }
  }
  anzum = hmenarray [ d.id.substr ( 2, 1 ) ];
  if ( anzum > 0 ) {
    for ( i = 1; i <= anzum; i++ ) {
      um = document.getElementById ( 'um' + d.id.substr ( 2, 1 ) + i );
      if ( um != null ) {
        um.style.visibility = 'visible';
      }
    }
  }
}
function untermenueaus ( mn, ai ) {
  for ( i = 1; i <= ai; i++ ) {
    um = document.getElementById ( 'um' + mn + i );
    if ( um != null ) um.style.visibility = 'hidden';
  }
}
function hminummer ( d ) {
  return d.id.substr ( 2, 1 );
}
function hmmouseout ( d ) {
  if ( d != akthmid ) {
    with ( d.style ) {
      backgroundColor = hm_farbe;
      color = "blue";
      cursor="normal";
    }
  }
  anzum = hmenarray [ hminummer ( d ) ];
  if ( anzum > 0 ) untermenueaus ( hminummer ( d ), anzum );
}
function startseite ( ) {
  divum.style.visibility = 'hidden';
  divinh.style.visibility = 'hidden';
  divpdf.style.visibility = 'hidden';
  startbs.style.visibility = 'hidden';
  startbild.style.visibility = 'visible';
}
function setze_hmitem ( d ) {
  altakthmid = akthmid;
  akthmid = d;
  if ( altakthmid != null ) { hmmouseout ( altakthmid ); }
  d.style.backgroundColor = "red"
  d.style.cursor="normal";
}
function eineSeite ( dn ) {
  if ( sprache == deutsch ) dn = dn + 'd'; else dn = dn + 'e';
  dn = dn + '.htm';
  divum.style.visibility = 'hidden';
  divpdf.style.visibility = 'hidden';
  divinh.style.visibility = 'hidden';
  startbs.style.visibility = 'visible';
  hs = '<iframe src="/ft_html/' + dn + '" ' +
               'name="frstartbs" frameborder="no" ' +
               'style="position:absolute;left:0px;top:0px;' +
                      'border:0px;' +
                      'width:' + getZahl ( startbs.style.width ) + 'px;' +
                      'height:' + getZahl ( startbs.style.height ) + 'px">' +
       '</iframe>';
  startbs.innerHTML = hs;
}
function lade_anwendung ( ) {
	agmouseclick ( allgroup );
	if ( sprache == deutsch ) datname = 'ge'; else datname = 'en';
	if ( w1024 ) datname = datname + '1024'; else datname = datname + '800';
	datname = '/ft_html/ftanwendung' + datname + '.htm';
	//datname = '/cgi-bin/ftanwendung' + datname + '.htm';
	
	frstartbs.location.href = datname;
	/*
	hs = proghref + prgprogram + '.exe/getanwendung?' +
       'sprache=' + sprache + '&' +
       'w1024=' + w1024;
  frstartbs.location.href = hs;
  hs = proghref + prgprogram + '.exe/getprogram?' +
       'sprache=' + sprache + '&' +
       'w1024=' + w1024;
  if ( sprache == deutsch ) { datname = 'ftprogge.htm'; }
  else { datname = 'ftprogen.htm'; }
  if ( location.host == 'localhost' ) {
    frum.location.href = hs;
  }
  else {
    frum.location.href = '/cgi-bin/ft_daten/' + datname;
  }*/
}
function anwendungsseite ( ) {
  divum.style.visibility = 'hidden';
  divpdf.style.visibility = 'hidden';
  divinh.style.visibility = 'hidden';
  startbs.style.visibility = 'visible';
  hbw = getZahl ( startbs.style.width );
  hbh = getZahl ( startbs.style.height );
  if ( w1024 ) { hss = 36; } else { hss = 28; }
  hs = '<img src="/ft_pict/logohinten.gif" ' +
            'style="position:absolute;left:0px;top:0px;' +
                   'width:' + hbw + 'px;' +
                   'height:' + hbh + 'px">' +
       '<div style="position:absolute;' +
                   'top:' + eval ( ( hbh / 2 ) - 40 ) + 'px;' +
                   'width:' + hbw + 'px;' +
                   'font-size:' + eval ( hss ) + ';' +
                   'color:blue;' +
                   'font-family:arial;font-weight:bold;' +
                   'text-align:center">' +
       hs +
       '</div>';
  hs = '<iframe src="JavaScript:parent.lade_anwendung()" ' +
               'name="frstartbs" frameborder="no" ' +
               'style="position:absolute;left:0px;top:0px;' +
                      'border:0px;' +
                      'width:' + getZahl ( startbs.style.width ) + 'px;' +
                      'height:' + getZahl ( startbs.style.height ) + 'px">' +
       '</iframe>';
  startbs.innerHTML = hs;
}
function init_katalog ( ) {
  aktupmz = null;
  if ( frinh == null ) { return; }
  with ( divum.style ) {
    top = getZahl ( startbs.style.top );
    height = getZahl ( startbs.style.height );
  }
  divum.style.visibility = "visible";
  divinh.style.visibility = "visible";
  with ( divinh.style ) {
    wh = eval ( getZahl ( height ) - getZahl ( divinhu.style.height ) )
    hs = '<img src="/ft_pict/logohinten.gif" ' +
              'style="position:absolute;left:0px;top:0px;' +
                     'width:' + getZahl ( width ) + 'px;' +
                     'height:' + wh + 'px">';
  }
  frinh.document.write ( hs );
  if ( startbs != null ) {
    startbs.style.visibility = "hidden";
  }
  allgroup.style.visibility = "hidden";
  divsuch.style.visibility = 'visible';
}
function frum_src ( ) {
	if ( sprache == deutsch ) { ws = 'ge'; } else { ws = 'en'; }
	if ( w1024 ) { ws = ws + '1024'; } else { ws = ws + '800'; }
	return '/ft_html/ftprog' + ws + '.htm';
	/*
	if ( location.host == 'localhost' ) {
		return	proghref + prgprogram + '.exe/getprogram?' +
       			'sprache=' + sprache + '&' +
       			'w1024=' + w1024;
	}
	else {
		if ( sprache == deutsch ) { 
			return 'ftprogge.htm'; 
		}
  	else { 
  		return 'ftprogen.htm'; 
  	}
	}
	*/
}
function katalogAnzeige ( d ) {
	agmouseclick ( allgroup );
  init_katalog ( );
  /*
  hs = proghref + prgprogram + '.exe/getprogram?' +
       'sprache=' + sprache + '&' +
       'w1024=' + w1024;
  if ( sprache == deutsch ) { datname = 'ftprogge.htm'; }
  else { datname = 'ftprogen.htm'; }
  if ( location.host == 'localhost' ) {
    frum.location.href = hs;
  }
  else {
    //frum.location.href = hs;
    frum.location.href = '/cgi-bin/ft_daten/' + datname;
  }*/
}
function hmclick ( d ) {
  if ( hmenarray [ hminummer ( d ) ] != 0 ) return;
  if ( d == akthmid ) { return; }
  divarb.style.visibility = 'hidden';
  if ( startbs != null ) {
    if ( d.id.substr ( 2, 1 ) != '1' ) {
      startbild.style.visibility = 'hidden';
    }
  }
  setze_hmitem ( d );
  if ( akthmumid != null ) {
    makthmumid = akthmumid;
    akthmumid = null;
    hmmouseout ( makthmumid );
  }
  switch ( d.id.substr ( 2, 1 ) ) {
    case '1' : startseite ( );
               break;
    case '2' : katalogAnzeige ( d );
               break;
    case '3' : anwendungsseite ( );
               break;
    case '4' : eineSeite ( 'news' );
               break;
    case '5' : eineSeite ( 'firma' );
               break;
  }
}
function addHMItem ( wid, l, t, b, s, up ) {
  if ( w1024 ) {
    fs = 20;
  }
  else {
    fs = 16;
  }
  if ( menueH == 0 ) { menueH = fs + 4; };
  hs = '<div id="hm' + wid + '" ' +
            'style="position:absolute;' +
                  'left:' + l + 'px;top:' + t + 'px;' +
                  'width:' + b + 'px;height:' + menueH + 'px;' +
                  'font-family:arial;' +
                  'text-align:center;font-weight:bold;font-size:' + fs + ';' +
                  'z-index:15;' +
                  'background-color:' + hm_farbe + ';color:blue" ' +
            'onclick="hmclick(this)" ' +
            'onmouseover="hmmouseover(this)" ' +
            'onmouseout="hmmouseout(this)">' +
       s;
  if ( up != null ) hs = hs + up ( wid, b, menueH );
  hs = hs + '</div>';
  return hs;
}
function char_Enthalten ( c, s ) {
  if ( s.length > 0 ) {
    for ( i = 0; i < s.length - 1; i++ ) {
      if ( s.substr ( i, 1 ) == c ) { return i; }
    }
  return 0;
  }
}
function nameRef ( name, ref, htmls ) {
  this.name = name;
  this.ref = ref;
  this.htmls = htmls
}
function getReferenz ( id ) {
  for ( i = 0; i < refArr.length - 1; i++ ) {
    if ( refArr [ i ].name == id ) {
      return refArr [ i ].ref;
    }
  }
  return 0;
}
function getIDvonRef ( r ) {
  for ( i = 0; i < refArr.length - 1; i++ ) {
    if ( refArr [ i ].ref == r ) {
      return refArr [ i ].name;
    }
  }
  return '';
}
function addRef ( name, ref, htmls ) {
  nar = new nameRef ( name, ref, htmls );
  refArr [ posArr ] = nar;
  ++posArr;
}
function hm_mouseover ( d ) {
  with ( d.style ) {
    border = "1px solid black";
    cursor = "pointer";
    fontWeight = "bold";
  }
}
function hm_mouseout ( d ) {
  with ( d.style ) {
    border = "0px";
    fontWeight = "normal";
    cursor = "normal";
  }
}
function pm_mouseover ( d ) {
  if ( inpmmouse ) { return }
  inpmmouse = true;
  with ( d.style ) {
    top = getZahl ( top ) - 1;
    left = getZahl ( left ) - 1;
    width = getZahl ( width ) + 2;
    height = getZahl ( height ) + 2;
    cursor = "pointer";
    borderWidth = 2;
    hm_mouseover ( frum.document.getElementById ( 'text' + d.id.substr ( 2, d.id.length - 2 ) ) );
  }
}
function pm_mouseout ( d ) {
  if ( !inpmmouse ) { return; }
  inpmmouse = false;
  with ( d.style ) {
    top = getZahl ( d.style.top ) + 1;
    left = getZahl ( left ) + 1;
    width = getZahl ( width ) - 2;
    height = getZahl ( height ) - 2;
    cursor = "normal";
    borderWidth = 1;
  }
  hm_mouseout ( frum.document.getElementById ( 'text' + d.id.substr ( 2, d.id.length - 2 ) ) );
}
function umEintrag ( i ) {
  if ( i < 10 ) { return '0' + i; }
  else { return '' + i; }
}
function einMenueEin ( mis ) {
  var pum = null;
  var spum = '';
  var aum = 1;
  var smis = mis;
  var um = frum.document.getElementById ( smis + umEintrag ( aum ) );
  while ( um != null ) {
    um.style.visibility = "visible";
    spum = 'pm' + um.id.substr ( 2, um.id.length - 2 );
    pum = frum.document.getElementById ( spum );
    if ( pum != null ) {
      if ( pum.innerHTML == '-' ) {
        einMenueEin ( smis + umEintrag ( aum ) );
      }
    }
    ++aum;
    um = frum.document.getElementById ( smis + umEintrag ( aum ) );
    if ( um == null ) {
      ++aum;
      um = frum.document.getElementById ( smis + umEintrag ( aum ) );
    }
  }
}
function einMenueAus ( mis ) {
  var pum = null;
  var spum = '';
  var aum = 1;
  var smis = mis;
  var um = frum.document.getElementById ( smis + umEintrag ( aum ) );
  while ( !( um == null ) ) {
    um.style.visibility = "hidden";
    um.style.top = 0;
    spum = 'pm' + um.id.substr ( 2, um.id.length - 2 );
    pum = frum.document.getElementById ( spum );
    if ( pum != null ) {
      if ( pum.innerHTML == '-' ) {
        pum.innerHTML = '+';
        einMenueAus ( smis + umEintrag ( aum ) );
      }
    }
    ++aum;
    um = frum.document.getElementById ( smis + umEintrag ( aum ) );
    if ( um == null ) {
      ++aum;
      um = frum.document.getElementById ( smis + umEintrag ( aum ) );
    }
  }
}
function hmenEinAus ( ea, ami ) {
  aktid = 1;
  wmi = 'mi' + umEintrag ( aktid );
  dwmi = frum.document.getElementById ( wmi );
  while ( dwmi != null ) {
    if ( ea ) { dwmi.style.visibility = "visible"; }
    else {
      if ( wmi != ami ) { dwmi.style.visibility = "hidden"; }
      else { dwmi.style.visibility = "visible"; }
    }
    ++aktid;
    wmi = 'mi' + umEintrag ( aktid );
    dwmi = frum.document.getElementById ( wmi );
  }
}
function pm_mouseclick ( d ) {
  c = d.innerHTML;
  dtop = getZahl ( d.style.top );
  ame = 'mi' + d.id.substr ( 2, d.id.length - 2 );
  if ( c == '+' ) {
    if ( d.id.length == 6 ) {
      if ( aktupmz != null ) {
        aktupmz.innerHTML = '+';
        einMenueAus ( 'mi' + aktupmz.id.substr ( 2, 4 ) );
      }
      aktupmz = d;
    }
    d.innerHTML = '-';
    if ( d.id.length == 4 ) {
      akthpmz = d;
      hmenEinAus ( false, ame );
      allgroup.style.visibility = 'visible';
      divsuch.style.visibility = 'hidden';
      with ( divum.style ) {
        top = getZahl ( top ) + getZahl ( allgroup.style.height );
        height = getZahl ( height ) - getZahl ( allgroup.style.height );
      }
    }
    if ( d.id.length == 6 ) {
      druckid = d.id;
      divpdf.style.visibility = 'visible';
    }
    einMenueEin ( ame );
    alladjustMenue ( 'mi', 1, 5 );
  }
  else {
    if ( d.id.length == 6 ) { aktupmz = null;}
    divpdf.style.visibility = 'hidden';
    d.innerHTML = '+';
    einMenueAus ( ame );
    if ( d.id.length == 4 ) {
      akthpmz = null;
      hmenEinAus ( true, ame );
      allgroup.style.visibility = 'hidden';
      divsuch.style.visibility = 'visible';
      with ( divum.style ) {
        top = getZahl ( top ) - getZahl ( allgroup.style.height );
        height = getZahl ( height ) + getZahl ( allgroup.style.height );
      }
    }
    alladjustMenue ( 'mi', 1, 5 );
  }
  if ( isNS ) {
    if ( dtop != getZahl ( d.style.top ) ) {
      pm_mouseout ( d );
    }
  }
}
function alladjustMenue ( smi, aid, ntop ) {
  antop = adjustMenue ( smi, aid, ntop );
  return antop;
}
function adjustMenue ( smi, aid, ntop ) {
  var dpmi = null;
  var iaid = aid;
  var ismi = smi;
  var intop = ntop;
  var ami = ismi + umEintrag ( iaid );
  var pmi = 'pm' + ismi.substr ( 2, ismi.length - 2 );
  var dami = frum.document.getElementById ( ami );
  var usediv;
  if ( dami == null ) { return ntop; }
  while ( dami != null ) {
    usediv = ami.length > 4;
    if ( !usediv ) { usediv = dami.style.visibility == 'visible'; }
    if ( usediv ) {
      dami.style.top = intop;
      dpmi = frum.document.getElementById ( pmi + umEintrag ( iaid ) );
      intop = intop + getZahl ( dami.style.height );
      if ( !( dpmi == null ) ) {
        if ( dpmi.innerHTML == '-' ) {
          intop = adjustMenue ( ismi + umEintrag ( iaid ), 1, intop );
        }
      }
    }
    ++iaid;
    dami = frum.document.getElementById ( ismi + umEintrag ( iaid ) );
    if ( dami == null ) {
      ++iaid;
      dami = frum.document.getElementById ( ismi + umEintrag ( iaid ) );
    }
  }
  return intop;
}
function hm_mouseclick ( d ) {
  spmz = 'pm' + d.id.substr ( 4, d.id.length - 4 );
  dpmz = frum.document.getElementById ( spmz );
  if ( dpmz != null ) pm_mouseclick ( dpmz );
}
function um_mouseover ( d ) {
  with ( d.style ) {
    if ( d != aktumid ) {
      color = "white";
      fontWeight = "bold";
      cursor = "pointer";
    }
    else { cursor = "normal"; }
  }
}
function um_mouseout ( d ) {
  if ( d != aktumid ) {
    with ( d.style ) {
      color = "black";
      fontWeight ="normal";
      cursor = "normal";
      border = "0px";
    }
  }
}
function getHTMLS ( id ) {
  for ( i = 0; i < refArr.length - 1; i++ ) {
    if ( refArr [ i ].name == id ) {
      return refArr [ i ].htmls;
    }
  }
  return "";
}
function getZStr ( s ) {
  ws = s;
  if ( ws.length > 0 ) {
    if ( ws.substr ( 0, 1 ) == '0' ) {
      ws = ws.substr ( 1, 1 );
    }
  }
  return ( ws );
}
function um_mouseclick ( d ) {
  if ( d != aktumid ) {
    aktid = d.id;
    altaktumid = aktumid;
    aktumid = d;
    if ( altaktumid != null ) { um_mouseout ( altaktumid ); }
    with ( d.style ) {
      color = "white";
      fontWeight = "bold";
      border = "1px solid white";
    }
    hs = getHTMLS ( d.id );
    if ( hs == "" ) {
      grRef = getReferenz ( d.id );
      hs = 'w1024=' + w1024 +
           '&gruppe=' + grRef +
           '&breite=' + getZahl ( divinh.style.width ) +
           '&hoehe=' + eval ( getZahl ( divinh.style.height ) -
                              getZahl ( divinhu.style.height ) ) +
           '&sprache=' + sprache +
           '&bereich=';
      if ( d.id.length < 11 ) {
        hs = proghref + prgbereich + '.exe/getbereich?' +
             hs +
             getZStr ( d.id.substr ( 8, 2 ) );
      }
      else {
        hs = proghref + prgtabelle + '.exe/gettabelle?' +
             hs +
             getZStr ( d.id.substr ( 10, 2 ) );
      }
    }
    else {
      divpdf.visibility = 'hidden';
      hs = '/ft_html/' + hs;
    }
    frinh.location.href = hs;
  }
}
function addEintrag ( id, l, t, h, pmz, s, v, r, htmls ) {
  chpos = char_Enthalten ( '#', s );
  if ( chpos > 0 ) { wh = h + h; } else { wh = h; }
  hs = '<div id="mi' + id + '" ' +
            'style="position:absolute;left:' + l + 'px;top:' + t + 'px;' +
                   'width:' + eval ( getZahl ( divum.style.width ) - l ) + 'px;' +
                   'height:' + wh + 'px';
  if ( !v ) {
    hs = hs + ';visibility:hidden';
  }
  hs = hs + '">';
  df = 0;
  switch ( id.length ) {
    case 2 : df = 0;
             break;
    case 4 : df = 1;
             break;
    case 6 : df = 2;
             break;
    case 8 : df = 3;
             break;
  }
  idstr = '';
  if ( pmz ) {
    idstr = 'pm' + id;
    hs = hs +
         '<div id="' + idstr + '" ' +
              'style="position:absolute;left:3px;top:3px;' +
                     'height:' + eval ( h - 6 ) + 'px;' +
                     'width:' + eval ( h - 6 ) + 'px;' +
                     'border-style:solid;border-width:1px;border-color:black;' +
                     'font-size:' + eval ( globFontS - 4 ) + ';' +
                     'text-align:center;font-weight:normal" ' +
                     'onclick="parent.pm_mouseclick(this)" ' +
                     'onmouseover="parent.pm_mouseover(this)" ' +
                     'onmouseout="parent.pm_mouseout(this)">' +
         '+' +
         '</div>';
  }
  addRef ( 'text' + id, r, htmls );
  hs = hs +
       '<div name="r' +  r + '" id="text' + id + '" ' +
            'style="position:absolute;left:' + eval ( h + 1 ) + 'px;' +
                   'top:2px;height:' + eval ( wh - 2 ) + 'px;' +
                   'font-family:arial;' +
                   'text-align:left;font-size:' + eval ( globFontS - df );
  if ( pmz ) {
    hs = hs + '" ' +
         'onmouseover="parent.hm_mouseover(this)" ' +
         'onclick="parent.hm_mouseclick(this)" ' +
         'onmouseout="parent.hm_mouseout(this)';
  }
  else {
    hs = hs + '" ' +
         'onmouseover="parent.um_mouseover(this)" ' +
         'onclick="parent.um_mouseclick(this)" ' +
         'onmouseout="parent.um_mouseout(this)';
  }
  hs = hs + '">';
  if ( chpos == 0 ) {
    hs = hs + s;
  }
  else {
    hs = hs + s.substr ( 0, chpos ) + '<br>' +
              s.substr ( chpos + 1, s.length - chpos );
  }
  hs = hs + '</div></div>';
  frum.document.write ( hs );
}
function addSubMenueFirma ( hid, b, h ) {
  hmenarray [ hid ] = 3;
  if ( sprache == deutsch ) { hms = '&uuml;ber F & T'; } else { hms = 'about F & T'; }
  uhs = addSubMenueEintrag ( hid, '1', b, h, h, hms );
  if ( sprache == deutsch ) { hms = 'Kontakt'; } else { hms = 'contact'; }
  uhs = uhs + addSubMenueEintrag ( hid, '2', b, 2 * h, h, hms );
  if ( sprache == deutsch ) { hms = 'Impressum'; } else { hms = 'impressum'; }
  uhs = uhs + addSubMenueEintrag ( hid, '3', b, 3 * h, h, hms );
  return uhs;
}
function agmouseover ( d ) {
  with ( d.style ) {
    cursor = "pointer";
    fontWeight = "bold";
    backgroundColor = "#00FFFF";
  }
}
function agmouseout ( d ) {
  with ( d.style ) {
    cursor = "normal";
    fontWeight = 'normal';
    backgroundColor = "#00BBFF";
  }
}
function agmouseclick ( d ) {
  if ( akthpmz != null ) {
    divpdf.style.visibility = 'hidden';
    akthpmz.innerHTML = '+';
    with ( divum.style ) {
      top = getZahl ( top ) - getZahl ( allgroup.style.height );
      height = getZahl ( height ) + getZahl ( allgroup.style.height );
    }
    einMenueAus ( 'mi' + akthpmz.id.substr ( 2, 2 ) );
    akthpmz = null;
  }
  if ( allgroup.style.visibility == 'visible' ) {
  	hmenEinAus ( true, ame );
  	allgroup.style.visibility = 'hidden';
  	divsuch.style.visibility = 'visible';
  	alladjustMenue ( 'mi', 1, 5 );
  }
}
function pdfmouseover ( d ) {
  with ( d.style ) {
    cursor = "pointer";
    fontWeight = "bold";
    backgroundColor = "red";
  }
}
function pdfmouseout ( d ) {
  with ( d.style ) {
    cursor = "normal";
    fontWeight = 'normal';
    backgroundColor = "#00BBFF";
  }
}
function pdfmouseclick ( d ) {
  pdfname = '';
  if ( druckid.length != 6 ) return;
  if ( sprache == deutsch ) dn = 'd'; else dn = 'e';
  pdfname = '/pdf/datenblatt_' + dn + '_' + druckid.substr ( 2, 4 ) + '.pdf';
  winpdf = parent.openpdf ( pdfname );
}
function bild1over ( b ) {
  b.style.cursor="pointer";
  if ( bildGrosz == 0 ) {
    window.status = 'Klicken Sie auf das Bild für Vergrößerung!';
  }
  else {
    window.status = 'Klicken Sie auf das Bild für Verkleinerung!';
  }
}
function bild1out ( b ) {
  b.style.cursor="normal";
  window.status = '';
}
function bild1onload ( b ) {
  bildo = b;
}
function zoomclick ( z ) {
  if ( bildo != null ) { bild1click ( bildo ); }
}
function bild1click ( b ) {
  if ( bildGrosz == 0 ) {
    divum.style.visibility = 'hidden';
    divpdf.style.visibility = 'hidden';
    divinh.style.visibility = 'hidden';
    timg = document.getElementById ( 'tempimg' );
    timg.src = b.src;
    x = ''; y= ''; pn = 1;
    while ( b.name.substr ( pn, 1 ) != 'h' ) {
      x = x + b.name.substr ( pn, 1 );
      ++pn;
    }
    x = eval ( x );
    ++pn;
    while ( pn < b.name.length ) {
      y = y + b.name.substr ( pn, 1 );
      ++pn;
    }
    with ( timg.style ) {
      bx = getZahl ( bildg.style.width );
      by = getZahl ( bildg.style.height );
      l = 0; t = 0;
      if ( x > bx ) {
        y = y * bx / x;
        x = bx;
      }
      if ( y > by ) {
        x = x * by / y;
        y = by;
      }
      if ( x < bx ) { l = ( bx - x ) / 2; }
      if ( y < by ) { t = ( by - y ) / 2; }
      left = l;
      top = t;
      width = x;
      height = y;
    }
    buz = document.getElementById ( 'unzoom' );
    if ( buz != null ) {
      with ( buz.style ) {
        left = l + x - 40;
        top = t + 10;
      }
    }
    bildg.style.visibility = "visible";
    bildGrosz = 1;
  }
  else {
    bildg.style.visibility = 'hidden';
    divum.style.visibility = 'visible';
    divinh.style.visibility = 'visible';
    bildGrosz = 0;
  }
}
function suchmouseover ( d ) {
  with ( d.style ) {
    cursor = "pointer";
    fontWeight = "bold";
//    backgroundColor = "red";
  }
}
function suchmouseout ( d ) {
  with ( d.style ) {
    cursor = "normal";
    fontWeight = 'normal';
//    backgroundColor = "#00BBFF";
  }
}
function suchmouseclick ( d ) {
  we = document.getElementById ( 'idisuch' );
  if ( we == null ) return;
  sn = we.value;
  if ( sn == '' ) {
    if ( sprache == deutsch ) sn = 'Es wurde kein Suchbegriff eingetragen!';
    else sn = 'No search string was typed in!'
    alert ( sn )
    return;
  }
  hs = proghref + prgprogram + '.exe/getsuche?' +
       'sprache=' + sprache + '&' +
       'w1024=' + w1024 + '&' +
       'suchnumm=' + sn;
  frwork.location.href = hs;
}
function setze_katalog ( r, n ) {
  tid = getIDvonRef ( r );
  we = frum.document.getElementById ( 'pm' + tid.substr ( 4, 2 ) );
  if ( we != null ) {
    pm_mouseclick ( we );
    we = frum.document.getElementById ( 'pm' + tid.substr ( 4, 4 ) );
    if ( we != null ) {
      pm_mouseclick ( we );
      we = frum.document.getElementById ( 'pm' + tid.substr ( 4, 4 ) + '07' );
      if ( we != null ) {
        pm_mouseclick ( we );
        we = frum.document.getElementById ( tid + '07' + n );
        if ( we != null ) um_mouseclick ( we );
      }
    }
  }
}
function setze_fr_arbeit ( woben ) {
	if ( w1024 ) { prod_lbb = 300;} else { prod_lbb = 250; };
	if ( mitnews ) itemanzahl = 4; else itemanzahl = 3;
	hmibreite = Math.round ( ( arb_breite - prod_lbb ) / itemanzahl );
  wlinks = 0;
  if ( sprache == deutsch ) { hms = 'Produkte'; } else { hms = 'products'; }
  whs = addHMItem ( '2', wlinks, woben, prod_lbb, hms, null );
  if ( sprache == deutsch ) { hms = 'Anwendungen'; } else { hms = 'applications'; }
  whs = whs + addHMItem ( '3', wlinks + prod_lbb, woben, hmibreite, hms, null );
  if ( sprache == deutsch ) hms = 'Unternehmen'; else hms = 'company';
  whs = whs + addHMItem ( '5', wlinks + prod_lbb + hmibreite, woben, hmibreite, hms, addSubMenueFirma );
  if ( mitnews ) {
  	if ( sprache == deutsch ) hms = 'News'; else hms = 'News';
  	whs = whs + addHMItem ( '4', wlinks + prod_lbb + 2* hmibreite, woben, hmibreite, hms, null );
  }
  if ( sprache == deutsch ) { hms = 'Home'; } else { hms = 'Home'; }
  whs = whs + addHMItem ( '1', wlinks + arb_breite - hmibreite, woben, hmibreite, hms, null );
	fkh = woben + menueH;
  if ( w1024 ) {
    fks = 17; lbs = 310; kkh = 620;
  }
  else {
    fks = 14; lbs = 260; kkh = 464;
  }
  arb_hoehe = kkh;
  if ( w1024 ) { db= 260; dl = 10; fs = 22; }
  else { db = 210; dl = 5; fs = 18; }
  if ( sprache == deutsch ) { dt = 'alle Gruppen'; }
  else { dt = 'all groups'; }
  whs = whs +
  			'<div id="allgroup" ' +
            'onmouseover="agmouseover(this)" ' +
            'onmouseout="agmouseout(this)" ' +
            'onclick="agmouseclick(this)" ' +
            'style="position:absolute;top:' +  fkh + 'px;' +
                   'left:' + wlinks + 'px;width:' + prod_lbb + 'px;' +
                   'height:' + eval ( fs + 4 ) + 'px;color:#000066;' +
                   'background-color:#00BBFF;' +
                   'font-family:arial;font-size:' + fs + ';text-align:center;' +
                   'visibility:hidden;z-index:5">' +
       dt +
       '</div>';
  pdfh = fs + 4;
  toph = Math.round ( kkh * 0.90 );
  if ( sprache == deutsch ) { dt = 'Datenblatt als PDF'; }
  else { dt = 'data sheet as pdf'; }
  whs = whs +
  			'<div id="dum" ' +
            	'style="position:absolute;top:' + fkh + 'px;' +
                   'left:' + wlinks + 'px;width:' + prod_lbb + 'px;' +
                   'height:' + eval ( kkh - fs - 4 - pdfh ) + 'px;color:black;' +
                   'background-color:#00BBFF;' +
                   'visibility:hidden;z-index:3">' +
       '<iframe src="' + frum_src + '" id="frfrum" ' +
               'name="frum" frameborder="no" ' +
               'style="position:0px;top:0px;width:' + eval ( prod_lbb ) + 'px;' +
                      'height:' + eval ( kkh - fs - 4 - pdfh ) + 'px">' +
       '</iframe>' +
       '</div>' +
       '<div id="divpdf" ' +
            'onmouseover="pdfmouseover(this)" ' +
            'onmouseout="pdfmouseout(this)" ' +
            'onclick="pdfmouseclick(this)" ' +
             'style="position:absolute;top:' + eval ( fkh + kkh - pdfh ) + 'px;' +
                   'left:' + wlinks + 'px;width:' + prod_lbb + 'px;' +
                   'height:' + eval ( pdfh ) + 'px;color:#000066;' +
                   'background-color:#00BBFF;' +
                   'font-family:arial;font-size:' + fs + ';text-align:center;' +
                   'visibility:hidden;z-index:3">' +
       dt +
       '</div>';
	whs = whs +
      '<div id="divsuch" ' +
             //'style="position:absolute;top:' + eval ( fkh + kkh - 3 * pdfh ) + 'px;' +
             'style="position:absolute;top:' + eval ( fkh + toph ) + 'px;' +
                   'left:' + wlinks + 'px;width:' + prod_lbb + 'px;' +
                   //'height:' + eval ( 3 * pdfh ) + 'px;color:#000066;' +
                   'height:' + eval ( kkh - toph ) + 'px;color:#000066;' +
                   'background-color:#00EEFF;' +
                   'font-family:arial;font-size:' + fs + ';text-align:center;' +
                   'visibility:hidden;z-index:3">';
  if ( w1024 ) fss = 14; else fss = 10;
  if ( sprache == deutsch ) dt = 'Geben Sie den Produktcode ein<br>z.B.';
  else dt = 'You enter the product code<br>e.g.';
  whs = whs +
          '<div style="position:absolute;top:3px;left:0px;' +
                      'width:' + eval ( prod_lbb ) + 'px;' +
                      'height:' + eval ( pdfh ) + 'px;' +
                      'font-family:arial;font-size:' + fss + ';font-weight:bold;text-align:center">' +
         dt + '  FTPCSUV1000T' +
         '</div>';
  if ( sprache == deutsch ) { dt = 'suchen'; }
  else { dt = 'search'; }
  whs = whs +
         '<div style="position:absolute;top:' + eval ( kkh - toph - pdfh ) + 'px;left:0px;' +
                      'width:' + eval ( prod_lbb / 2 ) + 'px;' +
                      'height:' + eval ( pdfh ) + 'px;' +
                      'font-family:arial;font-size:' + fs + ';text-align:center">' +
         '<input id="idisuch" name="inpsuch" type="text" size="15" maxlength="20">' +
         '</div>' +
         '<div ' +
              'onmouseover="suchmouseover(this)" ' +
              'onmouseout="suchmouseout(this)" ' +
              'onclick="suchmouseclick(this)" ' +
              'style="position:absolute;top:' + eval ( kkh - toph - pdfh - 4 ) + 'px;left:' + eval ( prod_lbb / 2 ) + 'px;' +
                      'width:' + eval ( prod_lbb / 2 ) + 'px;' +
                      'height:' + eval ( pdfh ) + 'px;' +
                      'font-family:arial;font-size:' + fs + ';text-align:center">' +
         dt +
         '</div>' +
       '</div>';
// Haftung
	if ( sprache == deutsch ) { dath = 'd'; }
  else { dath = 'e'; }
  heighth = kkh - toph;
  dath = '/ft_html/haftung' + dath + '.htm';
  whs = whs +
  		'<div id="dinh" ' +
            'style="position:absolute;top:' + fkh + 'px;' +
                   'left:' + eval ( wlinks + prod_lbb ) + 'px;' +
                   'width:' + eval ( arb_breite - prod_lbb ) + 'px;' +
                   'height:' + kkh + 'px;' +
                   'background-color:#00BBFF;' +
                   'z-index:11;' +
                   'visibility:hidden">' +
       '<iframe src="" ' +
               'id="idfrinh" ' +
               'name="frinh" frameborder="no" ' +
               'style="position:absolute;left:0px;top:0px;' +
                      'width:' + eval ( arb_breite - prod_lbb ) + 'px;' +
                      'height:' + toph + 'px">' +
       '</iframe>' +
       '<div id="dinhu" ' +
              'style="position:absolute;left:0px;' +
                     'top:' + toph + 'px;' +
                     'width:' + eval ( arb_breite - prod_lbb ) + 'px;' +
                     'height:' + heighth + 'px;' +
                     'z-index:12;' +
                     'background-color:#00BBFF" ' +
                     'visibility:hidden">' +
           '<iframe src="' + dath + '" ' +
                   'name="frinhh" frameborder="no" ' +
                   'style="position:absolute;left:0px;top:5px;' +
                          'width:' + eval ( arb_breite - prod_lbb ) + 'px;' +
                          'height:' + eval ( heighth - 5 ) + 'px">' +
           '</iframe>' +
         '</div>' +
       '</div>';
// Großes Bild
	whs = whs +
			'<div id="bildgrosz" ' +
            'style="position:absolute;top:0px;' +
                   'left:' + wlinks + 'px;' +
                   'width:' + arb_breite + 'px;' +
                   'height:' + eval ( kkh + fkh ) + 'px;' +
                   'background-color:white;' +
                   'z-index:20;' +
                   'visibility:hidden">' +
       '<img id="tempimg" width="' + arb_breite + '" height="' + eval ( kkh + fkh ) + '" ' +
            'style="position:absolute;left:0px;top:0px" ' +
                  'onclick="bild1click(this)" ' +
                  'onmouseover="bild1over(this)" ' +
                  'onmouseout="bild1out(this)">' +
       '<div id="unzoom" ' +
             'style="position:absolute;left:0px;top:0px;width:30px;height:30px;' +
                    'z-index:21">' +
       '<img src="/ft_pict/unzoom.gif" width="30" height="30" ' +
             'onclick="zoomclick(this)" ' +
             'onmouseover="bild1over(this)" ' +
             'onmouseout="bild1out(this)">' +
       '</div>' +
       '</div>';
// Startbildschirm
	whs = whs +
  			'<div id="startbild" ' +
            'style="position:absolute;top:' + eval ( woben + menueH ) + 'px;' +
                   'left:' + wlinks + 'px;' +
                   'width:' + arb_breite + 'px;height:' + eval ( kkh ) + 'px;' +
                   'background-color:white;' +
                   'visibility:visible;' +
                   'z-index:10">' +
					'<img id="imgstart" ' +
             'src="/ft_pict/logohinten.gif" width="' + arb_breite + '" height="' + eval ( kkh ) + '">' +
       '</div>' +
       '<div id="divtemp" '+
             'style="visibility:hidden;z-index:3">' +
       '</div>';
  whs = whs +
  		'<div id="startbs" ' +
            'style="position:absolute;top:' + fkh + 'px;' +
                   'left:' + wlinks + 'px;' +
                   'width:' + arb_breite + 'px;' +
                   'height:' + eval ( kkh ) + 'px;' +
                   'background-color:white;' +
                   'visibility:hidden;' +
                   'z-index:14">' +
                   //'z-index:44">' +
       '</div>';
// Arbeitsbildbereich
	whs = whs +
			'<div id="divarb" ' +
            'style="position:absolute;top:' + fkh + 'px;' +
                   'left:' + wlinks + 'px;' +
                   'width:' + arb_breite + 'px;' +
                   'height:' + eval ( kkh ) + 'px;' +
                   'background-color:white;' +
                   'visibility:hidden;' +
                   'z-index:14">' +
       '</div>';
// Ergebnisframe für Suchanfrage
	whs = whs +
				'<div id="divwork" ' +
            'style="position:absolute;top:0px;left:0px;height:50px;width:50px;visibility:hidden;z-index:45">' +
       		'<iframe src="" ' +
               'name="frwork" width="50" height="50" ' +
               'style="position:absolute;left:0px;top:0px;' +
                      'border:0px;width:50px;height:50px">' +
       		'</iframe>' +
       	'</div>';
	return whs;
}
function setze_fr_kopf ( wh, fs ) {
	rlb = ( wh / logo_y ) * logo_x;
	whs = '<div id="dkopf" bgcolor="#00BBFF"' +
            'style="position:absolute;top:0px;height:' +  wh + 'px;' +
                  'left:0px;width:' + arb_breite + 'px;' +
                  'font-size:' + fs + ';font-weight:bold;' +
                  'font-family:arial;' +
                  'color:blue;' +
                  'text-align:center;' +
                  'background-color:#CCCCCC;">' +
					'<img src="/ft_pict/logo_ft.gif" ' +
            'style="position:absolute;left:0px;top:0px;' +
                   'width:' + rlb + 'px;height:' + wh + 'px">' +
        	'F & T Fibers and Technology GmbH' +
        	'<img src="/ft_pict/logo_ft.gif" ' +
            'style="position:absolute;left:' + eval ( arb_breite - rlb ) + 'px;top:0px;' +
                   'width:' + rlb + 'px;height:' + wh + 'px">' +
        '</div>';
  return whs;
}
function gehezuprodukt ( r ) {
  tid = getIDvonRef ( r );
  we = document.getElementById ( 'hm2' );
  if ( we != null ) setze_hmitem ( we );
  init_katalog ( );
  we = frum.document.getElementById ( 'pm' + tid.substr ( 4, 2 ) );
  if ( we != null ) {
    pm_mouseclick ( we );
    we = frum.document.getElementById ( 'pm' + tid.substr ( 4, 4 ) );
    if ( we != null ) {
      pm_mouseclick ( we );
      we = frum.document.getElementById ( tid + '01' );
      if ( we != null ) um_mouseclick ( we );
    }
    else {
      we = frum.document.getElementById ( tid );
      if ( we != null ) um_mouseclick ( we );
    }
  }
}
function starte_katalog ( isprache ) {
	sprache = isprache;
	if ( w1024 ) { 
		arb_breite = breite1024; 
		arb_hoehe = hoehe1024;
		hoehe = 51; 
		fsize = 44;
	}
	else { 
		arb_breite = breite800;
		arb_hoehe = hoehe800;
		hoehe = 36; 
		fsize = 30; 
	}
	wtable = document.getElementById ( 'auswahltabelle' );
	if ( wtable != null ) wtable.style.visibility = 'hidden';
	wdivalles = document.getElementById ( 'divalles' );
	was = setze_fr_kopf ( hoehe, fsize ) +
				setze_fr_arbeit ( hoehe );
	wdivalles.innerHTML = was;
	load_startbs ( );
	divum = document.getElementById ( 'dum' );
  divinh = document.getElementById ( 'dinh' );
  divinhu = document.getElementById ( 'dinhu' );
  bildg = document.getElementById ( 'bildgrosz' );
  startbs = document.getElementById ( 'startbs' );
  startbild = document.getElementById ( 'startbild' );
  divarb = document.getElementById ( 'divarb' );
  divpdf = document.getElementById ( 'divpdf' );
  divsuch = document.getElementById ( 'divsuch' );
  allgroup = document.getElementById ( 'allgroup' );
  frum.location.href = frum_src ( );
}
function zeige ( ) {
  imgs = document.getElementById ( 'imgstart' );
  imgt = document.getElementById ( 'imgtemp' );
  if ( w1024 ) {
    imgs.style.top = getZahl ( imgs.style.top ) - 20;
    //imgs.style.height = hoehe1024;
    imgs.style.height = arb_hoehe;
  } else {
    imgs.style.top = getZahl ( imgs.style.top ) - 20;
    //imgs.style.height = hoehe800;
    imgs.style.height = arb_hoehe;
  }
  imgs.src = imgt.src;
}
function load_startbs ( ) {
  dt = document.getElementById ( 'divtemp' );
  if ( w1024 ) bildname = 'startbs1024.jpg'; else bildname = 'startbs800.jpg';
  hs = '<img id="imgtemp" src="/ft_pict/' + bildname + '" ' +
                'style="position:absolute;top:0px;left:0px;visibility:hidden" onLoad="zeige()">';
  dt.innerHTML = hs;
}