
 var bObr=Array();
 var sObr=Array();
 var tempX = 0
 var tempY = 0

 function preloadImg(imgName,celkem) {

   sCesta="images/smaller/";
   bCesta="images/bigger/png/";

   koncovka=Array("a","b","c","d");

   for(i=0;i<celkem;i++) {

      sObr[i]=new Image();
      bObr[i]=new Image();
      sObr[i].src=sCesta+imgName+"-"+koncovka[i]+".jpg";
      bObr[i].src=bCesta+imgName+"-"+koncovka[i]+".png";
      };
   };
   function switchImage(target,order) {
      document.getElementById(target).src=bObr[order].src;
     // document.getElementById(target).filters(0).src=bObr[order].src;
   };


   function showImageWindow(URL) {

      document.getElementById("nahled").src=URL;
      //document.getElementById("nahled").filters(0).src=URL;
      document.getElementById("okno").style.display="block";
      //document.getElementById("okno").style.top=(tempY-110)+"px";
      //alert(document.getElementById("okno").style.top);
      //alert(tempY);
   //nahled = window.open(URL, "", "fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=67,height=100")
   }

   function closeImageWindow() {
      document.getElementById("okno").style.display="none";
   }



// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.

var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) {  document.captureEvents(Event.MOUSEMOVE);document.addEventListener("mousemove",getMouseXY,true);}

// Main function to retrieve mouse x-y pos.s

function getMouseXY(event) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = event.pageX
    tempY = event.pageY
  };

  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  return true
}

