var IE = document.all?true:false
var blokada = false;
var stops = false;
var x;
var y;

function policz(zdarzenie) {
	box = document.getElementById('wordBox');
  zdarzenie = (zdarzenie)?zdarzenie:((window.event)?event:null);


  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = zdarzenie.clientX + document.documentElement.scrollLeft
    tempY = zdarzenie.clientY + document.documentElement.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = zdarzenie.pageX
    tempY = zdarzenie.pageY
  }
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}

  x = tempX
  y = tempY

	if(!stops){
	  box.style.top = y-135+'px';
	  box.style.left = x-10+'px';
  }

}

if (navigator.appName=="Microsoft Internet Explorer") {
  document.onmousemove = policz;
} else {
  window.onmousemove = policz;
}



function pokaz(nr){
	if (!blokada) {
		xajax_word(nr);
		document.getElementById('wordBox').style.display='block';
		blokada = true;
		  box.style.top = y-135+'px';
		  box.style.left = x-10+'px';
		stops=true;
	}

}

function kryj(){

	if(!stops){
		document.getElementById('wordText').innerHTML='<div style="text-align:center; width:100%;padding-top:20px;"><img  src="./images/loader.gif" alt="loading..."/></div>';
		document.getElementById('wordBox').style.display='none';
		blokada = false;
	}
}
/**
 *
 * @access public
 * @return void
 **/
function stop_(){
	if (stops) {
		stops=false;
		kryj();
	}else{
		stops=true;
	}

}