// JavaScript Document
if (navigator.appName=="Microsoft Internet Explorer"){
mouse();
}
else {
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=mouse;
}


var times=0;

function mouse(e){
/*cursor_x = (window.event) ? window.event.x : e.clientX;
      cursor_y = (window.event) ? window.event.y : e.clientY;  */ 
    if (navigator.appName=="Microsoft Internet Explorer")   {
      cursor_x=window.event.x;
      cursor_y=window.event.y;  
    }
    else if (navigator.appName=="Netscape") {
      cursor_x=e.pageX;
      cursor_y=e.pageY;     
    }
    else {
    cursor_x=e.clientX;
    cursor_y=e.clientY;
    }
  if (document.documentElement.scrollTop > 0) {
  cursor_y = cursor_y - document.documentElement.scrollTop;
  }
  //document.title='x: '+cursor_x+' y: '+cursor_y;
}

function getID(id){
  return document.getElementById(id);
}

function showBubble(what,way,left,top){
  /*left=0;
  top=0;*/
  thing=getID(what);
  if(way=='over'){
    thing.style.display='block';
    thing.style.left=cursor_x+left+'px'; 
    thing.style.top=cursor_y+top+'px'; 
    /*thing.style.left='0px';
    thing.style.top='0px';*/
  }
  if(way=='out'){
    thing.style.display='none';
  }
}


function zavri(id){
  el=document.getElementById(id).style;
  el.display='none';
}
function ChangeBut(what,source){
  document.getElementById(what).src=source;
} 
function Preload(image,position){ 
  document.imageArray=new Array;
  document.imageArray[position]=new Image;
  document.imageArray[position].src=image;
} 

Preload('images/close1.png',1);
Preload('images/close2.png',2);
Preload('images/close3.png',3);


