/* Version 1.11 */

// rudimentaerer Browser-Check
if((navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) < "4") || (navigator.appName!="Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) < "5"))
 alert("Bitte installieren Sie einen Browser ab Versions-Nummer 5, da die Website sonst nur eine eingeschränkt Funktionalität besitzt !\n\nVielen Dank für Ihr Verständnis.");

window.status = "Gewerbe Dreiländereck";

// verzoegerung beim ersten bannertausch in millisekunden
var verzoegerung = 0;

// var ziel = window.location.search.slice(6);
// if (ziel == "") ziel = "branchen";

function over(img,x) {
 if (img != "") {
  document[img+x].src="/images/"+img+"_on.gif";
  if(img != "pfeil") window.status = img;
 }
}
function out(img,x) {
 if (img != ziel)
  document[img+x].src="/images/"+img+"_off.gif";
 window.status = "Gewerbe Dreiländereck";
}

var h  = 0;
if (navigator.appName.indexOf("Netscape") != -1) h = 3;
var ie = false;
if ( (navigator.userAgent.indexOf("MSIE") != -1) && (navigator.userAgent.indexOf("Opera") == -1) ) ie = true;

// ueberschreiben von banner.location.replace() mit keiner Funktionalitaet
/*
if (ie) {
 function location_a() {
  this.replace = function(x){}
 }
 function banner_a() {
  this.location = new location_a();
 }
 var banner = new banner_a();
}
*/

function hoehe(x) {
  // test
  /*
  document.getElementById("t_1").style.width = "794px";
  document.getElementById("t_2").style.width = "794px";
  document.getElementById("td_1").style.width = "645px";
  if (x == 0)
   document.getElementById("td_2").style.width = "496px";
  else
   document.getElementById("td_3").style.width = "685px";
  */

 // höhere navi bei anderssprachigen Seiten
 var nh = 252; if (document.URL.indexOf("/de/") == -1) nh+=23;
 // höherer content bei franzoesischen Seiten (nicht mehr aktuell)
 var ch = 145; // if (document.URL.indexOf("/fr/") != -1) ch+=18;

 document.getElementById("navi").style.height = (document.body.clientHeight-nh)+"px";
 document.getElementById("content").style.height = (document.body.clientHeight-ch-x)+"px";
 if (x == 0) {
  document.getElementById("t_3").style.height = (document.body.clientHeight-148+h-x)+"px";
  document.getElementById("t_4").style.height = (document.body.clientHeight-148+h-x)+"px";
 }
}

function breite(x) {
 return;
}

/*
function breite(x) {
 if (document.body.clientWidth < 800) {
  document.getElementById("t_1").style.width = "777px";
  document.getElementById("t_2").style.width = "777px";
  document.getElementById("td_1").style.width = "650px";
  if (x == 0)
   document.getElementById("td_2").style.width = "500px";
  else
   document.getElementById("td_3").style.width = "685px";
 }
 else {
  document.getElementById("t_1").style.width = "100%";
  document.getElementById("t_2").style.width = "100%";
  document.getElementById("td_1").style.width = (document.body.clientWidth-140)+"px";
  if (x == 0)
   document.getElementById("td_2").style.width = (document.body.clientWidth-140-150)+"px";
  else
   document.getElementById("td_3").style.width = (document.body.clientWidth-105)+"px";
 }
}
*/

function info(x,y) {
 document.getElementById("infotext").style.left = (document.body.clientWidth/2-277)+"px";
 document.getElementById("infotext").innerHTML = x;
 document.getElementById("infotext").style.visibility = y;
}

function startseite() {
 if (document.URL.indexOf("/de/") != -1) this.location.href = "/";
 if (document.URL.indexOf("/en/") != -1) this.location.href = "/english.htm";
 if (document.URL.indexOf("/fr/") != -1) this.location.href = "/francaise.htm";
 if (document.URL.indexOf("/it/") != -1) this.location.href = "/italiano.htm";
}

// ticker
var timerID = null;
var timerRunning = false;
var id,pause=0,position=0;
function marquee() {
 var i,k,msg=m_text;
 k=(75/msg.length)+1;
 for(i=0;i<=k;i++) msg+=" "+msg;
 document.marqueeform.marquee.value=msg.substring(position,position+120);
 if(position++==69) position=0;
 id=setTimeout("marquee()",1000/05);
}
function action() {
 if(!pause) {
  clearTimeout(id);
  pause=1;
 }
 else {
  marquee();
  pause=0;
 }
}

