if( document.captureEvents && Event.MOUSEMOVE ) {
  document.captureEvents( Event.MOUSEMOVE );
}


function alertCoord(e) {
  if( !e ) {
    if( window.event ) {
      //Internet Explorer
      e = window.event;
    } else {
      //total failure, we have no way of referencing the event
      return;
    }
  }
  if( typeof( e.pageX ) == 'number' ) {
    //most browsers
    var xcoord = e.pageX;
    var ycoord = e.pageY;
  } else if( typeof( e.clientX ) == 'number' ) {
    //Internet Explorer and older browsers
    //other browsers provide this, but follow the pageX/Y branch
    var xcoord = e.clientX;
    var ycoord = e.clientY;
    var badOldBrowser = ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) ||
     ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) ||
     ( navigator.vendor == 'KDE' );
    if( !badOldBrowser ) {
      if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
        //IE 4, 5 & 6 (in non-standards compliant mode)
        xcoord += document.body.scrollLeft;
        ycoord += document.body.scrollTop;
      } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
        //IE 6 (in standards compliant mode)
        xcoord += document.documentElement.scrollLeft;
        ycoord += document.documentElement.scrollTop;
      }
    }
  } else {
    //total failure, we have no way of obtaining the mouse coordinates
    return;
  }
	
  	
  element = document.getElementById("powiekszenie");
  element.style.left =xcoord+10;
  element.style.top =ycoord-40;	
}

document.onmousemove = alertCoord;
var myinterval = '';
function clear_p(){
	x = document.getElementById('powiekszenie');
	x.style.display = 'none';
}
function hide_p(){
	myinterval = setTimeout("clear_p()",30);
	//x = document.getElementById('powiekszenie');
	//x.style.display = 'none';
}

//myinterval = setTimeout("clear_p()",30);

function show_p(symbol,nazwa,kk,ks,ikona){
	clearTimeout(myinterval);
	x = document.getElementById("powiekszenie");
	x.innerHTML = "<div id='symbol'><img src=\"pic/ico/min/"+ikona+"\">"+symbol+"</div><div id='nazwa'>"+nazwa+"</div><div id='kursy'>Kurs kupna: <b>"+kk+" zł</b><br />Kurs sprzedaży: <b>"+ks+" zł</b></div>";
	x.style.display='block';	
}

function show_pw(nazwa,kk,ks){
	clearTimeout(myinterval);
	x = document.getElementById("powiekszenie");
	x.innerHTML = "<div id='symbol'><div id='nazwa'>"+nazwa+"</div><div id='kursy'>Kurs kupna: <b>"+kk+" zł</b><br />Kurs sprzedaży: <b>"+ks+" zł</b></div>";
	x.style.display='block';	
}
