var push_array = new Array();
// 0 = in, 1= out
var push_array_io = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);

for (i = 0; i < push_array.length; i++) {
  push_array.push_back(0);
}

function push_in_loop(whoid, nr) {
  push_array[nr] = 2;
  who = document.getElementById(whoid);
  v = 20 + 15*Math.sin(push_array[nr]);
  who.style.left = ''+v+'px';
}

function push_out_loop(whoid, nr) {
  if (push_array_io[nr] != 1) return;
  push_array[nr] -= 0.3;
  if (push_array[nr] <= 0) return;
  who = document.getElementById(whoid);
  v = 20 + 15*Math.sin(push_array[nr]);
  who.style.left = ''+v+'px';
  setTimeout("push_out_loop('"+whoid+"',"+nr+")", 50);
}

function push_in(who, nr)
{
  push_array_io[nr] = 0;
  push_in_loop(who.id, nr);
}
function push_out(who, nr)
{
  push_array_io[nr] = 1
    push_out_loop(who.id, nr);
}


function get_top() 
{
  if (self.pageYOffset) // all except Explorer
    return self.pageYOffset;
  else if (document.documentElement && document.documentElement.scrollTop)
    return document.documentElement.scrollTop;
  else if (document.body) // all other Explorers
    return document.body.scrollTop;
}

function show_zoom(what) {
  z = document.getElementById('zoom');
  i = document.getElementById('zoom_image');
  i.src = '';
  i.src = 'px/bilder/'+what+'.jpg';
  z.style.top = "" + (get_top() + 11) + "px";
  z.style.display = 'block';
}

function hide_zoom() {
  z = document.getElementById('zoom');
  z.style.display = 'none';
}
