function ZoomSetzen(img, dir, width, height, margin, zIndex, delay) {
  setTimeout(function() {
    if (img.dir==dir) {
      img.style.width=width;
      img.style.height=height;
      img.style.margin=margin;
      img.style.zIndex=zIndex;
      img.parentNode.parentNode.style.zIndex=zIndex;
    }
  }, delay);
}

function groesser(img, width, height) {
  img.dir='rtl';
  now=parseInt(img.style.zIndex);
  for (i=now+1; i<=10; i++) {
    w=(width*(10+i))/20+'px';
    h=(height*(10+i))/20+'px';
    m=(-i)+'px 0 0 '+(-width*i/40)+'px';
    ZoomSetzen(img, 'rtl', w, h, m, i, 20*(i-now));
  }
}

function kleiner(img, width, height) {
  img.dir='ltr';
  now=parseInt(img.style.zIndex);
  for (i=now-1; i>=0; i--) {
    w=(width*(10+i))/20+'px';
    h=(height*(10+i))/20+'px';
    m=(-i)+'px 0 0 '+(-width*i/40)+'px';
    ZoomSetzen(img, 'ltr', w, h, m, i, 20*(now-i));
  }
}

function deckkraftdown(div1, div2, div3, div4) {
	document.getElementById(div1).style.opacity = 0.2;
	document.getElementById(div2).style.opacity = 0.2;
	document.getElementById(div3).style.opacity = 0.2;
	document.getElementById(div4).style.opacity = 0.2;
	document.getElementById(div1).style.filter = "Alpha(opacity=20)";
	document.getElementById(div2).style.filter = "Alpha(opacity=20)";
	document.getElementById(div3).style.filter = "Alpha(opacity=20)";
	document.getElementById(div4).style.filter = "Alpha(opacity=20)";	
}

function deckkraftup(div1, div2, div3, div4) {
	document.getElementById(div1).style.opacity = 1.0;
	document.getElementById(div2).style.opacity = 1.0;
	document.getElementById(div3).style.opacity = 1.0;
	document.getElementById(div4).style.opacity = 1.0;
	document.getElementById(div1).style.filter = "Alpha(opacity=100)";
	document.getElementById(div2).style.filter = "Alpha(opacity=100)";
	document.getElementById(div3).style.filter = "Alpha(opacity=100)";
	document.getElementById(div4).style.filter = "Alpha(opacity=100)";
}

 var fenster;		
 function oeffnen(quelle,b,h)  {
	fenster = window.open(quelle,"trailer","width='+b+',height='+h+',left=100,top=100,toolbar=no,status=no,resizable=no,menubar=no,location=no");	     
	fenster.resizeTo(b,h);
  fenster.moveTo(0,0);
  fenster.focus();
}

