<!--//
easytt = null;
document.onmousemove = updateEasyTT;
function updateEasyTT(e)
{
  x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
  y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
  if (easytt != null)
  {
	easytt.style.left = (x + 5) + "px";
	easytt.style.top = (y + 10) + "px";
  }
}
function showEasyTT(id)
{
  easytt = document.getElementById(id);
  easytt.style.display = "block";
}
function hideEasyTT()
{
  easytt.style.display = "none";
}

var countDownTime=3;

function countDown()
{
  if (countDownTime > 0){
  --countDownTime;
  //Für IE
  if (document.all) //if IE 4+ 
  document.all['countDownText'].innerHTML = countDownTime;
  //Für Firefox, NS und co
  else if (document.getElementById)
  document.getElementById('countDownText').innerHTML = countDownTime; 
  setTimeout("countDown()", 1000);
  } else {
  document.location.href="haupt.php?verweis=9&unter_verweis=1";
  }
}

Normal0 = new Image();
Normal0.src = "../bilder/hom_off.gif";
Highlight0 = new Image();
Highlight0.src = "../bilder/hom_on.gif";

Normal1 = new Image();
Normal1.src = "../bilder/suc_off.gif";
Highlight1 = new Image();
Highlight1.src = "../bilder/suc_on.gif";

Normal2 = new Image();
Normal2.src = "../bilder/gae_off.gif";
Highlight2 = new Image();
Highlight2.src = "../bilder/gae_on.gif";

Normal3 = new Image();
Normal3.src = "../bilder/ema_off.gif";
Highlight3 = new Image();
Highlight3.src = "../bilder/ema_on.gif";

Normal4 = new Image();
Normal4.src = "../bilder/new_off.gif";
Highlight4 = new Image();
Highlight4.src = "../bilder/new_on.gif";

Normal5 = new Image();
Normal5.src = "../bilder/ver_off.gif";
Highlight5 = new Image();
Highlight5.src = "../bilder/ver_on.gif";

Normal6 = new Image();
Normal6.src = "../bilder/jug_off.gif";
Highlight6 = new Image();
Highlight6.src = "../bilder/jug_on.gif";

Normal7 = new Image();
Normal7.src = "../bilder/mas_off.gif";
Highlight7 = new Image();
Highlight7.src = "../bilder/mas_on.gif";

Normal8 = new Image();
Normal8.src = "../bilder/sch_off.gif";
Highlight8 = new Image();
Highlight8.src = "../bilder/sch_on.gif";

Normal9 = new Image();
Normal9.src = "../bilder/bun_off.gif";
Highlight9 = new Image();
Highlight9.src = "../bilder/bun_on.gif";

Normal10 = new Image();
Normal10.src = "../bilder/spo_off.gif";
Highlight10 = new Image();
Highlight10.src = "../bilder/spo_on.gif";

function Bildwechsel0(Bildnr,Bildobjekt)
  {                  window.document.hom.src = Bildobjekt.src;  }

function Bildwechsel1(Bildnr,Bildobjekt)
  {                  window.document.suc.src = Bildobjekt.src;  }

function Bildwechsel2(Bildnr,Bildobjekt)
  {                  window.document.gae.src = Bildobjekt.src;  }

function Bildwechsel3(Bildnr,Bildobjekt)
  {                  window.document.ema.src = Bildobjekt.src;  }

function Bildwechsel4(Bildnr,Bildobjekt)
  {                  window.document.news.src = Bildobjekt.src;  }

function Bildwechsel5(Bildnr,Bildobjekt)
  {                  window.document.ver.src = Bildobjekt.src;  }

function Bildwechsel6(Bildnr,Bildobjekt)
  {                  window.document.jug.src = Bildobjekt.src;  }

function Bildwechsel7(Bildnr,Bildobjekt)
  {                  window.document.mas.src = Bildobjekt.src;  }

function Bildwechsel8(Bildnr,Bildobjekt)
  {                  window.document.sch.src = Bildobjekt.src;  }

function Bildwechsel9(Bildnr,Bildobjekt)
  {                  window.document.bun.src = Bildobjekt.src;  }

function Bildwechsel10(Bildnr,Bildobjekt)
  {                  window.document.spo.src = Bildobjekt.src;  }
  
