<!--


// These variables will hold the current mouse pointer position.
var mouseX = 0;
var mouseY = 0;
// Set up event capturing.
// Function to return a random number from a given range.
var top100 = new Array();


function inittop100() {

    top100=getLayer("top100");
    if (isMinNS4)
      top100.image = top100.document.images["top100"];
    if (isMinIE4)
      top100.image = document.images["top100"];

    top100.x=getWindowWidth()/2;
    top100.y=getWindowHeight()/2;
    top100.xirany=1;
    top100.yirany=1;
    top100.a = random(100, 150);
    top100.b = random(100, 100);
    top100.theta = Math.random() * 2 * Math.PI;
    top100.delta = random(4 * Math.PI / 100, 8 * Math.PI / 100);
    if (Math.random() >= 0.5)
      top100.delta = -top100.delta;
    top100.phi = Math.random() * 2 * Math.PI;

    moveLayerTo(top100, 0, 0); 
    showLayer(top100);
  updatetop100();
}

function updatetop100_a() {

  var i, x1, y1, x2, y2;

    top100.theta += top100.delta;
    if (top100.theta > 2 * Math.PI)
      top100.theta -= 2 * Math.PI;
    if (top100.theta < 0)
      top100.theta += 2 * Math.PI;
    x1 = Math.round(top100.a * Math.sin(top100.theta));
    y1 = Math.round(top100.b * Math.cos(top100.theta));
    lim= Math.round(getWindowWidth()*0.7);
    if (mouseX<lim) 
     {
       x2 = mouseX + Math.round(x1 * Math.cos(top100.phi) + y1 * Math.sin(top100.phi));
     } else
     {
       x2 = lim+Math.round(x1 * Math.cos(top100.phi) + y1 * Math.sin(top100.phi));
     }
    y2 = mouseY - Math.round(y1 * Math.cos(top100.phi) - x1 * Math.sin(top100.phi));
    moveLayerTo(top100, x2, y2);
//    top100.image.src = "kepek/golyo" + top100.imageIndex + ".gif";
//    if (++top100.imageIndex > 3)
//      top100.imageIndex = 1;

  // Set up next call.

    count=GetCookie('count');
    alert(count);
    if (count==null) 
     { setTimeout('updatetop100()', 25); } else
     { 
       alert(top100);
       hideLayer(top100);  
     }

  return;
}

function updatetop100() 
 {
   var i, x1, y1, x2, y2;

    top100.x= top100.x+top100.xirany*1;
    top100.y= top100.y+top100.yirany*1;
    if (top100.x>=getWindowWidth()-150) { top100.xirany=-top100.xirany; }
    if (top100.x<50) { top100.xirany=-top100.xirany; }
    if (top100.y>=getWindowHeight()-50) { top100.yirany=-top100.yirany; }
    if (top100.y<50) { top100.yirany=-top100.yirany; }
//      alert(top100.y);
    
    moveLayerTo(top100, top100.x, top100.y);
//    top100.image.src = "kepek/golyo" + top100.imageIndex + ".gif";
//    if (++top100.imageIndex > 3)
//      top100.imageIndex = 1;

  // Set up next call.

    count=GetCookie('count');
    if (count==null) 
     { setTimeout('updatetop100()', 25); } else
     { 
       hideLayer(top100);  
     }
  return;
}


function random(min, max) {

  return Math.random() * (max - min) + min;
}


function getMousePosition(e) {

  // Save cursor position using browser-specific code.

  if (isMinNS4) {
    mouseX = e.pageX;
    mouseY = e.pageY;
  }
  if (isMinIE4) {
    mouseX = event.clientX + document.body.scrollLeft;
    mouseY = event.clientY + document.body.scrollTop;
  }
  return true;
}

///
/// golyokhoz tartozik - vege
///

<!-- vege -->

