function popup (filename,nam,abt,tel,fax,mail,fil,mob)
  {
    var win;
    var filiale;
	var dom;
	dom = "&#64;&#101;&#108;&#101;&#107;&#116;&#114;&#111;&#45;&#98;&#114;&#97;&#117;&#110;&#46;&#100;&#101;"
    switch (fil){
	case "ab": filiale="06021 405-";break
	case "alz": filiale="06023 5052-";break
	case "ffm": filiale="069 548404-";break
	case "da": filiale="06151 27366-";break
    }    
    win=window.open("","","Width=560,Height=300,left=200,top=200,location=no,status=no,scrollbars=no,menubar=no,toolbar=no");
    win.document.write("<html><head><title>Elektro Braun GmbH - "+nam+"</title><link rel='stylesheet' type='text/css' href='style.css'></head><body style='margin-left: 0px; margin-right: 0px; margin-top: 0px;'>");
    win.document.write("<table class='pop'>");
    win.document.write("<tr><td class='pop2' colspan='2'>Elektro Braun GmbH&nbsp;</td></tr><tr><td>");
    win.document.write("<img border='0' src='"+filename+"'>");
    win.document.write("</td>");
    win.document.write("<td class='pop'>");
    win.document.write("<b>"+nam+"</b> - "+abt+"<br><br>");
    win.document.write("Tel: "+filiale+tel+"<br>");
    if (mob){
	win.document.write("Mobil:"+mob+"<br>");
    }
    //win.document.write(mob+"<br>");
    win.document.write("Fax: "+filiale+fax+"<br><br>");
    win.document.write("E-Mail: <a href='mailto:"+mail+dom+"'>"+mail+dom+"</a><br>");
    win.document.write("</td></tr><tr><td class='z4s2' colspan='2'>&nbsp;</td></tr></table>");
    win.document.write("<br><form align='right'>"
      + "&nbsp;<input type='image' name='schliessen' src='images/schliessen.gif'"
      + "onClick='javascript:window.close()'></form>");
    win.document.write("</body></html>");
    win.document.close();
    win.focus();
    }

function popup2 (abt)
  {
    var win;
    win=window.open("","","Width=560,Height=300,Left=200,Top=200");
    win.document.write("<html><head><title>Elektro Braun GmbH</title><link rel='stylesheet' type='text/css' href='style.css'></head><body>");
    win.document.write("<table class='pop'>");
    win.document.write("<tr><td class='pop2' colspan='2'>"+abt+"&nbsp;&nbsp;</td></tr><tr><td>");
    win.document.write("<table><tr><td class='pop'>&nbsp;</td></tr></table>");
    win.document.write("</td></tr><tr><td class='z4s2' colspan='2'>&nbsp;</td></tr></table>");
    win.document.write("</body></html>");
    win.document.close();
}

Element.prototype.delay = 20;
Element.prototype.step = 10;
Element.elements = new Array();
var text0, text1;
function Element (id) {
  this.id = Element.elements.length;
  Element.elements[this.id] = this;
  if (document.layers) {
    this.layer = document[id];
    this.width = this.layer.document.width;
    this.height = this.layer.document.height;
  }
  else if (window.opera) {
    this.layer = document.getElementById(id);
    this.width = this.layer.style.pixelWidth;
    this.height = this.layer.style.pixelHeight;
  }
  else if (document.all) {
    this.layer = document.all[id];
    this.width = this.layer.offsetWidth;
    this.height = this.layer.offsetHeight;
  }
  else if (document.getElementById) {
    this.layer = document.getElementById(id);
    this.width = this.layer.offsetWidth;
    this.height = this.layer.offsetHeight;
  }
}
Element.prototype.moveTo = function (x, y) {
  if (document.layers)
    this.layer.moveTo (x, y);
  else if (document.all) {
    this.layer.style.pixelLeft = x;
    this.layer.style.pixelTop = y;
  }
  else if (document.getElementById) {
    this.layer.style.left = x + 'px';
    this.layer.style.top = y + 'px';
  }
}
Element.prototype.setVisibility = function (visibility) {
  if (document.layers)
    this.layer.visibility = visibility == 'hidden' ? 'hide' :
                            visibility == 'visible' ? 'visible' :
                            'inherit';
  else if (document.all || document.getElementById) 
    this.layer.style.visibility = visibility;
}
Element.prototype.animate = function () { 
  this.moveTo(this.startX, this.startY);
  this.setVisibility('visible');
  this.x = this.startX;
  this.y = this.startY;
  if (this.startX > this.endX)
    this.stepX = -this.step;
  else
    this.stepX = this.step;
  if (this.startY > this.endY)
    this.stepY = -this.step;
  else
    this.stepY = this.step;
  this.tid = setInterval('Element.elements[' + this.id + '].move()', 
this.delay);
}
Element.prototype.move = function () {
  this.x += this.stepX;
  this.y += this.stepY;
  if (this.stepX < 0 && this.x < this.endX 
     || this.stepX > 0 && this.x > this.endX)
    this.x = this.endX;
  if (this.stepY < 0 && this.y < this.endY
      || this.stepY > 0 && this.y > this.endY)
    this.y = this.endY;
  this.moveTo(this.x, this.y);
  if (this.x == this.endX && this.y == this.endY)
    clearInterval(this.tid);
}
function initAnimation () {
  text0 = new Element('text0');
  text1 = new Element('text1');
  if (window.innerHeight) {
    var ww = window.innerWidth;
    var wh = window.innerHeight;
  }
  else if (document.body && document.body.clientWidth) {
    var ww = document.body.clientWidth;
    var wh = document.body.clientHeight;
  }
  var width = text0.width + text1.width;
  text0.startX = 0 - text0.width;
  text1.startX = ww;
  text0.startY = text0.endY =
   text1.startY = text1.endY =
     Math.round ((wh - text0.height) / 2);
  text0.endX = Math.round((ww - width) / 2);
  text1.endX = text0.endX + text0.width;
  text0.animate();
  text1.animate();
}