var zoom = 4;
var speed = 4;
var real = 0;
var intervalIn;
var divs = document.getElementsByTagName('div');
for (var i = 0; i < divs.length; i++)
{
  if (divs[i].className == 'livethumbnail')
  {
	var myimg = divs[i].getElementsByTagName('img')[0];
	myimg.smallSrc = myimg.getAttribute('src');
	myimg.smallWidth = parseInt(myimg.getAttribute('width'));
	myimg.smallHeight = parseInt(myimg.getAttribute('height'));
	divs[i].onmouseover = scaleIn;
	divs[i].onmouseout = scaleOut;
	if (!myimg.smallWidth)
    {
    <?php
    if (isset($image)){
	  if ($image[0] > $image[1])
	  {
        echo "myimg.smallWidth = $image[0];\n";
        echo "myimg.smallHeight = $image[1];\n";
      }
      else
	  {
        echo "myimg.smallWidth = $image[1];\n";
 	    echo "myimg.smallHeight = $image[0];\n";
      }
	}
    ?>
      real = 0;
    }
    else
    {
  	  real = 1;
    }
  }
}

function scaleIn()
{
  var myimg = this.getElementsByTagName('img')[0];
  this.style.zIndex = 20;
  myimg.src = myimg.smallSrc;
  var count = 0;
  var real = 0;
  intervalIn = window.setInterval(scaleStepIn, 1);
  return false;

  function scaleStepIn()
  {
	var widthIn = parseInt(myimg.getAttribute('width'));
	var heightIn = parseInt(myimg.getAttribute('height'));
	if(widthIn >= heightIn) {
	  widthIn += speed;
	  heightIn += Math.floor(speed * (3/4));
	  myimg.style.left = parseInt(myimg.style.left) - (speed/2);
	  myimg.style.top = parseInt(myimg.style.top) - (Math.floor(speed * (3/8)));
	}
	else
	{
	  widthIn += Math.floor(speed * (3/4));
	  heightIn += speed;
	  myimg.style.top = parseInt(myimg.style.top) - (speed/2);
	  myimg.style.left = parseInt(myimg.style.left) - (Math.floor(speed * (3/8)));
	}
	myimg.setAttribute('width', widthIn);
	myimg.setAttribute('height', heightIn);
	count++;
	if (count >= zoom)
	  window.clearInterval(intervalIn);
  }
}
function scaleOut()
{
  window.clearInterval(intervalIn);
  var myimg = this.getElementsByTagName('img')[0];
  this.style.zIndex = 10;
  var mydiv = this;
  myimg.src = myimg.smallSrc;
  var interval = window.setInterval(scaleStepOut, 1);
  return false;

  function scaleStepOut()
  {
	var width = parseInt(myimg.getAttribute('width'));
	var height = parseInt(myimg.getAttribute('height'));
	if(width >= height) {
	  width -= speed;
	  height -= Math.floor(speed * (3/4));
	  myimg.setAttribute('width', width);
	  myimg.setAttribute('height', height);
	  myimg.style.left = parseInt(myimg.style.left) + (speed/2);
	  myimg.style.top = parseInt(myimg.style.top) + (Math.floor(speed * (3/8)));
  	  if(width < myimg.smallWidth + 4) {
	    myimg.setAttribute('width', myimg.smallWidth);
	    myimg.setAttribute('height', myimg.smallHeight);
	    myimg.style.top = 0;
	    myimg.style.left = 0;
		mydiv.style.zIndex = 1;
		window.clearInterval(interval);
	  }
	}
	else
	{
	  width -= Math.floor(speed * (3/4));
	  height -= speed;
	  myimg.setAttribute('width', width);
	  myimg.setAttribute('height', height);
	  myimg.style.top = parseInt(myimg.style.top) + (speed/2);
	  myimg.style.left = parseInt(myimg.style.left) + (Math.floor(speed * (3/8)));
	  if(real==1)
	  {
	    if(width < myimg.smallWidth + 4)
	    {
	      myimg.setAttribute('width', myimg.smallWidth);
	      myimg.setAttribute('height', myimg.smallHeight);
		  myimg.style.top = 0;
	      myimg.style.left = 0;
		  mydiv.style.zIndex = 1;
	      window.clearInterval(interval);
		}
	  }
	  else
	  {
	  	if(height < myimg.smallWidth + 4)
	    {
	      myimg.setAttribute('width', myimg.smallHeight);
	      myimg.setAttribute('height', myimg.smallWidth);
		  myimg.style.top = 0;
	      myimg.style.left = 0;
		  mydiv.style.zIndex = 1;
	      window.clearInterval(interval);
		}
	  }
	}
  }
}
//-->